Category "opencv"

How to calculate the Euclidean distance in a canny image

I have a black line and purple lines. I want to calculate the distance between each purple pixel points in the canny image and the closest black line in the mos

opencv face detection problems

Please help me resolve this **openCv **problem in faces import cv2, time first_frame = None video = cv2.VideoCapture(0) while True: check, frame=video.read(

Can someone explain the output of forward() in DNN module?

when I learn YOLO using opencv, and I use 1 class. outs = net.forward(output_layers) if I print the output is as follows: [9.31552518e-03 7.26305973e-03 2.5157

object detection with YOLO in 2 stream cameras using multithread and opencv

I want to do object detection with YOLO in 2 stream cameras. I use multithread and the result is like in the video. So when 2 camera streams are used, object de

Raspberry pi 64 bit Os showing Unable to locate package libjasper-dev. how to fix this?

I am using a raspberry pi 4. And I installed a 64-bit (not 32-bit) Raspberry Pi OS. When I tried to install libjasper-dev using the command 'sudo apt-get instal

Scene Text Image Super-Resolution for OCR

I am working on an OCR system. A challenge that I'm facing for recognizing the text within ROI is due to the shakiness or motion effect shot or text that is no

Fast and Robust Image Stitching Algorithm for many images in Python?

I have a stationary camera which takes photos rapidly of the continuosly moving product but in a fixed position just of the same angle (translation perspective)

How can I draw a circle next to each other with a text in center uisng opencv in python?

I'm trying to draw a concurrent circles of equal radius on top row of image with a text on center of circle. I'm able to draw a single circle on center of imag

Saving and loading image descriptors

I've using ORB/FLANN to compare images and want to save / load image descriptors that come out of FLANN to a file so I can read them in later to compare with an

How to solve "RuntimeError: CUDA error: invalid device ordinal"?

I'm trying to run this code. I don't know what is wrong with it, but this code is not running. and I don't know how to solve this problem. import cv2 from facia

How to calculate average pixel intensity inside a laser line in Python?

I am trying to write a code that calculates the speckle contrast of a laser line. Here is an example of an image that I would be analyzing: The image is black w

opencv_traincascade -numStages 1 How many stages do I need?

I am tracking one particular dog and nothing else. What is the maximum stage, number of positive and negative samples that makes sense? With: ./opencv_trainc

C# with Iron python Error: Microsoft.Scripting.SyntaxErrorException: 'unexpected token 'from''

I'm trying to execute a python file in c#. But I'm getting an error when I'm trying to execute the python file. The error is Microsoft.Scripting.SyntaxErrorExce

Is there a way to increase speed for video processing with opencv? [duplicate]

out = cv2.VideoWriter(output_file, codec, fps, (width,height)) while video.isOpened(): has_frame, image = video.read() if has_frame:

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