that I am putting color counts in. The structure is as follows:
color_map[blue][green][red]
Which gives me the amount of pixels seen that have that color. This works great but is not what I really want to do. I don't want to expand my map if that color doesn't exist in the image, but I don't know how it set up an iterator for the map. So how would I?
would do it for me. Oh and why are you using const_iterator instead?
@ne555
I would really like to know how that second part if that struct works, It would make things so much simpler if I knew what was going on there. The first part I actually have in my code as:
1 2 3 4
struct pixel
{
unsignedchar values[3];
};
Oh and btw I am working with bitmaps so they are read from the file as bgr, not that it matters much.
Actually the function exists in order to use the map.
An easy way will be comparing component by component, like you were doing in the original post (first blue, then green and last red)