Ask Your Question
0

How to use DualTLV1Optical Flow in python ?

asked 2019-05-03 14:53:14 -0600

Nbb gravatar image

updated 2019-05-03 15:56:30 -0600

I have OpenCV installed but can't seem to import the DualTLV1OpticalFlow https://docs.opencv.org/3.3.0/dc/d47/...

import cv2
optical_flow = cv2.DualTVL1OpticalFlow_create()

Gives me the error message

AttributeError: module 'cv2' has no attribute 'DualTVL1OpticalFlow_create'

Is there a way to install it if i already have OpenCV installed ? I got an error message

conda install -c michael_wild opencv-contrib

Solving environment: failed

UnsatisfiableError: The following specifications were found to be in conflict: - opencv-contrib -> python[version='>=3.6,<3.7.0a0'] - python=3.5 Use "conda info <package>" to see the dependencies for each package.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-05-03 15:21:22 -0600

berak gravatar image

updated 2019-05-03 15:22:42 -0600

as of current opencv 4, you need the opencv_contrib modules, it is in:

cv2.optflow.DualTVL1OpticalFlow_create()

see https://docs.opencv.org/master/dc/d4d...

(3.3 does not seem to have python bindings for this at all)

edit flag offensive delete link more

Comments

Thank you. Is there a way to install it if i already have OpenCV installed ? I got an error message (updated my original post)

Nbb gravatar imageNbb ( 2019-05-03 15:56:33 -0600 )edit

I simply created a new environment and installed opencv-contrib https://www.learnopencv.com/install-o...

Nbb gravatar imageNbb ( 2019-05-03 18:11:06 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-05-03 14:53:14 -0600

Seen: 2,600 times

Last updated: May 03 '19