fixed distrans.py sample (distanceTransform -> distanceTransformWithLabels)

pull/13383/head
Alexander Mordvintsev 13 years ago
parent 63b5cf6dea
commit 2727a425e4
  1. 2
      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:

Loading…
Cancel
Save