pageauc / speed-camera

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.
Apache License 2.0
977 stars 171 forks source link

Over reading speed on large vehicles #174

Open PD061314 opened 4 months ago

PD061314 commented 4 months ago

Hello,

Fantastic work on the camera program. I'm using it to try to generate data to support some changes to the local road infrastructure. But I'm after a little configuration help.

The camera is working well in general but is misreading on large vehicles producing anomalous high results i.e. farm tractor with trailer being detected at 150mph and large vans at 90mph.

I've had to play with the settings to get the camera to detect vehices in the speed range at the site (20-110mph) and I think that somewhere I've allowed in this misreading in trying to accomodate higher speeds.

Setup is a RP4 2Gb with a PiNoir camera running the 720 plugin.

P.S. As a request is there a facility to expoit the CSV data? The data would be very useful to communities trying to evidence speeding problems but there is no easy export option. TIA

`# Motion Event Settings

---------------------

MO_TRACK_EVENT_COUNT = 6 # Default= 6 Number of Consecutive Motion Events to>

Suggest single core cpu=4-7 quad core=8-15 but ad>

MO_MIN_AREA_PX = 500 # Default= 200 Exclude all contours less than or eq> MO_LOG_OUT_RANGE_ON = False # Default= True Show Out of Range Events per x_dif> MO_MAX_X_DIFF_PX = 650 # Default= 20 Exclude if max px away >= last motio> MO_MIN_X_DIFF_PX = 55 # Default= 1 Exclude if min px away <= last event > MO_X_LR_SIDE_BUFF_PX = 10 # Default= 10 Divides motion Rect x for L&R Buffer > MO_TRACK_TIMEOUT_SEC = 0.5 # Default= 0.5 Optional seconds to wait after track> MO_EVENT_TIMEOUT_SEC = 0.2 # Default= 0.3 seconds to wait for next motion even> MO_MAX_SPEED_OVER = 37`

a113speederbot commented 4 months ago

Hi there, I can't help with your high numbers but you can view .csv files by using the ./menubox command in a terminal. Then you just choose 'g'. I have exported them as well, so let me see how. (Edited)

OK, so the .csv file should be located at: /speed-camera. You can copy that to your local machine and view it there.

I hope that helps.

image

UnderpantsGnome commented 4 months ago

@PD061314

P.S. As a request is there a facility to expoit the CSV data? The data would be very useful to communities trying to evidence speeding problems but there is no easy export option. TIA

If you run the webserver you can symlink the csv into the media directory and download it from there whenever you want.

This assumes your install is in the default location.

cd ~/speed-camera/media
ln -s ../speed-cam.csv

I would not recommend exposing this on the internet unprotected, but it is useful for someone on the same network as the pi.

You can also use this branch to send the data and image wherever you want.