Ask Your Question
0

after successfully building with opencv contrib modules I am getting error

asked 2018-07-27 08:20:49 -0600

nobot gravatar image

i used the following configuration

cmake -D CMAKE_BUILD_TYPE=RELEASE

-D CMAKE_INSTALL_PREFIX=/usr/local
-D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules

-D BUILD_OPENCV_ENABLE_NONFREE=ON
-D WITH_OPENCL=ON
-D WITH_TBB=OFF -D WITH_OPENMP=ON -D WITH_V4L=ON
-D WITH_QT=OFF
-D WITH_OPENGL=ON
-D BUILD_EXAMPLES=ON ..

it did installed successfully

and for compiling my code, I Used
g++ 3bm3d.cpp -o bm3d `pkg-config --cflags --libs opencv ` -lopencv_xphoto

but still I am getting this infamous error ->

terminate called after throwing an instance of 'cv::Exception' what(): OpenCV(3.4.2) /home/odroid/Desktop/is2/opencv_contrib/modules/xphoto/src/bm3d_image_denoising.cpp:303: error: (-213:The function/feature is not implemented) This algorithm is patented and is excluded in this configuration;Set OPENCV_ENABLE_NONFREE CMake option and rebuild the library in function 'bm3dDenoising'

what else could I be possibly missing ??

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2018-07-27 08:27:07 -0600

berak gravatar image

updated 2018-07-27 08:29:22 -0600

just believe the errormsg.

the nonfree SIFT,SURF and the b3dm denoising algos can only be used, if you explicitly enable it.

you need to add: -DOPENCV_ENABLE_NONFREE=ON to your cmake flags, and rerun cmake && make && make install

(and it is OPENCV_ENABLE_NONFREE, not BUILD_OPENCV_ENABLE_NONFREE !)

edit flag offensive delete link more

Comments

thank you, It is now solved.

nobot gravatar imagenobot ( 2018-07-30 08:31:28 -0600 )edit

Hi, how can i do this in cmake-gui?

magoneonly gravatar imagemagoneonly ( 2018-10-18 02:42:49 -0600 )edit

^^ use the search box there

berak gravatar imageberak ( 2018-10-18 02:48:25 -0600 )edit
0

answered 2018-07-31 00:21:25 -0600

nobot gravatar image

Thank you, the error has been now sorted.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-07-27 08:20:49 -0600

Seen: 4,517 times

Last updated: Jul 31 '18