<< return to Pixycam.com

Image Processing Algorithm used on Pixy

Hi Guys,I am doing a paper on open source technology in vision based sensor applications for robotics. I am using the Pixy 5 and the Arduino Due. I would like to do more study on the image processing algorithm or model used by Pixy. I know it is hue-based but is it HSL/HSV? I would appreciate a pointin the right direction.

Thanks.

Michael.

Hi Michael,

You can find the source for the algorithm “here”:https://github.com/charmedlabs/pixy/blob/master/common/colorlut.cpp. It is based on HSV, but heavily weighted towards hue and saturation. Let me know if you have other questions.

Thanks.

Scott

HI Scott, thanks a lot. I have been through the code. I must say i am a complete Programming/coding newbie and the arduino is my first attempt at all this. What i wanted to find out is, is there any section of the code or the algorithm that you would be interested in me investigating to see how it can be enhanced? I could spend time doing that and possible credit that as my contribution to the project. Happy to hear what you think.

Regards, Michael.

Hi Michael,

Glad to hear you want to help contribute to Pixy! We don’t have any pending changes to be done to the color algorithm just yet, so I can’t really suggest anything. If you have any ideas or fixes that you see (how can we make it faster, how can we use less memory, etc.), feel free to work on those. We’re always open to suggestions.

I should warn you that since the color algorithm is the core function of Pixy, we’ll probably be very particular as to what contributions we accept. I don’t want to deter you from helping, but I also don’t want your hard work to go to waste if your end goal is to contribute code.

Good luck!

Scott

Hello Scott, thank you for replying. Well noted. Will let you know if i am able to come up with anything.

Regards,
Michael

Hi Scott. quick one: i’m trying to develop a distance algorithm for a project but im stuck on two points:

  1. what is the pixel-millimeter conversion used by pixy
  2. from an earlier post given my Rich i obtained a focal length of 2.7889mm for the standard pixy, is this right?

Hi Michael,

  1. See “this”:http://cmucam.org/boards/8/topics/2915 post. Scott Mahr (and others) has already looked in to this.
  2. I haven’t seen the focal length stated as 2.7889mm (do you have a link to his post?), but I know it is officially 2.8mm.

Thanks.

Scott