How-To: VoDisplay + VoCam = Awesome
If you follow this blog, you can probably tell that we've been enjoying playing with the VoDisplay lately.
We're wanting to add the VoCam + VoDisplay as an auditing step in our shipping processes, so we're looking at a way to take a picture and verify it without needing a full-sized monitor for this purpose at each shipping station.
This turns out to be pretty easy, by coupling what we've done on previous VoDisplay blog posts along with a couple of new things. After going through the previous blog posts, the next step is to install fswebcam:
sudo apt update
sudo apt install fswebcam
Next, make sure your VoCam (or other webcam) is plugged in. The VoCam is capable of 1920x1080 while many other webcams are not. Make sure you adjust the resolution to fit the capabilities of your webcam:
fswebcam -r 1920x1080 -D 0 -S 30 -s brightness=-8 --png 0 test.png && gm convert test.png -flip -resize 800x480! -rotate 270 PNG24:test2.png && gm convert test2.png test.bmp && sudo vodisp bitmap test.bmp
Here are explanations of the fswebcam options we used - feel free to fiddle with more options:
-r (resolution of image to capture)
-D (delay before taking picture in seconds - This is helpful with some webcams that need a little time to initialize)
-S (how many frames to skip - Again, this is helpful if the camera takes some time to settle its optical settings after initialization)
-s (after running fswebcam --list-controls the user can adjust any of the controls using the name of the available control, an equals sign, and the new value - in this example, we are adjusting the brightness by -8, making the resulting image a bit darker)
--png (output the image as a png file with a quality setting of 0 - we haven't noticed much of a difference with changing this value)
If the goal is to use the Raspberry Pi Camera, fswebcam may be substituted with raspistill. Make sure you have the PiCam enabled using the raspi-config option, "Enable Camera".