Using this cmake config:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D INSTALL_PYTHON_EXAMPLES=ON
-D OPENCV_EXTRA_MODULES_PATH=~/opencv/opencv_contrib/modules -D BUILD_opencv_dnns_easily_fooled=OFF
-D BUILD_opencv_dnn_modern=OFF -D BUILD_opencv_cnn_3dobj=OFF
-D PYTHON_EXECUTABLE=/usr/bin/python
-D WITH_CUDA=OFF -D BUILD_SHARED_LIBS=OFF
-D BUILD_EXAMPLES=ON ..
Just disable some dnn module which need caffe, since I am not installed caffe. But I need xfeatures module which give me those errors. It seems boostdesc.cpp not able to found, but I installed libboost-all-dev.
Any idea about this would be very appreciated, because the exactly same process I have build succeed many times except this. My script build from latest source so I think it might be a recently bug!
[ 80%] Building CXX object modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/src/boostdesc.cpp.o
/root/opencv/opencv_contrib/modules/xfeatures2d/src/boostdesc.cpp:646:37: fatal error: boostdesc_bgm.i: No such file or directory
compilation terminated.
modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/build.make:94: recipe for target 'modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/src/boostdesc.cpp.o' failed
Check CMake stdout log - it should warn about failed files downloading. Check CmakeDownloadLog.txt from build folder for details.
Currently xfeatures2d modules doesn't support conditional compilation with missing external files.
Similar problem: #1131
Many thanks, indeed cmake out shows that all things required by xfeature2d are all download fail:
CMake Warning at cmake/OpenCVDownload.cmake:188 (message):
xfeatures2d/boostdesc: Download failed: 1;"Unsupported protocol"
For details please refer to the download log file:
/root/opencv/build/CMakeDownloadLog.txt
Call Stack (most recent call first):
opencv_contrib/modules/xfeatures2d/cmake/download_boostdesc.cmake:22 (ocv_download)
opencv_contrib/modules/xfeatures2d/CMakeLists.txt:8 (download_boost_descriptors)
-- xfeatures2d/boostdesc: Download: boostdesc_bgm_bi.i
CMake Warning at cmake/OpenCVDownload.cmake:188 (message):
xfeatures2d/boostdesc: Download failed: 1;"Unsupported protocol"
For details please refer to the download log file:
/root/opencv/build/CMakeDownloadLog.txt
Call Stack (most recent call first):
opencv_contrib/modules/xfeatures2d/cmake/download_boostdesc.cmake:22 (ocv_download)
opencv_contrib/modules/xfeatures2d/CMakeLists.txt:8 (download_boost_descriptors)
-- xfeatures2d/boostdesc: Download: boostdesc_bgm_hd.i
CMake Warning at cmake/OpenCVDownload.cmake:188 (message):
xfeatures2d/boostdesc: Download failed: 1;"Unsupported protocol"
But, it says unsupported protocol, what this exactly mean? I am able to access internet without doubt.
Anyway, those package can be locally downloaded and place into which folder?
But, it says unsupported protocol, what this exactly mean?
the unsupported protocol is https in this case.
cmake calls either curl or wget internally, to download files, and whatever it used, it was misconfigured for https.
maybe updating curl (or wget) on your machine already helps, if not so, you could try to download the files manually, e.g.:
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_lbgm.i > 0ea90e7a8f3f7876d450e4149c97c74f-boostdesc_lbgm.i
(or simply from a webbrowser)
in the end, your opencv/.cache should look like this:
.cache
│
└───xfeatures2d
├───boostdesc
│ 0ae0675534aa318d9668f2a179c2a052-boostdesc_lbgm.i
│ 0ea90e7a8f3f7876d450e4149c97c74f-boostdesc_bgm.i
│ 202e1b3e9fec871b04da31f7f016679f-boostdesc_binboost_064.i
│ 232c966b13651bd0e46a1497b0852191-boostdesc_bgm_bi.i
│ 324426a24fa56ad9c5b8e3e0b3e5303e-boostdesc_bgm_hd.i
│ 98ea99d399965c03d555cef3ea502a0b-boostdesc_binboost_128.i
│ e6dcfa9f647779eb1ce446a8d759b6ea-boostdesc_binboost_256.i
│
└───vgg
151805e03568c9f490a5e3a872777b75-vgg_generated_120.i
7126a5d9a8884ebca5aea5d63d677225-vgg_generated_64.i
7cd47228edec52b6d82f46511af325c5-vgg_generated_80.i
e8d0dcd54d1bcfdc29203d011a797179-vgg_generated_48.i
Very thanks berak, I'll check it.
Hi, berak, However another problem occured:
/home/jintian/Downloads/opencv/modules/stitching/include/opencv2/stitching/detail/matchers.hpp:52:42: fatal error: opencv2/xfeatures2d/cuda.hpp: No such file or directory
xxfeature2d cannot find cuda.hpp, but I already diabled CUDA. So disappointed. How to get rid of the problem caused by xfeature2d?
sorry, idk. if you can't solve it, this should probably go into a new issue.
Hi, berak, I find that all those things needed by xfeature are all failed to download:
├───boostdesc
│ 0ae0675534aa318d9668f2a179c2a052-boostdesc_lbgm.i
│ 0ea90e7a8f3f7876d450e4149c97c74f-boostdesc_bgm.i
│ 202e1b3e9fec871b04da31f7f016679f-boostdesc_binboost_064.i
│ 232c966b13651bd0e46a1497b0852191-boostdesc_bgm_bi.i
│ 324426a24fa56ad9c5b8e3e0b3e5303e-boostdesc_bgm_hd.i
│ 98ea99d399965c03d555cef3ea502a0b-boostdesc_binboost_128.i
│ e6dcfa9f647779eb1ce446a8d759b6ea-boostdesc_binboost_256.i
│
└───vgg
151805e03568c9f490a5e3a872777b75-vgg_generated_120.i
7126a5d9a8884ebca5aea5d63d677225-vgg_generated_64.i
7cd47228edec52b6d82f46511af325c5-vgg_generated_80.i
e8d0dcd54d1bcfdc29203d011a797179-vgg_generated_48.i]
How to download them all. It seems this url not end with exactly file name:
https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_lbgm.i
I find those file names under opencv/.cache/xfeature2d, but just empty files, I think I have to manually download them, any idea about this?
Try to use fresh CMake version it should support https protocol (at least for files downloading).
To note, after I downloaded and pasted the boostdesc_* files, the same error was raised but with vgg_generated* ones. These can be downloaded from here.
same issue。
My .cache file as shown, but still there will be a problem fatal error: boostdesc_bgm.i: No such file or directory.
├───boostdesc
│ 0ae0675534aa318d9668f2a179c2a052-boostdesc_lbgm.i
│ 0ea90e7a8f3f7876d450e4149c97c74f-boostdesc_bgm.i
│ 202e1b3e9fec871b04da31f7f016679f-boostdesc_binboost_064.i
│ 232c966b13651bd0e46a1497b0852191-boostdesc_bgm_bi.i
│ 324426a24fa56ad9c5b8e3e0b3e5303e-boostdesc_bgm_hd.i
│ 98ea99d399965c03d555cef3ea502a0b-boostdesc_binboost_128.i
│ e6dcfa9f647779eb1ce446a8d759b6ea-boostdesc_binboost_256.i
│
└───vgg
151805e03568c9f490a5e3a872777b75-vgg_generated_120.i
7126a5d9a8884ebca5aea5d63d677225-vgg_generated_64.i
7cd47228edec52b6d82f46511af325c5-vgg_generated_80.i
e8d0dcd54d1bcfdc29203d011a797179-vgg_generated_48.i]
At the same time, I would like to know these operations is not meant to fix the failure to download the problem?
missing "/Users/apple/opencv-3.3.0/build/downloads/xfeatures2d/boostdesc_bgm_bi.i" #check_md5 "/Users/apple/opencv-3.3.0/.cache/xfeatures2d/boostdesc/232c966b13651bd0e46a1497b0852191-boostdesc_bgm_bi.i"
copy "/Users/apple/opencv-3.3.0/build/downloads/xfeatures2d/boostdesc_bgm_bi.i" "/Users/apple/opencv-3.3.0/.cache/xfeatures2d/boostdesc/232c966b13651bd0e46a1497b0852191-boostdesc_bgm_bi.i" do_copy "boostdesc_bgm_hd.i" "324426a24fa56ad9c5b8e3e0b3e5303e" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_hd.i" "/Users/apple/opencv-3.3.0/build/downloads/xfeatures2d"
What operations do I need to be able to compile?
@berak hello,thanks for your reply,i guess the last filename should be e8d0dcd54d1bcfdc29203d011a797179-vgg_generated_48.i instead of e8d0dcd54d1bcfdc29203d011a797179-vgg_generated_48.i]
Meanwhile ,i've tried much time soloving this issues,but still can't pass through,could you help to check and give some advice.
Here is some imformations of the issue , actually seems like dearbar's question
/home/shine/Downloads/opencv_contrib-master/modules/xfeatures2d/src/boostdesc.cpp:653:37: fatal error: boostdesc_bgm.i: No such file or directory
compilation terminated.
modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/build.make:91: recipe for target 'modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/src/boostdesc.cpp.o' failed
make[2]: * [modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/src/boostdesc.cpp.o] Error 1
CMakeFiles/Makefile2:7310: recipe for target 'modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/all' failed

