fixed distrans.py sample (distanceTransform -> distanceTransformWithLabels)
This commit is contained in:
parent
63b5cf6dea
commit
2727a425e4
@ -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…
Reference in New Issue
Block a user