Opencv_contrib: aruco: Error building calibrate_camera.cpp

Created on 5 Apr 2016  Â·  7Comments  Â·  Source: opencv/opencv_contrib

I've compiled other OpenCV examples with a new install of OpenCV 3.1.0 on OSX 10.11.4, using Xcode 7.3, using default LLVM 7.1 compiler and GNU++11 dialect, libc++ standard library.

However, I cannot compile calibrate_camera.cpp. These are the errors I get:

calibrate_camera.cpp:176:80: No member named 'create' in 'cv::aruco::DetectorParameters'
calibrate_camera.cpp:208:28: No viable conversion from 'const cv::aruco::Dictionary' to 'Ptr<aruco::Dictionary>'
calibrate_camera.cpp:232:64: No viable conversion from 'Ptr<aruco::Board>' to 'const cv::aruco::Board'
calibrate_camera.cpp:279:67: No viable conversion from 'Ptr<aruco::Board>' to 'const cv::aruco::Board'

Has anyone encountered this or have any ideas?

bug builinstall

All 7 comments

We can't reproduce this problem:

[ 76%] Building CXX object modules/aruco/CMakeFiles/example_aruco_calibrate_camera.dir/samples/calibrate_camera.cpp.o

http://pullrequest.opencv.org/buildbot/builders/master-contrib-mac/builds/250/steps/compile%20release/logs/stdio

Try to update to latest version or use the same code tags (3.1.0 or latest master) for example and OpenCV library (cv::getBuildInformation() may help)
Please check that right header files are used (especially in case of several OpenCV installations).
Try to run make VERBOSE=1 and post here a compilation command line.

There is an issue with aruco lib when installing opencv from homebrew. What I figured out are 2 things.

1)The aruco header file from the homebrew install, do not contain the declaration of the DetectorParameters::create function, and it seams that in general it is not implemented neither in the aruco.cpp source.

2)The current SHA of the opencv_contrib master branch is 745b12eed354fa9e9960f5338e111a9d6d684aaf56f34ab38fa92cfeaa533ca6

while homebrew is requesting for and older ef2084bcd4c3812eb53c21fa81477d800e8ce8075b68d9dedec90fef395156e5

and I believe that this is the root of our problem here... Homebrew has to modify the file:
https://github.com/Homebrew/homebrew-science/blob/master/opencv3.rb

I will post the same issue at homebrew-science repo because it is an annoying bug that wasted many hours from my life in order to figure it out!

ef2084bcd4c3812eb53c21fa81477d800e8ce8075b68d9dedec90fef395156e5

@kosmasK, this is not a commit hash, but archive checksum. Brew downloads archive from the releases page and verifies its checksum.

You can pass the --HEAD option to brew to get the latest source version.

Could I disable the aruco module separately when compiling?
I tried cmake -DWITH_ARUCO=OFF but not success. I aso grep aruco in the opencv_contrib folder and did not find any clue.

@blueardour , try -DBUILD_opencv_aruco=OFF

@mshabunin I found a easy way, just moved the aruco sub-folder away~ Thanks anyway

Was this page helpful?
0 / 5 - 0 ratings