opencv - Python AttributeError: 'module' object has no attribute 'DIST_L2' -
i trying use cv2.distancetransform()
method in python. , getting error when running following line of code:
dist_transform = cv2.distancetransform(opening,cv2.dist_l2,5)
i following error when running code:
attributeerror: 'module' object has no attribute 'dist_l2'
similar questions have been asked before, , know problem occurs when import 'something' when python file name 'something.py'. however, python file name segment3.py.
can please me this? trying segmentation using watershed algorithm. working on fedora20. in advance!
should rewritten below:
(dist_transform, labels) = cv2.distancetransform(opening,cv2.cv.cv_dist_l2,5)
Comments
Post a Comment