Category "opencv"

How to fill holes or reduce noise in an image?

I need to reduce the noise in images like the one bellow, i.e. fill the holes in the white object. I tried something with opencv but it ended up removing part o

How to get one of the specific values(with the specific index) of this iterable enumerate (results.pose_landmarks.landmark)?

import cv2 #OpenCV is the library that we will be using for image processing import mediapipe as mp #Mediapipe is the framework that will allow us to get our po

Django manage.py runserver graceful reloading

I am working on a Django project, which integrates a webcam and OpenCV. For the webcam access, I use following code. The webcam can be released if I use Ctrl +

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: