color percentage in image
I am beginner in OpenCv and I need your help how I can find a percentage of brown and yellow color in the picture when I ignore the white background
I am beginner in OpenCv and I need your help how I can find a percentage of brown and yellow color in the picture when I ignore the white background
Consider using k-means clustering to split the pixels of the image into distinct clusters based on color. In this case, you'd probably want to use k=3, i.e., 3 clusters (one for the white background, one for the brown, and one for the yellow). Then it would simply be a matter of counting the number of pixels belonging to each cluster label.
OpenCV seems to have a k-means method, though I'm not familiar with it. You may want to check out the scikit-learn k-means method instead.
Asked: 2018-10-27 12:01:53 -0600
Seen: 532 times
Last updated: Oct 27 '18
Area of a single pixel object in OpenCV
how to understand which functions available in python bindings?
Problems installing opencv on mac with python
build problems for android_binary_package - Eclipse Indigo, Ubuntu 12.04
OpenCV DescriptorMatcher matches
Can't compile .cu file when including opencv.hpp
read this tutorials