Skip to content

Realtime Motion Detection Latency #725

@baesek

Description

@baesek

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions