betterCamera

Turn web cam into a black / white board. Improved version of cam_board.

View the Project on GitHub kacpertopol/betterCamera

betterCam

Turn web cam into a black / white board:

betterCamera

This is an improved version of cam_board.

installation

git

If you are familiar with git and python 3 then make sure you have the numpy, opencv-python and opencv-contrib-python libraries installed before cloning the repository. The main script is betterCamera.

usage

The program can be launched from the terminal:

$ betterCamera

Control is via keyboard shortcuts. A list of special keys is available by pressing h. To quit the program hit q:

keys

printing ARUCO markers

Printouts with the ARUCO markers for a 16x9 camera aspect ration are available (the circle marks the top left corner of the page):

Printouts for other aspect ratios can be prepared using this, this, this, and this SVG image. Just make sure they are appropriately oriented on the page and that the innermost rectangle formed by the ARUCO marker corners has the correct aspect ratio.

All ARUCO symbols were generated using this handy website.

quitting

This is important 😀 Just hit q.

getting help

The h key activates the help screen: betterCamera with a description of all the special keys.

displaying the camera picture directly

Hitting w just displays the camera picure directly: betterCamera

zooming into the ARUCO markers

Two keys can be used to achieve this, r and t: betterCamera Small movements of the camera might cause jitter when using t. Pressing r will additionally smooth out the image and introduce a small time delay.

zooming into the ARUCO markers and inverting colors

Two keys can be used to achieve this, y and u: betterCamera Small movements of the camera might cause jitter when using u. Pressing y will additionally smooth out the image and introduce a small time delay.

zooming into the ARUCO markers and removing background

This can be useful for saving slide presentations. Two keys can be used to achieve this, d and f: betterCamera Small movements of the camera might cause jitter when using f. Pressing d will additionally smooth out the image and introduce a small time delay.

zooming into the ARUCO markers, removing background, inverting colors

Two keys can be used to achieve this, i and o: betterCamera Small movements of the camera might cause jitter when using o. Pressing i will additionally smooth out the image and introduce a small time delay.

adjusting de-noising parameter

When using d, f, i or o it might be helpful to adjust the de-noising parameter used to remove the background. This can be achieved by pressing + or -.

switching cameras

This requires information on additional cameras inside the configuration file. See the next section for more information no how to do this.

With the configuration file appropriately edited hit n to use the next camera. If the camera is not available a still image will be displayed. The n key can be hit many times and will loop through the cameras.

configuration

To add additional cameras, change camera resolutions, etc. edit the configuration file. The path to a directory containing the configuration file betterCam_config is displayed at the very bottom of the window after pressing the h key: betterCamera All configuration is done by modifying this file. Don’t be afraid to tinker with the settings, if you mess up, just replace betterCam_config with the default configuration file.

Configuration settings are entered using a simple key = value syntax. For example, the number of buffered perspective matrices, buffer can be decreased from the default 20 to 10 by changing:

buffer = 20

to

buffer=10

Each configuration option is paired with a comment describing the setting. Comments are lines starting with #. Additionally, sections are marked using square brackets, for example [perspectiveMatrix].