distanceTransform doesn't work from Python (Bug #2904)
Description
I can't seem to get distanceTransform to do anything to my input images using the Python bindings
The the problem can be reproduced with the following code:
import numpy as np
import cv2
im = np.zeros( (10, 10), dtype = np.uint8)
im[5,5] = 255
imDT = cv2.distanceTransform(im, cv.cv.CV_DIST_L1, cv.cv.CV_DIST_MASK_5)
I've tried different combinations of type and mask parameters, but the output is always the same as the input.
History
Updated by Niels Myrtue almost 12 years ago
Please delete. Realized the function treats zeros as edges.
Updated by Daniil Osokin almost 12 years ago
- Status changed from Open to Cancelled