|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Axis Vision hue / threshold / white balance experience
One of my student programmers requested that I post a what we have learned about the C++ vision tracking process in case it helps anyone else.
We initially had a 206, which we later swapped out for an 1101, thanks to the incredible kindness of 1816. We were having a lot of trouble with it and the Smart Dashboard, which may have just been the Smart Dashboard: http://www.chiefdelphi.com/forums/sh...d.php?t=113519 The 1101 now seems to be working well. We have a green led light that we shine, and try to find the reflections using the C++ vision sample code. Our first struggle is to just make the image coming from the camera match the sample images provided in the sample code; we initially spent a lot of time fiddling with the camera trying to make the reflected image 'green'. We find that every environment we go to has different lighting conditions, and we literally have to adapt the camera for each one. What we now do is load up the camera and play with the exposure and white balance settings until we feel we've got a good, strong color. It can be green, it can be blue-green; we don't care. Then we take a screen shot of it, and throw it into MS Paint. Using the eye dropper, we pull out the Hue (using edit colors). Then, in the code that constructs the threshold, the first two terms (default 60,100) bracket the Hue. We find that our light sometimes ends up looking more blue than green, which is a Hue more like 120. So for some lighting, we end up with a hue range more like 75,130. We haven't really played with how narrow we can make the band and still have things work. Cheers, Jeremy |
|
#2
|
|||
|
|||
|
Re: Axis Vision hue / threshold / white balance experience
That calibration process sounds like it works, but you may want to check the setting on the camera. If you choose a fixed white balance, you should see the hue change less. The light returned to the camera should largely be due to the LED ring, and they should be pretty stable. But auto-adapting white balance code running on the code is constantly trying to identify and adjust for lighting that it not quite white. For image processing, consistent is better than pretty, so set it to something like Fixed Fluorescent one. You may also want to do this to exposure so that saturation doesn't change so wildly.
Greg McKaskle |
|
#3
|
|||
|
|||
|
Re: Axis Vision hue / threshold / white balance experience
Right. I think the point is that in our test environments, when we mount the high target high, it would inevitably be directly in line with a fluorescent bulb. This gives the camera's white balance code fits In fact, in one space we used, we also had shifting daylight affecting the white balance. We spent hours fiddling with the settings, particularly the white balance settings. Our initial mistake was to focus entirely on trying to make the image green. In some cases, that was impossible. Realizing that we could choose the setting that gave us the best image, and adjust the threshold constructor to match was a break through for us.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|