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/mmaction/issues/24
https://github.com/opencv/opencv_contrib/issues/1301
They suggested to copy the required files to /home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src https://github.com/opencv/opencv_3rdparty/tree/contrib_xfeatures2d_boostdesc_20161012 https://github.com/opencv/opencv_3rdparty/tree/contrib_xfeatures2d_vgg_20160317
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:73: error: expected primary-expression before ‘<’ token
<td id="LC504" class="blob-code blob-code-inner js-file-line">};</td>
^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:2741:74: error: expected primary-expression before ‘/’ token
<td id="LC504" class="blob-code blob-code-inner js-file-line">};</td>
^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:2742:7: error: expected primary-expression before ‘<’ token
</tr>
^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:2742:8: error: expected primary-expression before ‘/’ token
</tr>
^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:2743:7: error: expected primary-expression before ‘<’ token
<tr>
^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:2744:9: error: expected primary-expression before ‘<’ token
<td id="L505" class="blob-num js-line-number" data-line-number="505"></td>
^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:19146:74: error: expected primary-expression before ‘<’ token
<td id="LC4605" class="blob-code blob-code-inner js-file-line">};</td>
^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:19146:75: error: expected primary-expression before ‘/’ token
<td id="LC4605" class="blob-code blob-code-inner js-file-line">};</td>
^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:19147:7: error: expected primary-expression before ‘<’ token
</tr>
^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:19147:8: error: expected primary-expression before ‘/’ token
</tr>
^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:19148:1: error: expected primary-expression before ‘<’ token
</table>
^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:19148:2: error: expected primary-expression before ‘/’ token
</table>
^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:19148:3: error: ‘table’ was not declared in this scope
</table>
^~~~~
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:19148:3: note: suggested alternative: ‘tanl’
</table>
^~~~~
tanl
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:19150:3: error: expected primary-expression before ‘<’ token
<details class="details-reset details-overlay BlobToolbar position-absolute js-file-line-actions dropdown d-none" aria-hidden="true">
^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_lbgm.i:19150:12: error: expected primary-expression before ‘class’
<details class="details-reset details-overlay BlobToolbar position-absolute js-file-line-actions dropdown d-none" aria-hidden="true">
^~~~~
In file included from /home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc.cpp:693:0:
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_binboost_064.i:7:1: error: expected primary-expression before ‘<’ token
<!DOCTYPE html>
^
/home/user/OpenCV/opencv_contrib/modules/xfeatures2d/src/boostdesc_binboost_064.i:7:3: error: ‘DOCTYPE’ was not declared in this scope
<!DOCTYPE html>