Laser spot processing
Laksmi from India  [4 posts]
13 year
Hi Baghdad_boy,

I'm sending two snapshots which was taken with no filter, camera settings: brightness(b) = 10,saturation(s) = 100,gain (g)=10. The RGB values on the info window correspond to one of the  brightest spots on the plastic bag, which are comparable to the laser spot values, (which is towards the top left corner of the bag).

Pls try with this. I've taken several shots with the b, s and g settings changed. I think the best combination is reduced b & g values and increased s value. Not tried with white balance & contrast. I'm doing all these through 'luvcview' on Linux and the webcam is logitech quickcam pro9000.

Thanks & Regards,

Anonymous 13 year

Do you know if luvcview is actually changing the camera values or just changing the image in software?

Don't worry about saturation, just keep that at a normal value otherwise the camera may bleed areas together. Further decrease the gain until the laser spot is the only visible light in the image. It should be the brightest thing in the image.

You can also try switching to grayscale (on the camera) as that may produce a better lighted image ( you don't really need color at this point since the idea is to detect the brightest spot in the image).

Anonymous from United Kingdom  [99 posts] 13 year
LUVCVIEW uses the SDL library and supports either MJPEG or YUYV encoding.  I have been fighting with this a bit as YUYV seems to encode the color information in a packed format.  IE it is a 422 format (intensity for every pixel but each pixel is only sampled in one color)  I imagine you know a lot more about this.  The SDL library also has a YUYV overlay that then does the interpolation to display a color image.   I have been just downsampling my images to get color information for every pixel by just doing 4 -> 1 and averaging the two color values to get an unpacked image that I can work with.

For laser tracking I have found that using a 100mW laser and just cutting on intensity channel work fine.   (I can split the intensity channel off the YUYV image very quickly and work with that)   You can do this in roborealm just as well and it should give good results.

hope this helps!
lakshmi from India  [2 posts] 13 year

Thank you for your valuable information.

I have been playing only with the MJPEG format and then a jpeg to ppm conversion is done(using a shell script which uses a convert function in IMAGEMAGICK).

And the laser source module is of less than 5mw only.

I'm considering the RGB values for finding the brightness. Do you mean to say that the better approach is to play with YUYV format for spot detection?

Awaiting for your valuable suggestions,

Thanks & Regards,
Anonymous 13 year
The YUYV format would probably not help you much in this case unless you just focus on the Y (intensity) channel as previously mentioned. Most people think that using color to detect laser spots with a webcam is the way to go ... from what we have seen it doesn't work very well. A better technique is to rely on the laser being the strongest light spot in the image. But in order to ensure that it is you have to tell the webcam to snap images really quickly so that not too much light gets into the image. When this happens the laser will normally be the lightest spot. If it isn't, then you can try changing the shutter or gain on the webcam, or get a brighter laser (higher power or diff color) or a different frequency (perhaps IR?).

As Baghdad_boy mentioned before, please include images. Perhaps an image with normal colors with a high shutter speed or low gain.

lakshmi from India  [2 posts] 13 year
Hi STeven,

Thanks a lot!!

I'm not sure if luvcview is actually changing the camera parameters or processing on the image. Am trying to get an answer.

And regarding the shutter speed, I can only minimize the gain and take shots. The brightness setting also should be kept at minimum, right?

I didn't understand the term camera bleed if saturation is increased. Can I keep this value at 30? For the two snaps I'd sent, the values were 100 for saturation and 10,10 for gain, brightness.

I'll again try using a more suitable set of values for camera settings. I think some pattern identification alongwith brightness would give a more reliable spot detection.

Why do you say that  colour detection doesn't work well?
Brightness plus colour can detect a spot more reliably, right?

Thanks & regards,
Anonymous 13 year
Yes, keeping the brightness to a min will help too.

Camera bleed is when a really colorfull pixel influences those around it to also become the same color even though they are not that actual color. Seems like 30 would be about right for the saturation. It just needs to be set to something where the image looks ok.

Pattern recognition? What pattern, all you have is a spot? So if you mean that spot detection is a pattern then yes, that will help.

Color is never a reliable form of detection as it changes based on what lighting is being used. Plus, as mentioned before the laser light center will appear white. You could check for a bright spot surrounded but a somewhat redder area but I would not rely on color any more than that. But there again, this is your project so feel free to experiment and see what works best!

waqar from Pakistan  [2 posts] 13 year
lakshmi HOW R U..

iam confusing,, my teacher assign me project " Courser Controll by laser light(Red spot) using webcam can you help me?
my mail address
plz contect me

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index