A problem about building OpenCV4[SOLVED]
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 ...
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)
Thanks @berak