73,083 questions
0
votes
0
answers
25
views
Error throwing while building opencv with gstreamer support
I am trying to build opencv from source to enable GStreamer support. I have followed this instructions here, but an error occurred. More specifically, the error occurred in this step:
make -j$(nproc)
...
Best practices
0
votes
1
replies
70
views
How can I correctly extract table structure (rows, columns, merged cells) from a complex scanned image using OpenCV?
I’m trying to extract tabular data from a scanned engineering document.
The table contains:
merged header cells
irregular row heights
irregular column widths
faint and broken borders
text inside ...
1
vote
2
answers
138
views
How to close a gap in the contour in OpenCV
I have a problem that I struggle with and cant seem to find a solution;
I want to get the area of the contours I see in this image/video frame:
The problem is the contour is cut off at the right as ...
1
vote
1
answer
103
views
Watershed fails to properly segmented objects
Currently I'm working on object detection for counting how many object presented on the frame. I already successfully separate some of them. There's still some object which is very close together ...
0
votes
0
answers
75
views
importing opencv-python in an embeded python program
I have a problem with a little program Im making
This is my program:
#define PY_SSIZE_T_CLEAN
#include <Python.h>
int main() {
Py_SetPythonHome(L"C:/Users/fxct/AppData/Local/Python/...
1
vote
0
answers
54
views
Green video output when streaming to RTSPtoWeb using GStreamer
I’m trying to make a script in python that restream an RTSP feed that has been processed in OpenCV (where I overlay the current date and time on each frame).
After processing, I use GStreamer to ...
-1
votes
0
answers
60
views
Python OpenCV LBPHFaceRecognizer "Unknown C++ exception from OpenCV code"
Trying to build a mini face recognition project from a set of pictures in a folder
When trying to use LBPH algorithm to do so using:
recognizer = cv.face.LBPHFaceRecognizer()
I get:
"Unknown C++...
3
votes
1
answer
776
views
I am having problems trying to install opencv-python
Im trying to install this package using my windows 11 machine, python version 3.14.0 and pip version 25.3 and numpy 2.3.4
This is what I get:
Installing build dependencies ... done
Getting ...
2
votes
0
answers
205
views
Why does setting a slightly smaller resolution(e.g., 1900×1080 instead of 1920×1080) drastically improve USB camera performance in OpenCV on Windows [closed]
I'm using OpenCV-Python on Windows 11 to capture video from a USB camera for object detection tasks. However, I noticed that the camera’s frame rate is extremely low — maybe only about 1 FPS, even ...
0
votes
0
answers
85
views
Crop Inner Black Square in QR Find Pattern
I'm doing an image processing inside the QR code finder patter. The problem is I can't perfectly crop the inner black square inside finder pattern. It's always have some white space around the black ...
2
votes
2
answers
91
views
How to detect a B/W icon inside a colored dashboard photo when scale/rotation/color differ (OpenCV, Python)
Problem:
I need to check whether a small black-and-white icon (template) appears inside a large, colored dashboard photo.
The icon in the photo may differ from the template in color, scale, small ...
1
vote
1
answer
116
views
Can't find DLLs for linking OpenCV to project [closed]
I am using Visual Studio 2022 and CMake to build my project.
In a third_party directory under the project root, I extracted the OpenCV build from the OpenCV 4.12.0 windows downloader.
In a CMakeLists....
1
vote
0
answers
99
views
How properly to wrap OpenCV APIs that take cv::InputArray/cv::OutputArray/cv::InputOutputArray for P/Invoke (C#)
I am writing my custom OpenCV wrapper (now I am using OpenCV 4.11) for C#
There are several reason for writing custom wrapper instead of using existing solutions (such as EmguCV):
I need actual ...
1
vote
2
answers
153
views
How to make image white outside of contour in OpenCvSharp
Looking for a method to set image color to white outside single contour.
Answer in
Fill the outside of contours OpenCV
outside-of-contours-opencv
contains python code for this:
import cv2
import numpy
...
-1
votes
2
answers
181
views
How to find printed document in image
Image contains single document printed in white paper. Background of image can be different.
Tried to get document using code from https://scanbot.io/techblog/document-edge-detection-with-opencv/ with ...
1
vote
1
answer
108
views
How can I find the contour of a box with a diagonal inside using OpenCV
I have to find the contours of boxes.
Some boxes have diagonal inside of them. I try to remove diagonal but I think it isn't answer.
Here are the images those I preprocessing and contour result. Only ...
0
votes
1
answer
105
views
OpenCV findChessboardCorners returns false after upgrading from 4.8 to 4.12 (same images, no code changes)
I recently upgraded OpenCV in my C++ project from 4.8 to 4.12.
After the upgrade, my unit tests for camera calibration started failing because
findChessboardCorners(...) now consistently returns false ...
-1
votes
1
answer
72
views
How can I detect T/X junctions but ignore 90° angled lines (L-turns) in OpenCV?
I'm trying to distinguish between 90° angled lines (L-turns) and true junctions (T and X intersections) in OpenCV.
I'm using morphological opening to extract long horizontal and vertical line segments,...
1
vote
0
answers
69
views
How can I have intellisense in VS Code for opencv.js
I want to have intellisense for opencv.js inside VS Code when I call it from a JavaScript file, but when I use import "path/opencv.js" or import cv from "path/opencv.js", I can't ...
1
vote
1
answer
93
views
Capturing the camera on android in the background with preview after processing with OpenCV
My goal is to be able actively process an image in the background, but when the app is in the foreground I'd need a preview which shows the processed image, meaning the original frame and bounding ...
0
votes
0
answers
53
views
cuda commands from python in opencv fail
I've compiled opencv with cuda support and am trying to use some cuda functions - to that end I'm trying the following test:
import cv2
if cv2.cuda.getCudaEnabledDeviceCount() > 0:
print("...
1
vote
2
answers
148
views
cmake cannot find_package(OpenCV), OpenCV installed using VCPKG on linux
I have these files that try to build a simple application with OpenCV in Linux:
cmake_minimum_required(VERSION 3.29)
project(opencv_app)
# Enable C++17
set(CMAKE_CXX_STANDARD 17)
set(...
0
votes
0
answers
102
views
Create a Pip Wheel for OpenCV Built from Source to Prevent Overwriting with Library Dependencies
I have a Dockerfile that builds OpenCV from source with cuda. The build itself succeeds, but pip doesn’t recognize this custom installation. As a result, when I later install a Python package that ...
1
vote
0
answers
88
views
How can I optimize a Python RTSP → YOLOv8 face-recognition → WebSocket pipeline to handle 6–8 cameras without lag/stutter?
What i am Trying to do?
I want to access the ip cameras and add a face recognition model to the live feed and display it to the web browser frontend for the ease of access this is the main concern, ...
3
votes
1
answer
114
views
Segmentation Error when Creating Charuco Board with Custom Ids
My intention is to create a charuco board object, which supports custom ids. Here is the code snippet being used.
def __init__(self, squaresX=11, squaresY=8, squareLength=0.015, markerLength=0.011,
...