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

Realtime Motion Detection Latency #725

Open
baesek opened this issue Sep 13, 2022 · 0 comments
Open

Realtime Motion Detection Latency #725

baesek opened this issue Sep 13, 2022 · 0 comments

Comments

@baesek
Copy link

baesek commented Sep 13, 2022

Hi,
sorry, this is more of a question than an issue. But i did not find a Discussions area here and I have the feeling posting my question here could help finding an answer the best.

I am actually using a raspberry pi camera v1 as a realtime motion detection by using the PiMotionAnalysis Class and the start_recording function. I just output the number of movement vectors that are longer than zero to get a value for how much change is happening in an image.
It works quite well, but there is latency (around 400ms, it feels like) and I think the bottleneck is the video input.
I tried around for example using 640x480 at 90fps which improved latency but decreases a lot of detail in the detection as there are much less possible macroblocks / motion_vectors for the field of view.

Without thinking enough I now bought a Camera v2 module as I read that it offers 1280x720 (90fps) then I saw that this is 16:9 and therefore I would lose quite some of the image on the edges of the fisheye kind of objective I use.

Browsing the Internet I found out that there are many people somehow using the camera module at higher framerates. I wondered as I always looked at the docs https://picamera.readthedocs.io/en/release-1.13/fov.html?highlight=sensor%20Modes#sensor-modes to see whats possible.

Can you somehow help me to improve the setup?
I am wondering if there is any possible modification to the picamera lib to offer more fps at 1296x972 (4:3) for example.
Or if I can somehow output the motion_vector count much faster using a different approach than a python script which sends osc messages to a pure data patch.

Do you see my problem, do you know a good solution?

Thank you for any help.

best,
Paul

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

1 participant