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
960 stars 169 forks source link

Capture being triggered by small objects and missing all vehicles. #162

Open a113speederbot opened 5 months ago

a113speederbot commented 5 months ago

Hello,

I changed the resolution of the camera to 720 using the plugin and resized the motion box in the picam720.py file. Since then, the camera seems only to be triggered by moving branches on trees, pedestrians, or if we pull one of our cars off the drive (very close to the camera). What have I missed, please?

Thank you.

EDIT: I wonder, since I have increased image resolution, should I increase MO_MIN_AREA_PX = 200, to exclude smaller objects but that still doesn't explain why all the vehicles are being missed.

SamDecrock commented 5 months ago

I also have set my camera to 720p, here are my tweaks:

MO_TRACK_EVENT_COUNT = 7
MO_MIN_AREA_PX = 9000 
MO_MAX_X_DIFF_PX = 250
MO_MIN_X_DIFF_PX = 5  
IM_BIGGER = 1  

Increased the framerate to 60 here in the library for my camera (not sure if that helped, but I have a 60 fps global shutter Pi camera).

So yes, definitely increase MO_MIN_AREA_PX as you now have more pixels for the same area.

Also make sure your cropping area is bigger.