I am using the opencv implementation of Harris Corner detection in python. My question is regarding the behaviour shown in the gif below – as the image is rotated the corners stop being detected (at various rotations). The full code: based on this. The image used can be found here. It is perhaps not so clear from the gif (more
Tag: computer-vision
How to play video on google colab with opencv?
I am working on a project related to object detection using Mask RCNN on google colab. I have a video uploaded to my colab. I want to display it as a video while processing it at the runtime using openCV. I want to do what cv2.VideoCapture(‘FILE_NAME’) does on the local machine. Is there any way to do it? Answer Found
How to create a Python convolution kernel?
I’m trying to create a convolution kernel, and the middle is going to be 1.5. Unfortunately I keep running in to ideas on how to do that. I’m trying to create something similar to this Answer Since OpenCV uses Numpy to display images, you can simply create a convolution kernel using Numpy. Here’s the kernel. Note the type is <class
Python OpenCV skew correction for OCR
Currently, I am working on an OCR project where I need to read the text off of a label (see example images below). I am running into issues with the image skew and I need help fixing the image skew so the text is horizontal and not at an angle. Currently the process I am using attempts to score different
How to remove small particle background noise from an image?
I’m trying to remove gradient background noise from the images I have. I’ve tried many ways with cv2 without success. Converting the image to grayscale at first to make it lose some gradients that may help to find the contours. Does anybody know of a way to deal with this kind of background? I even tried taking a sample from
How to detect and find checkboxes in a form using Python OpenCV?
I have several images for which I need to do OMR by detecting checkboxes using computer vision. I’m using findContours to draw contours only on the checkboxes in scanned document. But the algorithm extracts each and every contours of the text. Input Image: Answer Obtain binary image. Load the image, grayscale, Gaussian blur, and Otsu’s threshold to obtain a binary
Clustering images using unsupervised Machine Learning
I have a database of images that contains identity cards, bills and passports. I want to classify these images into different groups (i.e identity cards, bills and passports). As I read about that, one of the ways to do this task is clustering (since it is going to be unsupervised). The idea for me is like this: the clustering will
How to connect closest points together using opencv
Using the OpenCV module in python is it possible to connect the red dots in the image below such that each red dot is only connected once to its nearest neighbor red dot? Answer For the first step, you should convert your image to a binary image using the appropriate tools like cv2.cvtColor(), cv2.threshold(), cv2.bitwise_not(),… (depending on the image) –
How to create mask images from COCO dataset?
So I have been using this code,. I am trying to generate the raw mask of the images from COCO dataset. But what i get is some thing like this But what I want is something like this How can I get the raw mask against each image ? Answer I’m late to the party, but if this can help
Hough Circles open CV error
I am currently using HoughCircles on computer-vision but I can’t manage to make it work. How can this error be solved ? Here is my code : UPDATE : New error : Answer As @jeru-luke has told in comment, you should add img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) just before you call cv2.HoughCircles() : COLOR_BGR2GRAY and not COLOR_GRAY2BGR UPDATE: Add nimg =