Actually I've tried another way,but it still does not work

@Firststep2014 , yes there was a typo. (thanks)
and you have to run cmake again, so it copies the files from cmake/.downloads to modules/xfeatures2d/src
@berak OK,thanks,and I've tried copy all the file mannually , it worked
@Firststep2014 I am facing a similar problem. Can you please tell me which files you manually copied from where to where?
what is the solution?
Hi! The solution I used was to download by hand all the missing files, so if you encounter the same issue please use the folliwing command in a bash file:
cd ./cache/xfeatures2d/
cd boostdesc
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_lbgm.i > 0ae0675534aa318d9668f2a179c2a052-boostdesc_lbgm.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_256.i > e6dcfa9f647779eb1ce446a8d759b6ea-boostdesc_binboost_256.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_128.i > 98ea99d399965c03d555cef3ea502a0b-boostdesc_binboost_128.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_064.i > 202e1b3e9fec871b04da31f7f016679f-boostdesc_binboost_064.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_hd.i > 324426a24fa56ad9c5b8e3e0b3e5303e-boostdesc_bgm_hd.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_bi.i > 232c966b13651bd0e46a1497b0852191-boostdesc_bgm_bi.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm.i > 0ea90e7a8f3f7876d450e4149c97c74f-boostdesc_bgm.i
cd ../vgg
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_120.i > 151805e03568c9f490a5e3a872777b75-vgg_generated_120.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_64.i > 7126a5d9a8884ebca5aea5d63d677225-vgg_generated_64.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_48.i > e8d0dcd54d1bcfdc29203d011a797179-vgg_generated_48.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_80.i > 7cd47228edec52b6d82f46511af325c5-vgg_generated_80.i
And then run cmake again, and make. Hope this help
My issue was because of proxy. cmake calls curl which may have failed if you are behind a proxy. (export http_proxy didn't work for me)
Solution :
Update all the curl commands in opencv/build/download_with_curl.sh file to specify the proxy via -x option.
curl -x http://proxyip:port --output <path unchanged> <path unchanged>
Then run cmake and make
Edit:
export http_proxy didn't work because cmake was using its internal curl. Fixed that by adding --system-curl flag to the cmake command
With network proxy you can try this too:
export HTTP_PROXY=...
export HTTPS_PROXY=...
export http_proxy=${HTTP_PROXY}
export https_proxy=${HTTPS_PROXY}
cmake ...
Hey,
I'm new to the compilation game, but I ran into this problem and finally solved it so wanted to share the steps for anyone in the same place.
My OS is Ubuntu 18.04 and I'm running CUDA 10.0.
I'm running the following cmake command with cudacodec turned off because apparently nvcuvid is deprecated in cuda10:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=$cwd/installation/OpenCV-"$cvVersion" -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D WITH_TBB=ON -D WITH_V4L=ON -D OPENCV_PYTHON3_INSTALL_PATH=$cwd/OpenCV-$cvVersion-py3/lib/python3.5/site-packages -D WITH_QT=ON -D WITH_OPENGL=ON -D WITH_CUDA=ON -D CUDA_ARCH_BIN=6.1 -D CUDA_VERBOSE_BUILD=ON -D BUILD_opencv_cudacodec=OFF -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules -D BUILD_EXAMPLES=ON ..
At this point I manually downloaded the boostdesc and vgg files as suggested above. You actually don't have to do much more than lookate the download_with_curl.sh file (that's in your build folder). First ensure the file is executable by running the following command:
chmod +x download_with_curl.sh
then run the file with
./download_with_curl.sh
The boostdesc and vgg folders with the files will download into opencv/.cache/xfeatures2d/
Now this is where I ran into trouble (took me a while to solve). My extra modules folder which is linked to the xfeatures2d modules is in a seperate file path than the opencv build path. With the above recommendations I made the mistake of copying the boostdesc and vgg folders into opencv/build/modules/xfeatures2d/src that is wrong. You want to copy the two folders to opencv_contrib/modules/xfeatures2d/src
You can do that through the following command (presuming your opencv_contrib directory is in the same location as your opencv directory
if you are currently in the build directory
cp ../.cache/xfeatures2d/vgg ../../opencv_contrib/modules/xfeatures2d/src
cp ../.cache/xfeatures2d/boostdesc ../../opencv_contrib/modules/xfeatures2d/src
That's all folks. Like I said I'm new to this game so sorry if any mistakes. Anyways good luck to you all :-)
HI, everyone , i got the new issues as follows, although i 've already downloaded files as you guys mentioned above. and copy them to modules/xfeatures2d/src.
[ 78%] Building CXX object modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/src/boostdesc.cpp.o
In file included from /home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc.cpp:676:0:
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i: In constructor u2018cv::xfeatures2d::BoostDesc_Impl::BoostDesc_Impl(int, bool, float)u2019:
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:4345:86: error: unable to find numeric literal operator u2018operator""xu2019
f63, 0x3c0bbeef, 0xbbb0c8d7, 0xba092432, 0xbbc1c08e, 0xbc094c45, 0x3c2bca93, 0x
^~
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc.cpp:677:11: error: expected u2018}u2019 before u2018ini_paramsu2019
ini_params( orientQuant, patchSize,
^~~~~
In file included from /home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc.cpp:676:0:
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:9:18: warning: unused variable u2018nDimu2019 [-Wunused-variable]
static const int nDim = 64;
^
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:12:18: warning: unused variable u2018orientQuantu2019 [-Wunused-variable]
static const int orientQuant = 24;
^~~
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:15:18: warning: unused variable u2018patchSizeu2019 [-Wunused-variable]
static const int patchSize = 32;
^~~
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:18:18: warning: unused variable u2018iGradAssignTypeu2019 [-Wunused-variable]
static const int iGradAssignType = ASSIGN_SOFT;
^~~~~
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:21:18: warning: unused variable u2018nWLsu2019 [-Wunused-variable]
static const int nWLs = 512;
^~
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:24:27: warning: unused variable u2018threshu2019 [-Wunused-variable]
static const unsigned int thresh[] =
^~
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:93:18: warning: unused variable u2018orientu2019 [-Wunused-variable]
static const int orient[] =
^~~~
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:162:18: warning: unused variable u2018y_minu2019 [-Wunused-variable]
static const int y_min[] =
^
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:231:18: warning: unused variable u2018y_maxu2019 [-Wunused-variable]
static const int y_max[] =
^~~~~
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:300:18: warning: unused variable u2018x_minu2019 [-Wunused-variable]
static const int x_min[] =
^
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:369:18: warning: unused variable u2018x_maxu2019 [-Wunused-variable]
static const int x_max[] =
^~~~~
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:438:27: warning: unused variable u2018alphau2019 [-Wunused-variable]
static const unsigned int alpha[] =
^
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:507:27: warning: unused variable u2018betau2019 [-Wunused-variable]
static const unsigned int beta[] =
^~~~
modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/build.make:91: recipe for target 'modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/src/boostdesc.cpp.o' failed
make[2]: * [modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/src/boostdesc.cpp.o] Error 1
CMakeFiles/Makefile2:16780: recipe for target 'modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/all' failed
make[1]: [modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: ** [all] Error 2
error: unable to find numeric literal operator u2018operator""xu2019
f63, 0x3c0bbeef, 0xbbb0c8d7, 0xba092432, 0xbbc1c08e, 0xbc094c45, 0x3c2bca93, 0x
^~
i intend to install opencv3.4.0 in raspberry zero pi,by the way.
嗨,大家,我得到了如下新问题,虽然我已经按照你们上面提到的那样下载了文件。并将它们复制到modules / xfeatures2d / src。
[78%]构建CXX对象模块/ xfeatures2d / CMakeFiles / opencv_xfeatures2d.dir / src / boostdesc.cpp.o
在/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc.cpp中包含的文件中:676:0:
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:在构造函数 u2018cv :: xfeatures2d :: BoostDesc_Impl :: BoostDesc_Impl(int,bool,float) u2019 :
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i : 4345 : 86:错误:无法找到数字文字运算符 u2018operator“”x u2019
f63,0x3c0bbeef,0xbbb0c8d7,0xba092432 ,0xbbc1c08e,0xbc094c45,0x3c2bca93,0x
^〜
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc.cpp:677:11:错误:预期 u2019 u2019 u2018ini_params u2019
ini_params(orientQuant,patchSize,
^~ ~~/ home / pi / Download /
在文件从/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc.cpp:676:0包括:
/home/pi/Downloads/opencv_contrib-3.4.0/ modules / xfeatures2d / src / boostdesc_lbgm.i:9:18:warning:unused variable u2018nDim u2019 [-Wunused-variable]
static const int nDim = 64;
^ ~
opencv 0 / modules / xfeatures2d / src / boostdesc_lbgm.i:12:18:警告:未使用的变量 u2018orientQuant u2019 [-Wunused-variable]
static const int orientQuant = 24;
^~~
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:15:18:警告:未使用的变量 u2018patchSize u2019 [-Wunused-variable]
static const int patchSize = 32;
^~~ /
home / pi / Downloads / opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:18:18:警告:未使用的变量 u2018iGradAssignType u2019 [-Wunused-variable]
static const int iGradAssignType = ASSIGN_SOFT;
^ ~~~~
/ home / pi / Download / opencv_contrib-3.4.0 / modules / xfeatures2d / src / boostdesc_lbgm.i:21:18:警告:未使用的变量 u2018nWLs u2019 [-Wunused-variable]
static const int nWLs = 512;
^~~~ /
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:24:27:警告:未使用的变量 u2018thresh u2019 [-Wunused-variable]
static const unsigned int thresh [] =
^ ~
home / pi / Downloads / opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:93:18:警告:未使用的变量 u2018orient u2019 [-Wunused-variable]
static const int orient [] =
^~/
home / pi / Downloads / opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:162:18:警告:未使用的变量 u2018y_min u2019 [-Wunused-variable]
static const int y_min [] =
^~~~
/ home / pi /Downloads / opencv_contrib-3.4.0 / modules / xfeatures2d / src / boostdesc_lbgm.i:231:18:警告:未使用的变量 u2018y_max u2019 [-Wunused -变量]
static const int y_max [] =
^ ~
/ home / pi / Download / opencv_contrib-3.4.0 / modules / xfeatures2d / src / boostdesc_lbgm.i:300:18:警告:未使用的变量 u2018x_min u2019 [-Wunused -variable]
static const int x_min [] =
^~~~ /
/ home / pi / Download / opencv_contrib-3.4.0 / modules / xfeatures2d / src / boostdesc_lbgm.i:369:18:警告:未使用的变量 u2018x_max u2019 [-Wunused-variable]
static const int x_max [] =
^ ~
home / pi /Downloads / opencv_contrib-3.4.0 / modules / xfeatures2d / src / boostdesc_lbgm.i:438:27:警告:未使用的变量 u2018alpha u2019 [-Wunused-variable]
static const unsigned int alpha [] =
^~~
/home/pi/Downloads/opencv_contrib-3.4.0/modules/xfeatures2d/src/boostdesc_lbgm.i:507:27:警告:未使用的变量 u2018beta u2019 [-Wunused-variable]
static const unsigned int beta [] =
^ ~
modules / xfeatures2d / CMakeFiles / opencv_xfeatures2d.dir / build.make:91:目标'modules / xfeatures2d / CMakeFiles / opencv_xfeatures2d.dir / src / boostdesc.cpp.o'的配方失败
make [2]:* [modules / xfeatures2d / CMakeFiles / opencv_xfeatures2d.dir / src / boostdesc.cpp.o]错误1
CMakeFiles / Makefile2:16780:目标'modules / xfeatures2d / CMakeFiles / opencv_xfeatures2d.dir / all'的配方失败
make [1]:* * [modules / xfeatures2d / CMakeFiles / opencv_xfeatures2d.dir / all]错误2
Makefile:160:目标'all'失败的食谱
make: [all]错误2
@sainttelant .hello, sainttelant. I meet the same problem and I'd like to know that if you have solved the problem and how you do that. Thank you.
The same problem. The reason for mine is my cmake does not support protocol which leads to failures in downloading. I used the solution here: https://stackoverflow.com/questions/29816529/unsupported-protocol-while-download-tar-gz-package. That is to rebuild cmake with --system-curl so that it will support protocol and can download files from cmakefiles.
Just copy that solution here:
./bootstrap --system-curl
make
sudo make install
My solution:
cd opencv <!-- This is where you git cloned your opencv folder -->
vi ./dl.txt
copy https://github.com/opencv/opencv_contrib/issues/1301#issuecomment-447181426 into ./dl.txt
<!-- In dl.txt, change "cd ./cache/xfeatures2d/" to "cd ./.cache/xfeatures2d/" -->
<!-- exit ./dl.txt -->
chmod +x dl.txt
./dl.txt
cd ../build
cmake ..
make
sudo make install
your opencv/.cache should look like this:
https://github.com/opencv/opencv_contrib/issues/1301#issuecomment-318639639
Hi! The solution I used was to download by hand all the missing files, so if you encounter the same issue please use the folliwing command in a bash file:
!/bin/bash
cd ./cache/xfeatures2d/
cd boostdesccurl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_lbgm.i > 0ae0675534aa318d9668f2a179c2a052-boostdesc_lbgm.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_256.i > e6dcfa9f647779eb1ce446a8d759b6ea-boostdesc_binboost_256.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_128.i > 98ea99d399965c03d555cef3ea502a0b-boostdesc_binboost_128.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_064.i > 202e1b3e9fec871b04da31f7f016679f-boostdesc_binboost_064.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_hd.i > 324426a24fa56ad9c5b8e3e0b3e5303e-boostdesc_bgm_hd.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_bi.i > 232c966b13651bd0e46a1497b0852191-boostdesc_bgm_bi.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm.i > 0ea90e7a8f3f7876d450e4149c97c74f-boostdesc_bgm.i
cd ../vgg
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_120.i > 151805e03568c9f490a5e3a872777b75-vgg_generated_120.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_64.i > 7126a5d9a8884ebca5aea5d63d677225-vgg_generated_64.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_48.i > e8d0dcd54d1bcfdc29203d011a797179-vgg_generated_48.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_80.i > 7cd47228edec52b6d82f46511af325c5-vgg_generated_80.iAnd then run cmake again, and make. Hope this help
hi @BenbenIO , I have manually downloaded all the files above. My file structure is as follows:
picture 1

picture 2

there are no more errrors about boostesc, but vgg errors are still there.
Call Stack (most recent call first):
D:/Users/user wpy/Downloads/opencv-lhd-opencv_contrib-3.4.5/opencv_contrib/modules/xfeatures2d/cmake/download_vgg.cmake:16 (ocv_download)
D:/Users/user wpy/Downloads/opencv-lhd-opencv_contrib-3.4.5/opencv_contrib/modules/xfeatures2d/CMakeLists.txt:9 (download_vgg_descriptors)
what should I do next?
@berak OK,thanks,and I've tried copy all the file mannually , it worked
hi @Firststep2014 , so what is the final structure of folder?(
opencv_contrib-3.4.5opencv_contribmodulesxfeatures2d or
opencv_contrib-3.4.5opencv_contribmodulesxfeatures2dsrc or
opencv_contrib-3.4.5opencv_contribmodulesxfeatures2dcmake)
@Firststep2014 @BenbenIO I solve this problem.
I made a lot of possible attempts, and many of the others had some documents. Only when the file in the red box is added does it really work.

Download 48.i-120.i and rename with hash ,but when configure again,the rename files i.e. hash-"+"vgg_generated_48.i , hash-"+"vgg_generated_64.i,hash-"+"vgg_generated_80.i,hash-"+"vgg_generated_120.i are recovered.

I pack them up.
download this and unzip it ,that's ok.
patch__.zip
I also meet the same problem, I download them mannually and copy to modules\xfeatures2d\src ,can finally solve this problem.
you can search "boostdesc_bgm_xxx.i" in .../opencv/build/CMakeDownloadLog.txt
if you get something like this "#do_copy "boostdesc_bgm.i" "0ea90e7a8f3f7876d450e4149c97c74f" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm.i" "/home/.../build/downloads/xfeatures2d"
maybe something goes wrong during downloading from "";
check again:
ls -al ./build/downloads/xfeatures2d/
files like ".i" exist, but all are empty.
that means nothing has been downloaded before.
*so, check your access to https://raw.githubusercontent.com **.
for Chinese developers, you can download files from this link with passwd: e1wc
good luck~
you can search "boostdesc_bgm_xxx.i" in .../opencv/build/CMakeDownloadLog.txt
if you get something like this "#do_copy "boostdesc_bgm.i" "0ea90e7a8f3f7876d450e4149c97c74f" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm.i" "/home/.../build/downloads/xfeatures2d"
maybe something goes wrong during downloading from "";
check again:ls -al ./build/downloads/xfeatures2d/
files like ".i" exist, but all are empty.
that means nothing has been downloaded before.
*so, check your access to https://raw.githubusercontent.com **.
for Chinese developers, you can download files from this link with passwd: e1wc
good luck~
Thank you for leaving the downloading access for Chinese developers. And it helps a lot!
Hi! The solution I used was to download by hand all the missing files, so if you encounter the same issue please use the folliwing command in a bash file:
!/bin/bash
cd ./cache/xfeatures2d/
cd boostdesccurl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_lbgm.i > 0ae0675534aa318d9668f2a179c2a052-boostdesc_lbgm.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_256.i > e6dcfa9f647779eb1ce446a8d759b6ea-boostdesc_binboost_256.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_128.i > 98ea99d399965c03d555cef3ea502a0b-boostdesc_binboost_128.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_064.i > 202e1b3e9fec871b04da31f7f016679f-boostdesc_binboost_064.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_hd.i > 324426a24fa56ad9c5b8e3e0b3e5303e-boostdesc_bgm_hd.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_bi.i > 232c966b13651bd0e46a1497b0852191-boostdesc_bgm_bi.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm.i > 0ea90e7a8f3f7876d450e4149c97c74f-boostdesc_bgm.i
cd ../vgg
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_120.i > 151805e03568c9f490a5e3a872777b75-vgg_generated_120.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_64.i > 7126a5d9a8884ebca5aea5d63d677225-vgg_generated_64.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_48.i > e8d0dcd54d1bcfdc29203d011a797179-vgg_generated_48.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_80.i > 7cd47228edec52b6d82f46511af325c5-vgg_generated_80.iAnd then run cmake again, and make. Hope this help
that slove my problem, thx!
Hi! The solution I used was to download by hand all the missing files, so if you encounter the same issue please use the folliwing command in a bash file:
!/bin/bash
cd ./cache/xfeatures2d/
cd boostdesccurl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_lbgm.i > 0ae0675534aa318d9668f2a179c2a052-boostdesc_lbgm.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_256.i > e6dcfa9f647779eb1ce446a8d759b6ea-boostdesc_binboost_256.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_128.i > 98ea99d399965c03d555cef3ea502a0b-boostdesc_binboost_128.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_064.i > 202e1b3e9fec871b04da31f7f016679f-boostdesc_binboost_064.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_hd.i > 324426a24fa56ad9c5b8e3e0b3e5303e-boostdesc_bgm_hd.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_bi.i > 232c966b13651bd0e46a1497b0852191-boostdesc_bgm_bi.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm.i > 0ea90e7a8f3f7876d450e4149c97c74f-boostdesc_bgm.i
cd ../vgg
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_120.i > 151805e03568c9f490a5e3a872777b75-vgg_generated_120.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_64.i > 7126a5d9a8884ebca5aea5d63d677225-vgg_generated_64.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_48.i > e8d0dcd54d1bcfdc29203d011a797179-vgg_generated_48.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_80.i > 7cd47228edec52b6d82f46511af325c5-vgg_generated_80.iAnd then run cmake again, and make. Hope this help
Add these files to the src folder if cache not available
I had similar issue, but the reason was manually installed "cmake" which is using internal libcurl (w/o https support) by default. You can find explanation here:
https://stackoverflow.com/questions/51573524/cmake-is-unable-to-download-by-protocol-https-while-own-cmake-option-procedure
Let's review this issue, the problem has last more than three years and it's time to end the issue and conclude a satisfactory solution to save programmers' time.
This issue arises when your CMake fails trying to download the boostdest/vgg packages required by xfeatures2d module. Users would meet the issue either in the procedure of downloading or compiling xfeatures2d.


Possible reasons:
@leaf918 's reply resolves my issue quickly. https://github.com/opencv/opencv_contrib/issues/1301#issuecomment-618262386
I pack them up.
download this and unzip it ,that's ok.
patch__.zip
The zip file contains two folders named boostdest and vgg respectively. You would probably find that in your patch__.zip and overwrite the files.
It seems this is a common issue considering the number of replys under this issue. The trouble it made can be regarded as a design leak of opencv build procedure and we'd better schedule to improve the make experience. Changing download link or approach probably would relieve users.
Looks like this is because of the Chinese National Firewall. The wall prevent user establishes TCP connection to domain raw.githubusercontent.com.
After using a proxy, everything goes fine in my experience.
Most helpful comment
Hi! The solution I used was to download by hand all the missing files, so if you encounter the same issue please use the folliwing command in a bash file:
!/bin/bash
cd ./cache/xfeatures2d/
cd boostdesc
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_lbgm.i > 0ae0675534aa318d9668f2a179c2a052-boostdesc_lbgm.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_256.i > e6dcfa9f647779eb1ce446a8d759b6ea-boostdesc_binboost_256.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_128.i > 98ea99d399965c03d555cef3ea502a0b-boostdesc_binboost_128.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_064.i > 202e1b3e9fec871b04da31f7f016679f-boostdesc_binboost_064.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_hd.i > 324426a24fa56ad9c5b8e3e0b3e5303e-boostdesc_bgm_hd.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_bi.i > 232c966b13651bd0e46a1497b0852191-boostdesc_bgm_bi.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm.i > 0ea90e7a8f3f7876d450e4149c97c74f-boostdesc_bgm.i
cd ../vgg
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_120.i > 151805e03568c9f490a5e3a872777b75-vgg_generated_120.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_64.i > 7126a5d9a8884ebca5aea5d63d677225-vgg_generated_64.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_48.i > e8d0dcd54d1bcfdc29203d011a797179-vgg_generated_48.i
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_80.i > 7cd47228edec52b6d82f46511af325c5-vgg_generated_80.i
And then run cmake again, and make. Hope this help