Category "opencv"

cv2 polylines can't draw on numpy array "Expected Ptr<cv::UMat> for argument 'img'"

I'm converting a pytorch tensor representation of an image and series of points to numpy so that I can draw lines between the points and display the image in ju

Use a derived mapping function to modify s?

I've read this entire paper multiple times, and I've found a way to make everything in python... Except this (Article II, section C). They want me to upscale th

Correct way to draw/edit a CVPixelBuffer in Swift in iOS

Is there a standard performant way to edit/draw on a CVImageBuffer/CVPixelBuffer in swift? All the video editing demos I've found online overlay the drawing (re

Python CV2 video writer doesn't save video

I have a simple python code using OpenCV and Keras that performs some detections on frames (follow-up from my previous question here). But when I want to record

Python CV2 video writer doesn't save video

I have a simple python code using OpenCV and Keras that performs some detections on frames (follow-up from my previous question here). But when I want to record

Can't bind OpenCV to my project via CMake in CLion

For an exercise at school I need to work with OpenCV, but I can't figure out how I can link this in CLion. I have chosen to put the entire OpenCV library in my

Opencv for Unity - Camera position inaccurate by factor of ~2

I am having an issue getting accurate aruco pose estimation. The transform of the AR object relative to camera is a factor ~2 smaller than it should be. In the

Display and EDIT opencv image using Tkinter

I have a simple GUI app to display image from chosen camera and transformed image. To do transformation I need to choose 4 points on image, so I would like to p

How to remove cloth from a person using python

My Input Image is this. I need only the face and hair from that image and others will convert to white background including cloth. I used mediapipe's SelfiSegm

OpenCV C++ Sorting a vector of contour point in decending order

I'm trying to sort vector of contours point in decending order but whenever I used: sort(contours.begin(), contours.end() , greater<>()), It is poping

error: (-2:Unspecified error) Can't create layer "NoOp" of type "NoOp" in function 'cv::dnn::dnn4_v20210608::LayerData::getLayerInstance'

I am using tensorflow 2.4 and Cuda 11. I've build a CNN model from scratch using tensorflow and frozen it to create the .pb and .pbtxt file.Now I am trying to m

Image blending: transparant black areas

I'm trying to add a chessboard to an image in order to find the distortion coefficients. However when I use the function addWeighted() the black areas of my che

opencv tutorial problem with samples::findFile()

when I'm trying to run this tutorial I'm getting this problem on samples::findFile() I tried to #include <opencv2/core/utility.hpp> but same problem, any

error: (-215:Assertion failed) (int)_numAxes == inputs[0].size() in function 'getMemoryShapes'

im trying to use opencv to do face recognition using facenet512. i converted the model to onnx format using tf2onnx. i know that the input of the model should b

Improve edge detection using opencv

so I am working on a project to scan analog photos. The program should detect the edges and crop it automatically. For that I am using Python and OpenCV. My pro

How to crop and store bounding box image regions in Python?

My idea is to use the multiple bounding box coordinates of the abnormal regions for a given image and crop these regions to save to a separate folder. I have

How to detect the exact color of the images using hsv color model and opencv

I have datasets of images of gemstones.I have categorised the gemstones into folders based on their colours.(That is Red, Blue, Pink,Purple,Yellow). What I want

opencv video window not opening though sucess true and camera opens wbut no video window

Can somebody help me with finding error on the below code? I am working on tutorial Face Detect Attendance system python opencv but cv fails to load camera....

cv2.error: OpenCV(4.5.2) 👎 error: (-5:Bad argument) in function 'cvtColor'

this is my code and I have a problem. What is the solution for it, please? I try to make a screen recorder: import numpy as np import cv2 import pyautogui code

Linking opencv 3.2 for cv_bridge in Ubuntu 18.04 Jetson

I need to use cv_bridge and transfer the images to vison wx. I am using makefile to link / compile. The problem I have is I don't know where the header files a