Added get_threshold_dots function.
Added image_to_matrix and get_optimal_clusters (not correct yet) functions.
Added get_same_kind_set function.