Data
I want to categorize it by counting the following pixels through HSV (Hue-Saturation-Lightness)
- dark blue
- blue
- green
- yellow
- red
To show RGB channels (source) without HSV
x = linspace(0,1, size(Map)(1));
figure(Fignr)
lw = 4;
plot( x, Map(:,1),'color',[1,0,0],'linewidth',lw,
x, Map(:,2),'color',[0,1,0],'linewidth',lw,
x, Map(:,3),'color',[0,0,1],'linewidth',lw,
x, mean(Map,2),'color',[0.7,0.7,0.7],'o')
xlabel 'fraction'
ylabel 'intensity'
end
where example showRGBchannels(1,summer(500))
gives
This is just an example about one mapping where you can see fractions of different colors Red, Green and Blue about one figure.
However, the color map must be extended to colors yellow, green and dark blue too.
You can assume that
- dark blue has value [0, 0.2)
- blue [0.2, 0.4)
- green [0.4, 0.6)
- yellow [0.6, 0.8)
- red [0.8, 1.0)
However, I think this is not way to go, since HSV can a good choice here.
I was also recommended to use other colors than Rainbow for the visualization (continuous red-blue, publication here).
There are many implementations to separate colors and argumentation about which color seem to use.
Let's focus here on RGB colors and their separation.
Possibly, through HSV or any other appropriate method not mentioned.
How can you categorize and count the appropriate pixels i.e. colours of the first picture through HSV?
Any classes and/or papers for it?
See Question&Answers more detail:
os