I have an RGB image in 2D.
I would want to create groups of pixels that have the same color (RGB value); they are read from left to right and then from top to bottom.
When the current pixel has an RGB value different from the previous, it means I found a group (which contains previous pixels).
I know there are the CImg functions CImg_for2x2(img,x,y,z,c,I,T)
but the problem is that it works only on the channel c
, whereas I'm interested in the RGB value. Doc: http://cimg.eu/reference/group__cimg__loops.html#lo6
Do you know if it's possible to tell "CImg" to understand that I work with RGB value and not only red's value, e.g.?