Just like on Windows, it's very important to disable automatic exposition.
For users who don't find it important to have a fresh image of themselves to post on Facebook, daredevils eager to grab the sick and fly as soon as they switch their computer on, things can be a lot simpler once everything is properly set. Removing the IR filter from the web camera is the first step. Detailed instructions about removing the IR filter from an A4Tech PK333 web camera can be found on
this page. Based on these instructions, owners of other types of cameras may get a fair idea of what needs to be done. Once the IR filter is removed from the camera, it's necessary to fit a visible light filter on it in order to ensure that as much IR radiation emited by the diodes reaches the camera as possible, while preventing the ambiental radiation from reaching the lens at the same time. Information about the appropriate materials of which a good visible light filter can be made can be found on the
relevant page of the Free track website. Linux Mint with KDE desktop users will, after the filters have been sorted out, need to install the V4L-ctl tool by executing the following line in the Bash shell:
sudo apt-get install v4l-utils
, and then, somewhere in the home folder, for instance in the ~/myscripts/ folder, a script named, for instance, "setcam.sh" will need to be created which will contain the necessary camera settings. In the end, the execution of this script on every system boot up needs to be ensured. Creating the folder and the script containing file that were mentioned is easily done in the Dolphin file manager by opening the user's home folder, right clicking on empty space and selecting Create new > Folder, and then typing the name of the folder in the requester that pops up. Once the folder is created, it needs to be opened, and then one needs to right click the empty space again, select Create new > Text file and type in the name of the file in the requester. It is important for the extension of this file to be .sh. Now the new file needs to be opened in a text editor by right clicking it's icon and selecting Open with > Kate. The following lines which contain instructions for setting the web camera now need to be copied into the file:
#!/bin/bash
v4l2-ctl --set-fmt-video=width=320,height=240,pixelformat=YU12
v4l2-ctl --set-ctrl brightness=0
v4l2-ctl --set-ctrl contrast=0
v4l2-ctl --set-ctrl gamma=4
v4l2-ctl --set-ctrl gain_automatic=0
v4l2-ctl --set-ctrl exposure=781
v4l2-ctl --set-ctrl power_line_frequency=1
v4l2-ctl --set-ctrl sharpness=0
v4l2-ctl --set-ctrl compression_quality=50
and the file needs to be saved to disk. To ensure the execution of the script that was just created on every system boot up, the file /etc/rc.local, from which scripts which are meant to be executed on every system boot up are invoked, needs to be opened in a text editor by executing either of the following commands in the Bash shell:
sudo nano /etc/rc.local
or
sudo kate /etc/rc.local
, where "nano" and "Kate" are the names of text editors bundled with Linux Mint KDE distribution. Then , the following line needs to be appended to the file:
sh /home/username/myscripts/setcam.sh
and the file needs to be saved to disk. In the last line, 'username' stands for user name under which the user is logged onto the system, while the names of the folder and the script containing file in the path need to be changed to the names that were opted for if those names differ from the names suggested in the examples above. After a reboot, the camera will be set according to the values in the script, and everyone can adjust those values to suit their own needs. Users of distributions other than Linux Mint with KDE desktop will have to find their own way around loading the camera settings automatically, but hopefully, things can't be terribly different.