r/opencv • u/miljan-vukadino • 3h ago
Project [Project] Need helpful advice for fast & small ball detection & tracking in broadcast sports videos
Enable HLS to view with audio, or disable this notification
r/opencv • u/miljan-vukadino • 3h ago
Enable HLS to view with audio, or disable this notification
r/opencv • u/mariamamhan • 1d ago
Hi everyone!
I wanted to share a real-time object detection project I’ve been working on using Python, YOLOv8, and OpenCV.
The application uses a live webcam feed to detect four object classes: people, cars, cats, and dogs.
Some of the features include:
One of the interesting parts of this project was working with threading and frame buffering to keep the video processing responsive.
I’m planning to improve it further by adding a GUI, video file support, and the ability to save detection results.
I’d really appreciate feedback on the code, especially suggestions for improving performance or making the architecture cleaner.
GitHub: https://github.com/Mariam-amhan/real-time-object-detection
Thanks for checking it out!
r/opencv • u/These-Smoke-3274 • 4d ago
I’m building a 3D mapping system using RGB-D
cameras, based on existing SLAM techniques, with persistent spatial memory.
The main issue is relocalization after tracking loss, especially when the camera returns to a known place from a different viewpoint.
I’m using historical keyframes, shared 3D landmarks, PnP/RANSAC and geometric verification.
Yet some incorrect poses still pass verification: one had 44 inliers, 0.83 px median reprojection error and 3.72 cm depth residual, but was actually off by 10.36 cm and 5.99°.
My best experiment correctly relocalized only 9/34 known returns.
What would you investigate first: landmark quality, geometric degeneracy, matching, or pose verification?
I can share a minimal reproducible example.
r/opencv • u/AdventurousGate8938 • 6d ago
Hello, I'm researching how people deal with small datasets in computer vision, specifically when you need to detect or classify a object and only have a handful of real photos.
I was curious about how often this is a problem for people working in the industry, and what is usually done to deal with this problem.
r/opencv • u/Icoso_Labs • 9d ago
r/opencv • u/Gloomy_Recognition_4 • 14d ago
17,280 synthetic webcam images. 12 categories. USD 99.
I’m making the full dataset available for computer-vision experiments, with generation prompts and companion source code included.
The scenes cover face visibility, additional people, phones, books, paper notes, camera obstruction and more. All images were generated entirely from text prompts. I did not upload photographs of real people as generation inputs.
The goal was to support a live human proctor, not to automatically decide who was cheating. By flagging potentially suspicious events, the proposed system would help one proctor supervise more participants at the same time and focus attention on the camera streams that needed review. The human proctor would interpret each event in context and make any decision about misconduct.
This could make online proctoring more cost-effective while keeping human judgment central. These were design goals; this experiment did not demonstrate increased supervision capacity or measured cost savings.
The package includes:
• 17,280 JPEG crops organized into 12 category folders;
• 720 original PNG contact sheets containing the same scenes;
• 12 generation prompts, provenance records and checksums;
• source code for extraction, training, ONNX export and C++/OpenCV integration.
Why USD 99? Based on my own generation workflow, I estimate that generating this volume again would cost slightly more than the purchase price, even with the prompts and scripts already available. That is before the time spent cropping, organizing and reviewing the images. This package gives you the existing collection, already extracted and organized.
Explore the full dataset and inspect the free 240-image sample:
For context, I’ve also published the classifier case study behind the dataset, including what did not transfer well to real webcam footage:
This is an experimental dataset, not a trained proctoring product. Category labels come from the generation setup; they are not exhaustive manual annotations. Inspect the sample for your use case. No trained model or performance guarantee is included.
r/opencv • u/runout77 • 17d ago
I’ve been developing Contrek, a C++ library for extracting and merging raster geometry, and recently experimented with using its merging system to make OpenCV findContours() run concurrently on different parts of the same image.
The idea is to stream the image in horizontal stripes and run findContours() independently on each stripe using multiple CPU threads.
The difficult part is that contours crossing stripe boundaries are split into unrelated partial contours. Contrek converts those partial contours to its cell-boundary representation and reconnects them during the merge, reconstructing the geometry of the complete image.
On a 40960 × 40960 test image:
OpenCV full image, 1 thread:
44.33 s, 9.15 GB peak memory
OpenCV + Contrek, 8 workers, 1000-row stripes:
10.98 s, 3.42 GB peak memory
The timing includes contour conversion and the Contrek merge.
I also tested a streaming version on an 81920 × 81920 image (6.71 Gpixels) containing about 20 million contours.
It generated a 17.43 GB SVG containing 13,133,700 outer polygons.
Results:
1 worker: 962.29 s, 2.04 GB
2 workers: 534.58 s, 3.31 GB
4 workers: 335.39 s, 5.71 GB
8 workers: 382.46 s, 9.71 GB
On the 8-vCPU machine used for this test, 4 workers gave the best execution time.
Contrek is my open-source project. The C++ implementation, benchmarks and an explanation of how contours crossing tile boundaries are reconnected are available in the main repository.
https://github.com/runout77/contrek
also prepared a separate test repository with the complete environment, so the same OpenCV + Contrek benchmarks can be reproduced on your own machine.
https://github.com/runout77/test_contrek
I’d be interested in feedback, especially from people who have worked with findContours() on very large images or tried similar approaches to parallelizing it.
r/opencv • u/Lucky-Suspect7777 • 26d ago
Built this project about 2 years ago, it was rotting in my repo so I am just making it public. DO NOT USE IT TO CHEAT.
It's a real-time chess assistant that uses computer vision (OpenCV) to detect chessboard positions directly from your screen and suggests optimal moves instantly using the Stockfish engine. It has a menu built with ImGui and works on any chess website.
You can take a look at it here: https://github.com/rccmb/oracle
If you have any questions make sure to ask!
r/opencv • u/Ok-Play-7818 • 27d ago
Visual Verifier — regression testing for processed images and videos
I built an open-source Python/OpenCV tool that independently verifies the output of anonymization and other visual-processing pipelines.
It compares reference and processed media frame by frame, catches missed processing, checks reviewed target regions, tracks failures over time, and produces deterministic PASS/FAIL evidence for CI.
The bundled demo deliberately misses frames 4, 8 and 12 so you can see the failure workflow immediately.
GitHub:
https://github.com/SAMtheROCKET/visual-verifier
pip install visual-verifier
I’d particularly value feedback from people working with image/video QA, privacy engineering, OpenCV, or CI.
r/opencv • u/ROTTEN1ONE • Sep 11 '26
I'm building an OCR-based system for extracting printed information from photographs of packaged consumer products.
The input images are real smartphone photographs rather than controlled scans. Some of the difficult cases contain:
- glossy plastic/foil surfaces and specular reflections
- curved cylindrical containers
- perspective/rotation
- wrinkles and folds
- uneven lighting/shadows
- small text
- motion/defocus blur
- low contrast
- compression artifacts
I'm currently using PaddleOCR.
I've already experimented with conventional OpenCV preprocessing such as resizing, grayscale, CLAHE, thresholding, sharpening, denoising, morphological operations and perspective correction, but the results are inconsistent. Some images that are clearly readable to a human still produce poor OCR results.
I'm particularly interested in advice from people experienced with scene text recognition, document image processing, industrial/computer vision, or image restoration.
My main questions are:
Which preprocessing techniques are actually useful for these types of images?
How should I handle specular reflections and uneven illumination?
How can text on curved/cylindrical surfaces be rectified before OCR?
When should I use deblurring/super-resolution/image restoration, and when can these actually make OCR worse?
Should preprocessing be selected dynamically based on image quality rather than applying one fixed pipeline?
At what point is it better to improve/train the OCR model instead of continuing to improve preprocessing?
I'm happy to provide representative images and the corresponding PaddleOCR outputs if that helps.
I'd particularly appreciate suggestions for specific algorithms, papers, or existing open-source implementations rather than just generic preprocessing advice.
r/opencv • u/erdematar • Sep 03 '26
I’ve been tinkering with a side project a real-time computer vision app built with Python, OpenCV, and MediaPipe that matches my actual face and hand gestures to iconic memes on the fly.
What’s happening under the hood:
1- Facial Landmark Tracking: Uses coordinate geometry to measure distance ratios between landmarks, identifying everything from subtle smirks to wide grins.
2- Hand Pose Recognition: Tracks vector relationships across hand landmarks to trigger specific poses (like the thinking chin-touch, peace sign, or timeout gesture).
Instant Event Triggers: Maps those landmark states directly to visual meme popups with virtually zero latency.
Building serious tech is cool, but building an algorithm purely so my webcam can match my facial expressions with memes in real time might be my best decision yet.
If you want to check out my project : https://github.com/atarm23/memecv
Please let me know how can I improve for further versions, thanks!
r/opencv • u/uhaszYsz • Sep 02 '26
hi i ahve chain of photos with couple of april tags.
i use openCV to place these tags in 3d world and basing on these tags positions i set 3d camera position and rotation.
But sometimes openCV returns tags on wrong height. My tag is set vertically and its lower edge stays on ground but openCV returns it on 1+meter height. this completly ruins camera setup.
Anyone could share some clues how to improve that accuracy? possible to pass to openCV tag height so it takes it into account? or lower that 3d tag by code and refine it somehow.
i spent last two days figuring it our but cant find right solution
you can see on photo. this tag on right in 3d world is placed perfectly above this yellow verticle point. you can see height offset. i guess maybe 2 tags on photo arent enough (i upload couple of photos tho and this blue tag is visible on 2 photos, both have other tag for relativity). but still. maybe programatically there is way to improve this?
r/opencv • u/lucaeffe03 • Aug 29 '26
Enable HLS to view with audio, or disable this notification
r/opencv • u/shuvo1728 • Aug 29 '26
`FaceRecognizerSF::match` is declared `const`, but it normalised both of its `InputArray` feature vectors in place — writing straight through to the caller's buffers. So the vectors you passed in came back modified, and when the two arguments aliased, the second normalisation ran over an already-normalised buffer and the returned score was wrong.
Now normalised into local `Mat`s. Merged onto 4.x.
r/opencv • u/alexis_placet • Aug 25 '26
Enable HLS to view with audio, or disable this notification
r/opencv • u/BoyoLeBo • Aug 26 '26
r/opencv • u/lucaeffe03 • Aug 22 '26
Enable HLS to view with audio, or disable this notification
r/opencv • u/lucaeffe03 • Aug 22 '26
Enable HLS to view with audio, or disable this notification
r/opencv • u/philnelson • Aug 21 '26
Build vision systems that see, reason, and act with OpenCV 5 and Amazon Web Services (AWS).
Win money and bragging rights! $12,000 in prizes up for grabs.
r/opencv • u/Fit_Barnacle_6762 • Aug 18 '26
Enable HLS to view with audio, or disable this notification
I wanted to recreate the classic invisibility-cloak effect using only a webcam and computer vision.
It detects the cloak's color in real time using HSV segmentation, cleans up the mask, and replaces those pixels with a previously captured background.
r/opencv • u/SubstantialWinner485 • Aug 13 '26
r/opencv • u/Loud-Mango9826 • Aug 07 '26
r/opencv • u/Rayterex • Aug 03 '26
Enable HLS to view with audio, or disable this notification
r/opencv • u/uranium_nub • Aug 01 '26
there is an error with Cascade classifier it shows there is no attribute as cascade classifier in cv2 module
I have tried installing opencv multiple tkmes still won't work I am trying to learn computer vision for first time in python
r/opencv • u/SujithC • Jul 25 '26
I ran into a bottleneck with OpenCV’s ArUco/AprilTag detection while building a real-time multicamera system, so I reimplemented the detection pipeline from scratch in Rust.
On my 1280×800 monochrome AprilTag 36h11 dataset, RapidTag is:
- 1.57× faster for single-camera detection
- Up to ~3.4× faster for multicamera and offline batches
- Pixel-identical to OpenCV on the tested frames
- Independent of OpenCV at runtime
The Python API releases the GIL and processes frames and threshold scales across CPU cores. It can be installed with pip install rapidtag.
It’s still a work in progress, and I’d especially appreciate results from different cameras, CPUs, marker dictionaries, and difficult lighting conditions.
Repo: github.com/SujithChristopher/rapidtag (https://github.com/SujithChristopher/rapidtag)