Issue faceCascade = cv2.CascadeClassifier(‘haarcascade_frontalface_default.xml’) video_capture = cv2.VideoCapture(0) while True: ret, frame = video_capture.read() gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) faces = faceCascade.detectMultiScale( frame, scaleFactor=1.1, minNeighbors=5, minSize=(30, 30), flags=cv2.cv.CV_HAAR_SCALE_IMAGE ) # Draw a rectangle around the faces for (x, y, w, h) in
Continue readingTag: opencv
Opencv_createsamples fails with segmentation fault
Issue I am currently trying to make a HAAR classifier. I have made an annotation file and have done everything as described in the official openCV tutorial: https://docs.opencv.org/3.3.0/dc/d88/tutorial_traincascade.html . However, when I try to create the samples with opencv_createsamples, I
Continue readingWhere to get background sample images for haar training?
Issue I need collection of sample images (negative images, or also called background images) for haar training using opencv. It is written that I need to have a lot of them. About 5000 or 10000. Do you know where to
Continue readingsorting out pictures in training data to train a cnn (alexnet)
Issue i’m training a alexnet with footage from playing an emulated nes game (f1 racer), to further on let it play the game by itself. now while i’m capturing the training data, the background of the game is changing heavily
Continue readingMultiple QRCode detection from video stream
Issue I am making a program in c# that must detect and scan Qr-codes from a tag (using security cameras) that people glue to their chest, and as a second layer of security must also capture their faces and match
Continue readingWhere does a Mat object store its data if it's not in data variable?
Issue I need to transfer the image data from a Mat object (OpenCV) to a const unsigned char* within a ZXing::ImageView object; typically, I just use (assuming the object is named "object") object.data at my own risk and go from
Continue readingDecoding Datamatrix as digits using pylibdmtx
Issue I am trying to decode the digits from a Datamatrix. This is my code import cv2 from pylibdmtx.pylibdmtx import decode a = decode(cv2.imread(dmtx.jpg’)) print(a) The code runs without error. But it doesn’t print anything, it gives me an empty
Continue readingWhere to get background sample images for haar training?
Issue I need collection of sample images (negative images, or also called background images) for haar training using opencv. It is written that I need to have a lot of them. About 5000 or 10000. Do you know where to
Continue readingWhere to get background sample images for haar training?
Issue I need collection of sample images (negative images, or also called background images) for haar training using opencv. It is written that I need to have a lot of them. About 5000 or 10000. Do you know where to
Continue readingHow to adjust parameter of SVM for better training
Issue I am working on a Linear SVM and I am using Opencv with Python, I am trying to adjust the parameters for better training but still not getting the good results, I am feeling that I am going through
Continue readingTensorflow trained model speed
Issue I’m a Tensorflow newby and I’m trying to train a 1 class model for object detection. In particular I’m trying to recognize an arrow like the following: I need a very fast recognition so I started wondering if a
Continue readingopencv haartraining didnt finish
Issue i use 1292 positive image its for face and 5712 negative image and this my code for harrtraining C:\opencv\build\x64\vc11\bin\opencv_haartraining.exe -data cascades -vec vector/facevector.vec -bg negative/bg.txt -npos 1033 -nneg 5712 -nstages 20 -nsplits 2 -nonsym -minhitrate 0.999 -maxfalsealarm 0.5 -mem
Continue readingOpenCV createsamples – invalid background description file
Issue I’m in my OPENCV_ROOT folder and running the following command in Win-x64: opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 80 -h 40 -img ABSOLUTE_PATH_TO_POSITIVE_IMAGES_FOLDER\car.jpg -bg ABSOLUTE_PATH_TO_PROJECT\negatives.txt -vec ABSOLUTE_PATH_TO_SAMPLES_FOLDER\car.jpg.vec -num 125 My negatives.txt
Continue readingopencv createsamples has no error, but no samples found
Issue I’m using this tutorial, and I’m on the stage of creating lots of samples from my positive images. I’m using Windows. This is the command: perl bin/createsamples.pl positives.txt negatives.txt samples 1500\ “C:\opencv_built\bin\Release\opencv_createsamples.exe -bgcolor 0 -bgthresh 0 -maxxangle 1.1\ -maxyangle
Continue readingdivide image into two equal parts python opencv
Issue can someone tell me how to implement a bisection of the image into upper and lower part? so that I could overlap them. for example, I have an image and I should divide it to calculate a number of
Continue readingEstimating distance from camera to ground plane point
Issue How can I calculate distance from camera to a point on a ground plane from an image? I have the intrinsic parameters of the camera and the position (height, pitch). Is there any OpenCV function that can estimate that
Continue readingDetermine if a point is inside or outside of a shape with opencv
Issue I have images with white background and simple shapes in them (each image has one shape). I want to determine if a certain point (x,y) is inside the shape or not. How can I do that with opencv? Solution
Continue readingShow the center coordinate of the object tracking bounding box
Issue I would like to know how I can print the tracking coordinate rectangle onto the video. I want the coordinate of the center point of the rectangle and, of course, I want: if the tracker is moving, the coordinate
Continue readingHow to connect disjointed lines or edges in images?
Issue I am currently working on lines extraction from a binary image. I initially performed a few image processing steps including threshold segmentation and obtained the following binary image. As can be seen in the binary image the lines are
Continue readingHow to connect broken lines that cannot be connected by erosion and dilation?
Issue I have an image like this that has multiple stoppers and some of the lines are broken. To connect this broken line, I used a morphological operation like this: import cv2 import numpy as np img = cv2.imread(‘sample.png’, cv2.IMREAD_GRAYSCALE)
Continue readingnormalize image with opencv in c++?
Issue I have a TfLite model that takes a standardized float32 image as an input, the pixel range should convert from the [0~255] to [-1~1] I wrote a demo function but it didn’t work. I couldn’t set the color value
Continue readingOpenCV output monochrome TIFF group 4 compression
Issue Is there a way to output monochrome TIFF files in OpenCV with group 4 compression? This is the command to do it with imagemagick/graphicsmagick ‘gm convert ‘.$file.’ -type bilevel -monochrome -compress group4 ‘.$output OpenCV version 4.5.1 update # g++
Continue readingImage Comparison not working with Camera captured images
Issue [![enter image description here][1]][1][![enter image description here][2]][2]I am working on comparing two images for differences. Problem is that it works fine when I download some image from web, but not work when I tried to compare images which are
Continue readingFinding corners of box and crop Image
Issue Hey Guys I am working with numpy and opencv and want to get a image cropped by the contours of it. Here is one example what picture i want to crop by the edges, And i want that the
Continue readingValueError: too many values to unpack (expected 4) during ORB detection
Issue I’m detecting Unicode words on a starscape background. They all look a little like the example images below. I have a folder with 183 images, if any of those images are detected I want to click a button on
Continue readingPython making Hologram pyramid
Issue I am studying on hologram vision. I want to placed 4 images onto black screen. I wrote this code: import numpy as np import cv2 from screeninfo import get_monitors if __name__ == ‘__main__’: screen = get_monitors()[0] print(screen) width, height
Continue readingUse OpenCV to identiy hollow and filled circles
Issue I’m using OpenCV houghcircles to identify all the circles (both hollow and filled). Follow is my code: import numpy as np import cv2 img = cv2.imread(‘images/32×32.png’) gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) bilateral = cv2.bilateralFilter(gray,10,50,50) minDist = 30 param1 = 30
Continue readingHow to fill a polygon in OpenCV?
Issue The Python code given below draws a triangle, how can I fill it with a color inside? Or another easier way to draw a triangle in OpenCV? pts = np.array([[100,350],[165,350],[165,240]], np.int32) cv2.polylines(img,[pts],True,(0,255,255),2) Solution You have to use cv2.fillPoly(). Illustration
Continue readingHow to remove background and video from facial landmarks
Issue Im using this code to detect teh 468 facial landmarks from a face: import cv2 import mediapipe as mp import time cap = cv2.VideoCapture(0) pTime = 0 mpDraw = mp.solutions.drawing_utils mpFaceMesh = mp.solutions.face_mesh faceMesh = mpFaceMesh.FaceMesh(max_num_faces=2) drawSpec = mpDraw.DrawingSpec(thickness=1,
Continue readingWhy cv2.write saves black images?
Issue hi folks, greetings am using this code that I found on the web, to apply a wiener filter on an image, the code : from scipy.signal.signaltools import deconvolve from skimage import color, data, restoration img = color.rgb2gray(img) from scipy.signal
Continue readingRotating QR code to the correct position using Python OpenCV
Issue I’m a beginner in python and currently studying QR code detection and decoding. I’m having a hard time rotating the detected QR code to the right position. I already used minAreaRect() to rotate my QR code but it doesn’t
Continue readingPython3 'cv2.resizeWindow('img', 500,500)' error
Issue I am trying to run this face tracking program provided here, but running the python program returns; Traceback (most recent call last): File "C:\Users\User\Desktop\Projects\Face Tracking\servo\face.py", line 27, in <module> cv2.resizeWindow(‘img’, 500,500) cv2.error: OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window_w32.cpp:1473: error: (-27:Null pointer) NULL window:
Continue readingPython3 'cv2.resizeWindow('img', 500,500)' error
Issue I am trying to run this face tracking program provided here, but running the python program returns; Traceback (most recent call last): File "C:\Users\User\Desktop\Projects\Face Tracking\servo\face.py", line 27, in <module> cv2.resizeWindow(‘img’, 500,500) cv2.error: OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window_w32.cpp:1473: error: (-27:Null pointer) NULL window:
Continue readingPython3 'cv2.resizeWindow('img', 500,500)' error
Issue I am trying to run this face tracking program provided here, but running the python program returns; Traceback (most recent call last): File "C:\Users\User\Desktop\Projects\Face Tracking\servo\face.py", line 27, in <module> cv2.resizeWindow(‘img’, 500,500) cv2.error: OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window_w32.cpp:1473: error: (-27:Null pointer) NULL window:
Continue readingPython/Opencv save multiple images to folder with different names
Issue I am working on image processing, I have a folder with all of the images that needs to be processed, and I want to save all the processed images to another folder. How do I do that? for img
Continue readingResize image to maintain aspect ratio in Python, OpenCv
Issue 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 input so that its longer dimension is
Continue readingIs there any computational benefit to using Canny edge detection before circle Hough Transform?
Issue I was looking at how to detect billiard balls on a pool table, when I stumbled upon this post. The OP states that he employs the Canny edge detection algorithm on the hue channel of his video feed before
Continue readingHow to detect an object that blends with the background?
Issue I am a beginner and I am trying to apply an outline to the white remote control on the left that shares the same color with the background. a = cv2.imread(file_name) imgGray = cv2.cvtColor(a,cv2.COLOR_BGR2GRAY) imgGray = cv2.GaussianBlur(imgGray,(11,11),20) k5 =
Continue readingRemove everything of a specific color (with a color variation tolerance) from an image with Python
Issue I have some text in blue #00a2e8, and some text in black on a PNG image (white background). How to remove everything in blue (including text in blue) on an image with Python PIL or OpenCV, with a certain
Continue readingDetect white blobs using opencv python
Issue 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, whereas I only need complete circles, i.e. blobs. So I ran this
Continue readingWhen applying Gaussian filter the image becomes dark
Issue When I run the following code the output result is blurred but the image gets darker as I increase the value of sigma. Imports import numpy as np import cv2 import matplotlib.pyplot as plt %matplotlib inline import math import
Continue readingcv2.VideoCapture inconsistent behavior between cap.set and loop read
Issue I was trying to read the 600th frame of a video using cv2.VideoCapture. However, I found that the following two methods both successfully read an image but the images are different. I was wondering which is the correct way
Continue readingPython OpenCV Color Tracking
Issue Below is my python code for tracking white color objects. It works – but only for a few seconds and then the whole screen turns black and in some times it not work. I experimented with blue color and
Continue readingQuantify longest axis and width of irregular shapes within a single image
Issue Original question I have about 80-100 images such as (A). Each image is composed of shapes that were filled with black color after marking the outline in ImageJ. I need to extract each individual shape as in (B). I
Continue readingHow can I retain background after dilating text in image
Issue import cv2 import numpy as np # Load image, grayscale, Gaussian blur, Otsu’s threshold image = cv2.imread(‘1.png’) gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) blur = cv2.GaussianBlur(gray, (7,7), 0) thresh = cv2.threshold(blur, 0, 255, cv2.THRESH_BINARY_INV + cv2.THRESH_OTSU)[1] # Create rectangular structuring element
Continue readingCheck if an image contains blue pixels
Issue I have this image: And I’m trying to write a function in Python that will return True if the image contains blue pixels, or False otherwise. That image is just an example. I will have others were the blue
Continue readingHow to find extreme outer points in an image with Python OpenCV
Issue I have this image of a statue. I’m trying to find the top, bottom, left, and right most points on the statue. Is there a way to measure the edge of each side to determine the outer most point
Continue readingHow to create a Python convolution kernel?
Issue 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 Array = [ [0
Continue readingHow to get the location of all text present in an image using OpenCV?
Issue I have this image that contains text (numbers and alphabets) in it. I want to get the location of all the text and numbers present in this image. Also I want to extract all the text as well. How
Continue readingHow to convert PNG to JPG in Python?
Issue I’m trying to compare two images, one a .png and the other a .jpg. So I need to convert the .png file to a .jpg to get closer values for SSIM. Below is the code that I’ve tried, but
Continue readingHow to determine between inner and outer contour with Python OpenCV?
Issue I want to have a polygon region of interest and would like to perform an object detection algorithm within this area. For example, the user gives some points and I want to create a polygon with them in my
Continue readingHow to crop and extract stamp from an image with OpenCV?
Issue I am new to OpenCV. I have a "simple" image of a stamp that I have already processed a bit, as you can see in the code below. Now I have the problem of cropping the image to get
Continue readingOpenCV version 4.1.0 drawContours error: (-215:Assertion failed) npoints > 0 in function 'drawContours'
Issue I have the following code that worked well with OpenCV 3.4.1 and now is not working with OpenCV 4.1.0 and gives an error. I do not know how to adapt the code with the newer version, can you help
Continue readingUse cv2.findContours output as plt.contour input
Issue I have the following image I find the contour using contours, hierarchy = cv2.findContours(thresh, cv2.RETR_LIST, cv2.CHAIN_APPROX_NONE) contour = contours[0] Next, I determine the center of the contour def find_center(contour: np.ndarray) -> tuple: M = cv2.moments(contour) x = int(M["m10"] /
Continue readingImage masking by coordinate or changing binary image pixel to black based on the the coordinate
Issue I have this binary image and i want to remove the objects (convert all the white pixel to black ) that are above the (x, y) coordinate. This is the inital binary image image This is is the binary
Continue readingError: (-215:Assertion failed) npoints > 0 while working with contours using OpenCV
Issue When I run this code: import cv2 image = cv2.imread(‘screenshoot10.jpg’) cv2.imshow(‘input image’, image) gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) edged = cv2.Canny(gray, 30, 200) cv2.imshow(‘canny edges’, edged) _, contours = cv2.findContours(edged, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE) cv2.imshow(‘canny edges after contouring’, edged) print(contours) print(‘Numbers of
Continue readingDoes cv2.HoughCircles() perform a Gaussian blur?
Issue This is an extension to another user’s question asking whether it is necessary to perform a Gaussian blur before using cv2.Canny(). I know from the documentation that cv2.HoughCircles() calls a Canny edge detector (presumably cv2.Canny()). Based on the user’s
Continue readingHow to sort contours of a grid using OpenCV python?
Issue I’m trying to sort the following squares inside the checkers board grid. I have the valid contours, inside a NumPy array. Here’s a snippet of the code, on how I get the valid squares contours. # Find contours and
Continue readingHow to stretch a line to fit image with Python OpenCV?
Issue I have an image with the size of W * H, I want to draw a line on this and the line should be automatically fit to the image, for example if I draw it: I want this: How
Continue readingjoining dotted line by interpolation in an image
Issue I have this image as shown below. It is a binary mask I created this image using the below code. Basically I got the x_idx, y_idx for just those white pixels, and I know the actual image size, so
Continue readingPython OpenCV skew correction for OCR
Issue 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
Continue readingCounting curves, angles and straights in a binary image in openCV and python
Issue I want to write a tool for finding the number of angles, curves and straight lines within each bounded object in an image. All input images will be black on white background and all will represent characters. As illustrated
Continue readingHow to detect a hollowed shape as one object instead of two?
Issue A shape that is hollow, take the below situation as example, is detected as 2 objects, the outer triangle(can be seen as just an outline) is somehow detected as 2 objects as shown in the second image (2 green
Continue readingHow can I draw a circle next to each other with a text in center uisng opencv in python?
Issue 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 image as shown below I used below
Continue readingStoring RTSP stream as video file with OpenCV VideoWriter
Issue I’m developing a Python module, with OpenCV, that connects to an RTSP stream to perform some preprocessing on the video (mostly, reducing fps and resolution), and then store it in the file system. But, even after trying several codecs,
Continue readingOpenCV using k-means to posterize an image
Issue I want to posterize an image with k-means and OpenCV in C++ interface (cv namespace) and I get weird results. I need it for reduce some noise. This is my code: #include "cv.h" #include "highgui.h" using namespace cv; int
Continue readingIs there a way to detect if an image is blurry?
Issue I was wondering if there is a way to determine if an image is blurry or not by analyzing the image data. Solution Yes, it is. Compute the Fast Fourier Transform and analyse the result. The Fourier transform tells
Continue reading"DLL load failed" when import cv2 (opencv)
Issue In [windows server 2012 R2 x64, python 3.7 64x] pip install opencv-contrib-python installed without any error . and when I try to import it import cv2 show me this error : Traceback (most recent call last): File “test.py”, line
Continue readingHow to detect the exact color of the images using hsv color model and opencv
Issue 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 to do is: I want to train a model using hsv model and opencv to
Continue readingHow to antialias picture to get rid of the jerkiness in the image
Issue I am trying to antialias a picture and tried few methods, with open CV and with matplotlib and also with PIL. But still can’t get rid of the jerkiness. This is the picture for antialiasing. The first method I
Continue readingSimple illumination correction in images OpenCV C++
Issue I have some color photos and the illumination is not regular in the photos: one side of the image is brighter than the other side. I would like to solve this problem by correcting the illumination. I think local
Continue readingHow to fill holes or reduce noise in an image?
Issue I need to reduce the noise in images like the one bellow, i.e. fill the holes in the white object. I tried something with opencv but it ended up removing part of the object as you can see. Is
Continue readingHow to remove specific tag/sticker/object from images using OpenCV?
Issue I have hundreds of images of jewelry products. Some of them have "best-seller" tag on them. The position of the tag is different from image to image. I want iterate over all images, and if an image has this
Continue readingCompare two images and find all pixel coordinates that differ
Issue I have designed a program that compares two images and gives you the coordinates of the pixels that are different in both images and plots the using pygame. I do not mind having to use another library or to
Continue readingParticle detection with Python OpenCV
Issue I’m looking for a proper solution how to count particles and measure their sizes in this image: In the end I have to obtain the lists of particles’ coordinates and area squares. After some search on the internet I
Continue readingSelect coordinates from image, based on certain criteria
Issue Let’s say I have an OpenCV image in form of a numpy array. I want to collect all (x, y) point coordinates of points that have greater than zero blue color component. The naive way would be something like
Continue readingCV – Extract differences between two images
Issue I am currently working on an intrusion system based on video surveillance. In order to complete this task, I take a snapshot of the background of my scene (assume it’s totally clean, no people or moving objects). Then, I
Continue readingHow to detect checkboxes by removing noise using Python OpenCV?
Issue I am trying to identify the checkboxes in the image The top 4 are identified but the bottom 2 are not. At the same time I would like to be able to get rid of the peppering to avoid
Continue readingfinding not exactly same template in image
Issue I want to find a character in my input image. When I crop char from an image and use template matching, in almost all cases, it works perfect; but if I use that template for another image with a
Continue readingHow to overlay a heatmap numpy array in red on a gray image?
Issue I have tried first converting the grayscale image and the 2D-heatmap to RGB images. The heatmap is converted by making all except the red dimension zeros. Then the image is masked with a threshold, where the heatmap is above
Continue readingRemoving Horizontal Lines in image (OpenCV, Python, Matplotlib)
Issue Using the following code I can remove horizontal lines in images. See result below. import cv2 from matplotlib import pyplot as plt img = cv2.imread(‘image.png’,0) laplacian = cv2.Laplacian(img,cv2.CV_64F) sobelx = cv2.Sobel(img,cv2.CV_64F,1,0,ksize=5) plt.subplot(2,2,1),plt.imshow(img,cmap = ‘gray’) plt.title(‘Original’), plt.xticks([]), plt.yticks([]) plt.subplot(2,2,2),plt.imshow(laplacian,cmap =
Continue readingHow to clean images before OCR with Python OpenCV?
Issue 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 lot of the time the threshold takes away too much
Continue readingHow to extract multiple objects from an image using Python OpenCV?
Issue I am trying to extract object from an image using the color using OpenCV, I have tried by inverse thresholding and grayscale combined with cv2.findContours() but I am unable to use it recursively. Furthermore I can’t figure out how
Continue readingHow to detect and find checkboxes in a form using Python OpenCV?
Issue 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
Continue readingCropping Concave polygon from Image using Opencv python
Issue How can I crop a concave polygon from an image. My Input image look like . and the coordinates of closed polygon are [10,150],[150,100],[300,150],[350,100],[310,20],[35,10]. I want region bounded by concave polygon to be cropped using opencv. I searched for
Continue readingHow to detect corners of a square with Python OpenCV?
Issue In the image below, I am using OpenCV harris corner detector to detect only the corners for the squares (and the smaller squares within the outer squares). However, I am also getting corners detected for the numbers on the
Continue readingHow to approximate jagged edges as lines using Python OpenCV?
Issue 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. As of now, I’ve tried using cv2.approxPolyDP() with
Continue readingRemove moving objects to get the background model from multiple images
Issue I want to find the background in multiple images captured with a fixed camera. Camera detect moving objects(animal) and captured sequential Images. So I need to find a simple background model image by process 5 to 10 captured images
Continue readingCount total number of white pixels in an image
Issue I am trying to count total number of white pixels in the following image: But with my code, I get this error src is not a numpy array, neither a scalar. This is my code: img=cv2.imread(filename,1) TP= width *
Continue readingHow to find corner (x, y) coordinate points on image Python OpenCV?
Issue 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 the container. Solution Here’s a simple approach: Obtain
Continue readingDetect bullet holes on the target image
Issue I want to know how to detect the bullet holes on the target using Python and OpenCV. I’m not able to draw the contours around them. So far I have applied a threshold, and I have the following result
Continue readingOpenCV / C++ – OpenCV detect mouse click position and displays it, but doesn't draw a circle
Issue I have this OpenCV Code where I want to draw a circle on a image each time i left click my mouse. It detect the position of my mouse at the time I pressed the left button and displays
Continue readingHow to segment object from the background of an image Python OpenCV?
Issue I’m trying to segregate a tower from its background. To do this I’ve defined an upper and lower limit HSV range of object color as shown below, but it only segregates partial object from its background, as the object
Continue readingHow to detect multiple colored regions in an image and produce individual crops for each with Python OpenCV?
Issue I have an image like this: And I want to crop the image anywhere there is red. So with this image I would be looking to produce 4 crops: Obviously I first need to detect anywhere there is red
Continue readingHow to extract green objects in an image?
Issue I have ROI’s for the bounding boxes around the objects in an image. The ROI’s are obtained by the Faster R-CNN. Now I want to get the green spike objects contained within the bounding box. After getting the ROI’s,
Continue readingHow to find individual numbers in an image with Python OpenCV?
Issue I have an image similar to the following. I want to separate two numbers 7 and 4 as shown in the image, in that I want to have a bounding box for each of these two objects. How could
Continue readingDetect and fix text skew by rotating image
Issue Is there a way (using something like OpenCV) to detect text skew and correct it by rotating the image? Pretty much like this? Rotating an image seems easy enough if you know the angle, but for the images I’m
Continue readingHow to find and crop words into individual images with Python OpenCV?
Issue I have a binary image of words as shown, and I want crop the image with each character in different image. Output should have different images of k,7,2,f,5 & m. I tried using OpenCV in python, but due to
Continue readingHow to remove noise artifacts from an image for OCR with Python OpenCV?
Issue I have subsets of images that contains digits. Each subset is read by Tesseract for OCR. Unfortunately for some images the cropping from the original image isn’t optimal. Hence some artifacts/remains at the top and bottom of the image
Continue readingHow to find playing cards in an image with OpenCV?
Issue I’m currently developing a playing card detection program. I’m using Hough Line Transform in order to detect the positions of the cards, as it seems the most robust way. because it’s less dependent of environment conditions such as light
Continue reading