I am having problem running the opt_flow.py in /opencv/samples/python2. In /samples/python everything is okay. But in python2, there seems something missing.
The python version: 2.7.3 IDE: pyDev in Eclipse
running opt_flow.py from https://github.com/jonmarimba/OpenCVMirror/blob/ff81e19a7a12764c657e2765d69ef166065f5e61/opencv/samples/python2/opt_flow.py
Below are from the code snippet:
import cv2, cv2.cv as cv
import video
from common import anorm2, draw_str
from time import clock
...
and there comes errors..
Description Resource Path Location Type
Unresolved import: video optical_flow.py /practice/test line 9 PyDev Problem
Unresolved import: draw_str optical_flow.py /practice/test line 10 PyDev Problem
Unresolved import: anorm2 optical_flow.py /practice/test line 10 PyDev Problem
which I didn't found any related solution to this error, can anyone help?
I had the same problem so here's the answer just to make it clear to others:
The opencv examples import other files in the same folder. The video.py file is in the same place you found the sample you were running. If you copy one of the examples out, you will also need to copy out other files that it imports, including video.py, common.py, and others.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With