1 | initial version |
Thanks to Balaji, Canny now works
thresh = 50
maxValue = 255
th, dst = cv2.threshold(img, thresh, maxValue, cv2.THRESH_BINARY);
maxVal = 200
edges1 = cv2.Canny(dst,minVal,maxVal)
cv2.imshow('Edge image after thresholding image',edges)
cv2.imwrite('EdgeAfterThresh.png',edges1)
2 | No.2 Revision |
Thanks to Balaji, Canny now works
thresh = 50
maxValue = 255
th, dst = cv2.threshold(img, thresh, maxValue, cv2.THRESH_BINARY);
maxVal = 200
edges1 = cv2.Canny(dst,minVal,maxVal)
cv2.imshow('Edge image after thresholding image',edges)
cv2.imwrite('EdgeAfterThresh.png',edges1)
cv2.waitKey(0)
3 | No.3 Revision |
Thanks to Balaji, Canny now works
I'd still like to understand why Canny does not find the edge on the lower right virtex but has no issue with the lower left. I guess I could try flipping the image in the vertical axis. Canny should fail on the lower left then if its a data dependent issue.
thresh = 50
maxValue = 255
th, dst = cv2.threshold(img, thresh, maxValue, cv2.THRESH_BINARY);
maxVal = 200
edges1 = cv2.Canny(dst,minVal,maxVal)
cv2.imshow('Edge image after thresholding image',edges)
cv2.waitKey(0)