A Unix, Windows, Raspberry Pi Object Speed Camera using python, opencv, video streaming, motion tracking. Includes a Standalone Web Server Interface, Image Search using opencv template match and a whiptail Admin Menu Interface Includes picam and webcam Plugins for motion track security camera configuration including rclone sync script. watch-app allows remotely controller camera configuration from a remote storage service name. Uses sqlite3 and gnuplot for reporting. Recently added openalpr license plate reader support.
I've created a simple script to report data on a daily basis , over 35mph and over 40mph in 30mph zone,
It assumes speed is in mph.
AWK is used to get to the first line to get the top speed and to do the % calculations.
In combination with following crontab entries:
10 0 /home/pi/speed-camera/sql_speed_gt.py 20 1
12 0 /home/pi/speed-camera/sql_speed_gt.py 35 1
14 0 /home/pi/speed-camera/sql_speed_gt.py 40 1
16 0 /home/pi/speed-camera/daily_stat.sh
Also added newline write statement to create a single line per report entry in the html page in sql_speed_gt.py
This for the wc -l to work.
lines around 183
f.write(HTML_HEADER_1)
f.write("\n")
f.write(HTML_HEADER_2)
f.write("\n")
f.write(HTML_HEADER_3)
f.write("\n")
for item in html_table:
f.write(item)
f.write("\n")
f.write(HTML_FOOTER)
f.write("\n")
I've created a simple script to report data on a daily basis , over 35mph and over 40mph in 30mph zone, It assumes speed is in mph. AWK is used to get to the first line to get the top speed and to do the % calculations.
In combination with following crontab entries: 10 0 /home/pi/speed-camera/sql_speed_gt.py 20 1 12 0 /home/pi/speed-camera/sql_speed_gt.py 35 1 14 0 /home/pi/speed-camera/sql_speed_gt.py 40 1 16 0 /home/pi/speed-camera/daily_stat.sh
Also added newline write statement to create a single line per report entry in the html page in sql_speed_gt.py This for the wc -l to work. lines around 183