mattnedrich / MeanShift_py

Simple implementation of mean shift clustering in python
MIT License
293 stars 100 forks source link

mean_shifter.cluster issue #1

Closed Rana-Mahmoud closed 7 years ago

Rana-Mahmoud commented 7 years ago

In the Attached screenshot , I had this error when i added my image to try it . pointshape_issue

mattnedrich commented 7 years ago

The mean_shift.py cluster function is expecting the points passed into it to be a NumPy array. Line 20 in mean_shift.py is calling .shape on the passed in points to get their dimensionality.

What is the value of points in your code on line 20 of mean_shift.py? I think open cv imread may return a NumPy array (what my code is expecting), but I'm not sure. From your error message it looks like points is a NoneType which makes me think that the cv2.imread call is failing.

Rana-Mahmoud commented 7 years ago

Thanks a lot Mattnedrich , the problem was in the image path , but now I cant display the results of clustering !!

displayclustering results

mattnedrich commented 7 years ago

closing