<< return to Pixycam.com

Determining most dominant color in the captured image

Hey guys!
Is it possible, and if so, how difficult would it be to modify to add additional commands to pixy API? I want to be able to ask pixy what is the most dominant color in a image. I want to be able to ask pixy if its looking at a white wall. Is it possible to ask pixy to roughly count the number of white pixels and return it via I2C? Where is the raw R-G-B data stored?

Thank you!

Also, Im using pixy in a swarm robotics project here at Georgia Tech. My advisor was curious if you guys would be interest in collaboration.

Best,
Vadim.

Hi Vadim,

Yes, it is definitely possible for you to modify the firmware to add to the API and detection functionality. The device firmware is “here”:https://github.com/charmedlabs/pixy/tree/master/src/device. The raw image data is stored in the “SRAM1 memory bank”:https://github.com/charmedlabs/pixy/blob/5d3d0fd6dba062eb72538e46e0151a05af098395/src/device/libpixy/exec_m0.c and shared between the M0 and M1 cores.

If you’d like to talk collaboration, please email me at [email protected] and I’ll forward your request.

Let me know if you have any other questions about how you’d like to modify the code. Good luck!

Scott