Ask Your Question
0

A problem about building OpenCV4[SOLVED]

asked 2019-11-08 23:51:12 -0500

cv_new gravatar image

updated 2019-11-18 09:56:12 -0500

supra56 gravatar image

My verison of Cmake is 3.15.5 and my verison of curl 7.65.3. I am going to build the latest verison of OpenCV4 on Ubuntu 18.04.
But I encountered a problem when building the xfeatures2d module (/home/user/OpenCV/opencv_contrib/modules/xfeatures2d), So I read posts from others:

https://github.com/open-mmlab/mmactio...

https://github.com/opencv/opencv_cont...

They suggested to copy the required files to /home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src https://github.com/opencv/opencv_3rdp... https://github.com/opencv/opencv_3rdp...

I downloaded them from Chrome and then copy the files to /home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src

And I did that, but still encountered some errors when building that. I spend hours to find the reasons but cannot figure out. I don't want to rebuild the Cmake. Please help.

                                                                          ^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:1911:7: error: expected primary-expression before ‘<’ token
       </tr>
       ^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:1911:8: error: expected primary-expression before ‘/’ token
       </tr>
        ^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:1912:7: error: expected primary-expression before ‘<’ token
       <tr>
       ^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:1913:9: error: expected primary-expression before ‘<’ token
         <td id="L298" class="blob-num js-line-number" data-line-number="298"></td>
         ^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:2187:73: error: expected primary-expression before ‘<’ token
         <td id="LC366" class="blob-code blob-code-inner js-file-line">};</td>
                                                                         ^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:2187:74: error: expected primary-expression before ‘/’ token
         <td id="LC366" class="blob-code blob-code-inner js-file-line">};</td>
                                                                          ^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:2188:7: error: expected primary-expression before ‘<’ token
       </tr>
       ^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:2188:8: error: expected primary-expression before ‘/’ token
       </tr>
        ^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:2189:7: error: expected primary-expression before ‘<’ token
       <tr>
       ^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:2190:9: error: expected primary-expression before ‘<’ token
         <td id="L367" class="blob-num js-line-number" data-line-number="367"></td>
         ^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:2464:73: error: expected primary-expression before ‘<’ token
         <td id="LC435" class="blob-code blob-code-inner js-file-line">};</td>
                                                                         ^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:2464:74: error: expected primary-expression before ‘/’ token
         <td id="LC435" class="blob-code blob-code-inner js-file-line">};</td>
                                                                          ^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:2465:7: error: expected primary-expression before ‘<’ token
       </tr>
       ^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:2465:8: error: expected primary-expression before ‘/’ token
       </tr>
        ^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:2466:7: error: expected primary-expression before ‘<’ token
       <tr>
       ^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:2467:9: error: expected primary-expression before ‘<’ token
         <td id="L436" class="blob-num js-line-number" data-line-number="436"></td>
         ^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:2741 ...
(more)
edit retag flag offensive close merge delete

Comments

please check, what you actually downloaded there, -- it looks like html text, an error msg, not the boost descriptors (which should look like c++ code)

berak gravatar imageberak ( 2019-11-09 01:30:42 -0500 )edit

Thanks @berak

cv_new gravatar imagecv_new ( 2019-11-13 10:06:04 -0500 )edit

1 answer

Sort by » oldest newest most voted
1

answered 2019-11-18 07:49:03 -0500

cv_new gravatar image

I downloaded the required files from https://github.com/opencv/opencv_3rdp... https://github.com/opencv/opencv_3rdp... which are:

boostdesc_bgm.i (bgm.bin)
boostdesc_bgm_bi.i (bgm_bilinear.bin)
boostdesc_bgm_hd.i (bgm_hard.bin)
boostdesc_binboost_064.i (binboost.bin)
boostdesc_binboost_128.i (binboost_128.bin)
boostdesc_binboost_256.i (binboost_256.bin)
boostdesc_lbgm.i (lbgm.bin)
vgg_generated_120.i (120 dim PR&PJ matrices)
vgg_generated_80.i (80 dim PR&PJ matrices)
vgg_generated_64.i (64 dim PR&PJ matrices)
vgg_generated_48.i (48 dim PR&PJ matrices)

using Clone or Download.

And copy them into /home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src. My problem is then solved.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-11-08 23:51:12 -0500

Seen: 161 times

Last updated: Nov 18