-
Too dark? Too bright? Tweak it!
10/04/2020 at 02:26 • 0 commentsI am currently testing v1.30 of the new firmware. It allows you to tweak all factors related to the webcam if your image is too dark or too bright. It can even do some unimpressive emboss filters to your webcam... if you're crazy enough to do it.
Customizing camera settings
Override camera settings temporarily:
Log in to the debug interface. Then list all tweakable parameters:
/usr/bin/v4l2-ctl -L | less
Then you can directly apply parameters on the fly:
/usr/bin/v4l2-ctl -c auto_exposure_bias=15 /usr/bin/v4l2-ctl -c contrast=0
Override camera settings permanently:
Mount the SD card on your computer, and create a file called camera.txt in /boot and put all parameters you want overridden, e.g:
#Tweak the auto exposure bias auto_exposure_bias=15 #Tweak the contrast contrast=0
You can edit camera.txt on-target by remounting /boot read-write:
mount -o remount,rw /boot
-
Now the webcam works on macOS too!
09/04/2020 at 05:24 • 0 commentsWoohoo! It turns out that an incorrect USB speed setting caused the webcam to not work with macOS. Thanks to the excellent suggestion from Leonti, the issue is now fixed. As you can see, we are looking at the webcam on QuickTime. Excellent!
Now the webcam should work in all major operating systems.
With version 1.21, I also tweaked the auto-exposure so it doesn't over-exposure the object resulting in a more overally pleasant picture.
Happy Zooming!
Get V1.21 at: https://github.com/showmewebcam/showmewebcam/releases
-
How to tweak your camera settings
08/27/2020 at 00:31 • 0 commentsFor debugging, a 115200 baud serial interface is provided as a ttyACM device:
- Please use screen or minicom to connect to it.
- Use username:
root
, passwordroot
.
Also, there is a untested serial interface on the serial 40-pin header: https://pinout.xyz/pinout/uart
If you want to modify the image content the quick-and-dirty way (not recommended):
- Start with the
chroot-to-pi
script: https://gist.github.com/htruong/7df502fb60268eeee5bca21ef3e436eb - Edit
/bin/bash
to/bin/sh
on thechroot /mnt/raspbian /bin/bash
line.
Tweaking your camera settings
After you get into the pi by the debugging ttyACM interface, you'll see:
# cat /opt/uvc-webcam/start-webcam.sh #!/bin/sh /opt/uvc-webcam/multi-gadget.sh /usr/bin/v4l2-ctl -c auto_exposure=0 /usr/bin/v4l2-ctl -c auto_exposure_bias=15 /usr/bin/v4l2-ctl -c contrast=0 /usr/bin/v4l2-ctl -c video_bitrate=25000000 /opt/uvc-webcam/uvc-gadget -f1 -s2 -r1 -u /dev/video1 -v /dev/video0
Now, you can change the v4l2 parameters on the fly and preview their effects on your camera output.
To get the list of tweakable parameters:
# /usr/bin/v4l2-ctl -L
This is how I tweaked the settings for V1.1. I think it's possible to squeeze even more performance out of this camera.
-
V1.1 released - better auto exposure settings
08/26/2020 at 07:33 • 0 commentsI just released V1.1 with some tweakings to image quality. This release should make your camera do a more agressive auto-exposure and thus improve the image quality in less-than-ideal lighting situations.
Sample image (1x1200 lumens light front, 1x1200 lumens light back):
V1.0
V1.1
Get it while it's still hot: https://github.com/showmewebcam/showmewebcam/releases
-
Comparison between Pi 0 and other solutions
08/26/2020 at 01:16 • 0 commentsGot some rough comparison, excuse the model, that's me.
Dell XP 13 2019 Webcam
DSLR (Sony NEX 5R)
Show-me-webcam Pi 0 Cam + HQ Camera
For my untrained eyes, the quality of the Pi cam is way better than a laptop webcam but a little bit worse than a dedicated camera. It does bokeh very well and has a fixed focus so I would consider it a plus rather than a minus. The camera outputs a consistent 30fps on Windows and Linux, but it does not work on macOS for some reason.
I suppose it is possible to improve the firmware/software even more. For example, we can make it so the webcam auto-pans to the face. Or maybe we can warn the user when the webcam is out of focus. Or maybe we can even replace the background. However, those are the niceties that can be added later.