Here is the breakdown.
Open the demo panel, but not subVI panels. The example defaults to 320x240 with 2x2 decimation and both the image mask displays on.
With those settings and a target in view I get a little above 6 fps. If I turn off the display (by turning on gimbal tracking), I get 10.5. If I turn off the mask (by hitting the button below the mask, next to the fps) I get 11.5.
If you do not get these numbers there are possibly some things on your camera that are not set correctly. The ones I know of are – you don’t have an FRC/FRC account because the camera setup utility wasn’t run. This causes twice the comms setup overhead before getting an image. Connect to the camera using a web browser and log in with FRC/FRC. If it doesn’t work, run the camera setup or create the account by hand.
Another camera issue is if you set the compression near 0 or near 100. The default is 30. Near 0 or 100, the camera pipeline doesn’t seem to be able to keep up and you will get lower frame rate.
Another issue is if you are in a dark room. To get a decent image when there isn’t much light, the camera has two choices, expose the sensor longer, or increase the gain on the sensor to amplify stuff. The default setting for Exposure Priority is None which lets the camera decide. If you think this is your issue, you can set it to Frame Rate. The images may be noisier since the sensor noise will be amplified. The other option is to move to somewhere with more light.
If none of these get you similar issues, please post so that we have a reasonable baseline.
Here are the effects of image size and decimation. Both image display and mask are turned off.
Small (160x120)
1x1 decimation, No tgt in view : 20
2x2 decimation, No tgt in view : 24
1x1 decimation, One tgt in view : 16
2x2 decimation, One tgt in view : 19
Medium (320x240)
1x1 decimation, No tgt in view : 12
2x2 decimation, No tgt in view : 15
3x3 decimation, No tgt in view : 15
1x1 decimation, One tgt in view : 9
2x2 decimation, One tgt in view : 12
3x3 decimation, One tgt in view : 13
Large (640x480)
1x1 decimation, No tgt in view : 3.5
2x2 decimation, No tgt in view : 3.7
3x3 decimation, No tgt in view : 4
1x1 decimation, One tgt in view : 3.3
2x2 decimation, One tgt in view : 3.7
3x3 decimation, One tgt in view : 4
These are all taken with the panel open and with the servos running. Clearly you may have more I/O running than this, and if there is no delay or too small a delay, you could clearly have little CPU left to do vision.
Greg McKaskle
Greg McKaskle