cv2 (2.4.8) missing DIST_L2 for distanceTransform?
I'm trying to implement a image segmentation node. If I following the image segementation example code
dist_transform = cv2.distanceTransform(opening, cv2.DIST_L2, 5)
I get the following error:
AttributeError: 'module' object has no attribute 'DIST_L2'
Checking the __dict_ there is not a DIST_L2. I tried substituting NORM_L2, but that did not give the expected result.
The "import cv2" gives me version 2.4.8 (as installed by ROS Jade on Ubuntu 14.04)
Has anyone seen this issue?
Is it possible to use OpenCV 3 in python, or is that only for C++?
Can you write a minimal script which demonstrates this behavior. You have not clarified what cv2 exactly is. And point to the documentation from which you believe that cv2.DIST_L2 should exist.