All Questions
Tagged with contour computer-vision
134 questions
0
votes
0
answers
105
views
OpenCV trouble with consistency: edge detection / contours
Here is a generalized example of the house photo's I am referring to. I’m using OpenCV to detect and outline the roof of a house in a set of images by drawing contours around the roof edges. The issue ...
0
votes
1
answer
129
views
OpenCV code fail to detect overlapping rectangles in an image
I am using OpenCV to detect rectangles in an image based on their color. The code works well for non-overlapping rectangles, but it fails to detect overlapping rectangles.
Here's code I am using
...
0
votes
0
answers
28
views
How can i get the mask from contours to apply skeltonization
enter image description hereBelow is an image containing road contours. I want to apply skeletonization, but I'm getting poor results. So, I thought of first obtaining the mask from the contours and ...
0
votes
0
answers
90
views
Determine corner coordinates and Draw contours in OpenCV
Binary mask:
Expected image:
I am working on OpenCV-Python and I have an binary image below.
Next I have an "expected" image that has the contours on it. In this example image, it has 5 ...
-1
votes
1
answer
112
views
Unable to get left and right road edge
I am trying to find the points representing the left and right edge of a road mask(binary image). I have tried using contour detection but it is giving contour of whole image(including upper and lower ...
1
vote
1
answer
285
views
Find box contour using opencv
I need to find the contour of boxes and of the hot stuff in the box coming from an IR camera. I can easily find the contour of the hot stuff inside the box using a treshold multiotsu with classes=2, ...
0
votes
0
answers
109
views
How can I extract a bounding box around a picture of a slide in Python using cv2?
I have an image of a slide taken on a RaspberryPi, and I eventually want to be able to extract the slide number, which will always be in the bottom-right corner. I know that I can just use Tesseract ...
1
vote
0
answers
72
views
Adjust the edge points of a rectangular shaped contour
I've got a mask with a contour that is shaped similarily to a rectangle.
I currently calculate four edge points of the contour with the help of opencv and it works fine (see blue dots on image below)....
0
votes
0
answers
22
views
Does OpenCV-python guarantee that a contour remains the same even if other parts of an image change?
Concider this situation. you have two images.
Image 1
Image 2
Yes, the upper left figure is the same in both cases. Yes, the other (non-overlapping figures) might be different. Can I be sure that if ...
-1
votes
1
answer
62
views
Including innermost contour in an Image to find its centre
import cv2
image = cv2.imread("pcb.jpg")
gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
_, thresh_image = cv2.threshold(gray_image, 150, 255, cv2.THRESH_BINARY)
contours, hierarchy = ...
0
votes
2
answers
817
views
python opencv - filter contours by position
I use this code to find some blobs, and pick the biggest one.
contours, hierarchy = cv2.findContours(th1, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE)
if len(contours) != 0:
c = max(contours, key=...
0
votes
0
answers
134
views
How do I isolate the major white areas, Iterate through those contours, add a bounding box?
I'm am trying to get all white areas in the below image (first / second image), and draw a bounding box.
After thresholding, canny etc I get a decent mask, although needs improving. However not sure ...
-1
votes
2
answers
361
views
Finding coordinated of rectangular structure using OpenCV
I'm trying to draw a rectangular contour around the prominent rectangle shown in the picture below and find its coordinates.
The original image is :
[
I have arrived at the below image using:
th1 = ...
0
votes
1
answer
819
views
Is it possible to find the bending point using opencv Python?
Aim of my program is find the angle of bending Led.
I got the angle using convexity defects in convex hull but the midpoint is move away from center point of that bend.
original image
original
below ...
2
votes
1
answer
805
views
Find edge points of this shape using opencv python
Everyone I have used contours to find out the endpoints as shown in the image but I'm not getting my expected output what these points (p1,p2,p3,p4). Can you please help me to find it out? I have also ...