This was the preparation part for images and now we are ready to go on with clustering. Besides, it is hard to deal with 3-D Matrix that’s why we reshape() image and make it 2-D Matrix data. But, we won’t need row and column information separately. Now we have 3-D parameters in our image data: row number X column number X colour channel number. But we want Red-Green-Blue as our image color channel, so we convert it to the required channel using cv2.cvtcolor() function. Once the image is read using cv2, our image color channel comes to us as Blue-Green-Red. The other libraries that I have used NumPy for numerical arrays, Matplotlib for visualizing my result, Sklearn for machine learning.įirst we will read image data using cv2.imread() function from OpenCV as cv2. Project DetailsĪs, I have mentioned previously I used OpenCV library for image processing with Python3 for this project. Examining the centroid feature weights can be used to qualitatively interpret what kind of group each cluster represents.įor more information you can read this blog post. The “Choosing K” section below describes how the number of groups can be determined.Įach centroid of a cluster is a collection of feature values which define the resulting groups. ![]() Rather than defining groups before looking at the data, clustering allows you to find and analyze the groups that have been formed organically.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |