3 ms·
It would probably be better to use the Lab color space, and then you only have to look at the a channel (which is the transformation of color between red and gr
by lettergram 10y ago
It would probably be better to use the Lab color space, and then you only have to look at the a channel (which is the transformation of color between red and green).
I used this to great effect in edge detection because the Lab color space is based on eyes. Just changing images from RGB to the Lab color space increased the accuracy of edge detection (particularly for red/green items) by about 7%: http://austingwalters.com/edge-detection-in-computer-vision/ http://austingwalters.com/edge-detection-in-computer-vision/
Further, I used this color space to design a super accurate fiducial marker (and QR code)[1], that can be used to store a lot more information, easier to track, etc.
I believe the grad student I was working with was going to publish a paper at some point. For what ever reason I wasn't involved with the paper and the paper doesn't appear to be published yet.
The HSV color space separates out hue and saturation, which helps remove the background noise, but it would have trouble with overlapping circles or circles where red and blue say mix to make purple. Converting to the Lab space would actually help distinguish overlapping colors as well.
Here's a link to my work: [1] http://austingwalters.com/chromatags/ http://austingwalters.com/chromatags/
- Cyph0n 10y agoWish I had known this when I wrote a program that tracks a human wearing a shirt with a green square on it! The biggest issue with HSV was that it required a ton of tuning to compensate for ambient lighting conditions. Would Lab help with that, say by taking some range in -a and considering all of L? Or is that a separate problem entirely?
- lettergram 10y agoThe L in Lab represents "light" (saturation). By removing or not looking at that channel, you are essentially looking at the normalized color channels. Look at the a channel (red to green) and b channel (yellow to blue) to get the color of the images. This essentially removes lighting conditions, although obviously lighting conditions still impact the image to some degree, from the camera and original RGB image.
- jayjay71 10y agoThe L in HSL stands for lightness, and is similar to the L in Lab which also stands for lightness. Lab is meant to better represent how humans perceive color, but it's not inherently better for removing ambient lighting compared to HSL. The main difference between HSL and Lab is how good they are at distinguishing specific colors, and Lab tends to work better for things regarding human perception. I've always had better luck with HSL than Lab, but I tend to just try every color space when approaching a new problem. Also, removing glare and other lighting abnormalities is one of the banes of computer vision. To the best of my knowledge, nobody has figured out a good way to do it yet (although I've seen some promising work on dealing with occlusion, which you could use to overcome moderate glare with proper segmentation).
- mynewtb 10y agoLight intensity/amount, not saturation unless the word has a meaning I don't know.
- lettergram 10y agoLight is more correct, but in the terms of HSV or RGB when you decrease saturation it changes the colors to white/black respectively, essentially decreasing the separation between colors.
- Jack000 10y agocan you expand on why RGB wouldn't work? The most obvious way I can think of to include chroma information in apriltags would be to use 3 colors matched to the peak sensitivity of each channel. Does the RBG spectral sensitivity overlap too much for this to work?
- lettergram 10y agoThe RGB color space works, it just has light encoded in each channel (making it unnormalized). Separating out the light, i.e. normalizing on the color is what gives LAB the advantage. Further, because the way RGB is structured taking the difference between channels is more difficult (requires more calculations) than it does for the a & b channels. For instance, the a channel represents red to green, or positive a represents red and negative a represents green. This aids in finding edges between red and green with a simple addition/subtraction between pixels(a[i,i] - a[j,j]). If we were to try the same thing in the RGB space it would look something like (R[i,i] + G[i,i]) - (R[j,j] + G[j,j]), and you would still have the impact of light to deal with...
- jamessb 10y agoThere has been previous work that was similar to what I think you mean (and predates AprilTags) [1]. The idea is to use markers that are grids, with each cell colored either red, green or blue; tag detection is then done by finding the rectangular region of the image over which the average of the RGB contrast function [2] is maximised. Thus tags are detected based on color without having to do edge detection across the whole image. [1]: http://www.alexwg.org/publications/ProcSPIE_6623-662304.pdf http://www.alexwg.org/publications/ProcSPIE_6623-662304.pdf [2]: at a single pixel, this is sqrt((r-g)^2 + (g-b)^2 + (r-b)^2))