Videocapture using HDMI camera as HDMI input
Hi everyone, I want to ask you using `cap = cv2.VideoCapture(0)` in Python or in C++, can I get the video frames of HDMI camera giving stream in HDMI. i.e. input to our system will be HDMI. Help will...
View ArticleI'm getting the following error while using OpenCV
My code is as below: # It helps in identifying the faces import cv2, sys, numpy, os size = 4 haar_file = 'haarcascade_frontalface_default.xml' datasets = 'datasets' # Part 1: Create fisherRecognizer...
View ArticleDifferent output from Python and C++ in CalibrateHandEye()
Hi, We have tried to translate a C++ project into Python. The problem is that we get different outputs from the calibrateHandEye() function in the two versions. Even though the input is the same of...
View ArticleHow to show the confidence level of detectMultiScale "in python"
Hello! I was working on my research and I got a problem, I'm trying to show the confidence level, and I've googled for billion times, I've tried billions of codes, does anyone know how to show it?...
View ArticleConvert Python Into Java / Kotlin using these operations
I'm totally new in OpenCV. Does anyone knows how to convert below Python into Java/Kotlin? Only these a bit tricky to translate it. diff=cv2.subtract(img1, img2) diff[abs(diff)<30]=0 gray =...
View ArticleClicking contours with mouse but only 1 contour can be found?
I need the user to select inside the contours with a mouse, in a given image, in a specific order (this is to do with another part of the overall code). The code (below) correctly identifies 9...
View ArticleHow to find the location of a point in an image in millimeters using camera...
I am using a standard 640x480 webcam. I have done Camera calibration in OpenCV in Python 3. This the Code I am using. The code is working and giving me the **Camera Matrix** and **Distortion...
View Articleassert failed
I am trying to solve this issue: https://github.com/microsoft/ailab/issues/127#issue-725554407 I think OpenCV guru might know what's that about at a blink of an eye. I am guessing cv2 module for...
View ArticleHow to remove black stamp from an image
I have some stamped images (black) and I want to remove these stamps to get better similarity scores when comparing a non-stamped and stamped images. ...
View ArticleInsanely high cpu usage for simple videocapture (50% cpu usage)
**System information (version)** - OpenCV => 4.4.0.44 (opencv-contrib-python) - Operating System / Platform => Windows 10 Pro 64 Bit - Compiler => Visual Studio Build Tools 2019 (MSVC VS2019,...
View ArticleAlgorithm suggestion for texture image matching
Hello, I am trying to **match texture images**. what i tried, - **Feature detectors** like sift, surf, orb,akage. (they could not found feature points for some images of my image DB) - **LBP** (It kind...
View ArticleInput file is invalid
I am a newbie in Python. I have a OpenCV related issue. I have this simple code: import sys from matplotlib import pyplot import cv2 im = cv2.imread("E:\\Face.jpg") def plot_img(img): rgb =...
View Articleform a possible rectangle
I have images which have a noisy rectangle. I would like to find the four coordinates of the possible rectangle. When I try to find using contours, I sometimes get multiple contours and the code fails....
View ArticleColor threshholding only outputs edge for green color.
So basically I tried to threshhold the white and green color. While the white color outputs ideal results, the green threshold only outputs the outline of the color. import cv2 import numpy as np img...
View ArticleCan't save video
Hi, I want to object detect and save the video, but I can't. If there is no this line x, y, width, height, area = stats[index] it will be saved Do you know why And is there a solution? import cv2...
View Articlepython beginner mouseclicking problem
Hello, i'm learning the basics of opencv. I am working with the bit of code below. It generates a black image, i cannot click in some areas of the image without getting an error. Can anyone say why?...
View ArticlePython wrapper for opencv 4.5
There are a lot of new features in Opencv 4.5, are there any timelines for uploading python wrapper for opencv 4.5 to pypi? thanks in advance Best Regards
View Articlecv2 python package folder structure
Hi, is there a solid reason to have the *.pyd file in python-x.x folder under site_packages/cv2?
View Articlecv2.error: OpenCV(4.0.0): …(-215:Assertion failed)…...
I was trying to run a code for activity detection, but I get the following error. What is the problem? I have OpenCV(4.0.0) and am using windows. It's my first time running a DNN with openCV. model =...
View ArticleHow to calculate Optical Flow magnitude?
I'm trying to see how big different two given video frames are. My goal is to calculate a single value showing how fast objects inside those frames are moving. I can calculate Optical Flow matrix...
View Articlecv2.error: OpenCV(4.4.0)error: (-215:Assertion failed) !_src.empty() in...
. cap = cv2.VideoCapture(0) while True: # Grab a single frame of video ret, frame = cap.read() gray = cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY) faces = face_classifier.detectMultiScale(gray,1.3,5) for...
View ArticleUnable to open or export written video
System information OpenCV => 4.4.0.46 Operating System / Platform => MacOS Catalina 10.15.4 Compiler => Jupyter Notebook via Anaconda 4.8.3 I'm doing a computer vision task, in which my...
View ArticleHow do I read raw RGB data with Python?
I've got raw data with each byte representing the R, G or B values. No header, no compression. I need to read in this data fro processing. I've searched a lot but either they refer to `Mat` which my...
View ArticleHow to check if camera is enabled?
Hello. Is there any way to check if my camera is enabled (I don't mean available and I know that the light of computer is on when camera is on),but I'm writing a program with many files and functions...
View ArticleConverting image to grayscale
hi a newbie in python and opencv here.i tried to convert a picture from coloured to grayscale but it has an error,eventhou i take that code from youtube and all of my friends tried it and it work.i...
View Articleimshow no window on Mac Big Sur with Python
Ive recently upgraded to Big Sur, and also Python 3.9. and opencv 4.4.0.46 (latest) Now my imshow does not show anything. I can see the python launcher running, but no window appears. I am currently...
View ArticleDid convexityDefects function behaviour changed between cv2 versions 4.2.0...
I was making use of convexityDefects for hand detection/recognition in my project using opencv-contrib-python version `cv2 4.2.0.32`. I recently updated my cv2 version to the latest one, but my...
View ArticleDuplicate frames in saved file from cv2.VideoWriter
Setup specs can be found below. My VideoWriter writes @120fps, but the written video file has a repeated frame in it every 6 frames or so. This makes the true fps of the written video file closer to...
View ArticleReal-time webcam stream very slow with pixel manipulation
I am trying to write a script to manipulate video from a webcam. I am trying to do this through OpenCV with Python, but I am running into some issues. If I run the video capture stream with no pixel...
View ArticlefindCirclesGrid can't find sub-pattern with hollow insides
I'm trying to find a unique 2x2 hollow center sub-pattern inside a circle grid pattern. Using "detect", generates keypoints that indicate that the hollow circles are detected correctly, but the 2x2...
View Article