Category "opencv"

OpenCV AttributeError module 'cv2.cv2' has no attribute 'Tracker_create'

I have tried to run this code but get an Attribute Error. Any help would be greatly appreciated. import cv2 import sys (major_ver, minor_ver, subm

OpenCV contrib / Surface Matching / Demo script wrong result / Python / Point Pair Features (PPF)

Installed versions: opencv-contrib-python 4.5.4.60 opencv-python 4.5.4.58 I try to run the demo python script (ppf_load_match.py) for surface matching i

Stereo rectification problem with OpenCV and Python

import cv2 import glob import argparse import math from numpy import genfromtxt import matplotlib.pyplot as plt import numpy as np

Find the min max coordinates using bruteforce matcher

Using the famous brute force cv2 code https://docs.opencv.org/4.x/dc/dc3/tutorial_py_matcher.html I'm tring to get all the good points coordinate to get the are

Open CV snap points to a rectangle of a specific size

I am attempting to detect an image of a certain type on a page of degraded quality, that has rotational and translational variance. I need to "cropped" the dete

Is there any way to detect edge in this situation?

I try to detect edge using python. There are hundreds of algorithms for edge detection, however, the image is very obscure and unclear. The most serious problem

Ros2 : stereo image rectification

I'm starting to develop a visual odometry program. The "front" part (image acquisition and hopefully rectification) is done in ROS2, then the core of the proces

ASP.NET Core stream video from the OpenCVSharp capture

I want to stream video captured from the webcam using ASP.NET Core application. I also need to do some manipulations with the frames, that's why I'm using OpenC

finding not exactly same template in image

I want to find a character in my input image. When I crop char from an image and use template matching, in almost all cases, it works perfect; but if I use that

How to connect broken lines into one continuous line?

I have this picture: As you can see, some lines are not connected. These lines were drawn using semantic segmentation. What I want is to connect these lines, b

How to draw repeated slanted lines

I need to draw slanted lines like this programmatically using opencv-python, and it has to be similar in terms of the slant angle and the distance between the l

OpenCV Stitcher class not working in Python, always returns ERR_NEED_MORE_IMGS

I'm trying to use the OpenCV Stitcher class for putting two images together. I ran the simple example provided in the answer to this question with the same koal

OpenCV command line app can't access camera under macOS Mojave

I'm unable to access the iMac camera from a command line OpenCV program. (I'm compiling and running the program under CodeRunner, not Xcode.) I've read that Moj

How to determine travel distance of an object between frames, using a moving object and camera

If you have a video file with a moving object, as well as a moving camera, is it possible to track the distance that the object moved between 10 or 20 frames? I

OpenCV-Python Error (-215:Assertion failed) !empty() in function 'cv::CascadeClassifier::detectMultiScale'

Consider the following code: import cv2 # define a video capture object vid = cv2.VideoCapture(0, cv2.IMREAD_UNCHANGED) classifier = cv2.CascadeClassifier(cv2.

tqdm progressbar for opencv videocapture going beyong 100%

I am processing a video using Opencv in python and using tqdm to show the progressbar. However, the progress goes beyond 100%. Not really sure why is this happe

How to connect broken lines that cannot be connected by erosion and dilation?

I have an image like this that has multiple stoppers and some of the lines are broken. To connect this broken line, I used a morphological operation like this:

How to increase speed of video playback within Python using openCV [duplicate]

I am writing a program that draws a line on a video where the first pixels of the railing are encountered, my problem is that the video playba

Filling contour won't work using drawContours() thickness=-1 [duplicate]

I am trying to fill a contour which was obtained by separately thresholding 3 color channels. image_original = cv2.imread(original_image_pat

Join broken lines in image using OpenCV for python

I am working on a project in which I have to complete the broken lines in the image below and then calculate the area. Is there any way to complete the broken l