Closed lulu1315 closed 1 month ago
cv2.optflow.writeOpticalFlow(flow_name,flowDeep)
May be you should read doc carefully
cv.writeOpticalFlow("toto",flowDeep) MRE :
import numpy as np
import cv2 as cv
imgA = np.zeros((480,640))
imgB = np.zeros((480,640))
deepF = cv.optflow.createOptFlow_DeepFlow()
flowDeep = deepF.calc(imgA, imgB, None)
cv.writeOpticalFlow("toto",flowDeep)
ooops. ok it works. sorry for the noise
System Information
OpenCV python version: 4.9.0.80 Operating System / Platform: Ubuntu 20.04 Python version: 3.8.5
Detailed description
trying to write .flow files. i have opencv-contrib-python installed (pip3 install opencv-contrib-python) but it gives me this message (see title)
Steps to reproduce
using this code . flow is calculated with
deepF = cv2.optflow.createOptFlow_DeepFlow() flowDeep = deepF.calc(grayA, grayB, None) # cv2.optflow.writeOpticalFlow(flow_name,flowDeep)
Issue submission checklist