Go to Post Courtesy is the key. - Tom Schindler [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-02-2013, 20:42
jwhite jwhite is offline
Registered User
FRC #2823
Team Role: Mentor
 
Join Date: Feb 2013
Rookie Year: 2013
Location: Saint Paul, MN
Posts: 69
jwhite is an unknown quantity at this point
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   Spotlight this post!  
Unread 19-02-2013, 05:34
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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   Spotlight this post!  
Unread 19-02-2013, 08:19
jwhite jwhite is offline
Registered User
FRC #2823
Team Role: Mentor
 
Join Date: Feb 2013
Rookie Year: 2013
Location: Saint Paul, MN
Posts: 69
jwhite is an unknown quantity at this point
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.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:08.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi