Error RC1103 building opencv_contrib with Visual Stio 2017 opencv_core - opencv

I´m working in a project that uses the xfeatures2d module of open CV.
So im tyinging to build the contrib module. I'm following this video
https://www.youtube.com/watch?v=fIpTks0G2m0
On Cmake on the files with the format BUILD_opencv_..... im only selecting 2 options BUILD_opencv_core & BUILD_opencv_xfeatures2d. If I select more modules I get more errors:
link -> postimg.org/image/hn26hk8gh/
When I try to build the ALL_BUILD I get the following errors:
https://postimg.org/image/rvunndwi9/

Related

OpenCV build error while compiling with IE (Inference Engine)

OpenCV Version: 4.4.0 (latest)
OpenVINO Version: 2020.4 (latest)
The error happens when trying to build the project which is generated by CMake 3.18.0 on Windows 10.
I have tried many times building from scratch (clear all caches, update the source code, reinstall the OpenVINO toolkit, and run it's all demos successfully), but the problem still exists.
Here is the VS 2019 build error logs:
46>Done building project "opencv_dnn.vcxproj" -- FAILED.
73>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_dnn440.lib'
75>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_dnn440.lib'
73>Done building project "opencv_text.vcxproj" -- FAILED.
81>------ Build started: Project: opencv_datasets, Configuration: Release x64 ------
82>------ Build started: Project: opencv_videostab, Configuration: Release x64 ------
75>Done building project "opencv_mcc.vcxproj" -- FAILED.
81>Done building project "opencv_datasets.vcxproj" -- FAILED.
88>Done building project "opencv_dnn_objdetect.vcxproj" -- FAILED.
87>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_datasets440.lib'
87>Done building project "opencv_tracking.vcxproj" -- FAILED.
94>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_tracking440.lib'
94>Done building project "opencv_stereo.vcxproj" -- FAILED.
95>cv2.cpp
95>D:\GitHub\opencv\opencv_contrib\modules\saliency\include\opencv2/saliency/saliencySpecializedClasses.hpp(1,1): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
95>D:\GitHub\opencv\opencv_contrib\modules\datasets\include\opencv2/datasets/dataset.hpp(1,1): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
93>LINK : fatal error LNK1181: cannot open input file '..\..\..\lib\Release\opencv_tracking440.lib'
93>Done building project "opencv_java.vcxproj" -- FAILED.
95>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_dnn_superres440.lib'
95>Done building project "opencv_python3.vcxproj" -- FAILED.
96>------ Build started: Project: ALL_BUILD, Configuration: Release x64 ------
96>Building Custom Rule D:/GitHub/opencv/opencv/CMakeLists.txt
At the end 10 failed:
========== Build: 86 succeeded, 10 failed, 0 up-to-date, 0 skipped ==========
NOTE: Before I was able to build the OpenCV with IE without any errors but in the new release there are many errors while compiling and building.
Any solution..?
I am ready to provide more logs and info if needed.
Thanks!!
The problem was solved by configuring CMake with ngraph flag and locating its CMake files DIR location.

CMake error: 'target is not built by this project' Clion Kotlin

I'm trying to load OpenCV Libraries in CMakeFile.txt but it always ends with this error:
CMake Error at CMakeLists.txt:21 (target_link_libraries):
Cannot specify link libraries for target "HelloWorld" which is not built by
this project.
I've searched on the Internet but have got no solution.
cmake_minimum_required(VERSION 3.8)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/KotlinCMakeModule)
project(untitled1 Kotlin)
find_package(OpenCV REQUIRED)
IF (OpenCV_FOUND)
include_directories(/usr/local/Cellar/opencv/3.4.0_1/include)
link_libraries(/usr/local/Cellar/opencv/3.4.0_1/lib)
ENDIF(OpenCV_FOUND)
konanc_executable(
NAME HelloWorld
SOURCES hello.kt
)
target_link_libraries(HelloWorld
/usr/local/Cellar/opencv/3.4.0_1/lib
)
Someone can help me? I think it's not working because on the use of konanc_executable instead of add_executable but I need to use Kotlin so I cannot use the add_executable command.

Build OpenCV binding in Haskell for OpenCV 2.4

