Category "opencv"

Resize image to maintain aspect ratio in Python, OpenCv

I'd like to get a 1000 x 1000 picture in Python from any input picture so that the input doesn't lose it's aspect ratio. In other words, I want to resize the in

Python OpenCV Contour Tree Hierarchy Structure

I am trying to implement the algorithm found here in python with OpenCV. I am trying to implement the part of the algorithm that remove irrelevant edge boundari

Calculate affine motion model coefficients using OpenCV in C++

In order to correctly represent the camera motion characterization, I have to find different camera operations (such as Zoom, Pan, Rot and Tilt) in a video. The

How to decode mpeg motion vector using OpenCV in C++?

I want to decode the MPEG motion vectors using OpenCV in C++. Is there any function in OpenCV through which we can get this? Brightness may not be constant thro

mat is not a numerical tuple : openCV error

i have write down a code showing error i ma not getting it: Please help: Its showing mat is not a numerical tuple: import cv import cv2 capture = cv2.VideoCap

OpenCV - Apply mask to a color image

How can I apply mask to a color image in latest python binding (cv2)? In previous python binding the simplest way was to use cv.Copy e.g. cv.Copy(dst, src, mas

How to find corner (x, y) coordinate points on image Python OpenCV?

This is a truck container image but from the top view. First, I need to find the rectangle and know each corner position. The goal is to know the dimension of

"cv::VideoCapture::open VIDEOIO(CV_IMAGES): raised OpenCV exception"

When i use the VsCode debugger to run the code i dont get any error at all and everything works fine, but when i try to run the code without the debugger i get

OpenCV (-215:Assertion failed) !_src.empty() in function 'cvtColor

So, basically i'm writing a program in Google Colab that will detect faces through the webcam using python and opencv2. "I have Ubuntu 19.10, if this helps" im

Detect white blobs using opencv python

I am trying to simply find white circular blobs in an image. When i tried going with houghcircles, I keep getting letters and digits mistaken for circles, where

How to perform image segmentation of apples using Python OpenCV?

I have pictures of apple slices that have been soaked in an iodine solution. The goal is to segment the apples into individual regions of interest and evaluate

Image Perspective Transform using Android OpenCV

I am making Android App which can make Perspective Transform Image. I want to do same thing like below code. I tried but I cant read C code. Please advise me!

How to mask image with binary mask?

Suppose I have a greyscale image here: And a binary masked image here: With the same dimensions and shape. How do I generate something like this: Where the v

How to approximate jagged edges as lines using Python OpenCV?

I am trying to find accurate locations for the corners on ink blotches as seen below: My idea is to fit lines to the edges and then find where they intersect. A

Python OpenCV - How to save a 5 channel image

I'm using Google Colab with Python 3 and I need to merge 3 images to make a new one with 5 channels, but i get this error: error: OpenCV(4.1.2) /io/opencv/modu

How to clean images before OCR with Python OpenCV?

I've been trying to clear images for OCR: (the lines) I need to remove these lines to sometimes further process the image and I'm getting pretty close but a

How to clean images before OCR with Python OpenCV?

I've been trying to clear images for OCR: (the lines) I need to remove these lines to sometimes further process the image and I'm getting pretty close but a

How to crop sub-part from national ID without losing quality

I am having a use case where dividing National ID card is mandatory for OCR Received Image vary in size and pixels number Samples Used the following code to c

Not a Doxygen trailing comment

I am creating a project using Xcode using OpenCV library. I get an compiling error saying Not a Doxygen trailing comment in core.hpp and lots of other s

Resize multiple images with OpenCV to square size without padding

My question is simple yet I haven't found any solution on Google, all the answers are for adding padding which in my case I don't want... It's basically resizin