Skip to content

Admin and Settings

Claude Pageau edited this page Jan 19, 2018 · 47 revisions

menubox.sh

You can use menubox.sh to manage most aspects of running speed-cam.py and webserver.py. To run menubox.sh from logged in SSH or RPI desktop terminal session perform the following commands

cd ~/speed-camera
./menubox.sh

Note If you do not get menu box lines displayed in a putty SSH session. Open the top left putty window icon and select, Change Settings, Window, Translation, UTF-8 from pull down menu, then apply. To make this the default putty, prior to apply select session, default then apply.

Navigate menu using keyboard up/down arrow keys or press menu option letter to highlight menu item, then press Enter key to select option. Alternatively you can highlight menu item then press tab highlight selection, then press Enter key.

Screen shot of speed-cam main menu menubox main menu

Configuration Settings

speed-cam.py and webserver.py variable values are stored in the config.py file and are imported when speed-cam.py or webserver.py is run. If plugins are enabled in the config.py file then the appropriate plugin file will be loaded and the specified plugin settings will override the matching config.py variable setting. Use menubox.sh or nano editor to modify the config.py and/or plugin settings per the comments.

Most settings should be OK and should not need to be changed. Others may need to be fine tuned. The openCV settings most likely won't need to be changed unless you are familiar with them.

How to Manage Plugins

To accommodate different speed camera requirements there are plugin files. The default setting uses the picam480.py

  • picam240 - This takes 240p SD standard definition video stream and 320x240 speed images that is best choice for single core RPI (Use this with 320x240 resolution web cam's)
  • picam480 and webcam240 default - This takes 480p SD standard definition video stream and 640x480 speed images that is best with a single core RPI (Use this with 640x480 resolution web cam's)
  • picam720 and webcam720 - This takes a 720p HD high definition video stream and 1280x720 speed images that works best with a quad core RPI
  • picam1080 Experimental - This takes a 1080p HD video stream and 1920x1080 speed images that works best with a quad core RPI. Note performance will not be the best.

To change or disable a plugin edit config.py us menubox.sh or nano to change settings below as required.

# Plugins overlay the config.py variable settings
# -----------------------------------------------
pluginEnable = True
pluginName = "picam480"   # Specify filename in plugins subfolder without .py extension per below
                          # picam240, picam480, picam720, picam1080, webcam480, webcam720

You can create your own plugin or edit an existing one.
IMPORTANT: Do NOT delete the init.py file since it is required for plugins to be imported.

Note if log_data_to_file is set, it will save tracking data to a speed-cam.csv file in the same folder as speed-cam.py eg speed-cam.csv This file is used for generating web pages using the makehtml.py script.

How to Calibrate