Hi, I'm experimenting a little with computer vision, image analysis, feature detection, etc. This question is fairly involved and I've done all the googling/web research I can do, and it probably requires someone with at least little experience in this area -- maybe I'll get lucky (wish I could offer more than 500 points).
I'm trying to analyze a photo and pick out the shapes/objects within the photo. I've mixed and matched with the standard algorithms that are typically used for this (sobol, canny, others), and now I'm stepping back and crunching some basic numbers and just trying to apply some common sense.
I took a photo of a ball on a table (attached) and tried to imagine an algorithm to find the ball. It is the big region of orange in the middle, but the first problem is that it is not perfectly uniform orange, it has a shadow across it so that it is brightest at the upper left and darker at the lower right. It's all the same color but varying brightness.
So I thought, how do I normalize on brightness so that the computer sees a blob of uniform orange in the middle? Well, if I take the RGB data and transform it to HSL, well then perhaps I should see the "luminance" (L) change across the ball and the H+S will stay the same. Then the computer could just modify all the colors to have the same "L" of the HSL and then we will see a relatively uniform orange.
So I sampled some pixels and did the RGB->HSL transform by hand (tabulated and color coded, also attached), and found that it does *not* work like that. I thought hue and saturation, or at LEAST the hue, would be uniform across the ball. It is not, the saturation and hue both drop significantly as the shadow increases.
Out of curiosity I sampled some points from the regions of the picture from the back wall (gray-ish) and the table it's sitting on (beige). I started to realize that I couldn't pick out anything numerically similar between the groups of colors (orange ball, gray wall, beige table). I would have thought that the hue, or hue+saturation stayed the same while maybe the luminance changes with the brightness.
So... if that is not the rule, what IS the rule? What is the math that would group these sets of points together? Maybe there is some other transform other than RGB-HSL that makes it apparent? Obviously there is something, since it is IMMEDIATELY obvious to our eyes: those are orange, those are gray, and those are beige (of varying brightnesses).
Thanks very much for reading this far, and any thoughts. Like I said, I have already tried googling and web research, I probably need to hear from someone who has actually gone a little further down this road I'm *just* starting on.