I have ubuntu 16.04 with python 3.5
I am trying to install opencv without CUDA and the make is failed with the following error message:
[C:\fakepath\opencv.png](/upfiles/15178466361645434.png)
collect2: error: ld returned 1 exit status
modules/world/CMakeFiles/opencv_test_videostab.dir/build.make:127: recipe for target 'bin/opencv_test_videostab' failed
Is there any idea how to resolve the problem?
↧
make is failed: opencv_test_stab
↧
Why i am getting this error while building opencv3.4 with extra modules..Thanks
Im building opencv 3.4 with contrib module for java application using mingw32 and this error
> "no rule to make bin/opencv-340.jar" at 99% of building comes out ..how can i fix this thank you
↧
↧
Passing arguments to train_HOG.cpp
How do I pass these (http://answers.opencv.org/question/96925/how-to-use-train_hogcpp/) arguments to train_HOG.cpp?
After compiling this https://github.com/opencv/opencv/blob/master/samples/cpp/train_HOG.cpp in VS2017 I get this output:
'Project1.exe' (Win32): Loaded 'C:\Users\sephr\source\repos\Project1\x64\Release\Project1.exe'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbase.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140.dll'. Symbols loaded.
'Project1.exe' (Win32): Unloaded 'C:\Windows\System32\vcruntime140.dll'
'Project1.exe' (Win32): Loaded 'C:\opencv\build\x64\vc14\bin\opencv_world340.dll'. Cannot find or open the PDB file.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\win32u.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\gdi32full.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\msvcp_win.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\combase.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\bcryptprimitives.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\comdlg32.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\SHCore.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_5.82.16299.192_none_887f70824ab5b0de\comctl32.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\cfgmgr32.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\windows.storage.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\powrprof.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\profapi.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\msvfw32.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\concrt140.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\avicap32.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\winmm.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\winmm.dll'. Symbols loaded.
'Project1.exe' (Win32): Unloaded 'C:\Windows\System32\winmm.dll'
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\winmmbase.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\winmmbase.dll'. Symbols loaded.
'Project1.exe' (Win32): Unloaded 'C:\Windows\System32\winmmbase.dll'
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\avifil32.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\msacm32.dll'. Symbols loaded.
'Project1.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. Symbols loaded.
The thread 0x3284 has exited with code 1 (0x1).
The thread 0x2d68 has exited with code 1 (0x1).
The thread 0xfcc has exited with code 1 (0x1).
The program '[2476] Project1.exe' has exited with code 1 (0x1).
↧
How to do Nightly Build to the OpenCV for Windows?
I'm new to this OpenCV Library. I would like to know **how to do the nightly building process** for the *Opencv* code in *windows*. I have been checking with this to work on? But i don't get any information's on this one. So, please it will be helpful for me, if someone could have answers for this one?
Thanks in Advance....
↧
dnn build error via Mingw64
opencv 3.4
mingw64
eclipse oxygen windows 10
I'm getting these errors while building the dnn module. what's the cause of this error?
[ 58%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/layers/layers_common.avx512_skx.cpp.obj
C:\Users\Nitin\AppData\Local\Temp\ccBSUeSO.s: Assembler messages:
C:\Users\Nitin\AppData\Local\Temp\ccBSUeSO.s:21573: Error: invalid register for .seh_savexmm
C:\Users\Nitin\AppData\Local\Temp\ccBSUeSO.s:21575: Error: invalid register for .seh_savexmm
C:\Users\Nitin\AppData\Local\Temp\ccBSUeSO.s:21577: Error: invalid register for .seh_savexmm
C:\Users\Nitin\AppData\Local\Temp\ccBSUeSO.s:21579: Error: invalid register for .seh_savexmm
C:\Users\Nitin\AppData\Local\Temp\ccBSUeSO.s:21581: Error: invalid register for .seh_savexmm
C:\Users\Nitin\AppData\Local\Temp\ccBSUeSO.s:21583: Error: invalid register for .seh_savexmm
C:\Users\Nitin\AppData\Local\Temp\ccBSUeSO.s:21585: Error: invalid register for .seh_savexmm
C:\Users\Nitin\AppData\Local\Temp\ccBSUeSO.s:21587: Error: invalid register for .seh_savexmm
C:\Users\Nitin\AppData\Local\Temp\ccBSUeSO.s:21589: Error: invalid register for .seh_savexmm
C:\Users\Nitin\AppData\Local\Temp\ccBSUeSO.s:21591: Error: invalid register for .seh_savexmm
C:\Users\Nitin\AppData\Local\Temp\ccBSUeSO.s:21593: Error: invalid register for .seh_savexmm
C:\Users\Nitin\AppData\Local\Temp\ccBSUeSO.s:21595: Error: invalid register for .seh_savexmm
C:\Users\Nitin\AppData\Local\Temp\ccBSUeSO.s:21597: Error: invalid register for .seh_savexmm
C:\Users\Nitin\AppData\Local\Temp\ccBSUeSO.s:21599: Error: invalid register for .seh_savexmm
mingw32-make[2]: *** [modules\dnn\CMakeFiles\opencv_dnn.dir\build.make:1742: modules/dnn/CMakeFiles/opencv_dnn.dir/layers/layers_common.avx512_skx.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:4024: modules/dnn/CMakeFiles/opencv_dnn.dir/all] Error 2
mingw32-make: *** [Makefile:162: all] Error 2
↧
↧
Building OpenCV 3.0 with OpenCV_Contrib for use with Facial Recognition in Java Development in Windows 7
Hi,
I have followed the steps (using gui version of cmake) shown [here](https://github.com/itseez/opencv_contrib) on how to build OpenCV with extra modules. My sole goal is to be able to use FaceRecognizer within OpenCV 3.0 while developing in Java.
The first configure looked like 
Second configure after adding path of **opencv_contrib** modules to **OPENCV_EXTRA_MODULES_PATH** looked as shown 
Finally after clicking generating I had the following ;
I do not know what to do next as I even changed directory to build folder and attempted to run **make -j5** from command prompt but I could not do **import org.opencv.face.*;** in my netbeans Java workstation.
What else do I need to do afterwards to be able to add **import org.opencv.face.*;** in my Java workstation?
I also came across a previous similar post [too](http://answers.opencv.org/question/68037/opencv-3-java-face-recognition-example-requested/ocv_define_module(face%20opencv_core%20opencv_imgproc%20opencv_objdetect%20WRAP%20python)) but I did not understand how to make headways with it.
I will appreciate all help and howtos.
Regards,
Joseph Mwema
↧
build INSTALL does not add package WINDOWS
Hey there,
I want to build OpenCV from source on Windows and use the python bindings. My machine runs Windows 10, 64bit and have Anaconda installed with Python 3.6.4.
I followed the official manual found here:
https://docs.opencv.org/3.0-beta/doc/py_tutorials/py_setup/py_setup_in_windows/py_setup_in_windows.html .
In general everything went smoothly until reaching step 17. When building INSTALL I can observed that `cv2.cp36-win_amd64.pyd` is moved to `\Anaconda3\Lib\site-packages` which is on my path for packages.
However, when I promt `imput cv2` I am awarded with `ImportError: DLL load failed: The specified module could not be found.`. In keeping with this, `pip list` I also does not encloses `opencv-python`.
Could someone help me making my python aware of the opencv package. Thank you!
**Additional Information**
Earlier, I used binaries which where installed as wheels with `pip install`. I found the wheels on the unofficial page `https://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv`. Doing so, additionally adds the file `cv.py` plus `pip list` shows the entry `opencv-python`.
↧
Building OpenCV 3.4.1 from source [MinGW32, cmake 3.6.2, Qt 5.10, Windows 10]
Hello,
I am trying to build OpenCV 3.4.1 from source using CMake (GUI) and MinGW. I didn't find another way to use the OpenCV library in Windows. I use Qt as programming environment and want to extend a C++ project which includes OpenCV 3.
I followed [this](http://embeddedlaboratory.blogspot.de/2017/03/how-to-use-opencv-with-qt-mingw-on.html) tutorial to compile the sources. Unfortunately, I get some errors in the building step using the "mingw32-make" command.
Scanning dependencies of target opencv_videoio
[ 44%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dshow.cpp.obj
[ 44%] Building RC object modules/videoio/CMakeFiles/opencv_videoio.dir/vs_version.rc.obj
gcc: error: 3.4.1\sources\3rdparty\include\ffmpeg_: No such file or directory
C:\MinGW\bin\windres.exe: preprocessing failed.
modules\videoio\CMakeFiles\opencv_videoio.dir\build.make:261: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/vs_version.rc.obj' failed
mingw32-make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/vs_version.rc.obj] Error 1
CMakeFiles\Makefile2:5113: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/all' failed
mingw32-make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
Makefile:159: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
I already tried to disable the WITH_FFMPEG flag, since I do not need FFMPEG for my project, but the errors remain.
Do you have an idea how to overcome this errors?
Thank you for your help!
↧
Build solution filed: Cannot open opencv_core340d.lib
#### **System information**
- OpenCV => 3.4
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2017
#### **Detailed description**
I configured and generate CMake configuration succeed. When I trying to build the solution, following errors will occur, I didn't find opencv_core340d.lib on my computer. Is there anyone know how to fix this problem? If my description is not clear enough, please tell me. Thanks in advance!
#### **Visual Studio Error Info**
Severity Code Description Project File Line Suppression State
Error MSB6006 "cmd.exe" exited with code 1. opencv_core d:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets 171
Error LNK1104 cannot open file '....\lib\Debug\opencv_core340d.lib' opencv_flann D:\Program Files\opencv\build\modules\flann\LINK 1
Error LNK1104 cannot open file '....\lib\Debug\opencv_core340d.lib' opencv_ml D:\Program Files\opencv\build\modules\ml\LINK 1
Error LNK1104 cannot open file '....\lib\Debug\opencv_flann340d.lib' opencv_surface_matching D:\Program Files\opencv\build\modules\surface_matching\LINK 1
Error MSB6006 "cmd.exe" exited with code 1. opencv_cudaarithm d:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets 171
Error LNK1104 cannot open file '....\lib\Debug\opencv_core340d.lib' opencv_imgproc D:\Program Files\opencv\build\modules\imgproc\LINK 1
Error LNK1104 cannot open file '....\lib\Debug\opencv_imgproc340d.lib' opencv_objdetect D:\Program Files\opencv\build\modules\objdetect\LINK 1
Error LNK1104 cannot open file '....\lib\Debug\opencv_imgproc340d.lib' opencv_video D:\Program Files\opencv\build\modules\video\LINK 1
Error LNK1104 cannot open file '....\lib\Debug\opencv_video340d.lib' opencv_shape D:\Program Files\opencv\build\modules\shape\LINK 1
Error LNK1104 cannot open file '....\lib\Debug\opencv_imgproc340d.lib' opencv_plot D:\Program Files\opencv\build\modules\plot\LINK 1
#### **Steps to reproduce**
Configure CMake.
Generate CMake files.
build 'ALL_BUILD'.
↧
↧
Optimal performance CMake flags for android build
I am new to opencv and CMake and i am trying to use aruco markers in unity for my school project. Currently i am building my own shared object with cmake-gui and mingw so that i can use it into unity as a native plugin. The build is successful and everything works but as soon as i call aruco's detectMarkers function my fps counter drops from 60 to 10, huge frame drop. My code should be fine and the image feed i am providing is low res (800 x 640), all the detector parameter fields are set to default (i already tried to mess with these fields to get better performances but the fps gain is negligible) and the app correctly recognizes the markers. What could be possibly causing such a performance loss? The only issue i can think of is that i probably didn't set the right flags in CMake to optimize the build for android. The only flags i am specifing right now are: ANDROID_NDK, ANDROID_NDK_HOST_X64, BUILD_SHARED_LIBS, BUILD_opencv_world, CMAKE_CONFIGURATION_TYPES and extra_modules_path. I am new to opencv building and even with the minimal hints presented to me in CMake-gui i could not figure out what all the flags are for. Is there an online guide or some documentation to help me find out which flags i need to set to optimize my build for android systems?
↧
Request to FIX OpenCv 2.4.13.6 cmake source
Request to FIX OpenCv 2.4.13.6 cmake source to build OpenCv_World24136.DLL
minimum build x86 vc12,
because I can only build opencv_world with 3.x in vc14,vc15
↧
Freetype2 and Harfbuzz on WINDOWS for Python
Hey guys, Im using Python 3.5
Im using the latest version of CMake, MinGW, etc...
Im trying to compile OpenCV with Freetype2.
I git-cloned both the OpenCV and OpenCV-Contrib from source
Lets say I named the directory with the regular opencv [ opencv ]
and the directory with the opencv_contrib [ opencv_contrib ]
I cant... for the love of god... build it with Freetype... I check the CMakeList.txt from opencv_contrib/modules/freetype and I saw that it requires Harfbuzz, but on both opencv and opencv_contrib, there is no harfbuz module...
I did find online some harfbuz/freetype .lib and .dlls but I dont know where to put them...
I've been struggling with this for at least 5 days... please help D:
↧
Building native libraries not working
When following the instructions for building native libraries for OpenCV with cmake, I don't get any /libs folder with the .so file and the .jar file isn't generated either.
I'm following these steps:
**1. Installing dependencies:**
sudo apt-get update && sudo apt-get install oracle-java8-jdk cmake ant
sudo apt-get install build-essential cmake pkg-config libpng12-0 libpng12-dev libpng++-dev libpng3 libpnglite-dev zlib1g-dbg zlib1g zlib1g-dev pngtools libtiff4 libtiffxx0c2 libtiff-tools libjpeg8 libjpeg8-dev libjpeg8-dbg libjpeg-progs libavcodec-dev libavformat-dev libgstreamer0.10-0-dbg libgstreamer0.10-0 libgstreamer0.10-dev libunicap2 libunicap2-dev libdc1394-22-dev libdc1394-22 libdc1394-utils swig libv4l-0 libv4l-dev
**2. Adding export paths:**
export ANT_HOME=/usr/share/ant/
export PATH=${PATH}:${ANT_HOME}/bin
export JAVA_HOME=/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/
export PATH=$PATH:$JAVA_HOME/bin
**3. Downloading OpenCV:**
wget https://github.com/opencv/opencv/archive/3.4.0.zip
mv 3.4.0 opencv.zip
unzip opencv.zip
cd opencv-3.4.0/
**4. Make & Install:**
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D WITH_OPENCL=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_SHARED_LIBS=OFF -D JAVA_INCLUDE_PATH=$JAVA_HOME/include -D JAVA_AWT_LIBRARY=$JAVA_HOME/jre/lib/arm/libawt.so -D JAVA_JVM_LIBRARY=$JAVA_HOME/jre/lib/arm/server/libjvm.so -D CMAKE_INSTALL_PREFIX=/usr/local ..
make
make install
I'm running this on a Raspberry Pi. A part of the output of cmake is:
-- OpenCV modules:
-- To be built: calib3d core dnn features2d flann highgui imgcodecs imgproc ml objdetect photo python_bindings_generator shape stitching superres ts video videoio videostab
-- Disabled: js world
-- Disabled by dependency: -
-- Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java python2 python3 viz
<-- some other stuff -->
-- Python (for build): /usr/bin/python2.7
--
-- Java:
-- ant: /usr/bin/ant (ver 1.9.4)
-- JNI: NO
-- Java wrappers: NO
-- Java tests: NO
which concerns me..
Thanks in advance for your help!
Edit: Also noticed this error in cmake:
-- Could NOT find JNI (missing: JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
↧
↧
Adding packages to Javascript WASM build
Hi,
I'm using the Javascript WASM build target, and I wanted to expose more functionality. Exposing more methods in the existing packages (core, etc) is straightforward (i.e., I added "rotate" easily).
I wanted to try and add one of the opencv_contrib modules, and can't figure out how to do it.
I added a line to the embindgen.py file for aruco, and added aruco to the white_list in the file.
> aruco = {'aruco': ['detectMarkers', 'estimatePoseSingleMarkers', 'drawDetectedMarkers', 'drawAxis']}
The instructions for building the contrib modules assume you are building with CMAKE on the command line; I tried adding the appropriate flags to the build_js.py file, but couldn't seem to make it build any of the contrib modules (i.e., it didn't affect the resulting build).
I am trying it out with the aruco module. I also tried moving the aruco folder in the main opencv/modules. Here the build made some progress, showing me that it wasn't including it because of missing dependency (calib3d); so I changed the calib3d flag to ON in build_py.sh, and got output during the config that seems to say it is going to try and build aruco:
-- OpenCV modules:
-- To be built: aruco bgsegm bioinspired calib3d core dnn dnn_objdetect dpm features2d fuzzy hfs img_hash imgproc java_bindings_generator js line_descriptor objdetect phase_unwrapping plot python_bindings_generator reg rgbd saliency stereo structured_light tracking video xfeatures2d xphoto
-- Disabled: flann highgui imgcodecs ml photo shape stitching superres videoio videostab world
-- Disabled by dependency: ccalib datasets face optflow surface_matching text ximgproc xobjdetect
-- Unavailable: cnn_3dobj cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev cvv dnn_modern freetype hdf java matlab ovis python2 python3 sfm ts viz
-- Applications: -
-- Documentation: js
-- Non-free algorithms: NO
But, after that, it doesn't try to build that library.
I hope it's something simply I'm doing wrong, I don't have much experience building opencv
↧
opencv.js will not build
Hi, I followed the instructions given to download emsdk (https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html) and opencv.js (https://docs.opencv.org/3.4.1/d4/da1/tutorial_js_setup.html) but I am met with the following issue. Note that I do have cmake installed in my environment. Any help would be highly appreciated and please let me know if I am missing any important information. I am using opencv 3.4.
When running the command:
$ python ./platforms/js/build_js.py build_js
It correctly finds the required emsdk files but produces the following error:
Args: Namespace(build_dir='build_js', build_doc=False, build_test=False, build_wasm=False, clean_build_dir= False, config_only=False, emscripten_dir='C:/Users/user/Documents/emsdk/emscripten/1.37.37', enable_excepti on=False, opencv_dir='C:\\Users\\user\\Documents\\opencv', skip_config=False)
Check dir C:\Users\user\Documents\opencv\build_js (create: True, clean: False)
Check dir C:\Users\user\Documents\opencv (create: False, clean: False)
Check dir C:\Users\user\Documents\emsdk\emscripten\1.37.37 (create: False, clean: False)
Traceback (most recent call last):
File "./platforms/js/build_js.py", line 215, in
builder = Builder(args)
File "./platforms/js/build_js.py", line 84, in __init__
self.emcc_version = determine_emcc_version(self.emscripten_dir)
File "./platforms/js/build_js.py", line 62, in determine_emcc_version
ret = subprocess.check_output([os.path.join(emscripten_dir, "emcc"), "--version"])
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 336, in check_output
**kwargs).stdout
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 403, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 997, in _execute_chil d
startupinfo)
OSError: [WinError 193] %1 is not a valid Win32 application
###EDIT
###Running with Python 2.7:
Args: Namespace(build_dir='build_js', build_doc=False, build_test=False, build_wasm=False, clean_build_dir=False, config_only=False, emscripten_dir='C:/Users/Tao/Documents/Projects/emsdk/emscripten/1.37.37', enable_exception=False, opencv_dir='C:\\Users\\Tao\\Documents\\Projects\\opencv', skip_config=False)
Check dir C:\Users\Tao\Documents\Projects\opencv\build_js (create: True, clean: False)
Check dir C:\Users\Tao\Documents\Projects\opencv (create: False, clean: False)
Check dir C:\Users\Tao\Documents\Projects\emsdk\emscripten\1.37.37 (create: False, clean: False)
Traceback (most recent call last):
File "./platforms/js/build_js.py", line 217, in
builder = Builder(args)
File "./platforms/js/build_js.py", line 86, in __init__
self.emcc_version = determine_emcc_version(self.emscripten_dir)
File "./platforms/js/build_js.py", line 63, in determine_emcc_version
ret = subprocess.check_output([os.path.join(emscripten_dir, "emcc"), "--version"])
File "C:\Users\Tao\Documents\Projects\emsdk\python\2.7.13.1_64bit\python-2.7.13.amd64\lib\subprocess.py", line 212, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "C:\Users\Tao\Documents\Projects\emsdk\python\2.7.13.1_64bit\python-2.7.13.amd64\lib\subprocess.py", line 390, in __init__
errread, errwrite)
File "C:\Users\Tao\Documents\Projects\emsdk\python\2.7.13.1_64bit\python-2.7.13.amd64\lib\subprocess.py", line 640, in _execute_child
startupinfo)
WindowsError: [Error 193] %1 is not a valid Win32 application
↧
Compile OpenCV with anaconda python
Hello, I am trying to compile opencv with anaconda python support (I need to use opencv in python). The pre-built packages available from conda channels (e.g. intel or conda-forge) are not usable for me as I require to link the opencv with intel python distribution (installed via conda), with own custom compiled ffmpeg as well as I need cuda support.
I am using cmake-gui to configure opencv build environment. The problem I am facing is Cmake is unable to detect anaconda python on its own (given it is installed at the default conda installation path /home/user/minicaonda). If I manually add paths to anaconda as given at the following link the Python Libraries are still not detected.
https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/R9gWjl09UFs
As a result cmake configure log shows that python2 & python3 are unavailable. If I run make as it is the cv2.so (or cv2.cpython*.so) is not built.
Can someone guide me on how to resolve this issue?
↧
Building a completely statically compiled OpenCV for Linux
I'm working on building a static version of OpenCV with CUDA enabled. I have `-D SHARED_LIBS=OFF -D CUDA_USE_STATIC_CUDA_RUNTIME=ON` which seems to be the flags I need to pass, but if I take the statically compiled OpenCV built binaries (and libraries) and run `opencv_version` I get `error while loading shared libraries: libcudart.so.9.1`.
Is there a way to _*truly*_ statically compile OpenCV or will I have to ship CUDA with the build as well?
Additionally, when I try and load the "static" python library, I'm getting a message about `ImportError: libharfbuzz.so.0: cannot open shared object file`
So it really seems like I'm missing _something_ to build OpenCV statically to slim down Docker containers...
↧
↧
how to install libopencv-imgcodecs-dev on ubuntu?
when I tried to built my project using Kdevelop, some evident errors was displayed at "build"tools view.
***/home/htf/slambook/ch7/triangulation.cpp: error: ‘CV_FM_8POINT’ was not declared in this scope***
***/home/htf/slambook/ch7/triangulation.cpp: error: ‘CV_LOAD_IMAGE_COLOR’ was not declared in this scope***
the opencv version is 4.0.0, so I was thinking these errors should not have appeared.Then I planned to installed some packages to solve this problem,unfortunately, I do not know where could I find the package named imgcodecs.
if you have some good ideas or helpful approaches, please contact me as soon as you can , Thank you very much.
1.
Mat fundamental_matrix;
fundamental_matrix = findFundamentalMat ( points1, points2, CV_FM_8POINT );
cout<<"fundamental_matrix is "<
↧
OpenCV 3.3.1 python wrapper CUDA support
I've just built and installed OpenCV with CUDA support from official sources and I'm unable to find any python wrapper module for **cudabgsegm or any other cuda header**. Is there is available cuda libraries for python?
Build info:
General configuration for OpenCV 3.3.1-dev ===================================== Version control: 3.3.1-223-gf071a48 Extra modules: Location (extra): /home/wol/sources/opencv_contrib/modules Version control (extra): 3.3.1-104-gc6f1922 Platform: Timestamp: 2017-11-24T21:10:57Z Host: Linux 4.8.0-53-generic x86_64 CMake: 3.5.1 CMake generator: Unix Makefiles CMake build tool: /usr/bin/make Configuration: Release CPU/HW features: Baseline: SSE SSE2 SSE3 requested: SSE3 Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2 requested: SSE4_1 SSE4_2 AVX FP16 AVX2 SSE4_1 (3 files): + SSSE3 SSE4_1 SSE4_2 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 (2 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX AVX (5 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX AVX2 (9 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 C/C++: Built as dynamic libs?: YES C++ Compiler: /usr/bin/c++ (ver 5.4.0) C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -ffunction-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -ffunction-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG C Compiler: /usr/bin/cc C flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -ffunction-sections -msse -msse2 -msse3 -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG C flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -ffunction-sections -msse -msse2 -msse3 -fvisibility=hidden -g -O0 -DDEBUG -D_DEBUG Linker flags (Release): Linker flags (Debug): ccache: NO Precompiled headers: YES Extra dependencies: dl m pthread rt /usr/lib/x86_64-linux-gnu/libtbb.so cudart nppc nppial nppicc nppicom nppidei nppif nppig nppim nppist nppisu nppitc npps cublas cufft -L/usr/local/cuda/lib64 3rdparty dependencies: OpenCV modules: To be built: aruco bgsegm bioinspired calib3d ccalib core cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev datasets dnn dpm face features2d flann freetype fuzzy highgui img_hash imgcodecs imgproc line_descriptor ml objdetect optflow phase_unwrapping photo plot python2 python3 reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab xfeatures2d ximgproc xobjdetect xphoto Disabled: js world Disabled by dependency: - Unavailable: cnn_3dobj cvv dnn_modern hdf java matlab ovis sfm viz Applications: tests perf_tests examples apps Documentation: NO Non-free algorithms: NO GUI: GTK+: YES (ver 2.24.30) GThread : YES (ver 2.48.2) GtkGlExt: NO VTK support: NO Media I/O: ZLib: /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.8) JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (ver ) WEBP: build (ver encoder: 0x020e) PNG: /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.2.54) TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 / 4.0.6) JPEG 2000: /usr/lib/x86_64-linux-gnu/libjasper.so (ver 1.900.1) OpenEXR: build (ver 1.7.1) Video I/O: DC1394: YES (ver 2.2.4) FFMPEG: YES avcodec: YES (ver 56.60.100) avformat: YES (ver 56.40.101) avutil: YES (ver 54.31.100) swscale: YES (ver 3.1.101) avresample: NO GStreamer: base: YES (ver 0.10.36) video: YES (ver 0.10.36) app: YES (ver 0.10.36) riff: YES (ver 0.10.36) pbutils: YES (ver 0.10.36) libv4l/libv4l2: NO v4l/v4l2: linux/videodev2.h gPhoto2: NO Parallel framework: TBB (ver 4.4 interface 9002) Trace: YES (with Intel ITT) Other third-party libraries: Intel IPP: 2017.0.3 [2017.0.3] at: /home/wol/sources/opencv/build/3rdparty/ippicv/ippicv_lnx Intel IPP IW: sources (2017.0.3) at: /home/wol/sources/opencv/build/3rdparty/ippicv/ippiw_lnx Lapack: NO Eigen: NO Custom HAL: NO NVIDIA CUDA: YES (ver 8.0, CUFFT CUBLAS FAST_MATH) NVIDIA GPU arch: 50 NVIDIA PTX archs: OpenCL: YES (no extra features) Include path: /home/wol/sources/opencv/3rdparty/include/opencl/1.2 Link libraries: Dynamic load Python 2: Interpreter: /usr/bin/python2.7 (ver 2.7.12) Libraries: /usr/lib/x86_64-linux-gnu/libpython2.7.so (ver 2.7.12) numpy: /usr/local/lib/python2.7/dist-packages/numpy/core/include (ver 1.13.3) packages path: lib/python2.7/dist-packages Python 3: Interpreter: /usr/bin/python3 (ver 3.5.2) Libraries: /usr/lib/x86_64-linux-gnu/libpython3.5m.so (ver 3.5.2) numpy: /usr/local/lib/python3.5/dist-packages/numpy/core/include (ver 1.13.3) packages path: lib/python3.5/dist-packages Python (for build): /usr/bin/python2.7 Matlab: NO Install to: /usr/local -----------------------------------------------------------------
Build info:
General configuration for OpenCV 3.3.1-dev ===================================== Version control: 3.3.1-223-gf071a48 Extra modules: Location (extra): /home/wol/sources/opencv_contrib/modules Version control (extra): 3.3.1-104-gc6f1922 Platform: Timestamp: 2017-11-24T21:10:57Z Host: Linux 4.8.0-53-generic x86_64 CMake: 3.5.1 CMake generator: Unix Makefiles CMake build tool: /usr/bin/make Configuration: Release CPU/HW features: Baseline: SSE SSE2 SSE3 requested: SSE3 Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2 requested: SSE4_1 SSE4_2 AVX FP16 AVX2 SSE4_1 (3 files): + SSSE3 SSE4_1 SSE4_2 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 (2 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX AVX (5 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX AVX2 (9 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 C/C++: Built as dynamic libs?: YES C++ Compiler: /usr/bin/c++ (ver 5.4.0) C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -ffunction-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -ffunction-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG C Compiler: /usr/bin/cc C flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -ffunction-sections -msse -msse2 -msse3 -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG C flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -ffunction-sections -msse -msse2 -msse3 -fvisibility=hidden -g -O0 -DDEBUG -D_DEBUG Linker flags (Release): Linker flags (Debug): ccache: NO Precompiled headers: YES Extra dependencies: dl m pthread rt /usr/lib/x86_64-linux-gnu/libtbb.so cudart nppc nppial nppicc nppicom nppidei nppif nppig nppim nppist nppisu nppitc npps cublas cufft -L/usr/local/cuda/lib64 3rdparty dependencies: OpenCV modules: To be built: aruco bgsegm bioinspired calib3d ccalib core cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev datasets dnn dpm face features2d flann freetype fuzzy highgui img_hash imgcodecs imgproc line_descriptor ml objdetect optflow phase_unwrapping photo plot python2 python3 reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab xfeatures2d ximgproc xobjdetect xphoto Disabled: js world Disabled by dependency: - Unavailable: cnn_3dobj cvv dnn_modern hdf java matlab ovis sfm viz Applications: tests perf_tests examples apps Documentation: NO Non-free algorithms: NO GUI: GTK+: YES (ver 2.24.30) GThread : YES (ver 2.48.2) GtkGlExt: NO VTK support: NO Media I/O: ZLib: /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.8) JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (ver ) WEBP: build (ver encoder: 0x020e) PNG: /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.2.54) TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 / 4.0.6) JPEG 2000: /usr/lib/x86_64-linux-gnu/libjasper.so (ver 1.900.1) OpenEXR: build (ver 1.7.1) Video I/O: DC1394: YES (ver 2.2.4) FFMPEG: YES avcodec: YES (ver 56.60.100) avformat: YES (ver 56.40.101) avutil: YES (ver 54.31.100) swscale: YES (ver 3.1.101) avresample: NO GStreamer: base: YES (ver 0.10.36) video: YES (ver 0.10.36) app: YES (ver 0.10.36) riff: YES (ver 0.10.36) pbutils: YES (ver 0.10.36) libv4l/libv4l2: NO v4l/v4l2: linux/videodev2.h gPhoto2: NO Parallel framework: TBB (ver 4.4 interface 9002) Trace: YES (with Intel ITT) Other third-party libraries: Intel IPP: 2017.0.3 [2017.0.3] at: /home/wol/sources/opencv/build/3rdparty/ippicv/ippicv_lnx Intel IPP IW: sources (2017.0.3) at: /home/wol/sources/opencv/build/3rdparty/ippicv/ippiw_lnx Lapack: NO Eigen: NO Custom HAL: NO NVIDIA CUDA: YES (ver 8.0, CUFFT CUBLAS FAST_MATH) NVIDIA GPU arch: 50 NVIDIA PTX archs: OpenCL: YES (no extra features) Include path: /home/wol/sources/opencv/3rdparty/include/opencl/1.2 Link libraries: Dynamic load Python 2: Interpreter: /usr/bin/python2.7 (ver 2.7.12) Libraries: /usr/lib/x86_64-linux-gnu/libpython2.7.so (ver 2.7.12) numpy: /usr/local/lib/python2.7/dist-packages/numpy/core/include (ver 1.13.3) packages path: lib/python2.7/dist-packages Python 3: Interpreter: /usr/bin/python3 (ver 3.5.2) Libraries: /usr/lib/x86_64-linux-gnu/libpython3.5m.so (ver 3.5.2) numpy: /usr/local/lib/python3.5/dist-packages/numpy/core/include (ver 1.13.3) packages path: lib/python3.5/dist-packages Python (for build): /usr/bin/python2.7 Matlab: NO Install to: /usr/local -----------------------------------------------------------------
↧
x86_64-unknown-linux-gnu/bin/ld: cannot find -lpthreads
I'm installing opencv 3.3 with centOS 6.9, gcc 4.8.5, cmake 3.11.1 ,cuda 9.0 and cudnn 7.0.
I have been stuck on this question for quite a while.
cmake error output as below.
CMakeFiles/cmTC_09750.dir/CheckSymbolExists.c.o: In function `main':
**CheckSymbolExists.c:(.text.startup+0x3): undefined reference to `pthread_create'**
collect2: error: ld returned 1 exit status
gmake[1]: *** [cmTC_09750] Error 1
gmake[1]: Leaving directory `/home/cch/Downloads/opencv/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTC_09750/fast] Error 2
File /home/cch/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include
int main(int argc, char** argv)
{
(void)argv;
#ifndef pthread_create
return ((int*)(&pthread_create))[argc];
#else
(void)argc;
return 0;
#endif
}
Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/cch/Downloads/opencv/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/gmake" "cmTC_c092d/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_c092d.dir/build.make CMakeFiles/cmTC_c092d.dir/build
gmake[1]: Entering directory `/home/cch/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_c092d.dir/CheckFunctionExists.c.o
/usr/bin/cc -fPIC -DCHECK_FUNCTION_EXISTS=pthread_create -O3 -DNDEBUG -o CMakeFiles/cmTC_c092d.dir/CheckFunctionExists.c.o -c /usr/local/cmake-3.11.1/share/cmake-3.11/Modules/CheckFunctionExists.c
Linking C executable cmTC_c092d
/usr/local/cmake-3.11.1/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c092d.dir/link.txt --verbose=1
/usr/bin/cc -fPIC -DCHECK_FUNCTION_EXISTS=pthread_create -O3 -DNDEBUG -rdynamic CMakeFiles/cmTC_c092d.dir/CheckFunctionExists.c.o -o cmTC_c092d -lpthreads
**/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.5/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find -lpthreads**
collect2: error: ld returned 1 exit status
gmake[1]: *** [cmTC_c092d] Error 1
gmake[1]: Leaving directory `/home/cch/Downloads/opencv/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTC_c092d/fast] Error 2
> [root@IB1 include]# ldconfig -v | grep
> pthread ldconfig:
> /etc/ld.so.conf.d/kernel-2.6.32-696.el6.x86_64.conf:6:
> duplicate hwcap 1 nosegneg ldconfig:
> Path `/lib64' given more than once
> ldconfig: Can't stat /libx32: No such
> file or directory ldconfig: Can't stat
> /usr/libx32: No such file or directory
> libpthread.so.0 -> libpthread-2.17.so
> libpthread.so.0 -> libpthread-2.12.so
> ldconfig: Cannot stat
> /usr/lib64/libGL.so: No such file or
> directory libgpgme-pthread.so.11 ->> libgpgme-pthread.so.11.6.6
> libpthread.so.0 -> libpthread-2.12.so
I wonder what I should do next?
↧