Reputation: 93
I used to have OPENCV 3.4.1 installed on Ubuntu 18.04. I tried to compile YOLO3 on my machine and it failed to compile which lead me to this issue. One of the suggestions in that issue suggested to use 3.4.0 and it kinda worked.
I used these options with cmake:
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D WITH_CUDA=ON \
-D ENABLE_FAST_MATH=1 \
-D CUDA_FAST_MATH=1 \
-D WITH_CUBLAS=1 \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.4.0/modules \
-D BUILD_EXAMPLES=ON ..
then I did
make -j8
sudo make install
sudo ldconfig
With opencv 3.4.0 I was able to compile it. However when i try to run it I was getting the error(shown below). It is weird because i just installed 3.4.0 and it is showing some error related to 3.4.1.
OpenCV(3.4.1) Error: Assertion failed ((flags & FIXED_TYPE) != 0) in type, file <local_path>/opencv-3.4.1/modules/core/src/matrix_wrap.cpp, line 807
It is not supposed to show that 3.4.1 error when i don't even have it installed. I also removed the directory in which i compiled 3.4.1 earlier and still the error is pointing to the removed directory(<local_path>/opencv-3.4.1/
). is in my home folder with lot of weirdly named directories.So I excluded it to avoid any confusion.
I was able to confirm that 3.4.0 is installed with:
# han @ falcon in ~ [19:36:41]
$ /usr/local/bin/opencv_version
3.4.0
I want to know what is causing the error mentioned above(the one related to assertion)
Upvotes: 1
Views: 406
Reputation: 93
That happened because sudo apt-get purge libopencv*
did not yield any result when i ran it on ZSH( got an error saying "no matches found: libopencv*" which I overlooked). But same command on bash removed the config files from earlier installation.
Darknet won't compile with opencv 3.4.1. So i suggest downgrading opencv to 3.4.0. If you want to run it on 3.4.1 look into this issue on Github.
Upvotes: 1