From 2727a425e450fbff3034132c1e52986de8d200b4 Mon Sep 17 00:00:00 2001 From: Alexander Mordvintsev Date: Tue, 6 Mar 2012 13:22:55 +0000 Subject: [PATCH] fixed distrans.py sample (distanceTransform -> distanceTransformWithLabels) --- samples/python2/distrans.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/python2/distrans.py b/samples/python2/distrans.py index c200e7d..8633e66 100644 --- a/samples/python2/distrans.py +++ b/samples/python2/distrans.py @@ -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: -- 2.7.4