You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+43-32Lines changed: 43 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,60 +1,52 @@
1
-
## 📸 Real-Time Camera Streaming with Object Detection
2
-
A real-time camera streaming system built on a Raspberry Pi that integrates a custom Linux kernel module, a multithreaded user-space capture pipeline, MJPEG HTTP streaming, and optional on-device object detection using TensorFlow Lite.
1
+
## 📸 Real-Time Embedded Linux Video Streaming System
2
+
A real-time camera streaming system built on a Raspberry Pi that integrates a custom Linux kernel module, a multithreaded user-space capture pipeline, image processing, and MJPEG HTTP streaming.
3
3
4
4
This project demonstrates end-to-end system design across kernel space and user space. It combines Linux interfaces (V4L2, IOCTL, MMAP) with concurrent data pipelines and computer vision inference.
5
5
6
-
💡 **Additional Notes**: Each key feature includes a link to **in-depth implementation notes** that describe how the module was designed and built.
7
-
8
6
#### 🌿 Branches
9
7
-`main` - Stable, fully integrated version of the project
10
8
-`stream` - Core camera capture and MJPEG streaming pipeline
11
9
-`stream_detect` - Streaming pipeline with on-device object detection
12
10
-`gh-pages` - Generated documentation hosted via github pages
13
-
14
-
📝 **Documentation**: The project includes **comprehensive Doxygen documentation** covering modules, functions, classes and detailed usage.
15
-
11
+
16
12
👉 Explore the generated docs: [Doxygen Documentation](https://hajjsalad.github.io/RaspberryPi-Cam-Streamer/html/index.html)
17
13
👉 Explore how the documentation was structured and written: [Notes on Notion](https://www.notion.so/hajjsalad/Doxygen-Documentation-2dea741b5aab809989afdaf9d198430b)
14
+
👉 Each key feature includes a link to in-depth implementation notes that describe how the module was designed and built.
15
+
16
+
```This repository contains the backend implementation. The Android frontend is maintained in a separate repository: [Android Frontend repo](https://github.com/HajjSalad/RaspberryPi-Android-Video-Streaming)
17
+
```
18
18
19
-
### 🗝️ Key Features
20
-
1.**Custom Linux Kernel Module**[Notes on Notion](https://www.notion.so/hajjsalad/Cam-Stream-Kernel-Module-2cca741b5aab80e1bddbe204e5e99eae)
19
+
#### System Components
20
+
The backend is organized into five core components:
21
+
- 🔌 **Kernel Device Driver** - Custom Linux character device driver (/dev/cam_stream) providing camera control and GPIO hardware abstraction via ioctl interface, with LED indicators for streaming state.
22
+
- 📸 **V4L2 Camera Pipeline** - Low-level camera interfacing via Video4Linux2 API, handling device initialization, format negotiation (YUYV422 @ 640×480), MMAP buffer allocation, and continuous zero-copy frame capture.
23
+
- 🔄 **Multithreaded Producer-Consumer Pipeline** - Producer thread captures and encodes frames into a mutex-protected circular buffer; consumer threads stream frames to connected clients. Semaphore-based synchronization ensures efficient frame handoff.
24
+
- 🖼️ **Image Processing Pipeline** - Multi-stage processing: YUYV422 → RGB24 color space conversion (BT.601), motion detection via frame differencing (SAD), TensorFlow Lite object detection (MobileNet-SSD), and JPEG compression (libjpeg).
25
+
- 📡 **MJPEG HTTP Streaming** - Lightweight TCP-based HTTP server bound to port 8080, handling client connections, routing requests via request manager, and delivering continuous MJPEG streams using multipart/x-mixed-replace protocol.
26
+
27
+
---
28
+
### 🔌 Custom Linux Kernel Module
29
+
[Notes on Notion](https://www.notion.so/hajjsalad/Cam-Stream-Kernel-Module-2cca741b5aab80e1bddbe204e5e99eae)
21
30
22
31
- Character device driver exposing camera control and LED status signaling via `ioctl`
23
32
- Well-defined kernel ↔ user-space interface with minimal surface area
24
33
- GPIO-driven LED indicators reflecting real-time camera streaming state
25
34
26
35
`GPIO` · `IOCTL` · `Character device` · `Linux kernel` · `kernel ↔ user space interface`
27
-
28
-
2.**V4L2-Based Camera Pipeline**[Notes on Notion](https://www.notion.so/hajjsalad/V4L2-Streaming-Pipeline-2cca741b5aab80be8b30e62d9311b929)
36
+
---
37
+
### 📸 V4L2-Based Camera Pipeline
38
+
[Notes on Notion](https://www.notion.so/hajjsalad/V4L2-Streaming-Pipeline-2cca741b5aab80be8b30e62d9311b929)
29
39
30
40
- Camera configuration using V4L2 API, including format negotiation and stream parameters
31
41
- Buffer allocation and zero-copy frame access via memory mapping I/O (MMAP)
32
42
- Continuous frame capture with explicit buffer dequeue and re-queue operations
0 commit comments