Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked Oct 23 '15

boaz001 gravatar image

canny apertureSize parameter doesn't work

The apertureSize parameter as described by the canny documentation does not give any difference in the detected edges.

Here is my code:

thresh1 = 100
thresh2 = 200
aperture1 = 3
aperture2 = 7
img = cv2.imread("lena.png", 0)
edges1 = cv2.Canny(img, thresh1, thresh2, aperture1)
edges2 = cv2.Canny(img, thresh1, thresh2, aperture2)
cv2.imshow("result aperture 3", edges1)
cv2.imshow("result aperture 7", edges2)
cv2.waitKey()

Why are both result images identical?