0

es = cv.CreateStructuringElementEx(9,9, 4,4, cv.CV_SHAPE_ELLIPSE)

AttributeError: 'module' object has no attribute 'CreateStructuringElementEx'

Why? Where I could see the differences between the versions?

Timur Musharapov
  • 163
  • 1
  • 1
  • 13

1 Answers1

2

In OpenCV 3 you should use:

cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(9,9))

Have a look at OpenCV Python tutorials on morphological operations

Miki
  • 40,887
  • 13
  • 123
  • 202