Ask Your Question

wibr's profile - activity

2016-01-04 09:29:51 -0600 answered a question Missing/double edges in OpenCV/scikit-image implementations of Canny edge detector

Answer is already in the comments, it works with an aperture of 5. I also submitted an issue.

2016-01-01 10:18:23 -0600 commented question Missing/double edges in OpenCV/scikit-image implementations of Canny edge detector

Using an aperture size of 5 works in this case. However, I can't answer my own question yet.

2016-01-01 09:06:31 -0600 commented question Missing/double edges in OpenCV/scikit-image implementations of Canny edge detector

Yeah true the donut is not binary, don't think it should make a difference, though.

2016-01-01 08:54:08 -0600 commented question Missing/double edges in OpenCV/scikit-image implementations of Canny edge detector

Thanks for the suggestions! The images are all png already...

2016-01-01 08:23:12 -0600 received badge  Student (source)
2015-12-31 08:19:05 -0600 asked a question Missing/double edges in OpenCV/scikit-image implementations of Canny edge detector

If found that the Canny edge detector in OpenCV (2.4.9 on OSX via brew), applied on the binary test image below (left), misses an edge segment at the upper right corner (middle). For comparison I tried scikit-image (right), which produces a small hole at the top (can be fixed using different parameters) and double edges (which should not happend according to my understanding of the algorithm).

input file output canny opencv output canny scikit-image

I tried different parameters with no effect, probably because the input image is already a binary image.

Code:

# opencv
canny=cv2.Canny(image,300,500)
# scikit-image
canny = img_as_ubyte(feature.canny(image, 1, 300, 500))

Is this expected behaviour? Anything I can do to prevent those gaps?