ukoehb / cvvidproc Goto Github PK
View Code? Open in Web Editor NEWOpenCV video processing (for object tracking)
License: MIT License
OpenCV video processing (for object tracking)
License: MIT License
When computing the background with the following method in python
def compute_bkgd_med(vid_path, num_frames=100):
vidpack = cvvidproc.VidBgPack(
vid_path,
'hist',
-1,
num_frames,
True,
0,
0,
200,
200)print('getting video background')
bkgd_med = cvvidproc.GetVideoBackground(vidpack)
print('video background obtained')return bkgd_med
I get the following output:
getting video background
Frames: 2056; Res: 1280x512(200x512 cropped); FPS: 60
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.5.1-dev) /home/aylitalo/opencv/modules/core/src/matrix.cpp:810: error: (-215:Assertion failed) 0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows in function 'Mat'Aborted (core dumped)
In step 4 of 9 of the build during installation (building cv_vid_bg_helpers.cpp.o
), the following error arose
In file included from ../../../Sources/AsyncTokens/token_batch_generator.h:7,
from ../../../Sources/AsyncTokens/async_token_batch_generator.h:7,
from ../../../Sources/cv_vid_bg_helpers.cpp:4:
../../../Sources/AsyncTokens/ts_interval_timer.h:109:46: error: use of deleted function ‘std::atomic<_Tp>::atomic() [with _Tp = TSIntervalTimer::IntervalPair]’
109 | std::atomic m_interval_record{};
| ^
In file included from ../../../Sources/AsyncTokens/ts_interval_timer.h:11,
from ../../../Sources/AsyncTokens/token_batch_generator.h:7,
from ../../../Sources/AsyncTokens/async_token_batch_generator.h:7,
from ../../../Sources/cv_vid_bg_helpers.cpp:4:
/usr/include/c++/9/atomic:198:7: note: ‘std::atomic<_Tp>::atomic() noexcept [with _Tp = TSIntervalTimer::IntervalPair]’ is implicitly deleted because its exception-specification does not match the implicit exception-specification ‘’
198 | atomic() noexcept = default;
| ^~~~~~
I'm not sure of the cause, but I found this stackoverflow post describing a possible cause in detail.
A similar error occurs in step 5 of 9 (building main.cpp.o
):
In file included from ../../../Sources/main.cpp:9:
../../../Sources/AsyncTokens/ts_interval_timer.h:109:46: error: use of deleted function ‘std::atomic<_Tp>::atomic() [with _Tp = TSIntervalTimer::IntervalPair]’
109 | std::atomic m_interval_record{};
| ^
In file included from ../../../Sources/AsyncTokens/ts_interval_timer.h:11,
from ../../../Sources/main.cpp:9:
/usr/include/c++/9/atomic:198:7: note: ‘std::atomic<_Tp>::atomic() noexcept [with _Tp = TSIntervalTimer::IntervalPair]’ is implicitly deleted because its exception-specification does not match the implicit exception-specification ‘’
198 | atomic() noexcept = default;
| ^~~~~~
and in step 7 of 9 (building cv_vid_bubbletrack_helpers.cpp.o
):
In file included from ../../../Sources/AsyncTokens/token_batch_generator.h:7,
from ../../../Sources/AsyncTokens/async_token_batch_generator.h:7,
from ../../../Sources/cv_vid_bubbletrack_helpers.cpp:5:
../../../Sources/AsyncTokens/ts_interval_timer.h:109:46: error: use of deleted function ‘std::atomic<_Tp>::atomic() [with _Tp = TSIntervalTimer::IntervalPair]’
109 | std::atomic m_interval_record{};
| ^
In file included from ../../../Sources/AsyncTokens/ts_interval_timer.h:11,
from ../../../Sources/AsyncTokens/token_batch_generator.h:7,
from ../../../Sources/AsyncTokens/async_token_batch_generator.h:7,
from ../../../Sources/cv_vid_bubbletrack_helpers.cpp:5:
/usr/include/c++/9/atomic:198:7: note: ‘std::atomic<_Tp>::atomic() noexcept [with _Tp = TSIntervalTimer::IntervalPair]’ is implicitly deleted because its exception-specification does not match the implicit exception-specification ‘’
198 | atomic() noexcept = default;
| ^~~~~~
When in the ImgBackground folder, issuing the command from the README to install cvvidproc
<>
python3 setup.py --force-cmake --quiet install
<>
yields the following error message on my Ubuntu (18.04) terminal (tl;dr easy install doesn't have permission to write files to the Python distribution directory, but I don't know if I should grant them since easy install isn't particularly safe:
<>
copying PySources/cvvidproc/init.py -> _skbuild/linux-x86_64-3.8/cmake-install/PySources/cvvidproc/init.py
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/usr/local/lib/python3.8/dist-packages/test-easy-install-1481.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/usr/local/lib/python3.8/dist-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
https://setuptools.readthedocs.io/en/latest/easy_install.html
Please make the appropriate changes for your system and try again.
<>
The demo C++ program (built with cmake -S . -B Build -DCMAKE_BUILD_TYPE=Release
followed by cmake --build Build
) does not find the video file for analysis in either background computation or bubble-tracking:
"./Build/cvvidproc --vid_path=./Videos/ --vid=vid.mp4Video file not detected: /home/aylitalo/CvVidProc/Videos/vid.mp4
Background obtained in: 0.014 seconds
Background frame created was malformed, unexpectedly!Tracking bubbles...
Video file not detected: /home/aylitalo/CvVidProc/Videos/vid.mp4
Bubbles tracked in: 0.003 seconds
Number of bubbles: 0
To demonstrate that a video indeed exists at the specified location:
aylitalo@DESKTOP-SNTHKND:~/CvVidProc$ ls /home/aylitalo/CvVidProc/Videos/
vid.mp4
I created a virtual environment with Python 3.8 containing only numpy
, scikit-build
, and pybind11
, with the hard-coded reference to my OpenCV installation, and received a similar error message as when I installed in my standard environment. The last few lines seem most relevant (I've addressed the errors during the build in other issues). It says to check the CMake
output, but I can't figure out where that is:
running clean
Processing /mnt/c/Users/andyl/OneDrive - California Institute of Technology/Documents/Research/Kornfield/ANALYSIS/bubble-tracking/CvVidProc
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Building wheels for collected packages: cvvidproc
Building wheel for cvvidproc (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: /mnt/c/Users/andyl/envs/cvkoe/bin/python /mnt/c/Users/andyl/envs/cvkoe/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpqwpy_tin
cwd: /tmp/pip-req-build-0iv3byhy
Complete output (135 lines):
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 9.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- The CXX compiler identification is GNU 9.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-req-build-0iv3byhy/_cmake_test_compile/build
CMAKE version used: 3.18.4
-- The CXX compiler identification is GNU 9.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenCV: /mnt/c/Downloads/opencv/build (found version "4.5.1")
-- Found Python3: /mnt/c/Users/andyl/envs/cvkoe/bin/python (found version "3.8.5") found components: Interpreter Development NumPy Development.Module Development.Embed
'/mnt/c/Users/andyl/envs/cvkoe/bin/python' '-c' 'import pybind11; print(pybind11.get_cmake_dir())'
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Found pybind11: /tmp/pip-build-env-bxm2ypff/overlay/lib/python3.8/site-packages/pybind11/include (found version "2.6.2" )
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-req-build-0iv3byhy/_skbuild/linux-x86_64-3.8/cmake-build
[1/9] Building CXX object CMakeFiles/_core.dir/Sources/py_bindings.cpp.o
FAILED: CMakeFiles/_core.dir/Sources/py_bindings.cpp.o
/usr/bin/c++ -D_core_EXPORTS -Igenerated -I../../../Sources/AsyncTokens -I../../../Sources/ProcessorAlgos -I../../../Sources/ProcessorTokenHandlers -I../../../Sources/Utility -isystem /mnt/c/Downloads/opencv/build -isystem /mnt/c/Downloads/opencv/include -isystem /mnt/c/Downloads/opencv/modules/core/include -isystem /mnt/c/Downloads/opencv/modules/flann/include -isystem /mnt/c/Downloads/opencv/modules/imgproc/include -isystem /mnt/c/Downloads/opencv/modules/ml/include -isystem /mnt/c/Downloads/opencv/modules/photo/include -isystem /mnt/c/Downloads/opencv/modules/dnn/include -isystem /mnt/c/Downloads/opencv/modules/features2d/include -isystem /mnt/c/Downloads/opencv/modules/imgcodecs/include -isystem /mnt/c/Downloads/opencv/modules/videoio/include -isystem /mnt/c/Downloads/opencv/modules/calib3d/include -isystem /mnt/c/Downloads/opencv/modules/highgui/include -isystem /mnt/c/Downloads/opencv/modules/objdetect/include -isystem /mnt/c/Downloads/opencv/modules/stitching/include -isystem /mnt/c/Downloads/opencv/modules/ts/include -isystem /mnt/c/Downloads/opencv/modules/video/include -isystem /mnt/c/Downloads/opencv/modules/gapi/include -isystem /usr/include/python3.8 -isystem /tmp/pip-build-env-bxm2ypff/overlay/lib/python3.8/site-packages/pybind11/include -isystem /tmp/pip-build-env-bxm2ypff/overlay/lib/python3.8/site-packages/numpy/core/include -O3 -DNDEBUG -fPIC -fvisibility=hidden -flto -fno-fat-lto-objects -pthread -std=gnu++14 -MD -MT CMakeFiles/_core.dir/Sources/py_bindings.cpp.o -MF CMakeFiles/_core.dir/Sources/py_bindings.cpp.o.d -o CMakeFiles/_core.dir/Sources/py_bindings.cpp.o -c ../../../Sources/py_bindings.cpp
../../../Sources/py_bindings.cpp:9:10: fatal error: token_processor_algo_base.h: No such file or directory
9 | #include "token_processor_algo_base.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[2/9] Building CXX object CMakeFiles/_core.dir/Sources/Utility/ndarray_converter.cpp.o
[3/9] Building CXX object CMakeFiles/_core.dir/Sources/ProcessorAlgos/highlight_bubbles_algo.cpp.o
[4/9] Building CXX object CMakeFiles/_core.dir/Sources/Utility/cv_util.cpp.o
[5/9] Building CXX object CMakeFiles/_core.dir/Sources/cv_vid_bg_helpers.cpp.o
FAILED: CMakeFiles/_core.dir/Sources/cv_vid_bg_helpers.cpp.o
/usr/bin/c++ -D_core_EXPORTS -Igenerated -I../../../Sources/AsyncTokens -I../../../Sources/ProcessorAlgos -I../../../Sources/ProcessorTokenHandlers -I../../../Sources/Utility -isystem /mnt/c/Downloads/opencv/build -isystem /mnt/c/Downloads/opencv/include -isystem /mnt/c/Downloads/opencv/modules/core/include -isystem /mnt/c/Downloads/opencv/modules/flann/include -isystem /mnt/c/Downloads/opencv/modules/imgproc/include -isystem /mnt/c/Downloads/opencv/modules/ml/include -isystem /mnt/c/Downloads/opencv/modules/photo/include -isystem /mnt/c/Downloads/opencv/modules/dnn/include -isystem /mnt/c/Downloads/opencv/modules/features2d/include -isystem /mnt/c/Downloads/opencv/modules/imgcodecs/include -isystem /mnt/c/Downloads/opencv/modules/videoio/include -isystem /mnt/c/Downloads/opencv/modules/calib3d/include -isystem /mnt/c/Downloads/opencv/modules/highgui/include -isystem /mnt/c/Downloads/opencv/modules/objdetect/include -isystem /mnt/c/Downloads/opencv/modules/stitching/include -isystem /mnt/c/Downloads/opencv/modules/ts/include -isystem /mnt/c/Downloads/opencv/modules/video/include -isystem /mnt/c/Downloads/opencv/modules/gapi/include -isystem /usr/include/python3.8 -isystem /tmp/pip-build-env-bxm2ypff/overlay/lib/python3.8/site-packages/pybind11/include -isystem /tmp/pip-build-env-bxm2ypff/overlay/lib/python3.8/site-packages/numpy/core/include -O3 -DNDEBUG -fPIC -fvisibility=hidden -flto -fno-fat-lto-objects -pthread -std=gnu++14 -MD -MT CMakeFiles/_core.dir/Sources/cv_vid_bg_helpers.cpp.o -MF CMakeFiles/_core.dir/Sources/cv_vid_bg_helpers.cpp.o.d -o CMakeFiles/_core.dir/Sources/cv_vid_bg_helpers.cpp.o -c ../../../Sources/cv_vid_bg_helpers.cpp
In file included from ../../../Sources/AsyncTokens/token_batch_generator.h:7,
from ../../../Sources/AsyncTokens/async_token_batch_generator.h:7,
from ../../../Sources/cv_vid_bg_helpers.cpp:4:
../../../Sources/AsyncTokens/ts_interval_timer.h:109:46: error: use of deleted function ‘std::atomic<_Tp>::atomic() [with _Tp = TSIntervalTimer::IntervalPair]’
109 | std::atomic m_interval_record{};
| ^
In file included from ../../../Sources/AsyncTokens/ts_interval_timer.h:11,
from ../../../Sources/AsyncTokens/token_batch_generator.h:7,
from ../../../Sources/AsyncTokens/async_token_batch_generator.h:7,
from ../../../Sources/cv_vid_bg_helpers.cpp:4:
/usr/include/c++/9/atomic:198:7: note: ‘std::atomic<_Tp>::atomic() noexcept [with _Tp = TSIntervalTimer::IntervalPair]’ is implicitly deleted because its exception-specification does not match the implicit exception-specification ‘’
198 | atomic() noexcept = default;
| ^~~~~~
[6/9] Building CXX object CMakeFiles/_core.dir/Sources/main.cpp.o
FAILED: CMakeFiles/_core.dir/Sources/main.cpp.o
/usr/bin/c++ -D_core_EXPORTS -Igenerated -I../../../Sources/AsyncTokens -I../../../Sources/ProcessorAlgos -I../../../Sources/ProcessorTokenHandlers -I../../../Sources/Utility -isystem /mnt/c/Downloads/opencv/build -isystem /mnt/c/Downloads/opencv/include -isystem /mnt/c/Downloads/opencv/modules/core/include -isystem /mnt/c/Downloads/opencv/modules/flann/include -isystem /mnt/c/Downloads/opencv/modules/imgproc/include -isystem /mnt/c/Downloads/opencv/modules/ml/include -isystem /mnt/c/Downloads/opencv/modules/photo/include -isystem /mnt/c/Downloads/opencv/modules/dnn/include -isystem /mnt/c/Downloads/opencv/modules/features2d/include -isystem /mnt/c/Downloads/opencv/modules/imgcodecs/include -isystem /mnt/c/Downloads/opencv/modules/videoio/include -isystem /mnt/c/Downloads/opencv/modules/calib3d/include -isystem /mnt/c/Downloads/opencv/modules/highgui/include -isystem /mnt/c/Downloads/opencv/modules/objdetect/include -isystem /mnt/c/Downloads/opencv/modules/stitching/include -isystem /mnt/c/Downloads/opencv/modules/ts/include -isystem /mnt/c/Downloads/opencv/modules/video/include -isystem /mnt/c/Downloads/opencv/modules/gapi/include -isystem /usr/include/python3.8 -isystem /tmp/pip-build-env-bxm2ypff/overlay/lib/python3.8/site-packages/pybind11/include -isystem /tmp/pip-build-env-bxm2ypff/overlay/lib/python3.8/site-packages/numpy/core/include -O3 -DNDEBUG -fPIC -fvisibility=hidden -flto -fno-fat-lto-objects -pthread -std=gnu++14 -MD -MT CMakeFiles/_core.dir/Sources/main.cpp.o -MF CMakeFiles/_core.dir/Sources/main.cpp.o.d -o CMakeFiles/_core.dir/Sources/main.cpp.o -c ../../../Sources/main.cpp
In file included from ../../../Sources/main.cpp:9:
../../../Sources/AsyncTokens/ts_interval_timer.h:109:46: error: use of deleted function ‘std::atomic<_Tp>::atomic() [with _Tp = TSIntervalTimer::IntervalPair]’
109 | std::atomic m_interval_record{};
| ^
In file included from ../../../Sources/AsyncTokens/ts_interval_timer.h:11,
from ../../../Sources/main.cpp:9:
/usr/include/c++/9/atomic:198:7: note: ‘std::atomic<_Tp>::atomic() noexcept [with _Tp = TSIntervalTimer::IntervalPair]’ is implicitly deleted because its exception-specification does not match the implicit exception-specification ‘’
198 | atomic() noexcept = default;
| ^~~~~~
[7/9] Building CXX object CMakeFiles/_core.dir/Sources/cv_vid_bubbletrack_helpers.cpp.o
FAILED: CMakeFiles/_core.dir/Sources/cv_vid_bubbletrack_helpers.cpp.o
/usr/bin/c++ -D_core_EXPORTS -Igenerated -I../../../Sources/AsyncTokens -I../../../Sources/ProcessorAlgos -I../../../Sources/ProcessorTokenHandlers -I../../../Sources/Utility -isystem /mnt/c/Downloads/opencv/build -isystem /mnt/c/Downloads/opencv/include -isystem /mnt/c/Downloads/opencv/modules/core/include -isystem /mnt/c/Downloads/opencv/modules/flann/include -isystem /mnt/c/Downloads/opencv/modules/imgproc/include -isystem /mnt/c/Downloads/opencv/modules/ml/include -isystem /mnt/c/Downloads/opencv/modules/photo/include -isystem /mnt/c/Downloads/opencv/modules/dnn/include -isystem /mnt/c/Downloads/opencv/modules/features2d/include -isystem /mnt/c/Downloads/opencv/modules/imgcodecs/include -isystem /mnt/c/Downloads/opencv/modules/videoio/include -isystem /mnt/c/Downloads/opencv/modules/calib3d/include -isystem /mnt/c/Downloads/opencv/modules/highgui/include -isystem /mnt/c/Downloads/opencv/modules/objdetect/include -isystem /mnt/c/Downloads/opencv/modules/stitching/include -isystem /mnt/c/Downloads/opencv/modules/ts/include -isystem /mnt/c/Downloads/opencv/modules/video/include -isystem /mnt/c/Downloads/opencv/modules/gapi/include -isystem /usr/include/python3.8 -isystem /tmp/pip-build-env-bxm2ypff/overlay/lib/python3.8/site-packages/pybind11/include -isystem /tmp/pip-build-env-bxm2ypff/overlay/lib/python3.8/site-packages/numpy/core/include -O3 -DNDEBUG -fPIC -fvisibility=hidden -flto -fno-fat-lto-objects -pthread -std=gnu++14 -MD -MT CMakeFiles/_core.dir/Sources/cv_vid_bubbletrack_helpers.cpp.o -MF CMakeFiles/_core.dir/Sources/cv_vid_bubbletrack_helpers.cpp.o.d -o CMakeFiles/_core.dir/Sources/cv_vid_bubbletrack_helpers.cpp.o -c ../../../Sources/cv_vid_bubbletrack_helpers.cpp
In file included from ../../../Sources/AsyncTokens/token_batch_generator.h:7,
from ../../../Sources/AsyncTokens/async_token_batch_generator.h:7,
from ../../../Sources/cv_vid_bubbletrack_helpers.cpp:5:
../../../Sources/AsyncTokens/ts_interval_timer.h:109:46: error: use of deleted function ‘std::atomic<_Tp>::atomic() [with _Tp = TSIntervalTimer::IntervalPair]’
109 | std::atomic m_interval_record{};
| ^
In file included from ../../../Sources/AsyncTokens/ts_interval_timer.h:11,
from ../../../Sources/AsyncTokens/token_batch_generator.h:7,
from ../../../Sources/AsyncTokens/async_token_batch_generator.h:7,
from ../../../Sources/cv_vid_bubbletrack_helpers.cpp:5:
/usr/include/c++/9/atomic:198:7: note: ‘std::atomic<_Tp>::atomic() noexcept [with _Tp = TSIntervalTimer::IntervalPair]’ is implicitly deleted because its exception-specification does not match the implicit exception-specification ‘’
198 | atomic() noexcept = default;
| ^~~~~~
ninja: build stopped: subcommand failed.
File "/tmp/pip-build-env-bxm2ypff/overlay/lib/python3.8/site-packages/skbuild/setuptools_wrap.py", line 589, in setup
cmkr.make(make_args, env=env)
File "/tmp/pip-build-env-bxm2ypff/overlay/lib/python3.8/site-packages/skbuild/cmaker.py", line 496, in make
raise SKBuildError(
Configuring Project
Working directory:
/tmp/pip-req-build-0iv3byhy/_skbuild/linux-x86_64-3.8/cmake-build
Command:
cmake /tmp/pip-req-build-0iv3byhy -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-req-build-0iv3byhy/_skbuild/linux-x86_64-3.8/cmake-install/PySources/cvvidproc -DPYTHON_EXECUTABLE:FILEPATH=/mnt/c/Users/andyl/envs/cvkoe/bin/python -DPYTHON_VERSION_STRING:STRING=3.8.5 -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.8 -DPYTHON_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpython3.8.so -DSKBUILD:BOOL=TRUE -DCMAKE_MODULE_PATH:PATH=/tmp/pip-build-env-bxm2ypff/overlay/lib/python3.8/site-packages/skbuild/resources/cmake '-DCV_DIR:STRING='"'"'/mnt/c/Downloads/'"'"'' '-DCV_INSTALL_DIR:STRING='"'"'/mnt/c/Downloads/opencv/build/'"'"'' -DCMAKE_BUILD_TYPE:STRING=Release
Traceback (most recent call last):
ERROR: Failed building wheel for cvvidproc
Failed to build cvvidproc
ERROR: Could not build wheels for cvvidproc which use PEP 517 and cannot be installed directly
Installing worked perfectly, thanks for patching up the package! I hit the following "ImportError" when I import inside a Python shell:
import cvvidproc as cv
Traceback (most recent call last):
File "", line 1, in
File "/mnt/c/Users/andyl/envs/cvkoe/lib/python3.8/site-packages/cvvidproc/init.py", line 4, in
from ._core import doc, VidBgPack, GetVideoBackground, HighlightBubblesPack, AssignBubblesPack, VidBubbleTrackPack, TrackBubbles
ImportError: /mnt/c/Users/andyl/envs/cvkoe/lib/python3.8/site-packages/cvvidproc/_core.cpython-38-x86_64-linux-gnu.so: undefined symbol: __atomic_compare_exchange_16
Similarly, in C++, the installation was perfect. The build also worked (with a few minor errors) but threw an error during linking ("[100%] Linking CXX executable cvvidproc"). The error message is long, but here's the preamble (and probably most relevant portion):
[100%] Linking CXX executable cvvidproc
/usr/bin/ld: CMakeFiles/cvvidproc.dir/Sources/main.cpp.o: in functionmain': main.cpp:(.text.startup+0x12a): undefined reference to
__atomic_load_16'
/usr/bin/ld: main.cpp:(.text.startup+0x165): undefined reference to__atomic_compare_exchange_16' /usr/bin/ld: main.cpp:(.text.startup+0x17f): undefined reference to
__atomic_load_16'
and the ending portion:
/usr/bin/ld: CMakeFiles/cvvidproc.dir/Sources/rand_tests.cpp.o: in function
rand_tests::demo_trackbubbles(CommandLinePack&, cv::Mat&)': rand_tests.cpp:(.text+0x1627): undefined reference to
__atomic_load_16'
/usr/bin/ld: rand_tests.cpp:(.text+0x1663): undefined reference to__atomic_compare_exchange_16' /usr/bin/ld: rand_tests.cpp:(.text+0x1678): undefined reference to
__atomic_load_16'
/usr/bin/ld: CMakeFiles/cvvidproc.dir/Sources/rand_tests.cpp.o: in functionrand_tests::test_timing_numpyconverter(int, bool)': rand_tests.cpp:(.text+0x1f39): undefined reference to
__atomic_load_16'
/usr/bin/ld: rand_tests.cpp:(.text+0x1f73): undefined reference to__atomic_compare_exchange_16' /usr/bin/ld: rand_tests.cpp:(.text+0x1f99): undefined reference to
__atomic_load_16'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/cvvidproc.dir/build.make:190: cvvidproc] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/cvvidproc.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
I'm using Python 3.8.5 and g++/gcc 9.3.0 on linux and have tried this on a virtual environment to make sure the peculiarities of other installed packages didn't interfere.
PS I found that this forum and this one discuss a similar error, but I don't understand how to implement their suggestions, so I thought I'd include links in case they're helpful.
Not a big issue, but just wanted to record that, if I don't import cv2
before cvvidproc
, I get the following error:
Traceback (most recent call last):
File "test_tracking.py", line 16, in
import cvvidproc
File "/home/aylitalo/.local/lib/python3.8/site-packages/cvvidproc/init.py", line 4, in
from ._core import doc, VidBgPack, GetVideoBackground, HighlightBubblesPack, AssignBubblesPack, VidBubbleTrackPack, TrackBubbles
ImportError: libopencv_videoio.so.4.5: cannot open shared object file: No such file or directory
If I import cv2
beforehand, it works fine.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.