I have compiled OpenCV
according to https://docs.opencv.org/master/d7/d9f/tutorial_linux_install.html
Used sources for 2.4.13.4
.
Used the following cmake
command:
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local -D PYTHON3_EXECUTABLE=/opt/anaconda3/bin/python PYTHON_INCLUDE_DIR=/opt/anaconda3/include/python3.5m PYTHON_INCLUDE_DIR2=/usr/include/python3.5 PYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.5m.so
PYTHON3_NUMPY_INCLUDE_DIRS=/opt/anaconda3/lib/python3.5/site-packages/numpy/core/include ..
Tests ran ok.
sudo make install
ran ok.
Unfortunately, in Python:
video = cv.VideoCapture(filename)
frame_count = int(video.get(cv.CAP_PROP_FRAME_COUNT))
returns zero.
Suspect that cv2
package I use in python is just something separate.
How to ensure cv2
uses the same OpenCV i compiled?
UPDATE
dims@calculon:~$ python -c "import cv2; print(cv2.__version__)"
3.3.0
dims@calculon:~$ pkg-config opencv --modversion
2.4.13.4