To preface: sorry if this is the wrong subforum, not sure if this would fit better in programming (not really programming related either though).
This year we are using a CMUCam5 Pixy for vision… and it works well, but white balance and auto exposure seem to reset or change after turning the robot on and off.
In PixyMon, disabling auto exposure, auto white balance, and auto white balance on startup cause the Pixy to stop getting a video feed. Any ideas? Is there a way I can set the exposure/white balance manually in a config file so we don’t have to worry about calibrating before every match?
Thanks in advance
If this information helps: the Pixy is wired to an analog port on the Rio, and using the 5v power from that. We need camera brightness (in PixyMon signature pane) to be very low to take advantage of the reflective tape/LED ring.
I’ve never held a roboRIO, but I know a fair bit of GNU/linux.
If you’re looking to go the automated, linuxy route, what you’d do is make a script that sets the camera settings you want, then make that a start up script.
Script to set camera exposure:
First, you’ll need to install v4l2-clt (video for linux 2, command line interface)
What I do not know is if after you set these, they stick when you close the program that set them. If they do, the later part of what I wrote above still holds, just you’d call an executable that sets the pixy’s settings instead of a shell script.
Connect to the Pixy with Pixymon and enable all 3 boxes in that camera pane (the exposure and white balance boxes). Next set your camera brightness where it needs to be. Ours is set to 22 for both Pixys on our machine. For whatever reason, I can only get the camera brightness to adjust if the auto-exposure is still on. Now set your color signature. Now un-check all 3 boxes in the camera tab.
Now the weird step: check the Auto White Balance box for a couple seconds an then un-check it. The Charmed Labs folks tell me this stores the white balance setting to Pixy’s flash memory. All 3 boxes in the camera tab should now be un-checked.
If I have remembered all of this correctly, your Pixy settings are now non-volatile and will still be there on power up.
We are using pixy cameras as well. Ken’s method of setting is what we had to do as well to set the camera up. Once set it remembers the settings even on power up.