I'm asking you a very simple question. I want to use the TVL1 function for computing opticalflow with openCV (and python). But here is what I get :
AttributeError: 'module' object has no attribute 'DualTVL1OpticalFlow_create'
Traceback (most recent call last):
File "opticalFlowModel.py", line 50, in computeOpticalFlow
optical_flow = cv2.DualTVL1OpticalFlow_create()
AttributeError: 'module' object has no attribute 'DualTVL1OpticalFlow_create'
The problem is that in this topic How to compute optical flow using tvl1 opencv function , they seems to use the exact same code. I also try this code : Speed Up Optical Flow algorithm (If applicable) Python OpenCV and have the same result.
Here are all my import :
import cv2
import numpy as np
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from PyQt4 import QtCore, QtGui
I'm using OpenCV 4.0.1