I tried to install cv library via cabal (cabal install cv).
But it brings me up an error:
Configuring CV-0.3.7...
Building CV-0.3.7...
Preprocessing library CV-0.3.7...
c2hs: C header contains errors:
dist/build/CV/Video.chs.h:22: (column 39) [ERROR] >>> Unknown identifier!
Cannot find a definition for `CV_CAP_PROP_WHITE_BALANCE_BLUE_U' in the header file.
cabal: Error: some packages failed to install:
CV-0.3.7 failed during the building phase. The exception was:
ExitFailure 1
I have read that it's problem is, that my install opencv is newer than the haskell-library needs it.
My opencv:
local/opencv 2.4.12.2-2
Open Source Computer Vision Library
So how can I fix this error now? Thanks for your help!

OpenCV linemod not cv member

I try to install a ROS indigo package jsk_recognition for chessboard detection and relative position, I have opencv-3.0.0-rc1 on Ubuntu 14.04. When I try to catkin_make the package I receive build errors, quit a lot, the full report is here, but it starts like:
[ 73%] Building CXX object
vision/jsk_recognition-master/jsk_perception/CMakeFiles/roi_to_mask_image.dir/roi_to_mask_image.cpp.o
/home/elod/catkin_ws/src/vision/jsk_recognition-master/jsk_perception/src/linemod.cpp:69:57:
error: ‘linemod’ is not a member of ‘cv’ std::vector<CvPoint>
maskFromTemplate(const std::vector<cv::linemod::Template>& templates,
^ /home/elod/catkin_ws/src/vision/jsk_recognition-master/jsk_perception/src/linemod.cpp:69:57:
error: ‘linemod’ is not a member of ‘cv’
/home/elod/catkin_ws/src/vision/jsk_recognition-master/jsk_perception/src/linemod.cpp:69:78:
error: template argument 1 is invalid std::vector<CvPoint>
maskFromTemplate(const std::vector<cv::linemod::Template>& templates,
^
/home/elod/catkin_ws/src/vision/jsk_recognition-master/jsk_perception/src/linemod.cpp:69:78:
error: template argument 2 is invalid
/home/elod/catkin_ws/src/vision/jsk_recognition-master/jsk_perception/src/linemod.cpp:69:57:
error: ‘linemod’ is not a member of ‘cv’ std::vector<CvPoint>
maskFromTemplate(const std::vector<cv::linemod::Template>& templates,
the problem seams to be with the linemod class, which in the online opencv documentation exist but in my case the compiler does not recognise it. The linemod.h header file can't be find in any opencv folder only in:
./home/elod/catkin_ws/src/vision/jsk_recognition-master/jsk_pcl_ros/include/jsk_pcl_ros/linemod.h
./opt/ros/indigo/include/jsk_pcl_ros/linemod.h
./usr/include/pcl-1.7/pcl/recognition/linemod.h
Is this module missing somhow my OpenCV installation or why cant find it in the cv namespace?
In my old Opencv 2.4.11 (uninstalled) seams to be included this module, but I migrated all my stuff to 3.0.0.
Any ideas how to solve it?
UPDATE
A very important observation is that the above mentioned pkg is for Opencv2.4 and I'm using 3.0! Some stuff was moved or removed from the new version like cvSnakeImage, which also appears in this pkg.
An other question would be: how to replace the cvSnakeImage or with what can be replaced?
Did you build from scratch (clean build directory) ?
You could try adding cv:: namespace into *.hpp
-<linemod::Match>
+<cv::linemod::Match>
And/or try adding "#include <opencv2/rgbd/linemod.hpp>" into the same file.

Opencv 2.4.11 Windows 8 Visual studio 2012 professional The application was unable to start correctly (0xc00007b)

I just follow the tutorial on
http://docs.opencv.org/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.html#windows-visual-studio-how-to
and set the project property --> C/c++ directory to C:\opencv\build\include
and linker--> additonal library directory to C:\opencv\build\x64\vc12\lib
linker --> input :
opencv_calib3d2411d.lib opencv_contrib2411d.lib opencv_core2411d.lib opencv_features2d2411d.lib opencv_flann2411d.lib opencv_gpu2411d.lib opencv_highgui2411d.lib opencv_imgproc2411d.lib opencv_legacy2411d.lib opencv_ml2411d.lib opencv_nonfree2411d.lib opencv_objdetect2411d.lib opencv_ocl2411d.lib opencv_photo2411d.lib opencv_stitching2411d.lib opencv_superres2411d.lib opencv_ts2411d.lib opencv_video2411d.lib opencv_videostab2411d.lib
and use the test code here
http://docs.opencv.org/_downloads/introduction_windows_vs.cpp
it built successully but when i run it just say: The application was unable to start correctly (0xc00007b)

Resources