<< return to Pixycam.com

Using Pixy to decode color values

Is it possible to have the pixy provide the raw color information for a given window? I would like to evaluate using the pixy to do color decoding in a controlled environment, but require the color information for further processing.

Hello Sean,
I’m not sure what you mean by “raw color information in a given window”. You can access the raw bayer pixels in PixyMon – is that what you mean?

Edward

I would like to determine whether or not it would be feasible to use the pixy in a controlled lighting environment where I can extract raw color information (ie RGB values) from a sample. I would need this information in a digital format that I can pass to a microcontroller for further analysis. I understand that you would have to do the color processing somewhere in firmware in order to detect if an object matches one of the preset color signatures, so I am wondering if it is possible for me to leverage that code somehow to get the color information “real-time” and pass that to a microcontroller.

Hello Sean,
If your microcontroller has USB and runs Linux, you can use libpixyusb to grab raw frames and get the raw pixel values this way. If you are using one of the serial interfaces (SPI, I2C or UART), you can’t grab raw frames because these interfaces tend to be slow. You can modify the firmware though, so Pixy will send the data you’re interested in. This requires some embedded experience however.

Hope this helps!

Edward

I will look into the libpixyusb, do you have any tutorials for this? Ultimately, I would be looking to interface to the pixy via SPI, I2C or UART. So I would be looking to modify the firmware. I do have embedded experience, so that should not be an issue. Please advise a good starting point for doing this.

Hello Sean,
This page describes how to build libpixyusb:

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

And this page is the best place to start for digging into the firmware:

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

Edward