go_away

Author Topic: Weird mean color results on CMUcam  (Read 2028 times)

0 Members and 1 Guest are viewing this topic.

Offline Fredrik AnderssonTopic starter

  • Robot Overlord
  • ****
  • Posts: 216
  • Helpful? 0
Weird mean color results on CMUcam
« on: September 13, 2007, 02:03:27 PM »
I've been trying to tackle this problem for some days now. I had problems getting any good results from trace color. When i logged the mean color results instead i noticed that something wasn't right. The results i get seem to be ok at first, but after some seconds all i get is a value similar to this: Rmean: 254 Gmean: 254 Bmean: 254 Rdev: 131 Gdev: 131 Bdev: 135

According to the manual, Get Mean color should return values between 16 and 240 only. Changing the lightning in the room doesn't change the values.

So, what could be the issue? The batteries perhaps? Though according to my battery meter they seem to be in good shape. Could it be the lens focus? I'm not sure if it`s right adjusted at all cause i can`t connect the CMUcam to the computer directly and therefore not see any dumped frames... however, i have tried with different settings of the lens. Could it be infrared light that ruins the image? I read somewhere that infrared could ruin the image pretty well and will make the image look almost black and white. Though, i have tested with total darkness, and i still get these weird values.

Thanks in advance and have a great day,
Fredrik Andersson
Current project: Pirrh - Portable Intelligent Round Rolling Hexapod

Offline Fredrik AnderssonTopic starter

  • Robot Overlord
  • ****
  • Posts: 216
  • Helpful? 0
Re: Weird mean color results on CMUcam
« Reply #1 on: September 15, 2007, 04:50:44 AM »
Sorry if i`m sort of bumping here, but i really need help here... i just feel a really strong urge to help people myself, as developing an little CMUcam library for the Arduino community (and our beloved Admin here :P ). I`m not really good at electronics, it`s the programming that is my strong side. I've already come as far as knowing the problem isn't caused by the programming (because i used almost same code all the time :P )

I found this topic, which really feels it could be it:
http://www.chiefdelphi.com/forums/showthread.php?t=42199

So, the wacky values could be caused by too low voltage levels. I`m powering the camera through the 5v pin on the micro-controller. I know that the manual recommends using 6-9v for the camera, but as the camera actually has an voltage regulator to 5v and as the serial communication seems to be working better using the 5v pin instead of the 9v pin, i use it. Could this be it? Though it worked somehow well the first tests...

Have a great day everybody,
Fredrik Andersson
Current project: Pirrh - Portable Intelligent Round Rolling Hexapod

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: Weird mean color results on CMUcam
« Reply #2 on: September 15, 2007, 08:04:17 AM »
Please explain in more detail how the board are powered. I feel that something is not properly connected. Are you using batteries?
Check out the uBotino robot controller!

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,632
  • Helpful? 169
    • Society of Robots
Re: Weird mean color results on CMUcam
« Reply #3 on: September 15, 2007, 12:52:41 PM »
What about your autogain and autowhite balance settings?

How are you getting these readings?

Try hooking it up directly to the PC java GUI and watch what your camera sees as you get these values.

Offline paulstreats

  • Supreme Robot
  • *****
  • Posts: 1,381
  • Helpful? 21
Re: Weird mean color results on CMUcam
« Reply #4 on: September 15, 2007, 04:20:34 PM »
If the camera has a built in 5v regulator, then you may have to provide more than 5v for it to work.

A normal 5v regulator needs around 7v to work (it will not work on a 5v input) so this may be the same for the built in one on the camera.

Obviously the higher voltage you supply to the regulator on the camera, the hotter it will get and so the hotter the camera circuit will get....

Also, if you are powering the camera through a pin on the microcontroller, it may not produce enough amps to power the camera. (I assume that you mean you are using a digital output as a pure power source.)

 


Get Your Ad Here