distanceTransform doesn't work from Python (Bug #2904)


Added by Niels Myrtue almost 12 years ago. Updated almost 12 years ago.


Status:Cancelled Start date:2013-03-22
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:-
Affected version:2.4.3 Operating System:
Difficulty: HW Platform:
Pull request:

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

Also available in: Atom PDF