@jeremydouglass I looked at your suggestion once more and I found this example for reference, so I think I know what you mean now: https://github.com/jorditost/ImageFiltering/tree/master/MultipleColorTracking.
You suggest I use to openCV library for processing to save the colors on different black/white channels, right?
One question is: How do I write to a openCV buffer from my own function? The example linked to does it with a build in function from openCV opencv.inRange
that filter the image based on the range of hue values. I would like to do it from my own “nearest pixel” function…