<< return to Pixycam.com

Change frame rate/resolution

I guess the Pixy out of the box is working on the default resolution 640x480 at 50 fps.
Any way to change it to 25 fps or other options?
Will this make this little guy to detect objects better?

Thanks!

Hi Ivan,

What kind of improvement are you looking for? More objects?

You can use @cam_setMode 0@ in Pixymon to get 25fps and a resolution of 1280x800. There wouldn’t really be any improvement in detection over mode 1, just a higher resolution image.

Scott

Hi Ivan,

I need to clarify my last post. Setting Pixy to mode 0 actually does not do anything for object detection (yet). When the default program is run (object detection), Pixy is automatically set to mode 1, so you’ll still be getting the smaller 640x400 images.

Scott

Hello,

would it be possible to remove the auto reset to CAM_MODE1 in function blobsSetup() in the next FW release?
I’m not interested in the higher resolution but in the lower frame rate of 25Hz, as in my i2c setup I’m suffering from a low data transmission rate. It would be a nice feature to double the number of blocks per frame by halving the frame rate in applications, where the transmission performance is the limiting factor. Would the change of the resolution have side effects to the detection performance?

I have just tried setting the light mode to CAM_LIGHT_LOW at low light conditions. Pixy raised the exposure time up to 160ms and the number of blocks I was able to read increased accordingly … nice, but of course, at a 6Hz frame rate with lots of motion blur pan/tilt is rather challenging (-;

Cheers,
Helmut

Hello Helmut,
Going into 2x (4x) higher resolution is challenging with Pixy’s memory limitations. While is might be possible, it’s not a simple change. I assume you’ve explored ways to increase the data rate. What platform are you using?

Edward

Hello Edward,
thanks for your quick response. I have kind of expected that increasing the resolution of the raw frames by 4 would have quite an impact on Pixy’s performance. So the PixyMon shell command cam_setMode() was for development purposes and is currently of not much use?
The platform I’m using is a fischertechnik TX controller, a device similar to lego mindstorms. The only provided interface is i2c with a rather low performance 5words/ms => 14 blocks/frame. Unfortunately it is a closed platform, thus there is no chance to improve this. But ~10 color objects per frame isn’t that bad and sufficient for a lot of applications.
cheers,
Helmut

Hello Helmut,
The cam_setMode command is of limited use, it is true. It is part of the camera API, which is why it’s exposed, but I can’t think of any use for it outside the firmware.

Edward

Hello,

I am not sure about the word ‘exposed’. Does it mean I can’t use ‘cam_setMode 0’ in Pixymon anymore? So do I have to change the firmware, if I want a 1280x800 resolution? If not, where do I have to set / type this in Pixymon?

Thanks
Robert

Hello Robert,
cam_setMode is probably fairly confusing, because you can set it, but it doesn’t affect the resolution that Pixy uses to detect objects. Pixy uses 640x400 resolution to detect objects regardless.

Edward

Is there any sense in changing the resolution used for the analysis in the firmware? Could you guide me to the files I should have a look at? 10fps would be fairly enough for me.
I have a project where I want to monitor colors / colorcodes of peoples headphones and need a range of at least 4meters or better 5m, but until now I just get 2,5 -3m. Setup is attached.

Robert

Hello Robert,
You’re correct in that it would require a firmware change, but going 2x (4x) higher resolution is challenging with Pixy’s memory limitations. While is might be possible, it’s not a simple change.

Have you tried to adjust the minimum block size?

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

It’s set to 20 by default. Try setting it to 1.

Edward

Yes I tried this and other things before. Can you give me any advice where to start looking in the firmware?
Is there a possibility to change the resolution that is send via i2c to 640 by 400 because this is just 320 by 200.

Robert

Hello Robert,
There are no commands to change the resolution in this way. If you want to start looking at the firmware, this file contains all of the color pixel filtering code for color connected components:

https://github.com/charmedlabs/pixy/blob/master/src/device/libpixy/rls_m0.c

Another approach is to change Pixy’s optics. Use a lens with a longer focal length, so Pixy can see farhter (at the cost of reduced field-of-view.) There are several messages on this forum that explore this possibility. Search for “M12”. In general, you want an M12 lens with a IR-cut filter and a focal length that’s greater than 2.8mm, which is the lens that Pixy ships with.

Edward