<< return to Pixycam.com

Low video resolution when sampling with Arduino

I need to get the position of a blob and send that to my arduino. Using the “hello world” example and looking at the FOV it doesn’t appear that I’m getting full VGA resolution, but the downsampled 320x200 resolution discussed here: http://www.cmucam.org/boards/8/topics/3570 When the blob’s location is outputted I never get anything more than 320 pixels wide. Could this be due to running the default program on power up? I haven’t changed the start command; is “runprogArg 8 1” a downsampled feed?

Hello Scott,
You are right, the numbers sent over SPI are 320x200. It’s because the of way the color blob algorithm does color interpolation.

The start command “runprogArg 8 1” is a command that PixyMon sends to Pixy to get it into Cooked Mode. In Cooked Mode, Pixy sends raw video at 320x200 resolution and PixyMon processes the video and overlays the processed video info ontop. It doesn’t affect the resolution you are getting when running the default program.

Hope this helps!

Edward

When I check outside of Pixymon using the arduino I never get an X value of more than 320 though. High resolution isn’t super critical for my project but I’m curious as to why I’m not getting 640x400 even when running independent of a live video feed.

Hello Scott,
When in raw or cooked video modes, the resolution is 320x200 because there isn’t enough RAM on Pixy’s processor to store a larger frame. (We need to store the frame in RAM for it to be streamed over USB.)

When you are in default mode, Pixy is performing a color interpolation of the 640x400 frame. The color interpolation is a nearest neighbors algorithm, which grabs the nearest color to get an RGB value. The result is that the largest x value is 319 and the largest y value is 199. In default mode, it’s not a scaling that takes place (like in raw and cooked video modes). I realize this is a subtle difference, and I hope it sheds some light on what’s happening.

Edward