Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4387

General discussion • Drastic Framerate Drop and Memory Utilization Issues with Multi-Camera Setup on Raspberry Pi Using OpenCV

$
0
0
Hi everyone,

I'm working on a project that involves accessing and processing video feeds from four cameras simultaneously on a Raspberry Pi using the Python OpenCV library. Here’s a quick overview of my setup:

Cam 1: Performs both object detection and motion detection.
Cam 2, 3, and 4: Perform motion detection only.
Observations
Memory Usage
The memory usage for each camera is as follows:

Cam 1: 580 MB to 780 MB
Cam 2: 680 MB to 830 MB
Cam 3: 756 MB to 825 MB
Cam 4: 694 MB to 893 MB
Framerate
The framerate drops significantly as more cameras are added:

Single Camera: More than 3.5 FPS
Two Cameras: Over 2 FPS
Three Cameras: 0.8 to 1.9 FPS
Four Cameras: 0.11 to 0.9 FPS
Questions:
Maintaining Higher Framerate: What strategies or optimizations can I implement to maintain a higher framerate when using multiple cameras on a Raspberry Pi?

Understanding Framerate Drop: What are the main reasons behind the drastic drop in framerate when accessing multiple camera feeds? Are there specific limitations of the Raspberry Pi hardware or the OpenCV library that I should be aware of?

Optimizing Memory Usage: Are there any best practices or techniques to optimize memory usage for each camera feed?

Setup Details
Raspberry Pi Model: Raspberry Pi 4 Model B
Camera Model: Hikvision DVR cam setup
OpenCV Version: OpenCV 4.9.0
Python Version: Python 3.11
Operating System: Debian GNU/Linux 12 (bookworm)
I'm eager to hear any insights, suggestions, or experiences with similar setups that could help me resolve these issues.

Note: I've already implemented multi-threading concepts.

Thank you for your assistance!

Statistics: Posted by Niranjan0423 — Wed Jun 19, 2024 5:43 am — Replies 0 — Views 16



Viewing all articles
Browse latest Browse all 4387

Trending Articles