Reputation: 11
I was looking for the answer and I find this code for calc the centroid coordinates:
from skimage.measure import regionprops
regions = regionprops(segments)
for props in regions:
cx, cy = props.centroid # centroid coordinat
So, what I need to do with this centroids to calc the dominant color in python? In other hand, I was thinking about use K-means with Opencv to obtain it but I'm confusing...
My intention is representing the dominat color feature from each superpixel for each color channels like b,g,r, h,s,v, l,a,b, l,u,v...
I'd like to have some help to resolve it. Thanks a lot
Upvotes: 0
Views: 149