Skip to content

Commit a6c6171

Browse files
committed
clean readme
1 parent ac2f627 commit a6c6171

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

README.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,10 @@
77

88
Real‑time multithreaded webcam/video capture in modern C++20 & OpenCV that keeps your main thread free for computer vision or ML inference.
99

10-
---
11-
1210
## Why?
1311

1412
OpenCV's `VideoCapture` is synchronous: every `read()` blocks on USB/RTSP I/O and decoding. This library adds a **producer/consumer** queue so frame acquisition runs on a dedicated thread, lifting throughput up to **32%** on a 4‑core laptop while keeping latency bounded.
1513

16-
---
17-
1814
## Features
1915

2016
| Category | What you get |
@@ -25,8 +21,6 @@ OpenCV's `VideoCapture` is synchronous: every `read()` blocks on USB/RTSP I/O an
2521
| Metrics | Built‑in FPS / latency stats returned as a C++ struct or JSON. |
2622
| Extensible | Optional CUDA path (-DENABLE_CUDA=ON), gRPC frame streaming, ONNXRuntime inference hooks. |
2723

28-
---
29-
3024
## Quick Start
3125

3226
### Docker (zero install)
@@ -46,8 +40,6 @@ cmake --build build -j
4640
./build/threaded_capture --device 0 --num_frames 500
4741
```
4842

49-
---
50-
5143
## Build from Source
5244

5345
```sh
@@ -66,14 +58,10 @@ chmod 700 utils/clean.bash
6658
./utils/clean.bash < .gitignore
6759
```
6860

69-
---
70-
7161
## Webcam Stream
7262

7363
The `detach` method (`t1.detach()`) is used so we don't need to wait for thread 1 to finish. Instead, it will get the dataframe. The process happens simultaneously.
7464

75-
---
76-
7765
## Measuring FPS and Elapsed Time
7866

7967
I first used the **chrono** library to measure the time but found that it's hard to convert to seconds for calculating FPS. So, I use **ctime**:
@@ -92,14 +80,10 @@ double elapsed_secs = double(end - start) / CLOCKS_PER_SEC;
9280
double fps = numFrames / elapsed_secs;
9381
```
9482

95-
---
96-
9783
## Face Detection using dlib
9884

9985
See: [dlib webcam_face_pose_ex.cpp example](http://dlib.net/webcam_face_pose_ex.cpp.html)
10086

101-
---
102-
10387
## Benchmark
10488

10589
### Just streaming webcam
@@ -130,14 +114,10 @@ done
130114

131115
The elapsed time doesn't change much; however, the FPS of streaming 100 and 1000 frames increases by 23.5% and 31.5%, respectively.
132116

133-
---
134-
135117
## License
136118

137119
This project is licensed under the MIT License — see [LICENSE](LICENSE) for details.
138120

139-
---
140-
141121
## Acknowledgements
142122

143123
- Inspired by [PyImageSearch: "How to increase FPS with multithreading in OpenCV"](https://www.pyimagesearch.com/2015/12/21/increasing-webcam-fps-with-python-and-opencv/)

0 commit comments

Comments
 (0)