I tried to use the DualTVL1OpticalFlow_create from opencv but it is not available at the latest version of cv2. Then, I tried to import cv2.optflow.DualTVL1OpticalFlow and, despite I can do it, I got an error when I calculated the flow.
cv2.error: OpenCV(4.5.4) D:\a\opencv-python\opencv-python\opencv_contrib\modules\optflow\src\tvl1flow.cpp:415: error: (-215:Assertion failed) I0.type() == CV_8UC1 || I0.type() == CV_32FC1 in function 'cv::optflow::OpticalFlowDual_TVL1::calc'
Can someone help me, please?
I tried to use the DualTVL1OpticalFlow_create from opencv but it is not available at the latest version of cv2. Then, I tried to import cv2.optflow.DualTVL1OpticalFlow and, despite I can do it, I got an error when I calculated the flow.
cv2.error: OpenCV(4.5.4) D:\a\opencv-python\opencv-python\opencv_contrib\modules\optflow\src\tvl1flow.cpp:415: error: (-215:Assertion failed) I0.type() == CV_8UC1 || I0.type() == CV_32FC1 in function 'cv::optflow::OpticalFlowDual_TVL1::calc'
Can someone help me, please?