I need to count the number of pixels that fall into a color range

asked 2020-04-10 13:56:40 -0500

TWAAL gravatar image

Hi, I am working on a project where i need to be able to count the number of pixels of each color in a specific given photo. I am currently using color segmentation pyrMeanShiftFiltering() to separate the colors like this; given this image: image description I put it through the color segmentation 20 times like this: image description after the processing, the image looks like this now: image description

The problem i am having is that the processed image is blurry and the shades are still not uniform. I then painstakingly set thresholds for RGB of each of the 8 possible land types. Split the color image into RGB, then looped through each image and counted the number of pixels for each color. The results were very imprecise.

Does anyone have a suggestion for another method of finding the area of each region here?

edit retag flag offensive close merge delete

Comments

Inside inner circle or outside?

supra56 gravatar imagesupra56 ( 2020-04-10 22:08:52 -0500 )edit

I am only concerned with whats on the inside of the large yellow circle. But i have another function that takes care of this.

TWAAL gravatar imageTWAAL ( 2020-04-15 15:51:54 -0500 )edit