Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
a113speederbot opened this issue Mar 2, 2024 · 3 comments
Open

Comments

@a113speederbot
Copy link

a113speederbot commented Mar 2, 2024

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
Copy link

SamDecrock commented Mar 23, 2024

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.

@a113speederbot
Copy link
Author

a113speederbot commented Sep 14, 2024

Thanks @SamDecrock, sorry - life got in the way somewhat so this reply is way overdue!

Just started trying to fix this issue again.

I have made changes to picam720.py like this:

MO_TRACK_EVENT_COUNT = 7
MO_MIN_AREA_PX = 9000
MO_LOG_OUT_RANGE_ON
MO_MAX_X_DIFF_PX = 250
MO_MIN_X_DIFF_PX = 5
MO_X_LR_SIDE_BUFF_PX = 10
MO_TRACK_TIMEOUT_SEC = 0.5
MO_EVENT_TIMEOUT_SEC = 0.3
MO_MAX_SPEED_OVER = 0

I have a module 3 camera and so I have changed the frame rate to 50fps in strmpilibcam.py

This is what the verbose log is saying:

Loading Wait...
----------------------------------------------------------------------
speed-cam.py 13.2  written by Claude Pageau
Motion Track Largest Moving Object and Calculate Speed per Calibration.
----------------------------------------------------------------------
[3:06:02.445034874] [6906]  INFO Camera camera_manager.cpp:316 libcamera v0.3.1+50-69a894c4
[3:06:02.453304751] [6914]  INFO RPI pisp.cpp:695 libpisp version v1.0.7 28196ed6edcf 29-08-2024 (16:33:32)
[3:06:02.463879439] [6914]  INFO RPI pisp.cpp:1154 Registered camera /base/axi/pcie@120000/rp1/i2c@80000/imx708@1a to CFE device /dev/media2 and ISP device /dev/media1 using PiSP variant BCM2712_C0
[3:06:02.466513899] [6906]  WARN V4L2 v4l2_pixelformat.cpp:344 Unsupported V4L2 pixel format RPBP
picamera2.picamera2 INFO: Camera configuration has been adjusted!
2024-09-14 18:54:13 INFO     configure_ Camera configuration has been adjusted!
[3:06:02.467407897] [6906]  INFO Camera camera.cpp:1191 configuring streams: (0) 1280x720-XRGB8888 (1) 4608x2592-BGGR_PISP_COMP1
[3:06:02.467567064] [6914]  INFO RPI pisp.cpp:1450 Sensor: /base/axi/pcie@120000/rp1/i2c@80000/imx708@1a - Selected sensor format: 4608x2592-SBGGR10_1X10 - Selected CFE format: 4608x2592-PC1B
picamera2.picamera2 INFO: Configuration successful!
2024-09-14 18:54:13 INFO     configure_ Configuration successful!
picamera2.picamera2 INFO: Camera started
2024-09-14 18:54:13 INFO     start_     Camera started
Logging Messages Disabled per LOG_VERBOSE_ON=False
----------------------------------------------------------------------
----------------------------------------------------------------------
----------------------------------------------------------------------
----------------------------------------------------------------------
----------------------------------------------------------------------

Thanks :)

@a113speederbot
Copy link
Author

Ah, I just noticed this! Logging Messages Disabled per LOG_VERBOSE_ON=False

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants