<< return to Pixycam.com

save parameters

hello everybody,

when the signatures are set, in which memory area are save the colour parameters i set? for example, when i teach a green signature to pixy, this informations about color set are store in memory?

also, are there something system to stabilize the brightness, because often the color suffer change, particularly durin the day for example if i set the signature in the mornig, this suffer change in the afternoon! someone find a method to compensate that change?

Hello Gianni,
Yes, Pixy saves the color signature data in its flash so it will remember it the next time it powers up.

Sometimes the “color temperature” changes as you describe. One way to compensate is to readjust the white balance in the afternoon so your color signatures will continue to work. There is some information on how to do this here:

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

(look for the section on White Balance)

Edward

Hi Edward,

How i can set the WB by code? the syntax of setWBV function are: pixy.setWBV(…)? what are the parameters of this function?

is like setBrightness?

Hello Gianni,
For setting the white balance, we recommend using the white button to get into AWB mode to “reset” the white balance. There is some more information on how to do this here:

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

We do have hooks in the code for setting white balance if you are using libpixyusb: cam_getWBV and cam_setWBV if you want to get and restore the white balance. Pixy doesn’t support these through the serial interfaces though (SPI, I2C, UART).

Edward

hi Edward,

ah ok, but why brightness could be set though SPI and WB no?

Edwar, with the setup of Brightness only, do you think could be enought to compensate the temperature colour during the day?

for example if i set by function the brightness during the day, so by setBrightness every tot time could be a good idea to avoid the ridefinition of signature? have you ever been in this situation?

Hello Gianni,
Setting the brightness won’t change the color temperature. I have been in your situation and I used the white button to reset the white balance. It’s a fairly easy and quick operation. Have you tried to see if it helps your situation?

Edward

hello Edward,

ok understand, yes i try, but i was looking for a method to try to make it “automatic”, another two questions:

  1. why comand getBrightness with arduino can’t be called? for example pixy.getBrightness(); tell me error: ‘Pixy’ has no member named ‘getBrightness’

  2. how can i access to flash to read the colour code store in her? is this the source responsable of capture and save the colours captured?

sorry but as you can see i’m a beginner about programming!

Hello Gianni,
There is currently no getBrightness() method in the Arduino/serial API. Regarding accessing the color code in flash, you can save them through the file menu:

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

But I think I’m not understanding what you are trying to do here. In your original message you were having problems with consistency between morning and afternoon lighting. This can be caused by a shift in color temperature, in which case you can reset the white balance with the white button.

If this doesn’t fix things completely, there are other ways to remedy, such as making the color signatures more inclusive by increasing the signature range. There is more information on how to do this on this page (toward the bottom).

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

Edward

hello Edward,

yes, i had a problem with the consistacy of coluor, and i try to change the brighness of camera automticaly by the day, for example by RTC module at tot time the sw set the brightness itself, and it sorted a small improvement, it’s a temporary solution! because as you said it isn’t a best way to do this even if i got an acceptable result also with increase the signature range!

the other thing i try to do, was to “supple” the colour, i was asked were pixy store the colour i teach her, because i was think about to redifine the colour to search by code, for example by function i write to flash mem. the RBG code of colour i want to find. well i save in a function some RBG code for example 255 128 29 and whe i call the function it push in the flash the new colur that pixy must find!

Hi Gianni,
It sounds like you would like to save off the signatures and recall them for later. This makes sense. So right now there is no way to do this, although we have received requests for being able to load and store signatures like you describe. We haven’t figured out how best to provide this feature, but thank you for the detailed description of your problem! It will help us find a good solution.

Edward

Hello Edward,

of course; the problem is how to write to flash while pixy isn’t connect to pixymon?

another question, i saw that the only sw to build pixy fmw is keilMDK, but i also read you are next to release, there are no news about it?

Hi Gianni,
The GCC version of the firmware is in testing. It works, but we’re still receiving feedback.

Edward

It might be possible to use a photocell with led lighting to correct this issue. If you capture the photocell readings while teaching pixy the color, it would be possible to adjust led lighting automatically to compensate for your environment lighting.