Ask Your Question

abeltan13's profile - activity

2020-03-02 05:16:47 -0600 received badge  Notable Question (source)
2019-08-12 00:12:15 -0600 received badge  Popular Question (source)
2018-06-17 05:10:17 -0600 asked a question Merge Two Closely Overlapping Contours

Merge Two Closely Overlapping Contours Hi, Say I have these two shapes, They can be represented by contours. I have

2018-06-17 05:02:50 -0600 commented answer Detect the `Shaded Region` and Remove it

wow, magic. Thanks a lot!

2018-06-17 05:02:07 -0600 marked best answer Detect the `Shaded Region` and Remove it

Hi,

I have a diagram like these:

diagram with shaded regions image description

I would like to detect the region which is shaded. Obviously, the shaded region is not really shaded, it just consists of a dense array of lines. I am also makeing a line tracing algorithm to detect the real lines, but these shaded lines distract my algorithm , so I need to remove them.

How do I detect the shaded regions and remove them?

Thanks a lot!

2018-06-17 05:02:07 -0600 received badge  Scholar (source)
2018-06-17 05:00:37 -0600 received badge  Enthusiast
2018-06-15 03:07:34 -0600 commented answer Detect the `Shaded Region` and Remove it

Hi LBerger, that is what I did. Unfortunately, the blur got rid of one of the True lines as well. The horizontal dotted

2018-06-14 23:21:38 -0600 asked a question Detect the `Shaded Region` and Remove it

Detect the `Shaded Region` and Remove it Hi, I have a diagram like these: I would like to detect the region which i

2018-06-01 07:37:49 -0600 marked best answer Hough Circles way too Sensitive

Hi,

I just downloaded OpenCV today. I decided to give it a test on a really simple example.

So I did Hough Circles on this simple image: image description

And I implemented Hough Circle using python :

import cv2
import numpy as np

img = cv2.imread('a_circle.jpg',0)
#gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
cimg = cv2.cvtColor(img,cv2.COLOR_GRAY2BGR)
#bin=cv2.threshold(img,0,255,cv2.THRESH_BINARY+cv2.THRESH_OTSU)[1]
#invbin=cv2.bitwise_not(bin)
edges = cv2.Canny(img,50,150,apertureSize = 3)
circles = cv2.HoughCircles(edges,cv2.HOUGH_GRADIENT,1,20,param1=50,param2=30,minRadius=100,maxRadius=0)
cv2.imshow('edge',edges)
cv2.waitKey(0)
circles = np.uint16(np.around(circles))
for i in circles[0,:]:
    # draw the outer circle
    cv2.circle(cimg,(i[0],i[1]),i[2],(0,255,0),2)
    # draw the center of the circle
    cv2.circle(cimg,(i[0],i[1]),2,(0,0,255),3)

cv2.imshow('detected circles',cimg)
cv2.waitKey(0)
cv2.destroyAllWindows()

However, I got a very messy circle detection with too many circles!

image description

I must be doing something wrongly! Could you tell me what it is?

Thanks very much!

Update:

I changed minDistance from 20 to 50 and I got:

image description

Update 2:

I changed minDistance from 50 to 120 and I got:

The problem has been solved. Thanks sjhalayka!!

2018-06-01 07:22:54 -0600 edited question Hough Circles way too Sensitive

Hough Circles way too Sensitive Hi, I just downloaded OpenCV today. I decided to give it a test on a really simple exam

2018-06-01 07:20:03 -0600 commented answer Hough Circles way too Sensitive

Hi,sjhalayka I changed the minDist from 20 to 100 and it worked 100%! Thanks a ton! Btw, what does the minDist do? S

2018-06-01 07:12:09 -0600 received badge  Editor (source)
2018-06-01 07:12:09 -0600 edited question Hough Circles way too Sensitive

Hough Circles way too Sensitive Hi, I just downloaded OpenCV today. I decided to give it a test on a really simple exam

2018-05-31 14:21:49 -0600 received badge  Student (source)
2018-05-31 07:53:10 -0600 asked a question Hough Circles way too Sensitive

Hough Circles way too Sensitive Hi, I just downloaded OpenCV today. I decided to give it a test on a really simple exam