StreamVision is a distributed object detection system consisting of two components:
- StreamVision-Client (this repository): C++ application that captures camera frames, sends them to a detection server, receives results, draws bounding boxes on frames, and displays live video stream in web browsers.
- StreamVision-Server (separate repository): C++ application that receives encoded frames, decodes them, runs inference with YOLOv11/v12, and returns detection results to client.
A demo captured using YOLOV11s:
Note: Application settings (Camera Device Index, Resolution, FPS, and Server Address, Port) are managed by
ConfigXMLsingleton class, loaded once at startup.
┌─────────────────┐
│ CameraCapture │ → Captures frames from camera
└────────┬────────┘
↓
┌─────────────────┐
│ FrameEncoder │ → Encodes frames as JPEG
└────────┬────────┘
↓
┌─────────────────┐
│ FrameHandler │ → Sends encoded frames/receives detections via ZeroMQ (REQ-REP pattern)
└────────┬────────┘
↓
┌─────────────────┐
│ JsonParser │ → Parses detection results
└────────┬────────┘
↓
┌─────────────────┐
│ Drawer │ → Draws bounding boxes and labels
└────────┬────────┘
↓
┌─────────────────┐
│ WebStream │ → Streams MJPEG to web browser
└─────────────────┘
| Library | Version | Purpose |
|---|---|---|
| OpenCV | 4.12.0 | Frame capture and image processing |
| ZeroMQ (libzmq) | 4.3.5 | Network communication |
| cppzmq | 4.11.0 | C++ bindings for ZeroMQ |
| nlohmann-json | 3.12.0 | JSON parsing |
| cpp-httplib | 0.26.0 | HTTP server for streaming |
| TinyXML2 | 11.0.0 | XML configuration parsing |
| Doxygen | Latest | Documentation generation (optional) |
The easiest way to build and run StreamVision-Client:
# Clone the repository
git clone https://github.com/yourusername/StreamVision-Client.git
cd StreamVision-Client
# Build Docker image
sudo docker build -t streamvision-client .
# Run container
sudo docker run -it --rm \
--device=/dev/video0:/dev/video0 \
--network host \
streamvision-clientNote: --device=/dev/video0 mounts your camera. Adjust if using a different camera index.
You can check with v4l2-ctl --list-devices command
You can install dependencies by following the steps in the Dockerfile.
-
Start the detection server (see StreamVision-Server repository)
-
Configure the application by editing config/config.xml:
<Config>
<Camera>
<Index>0</Index> <!-- Camera Device Index -->
<Width>640</Width> <!-- Camera Width -->
<Height>480</Height> <!-- Camera Height-->
<FPS>30</FPS> <!-- Camera FPS -->
</Camera>
<Server>
<IP>0.0.0.0</IP> <!-- Server IP address -->
<Port>5555</Port> <!-- Server port number -->
</Server>
</Config>Note:
- Configure camera settings based on your device.
- If changing server IP/port, update StreamVision-Server config accordingly.
- Run the client application:
./streamvision-client- View the live stream in your browser:
http://localhost:8080/stream
- View the doxygen documentation in your browser:
http://localhost:8001
