<< return to Pixycam.com

Improving Detection Accuracy with Arduino

Hi,
my Problem is, that i want to follow a white line in different lighting conditions. Following the line is working fine so far if i adjust my values manually following this guide:
http://www.cmucam.org/projects/cmucam5/wiki/Some_Tips_on_Generating_Color_Signatures_2

What i would like to do now is writing an algorithm, that is automatically adjusting those values before my line following code is running. So my problem is - do i have a possibility to change those values by writing code in Arduino and how do i do this if it’s possible?
If that’s not possible - do you have any other ideas for my problem above?

Thanks for your help!

Hello Benjamin,
Pixy’s “color connected-components” algorithm works with objects that have a specific hue (color). A white line has no hue and Pixy will have trouble picking it out from the background. Can you use a colored line?

Edward

Hi Edward,
My use case is following a line in a track and field stadium, so using another color will not be that easy. I thought about lighting the line with some green LED but i did not realise this yet. Do you think this will make things much easier?

But the line following is working also with the white line without any problems, if i adjust it with PixyMon before i start running the line following. So if i could adjust the values from PixyMon via Arduino i think everything will work fine.

Hello Benjamin,
Perhaps the white line has some hue component, yellow or red that Pixy is picking up on.

Using a green LED is an interesting idea, but my best guess is that it will confuse Pixy more than help. Green light will tend to make everything appear green! But I’m just guessing and I’ve been wrong before. I think it’s an idea worth exploring.

Edward

The lighting green did not help me to get constant lighting conditions. So my problem is still remaining. To be clear - the detection of the white line is working VERY good! My problem, is that i have to adjust the parameters with pixymon every time before i can start and i would like to adjust those parameters automatically with my arduino.

So again my question - can i adjust the parameters i have in pixymon directly with my arduino?

Hello Benjamin,
You can adjust some parameters, like camera brightness from the Arduino.

http://cmucam.org/projects/cmucam5/wiki/Arduino_API

But bear in mind that when you adjust parameters (like signature range), you are being a smart human and the Arduino will have trouble making effective adjustments. (assuming it was supported.)

I suspect that Pixy is picking up on a small hue component in the white line, but it sounds like it’s sensitive. Anyway, I’m not sure if any of this is helping. (sorry) :frowning:

Edward