Reputation: 31
Is there a way that compares histograms but for example white color to be excluded and so white color doesn't affect onto the comparison.
Upvotes: 0
Views: 871
Reputation: 5649
White pixels have Saturation, S = 0
. So, it is very easy to remove the white pixels from being counted while creating histogram. Do the following:
BGR
to HSV
HSV
image into three individual channels i.e. H
, S
and V
S
and if the pixel value = 0 (means S = 0) then it mean that it is a white pixel.Summary: you just need to find white pixels by checking their Saturation value, which is S = 0
.
PS: Have a look at this link to understand the HSV model.
Upvotes: 1