Software > Software

Weird mean color results on CMUcam


Fredrik Andersson:
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

Fredrik Andersson:
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:

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

Please explain in more detail how the board are powered. I feel that something is not properly connected. Are you using batteries?

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.

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.)


[0] Message Index

Go to full version