I am considering to use OpenCV\'s Kmeans implementation since it says to be faster...
Now I am using package cv2 and function kmeans,
I can not understand the pa
The problem here is your data_1.transpose
is not a numpy array.
OpenCV 2.3.1 and higher python bindings do not take anything except numpy array
as image/array parameters. so, data_1.transpose
has to be a numpy array.
Generally, all the points in OpenCV are of type numpy.ndarray
eg.
array([[[100., 433.]],
[[157., 377.]],
.
.
[[147., 247.]], dtype=float32)
where each element of array is
array([[100., 433.]], dtype=float32)
and the element of that array is
array([100., 433.], dtype=float32)