Related: Install OpenCV for Python
Some legacy functions were removed completely from OpenCV3, such as
I don’t plan to find a workaround for those since Horn-Schunck and Lucas-Kanade are available as pure Python.
FourCC and SimpleBlobDetector:
#!/usr/bin/env python try: from cv2 import cv from cv import FOURCC as fourcc from cv2 import SimpleBlobDetector as SimpleBlobDetector except ImportError: from cv2 import VideoWriter_fourcc as fourcc from cv2 import SimpleBlobDetector_create as SimpleBlobDetector
In OpenCV 3, you must pass the
outImage argument, and OpenCV 2 is happy with this as well.
The third argument must be specified as
flow= to be OpenCV 2/3 compatible.