Commit 2727a425 authored by Alexander Mordvintsev's avatar Alexander Mordvintsev

fixed distrans.py sample (distanceTransform -> distanceTransformWithLabels)

parent 63b5cf6d
......@@ -26,7 +26,7 @@ if __name__ == '__main__':
need_update = False
thrs = cv2.getTrackbarPos('threshold', 'distrans')
mark = cv2.Canny(img, thrs, 3*thrs)
dist, labels = cv2.distanceTransform(~mark, cv.CV_DIST_L2, 5)
dist, labels = cv2.distanceTransformWithLabels(~mark, cv.CV_DIST_L2, 5)
if voronoi:
vis = cm[np.uint8(labels)]
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment