go away spammer

Author Topic: CMUcam autoadjust to shadows  (Read 2060 times)

0 Members and 1 Guest are viewing this topic.

Offline airman00Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
CMUcam autoadjust to shadows
« on: November 09, 2008, 09:30:19 AM »
So heres my problem: I have the CMUcam ( version 1) and I'm trying to figure out how it adjusts to the light. My robot which has the CMUcam on it will be going through shadows as well as regular indoor fluorescent light (not sunlight). Will this sudden change cause a big problem to my CMUcam processing. Like lets say I am tracking red and the all of the sudden I go in the shadows , would the tracking be way off ?

Lets say I have the auto adjust on, would i gradually adjust or would it adjust after 15 seconds in one shot. I am saying 15 seconds because it says in the manual that it takes 15 seconds to adjust from power up. I really don't know the auto-adjust  time after its powered up and between light to shadows.
Check out the Roboduino, Arduino-compatible board!

Link: http://curiousinventor.com/kits/roboduino


Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: CMUcam autoadjust to shadows
« Reply #1 on: November 12, 2008, 03:20:26 AM »
First, test the bot in shadows and see what happens . . . it might not be a problem.

Now, there are two auto adjusts:

auto-whitening - this controls the brightness of the image

auto-contrast - this improves the difference between colors based on thresholding

As you mention, this auto changing will affect your calibration on which color to track . . .

What you want to do if you expect shadows is to operate in YUV space (not RGB space). YUV has green, blue, and brightness as the pixel values. Shadows in theory will only affect the brightness, so you can just ignore that value.

Look at the chart at the top right here:

If V is above 0 and U is below 0, then your camera is tracking red.

That page also has an RGB to YUV space converter equation if the CMU cam doesn't have YUV (I'm sure it does but I'm too lazy to look up the datasheet).

Another option is to write a clever program that can detect shadows and then choose another threshold value(s) for red.


Get Your Ad Here