Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

A problem about building OpenCV4

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>

A problem about building OpenCV4

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>

I fixed the above problem by downloading the git clone from github. But I still face another problem when installing, which is stated as follows:

Install the project...

-- Install configuration: "Release" CMake Error at cmake_install.cmake:41 (file): file INSTALL cannot find "/home/user/OpenCV/opencv/build/3rdparty/ippicv/ippicv_lnx/icv/readme.htm".

Makefile:73: recipe for target 'install' failed make: * [install] Error 1


The OpenCV cannot be installed, which shows that I missed the ippicv files. I downloaded the ippicv file from the official website (https://github.com/opencv/opencv_3rdparty/blob/ippicv/master_20170822/ippicv/ippicv_2017u3_lnx_intel64_general_20170822.tgz),

and extract the file to /home/user/OpenCV/opencv_contrib/modules. Besides, I changed the path in /home/hyleung/OpenCV/opencv/3rdparty/ippicv/ippicv.cmake from "https://raw.githubusercontent.com/opencv/opencv_3rdparty/${__commit_hash}/" to "/home/user/OpenCV/opencv_contrib/modules/ippicv/"

However, I still face the problem which shows that the file is likely to be missed. Please help.

A problem about building OpenCV4

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>

I fixed the above problem by downloading the git clone from github. But I still face another problem when installing, which is stated as follows:

Install the project...

-- Install configuration: "Release" CMake Error at cmake_install.cmake:41 (file): file INSTALL cannot find "/home/user/OpenCV/opencv/build/3rdparty/ippicv/ippicv_lnx/icv/readme.htm".

Makefile:73: recipe for target 'install' failed make: * [install] Error 1


The OpenCV cannot be installed, which shows that I missed the ippicv files. I downloaded the ippicv file from the official website (https://github.com/opencv/opencv_3rdparty/blob/ippicv/master_20170822/ippicv/ippicv_2017u3_lnx_intel64_general_20170822.tgz),

and extract the file to /home/user/OpenCV/opencv_contrib/modules. Besides, I changed the path in /home/hyleung/OpenCV/opencv/3rdparty/ippicv/ippicv.cmake from "https://raw.githubusercontent.com/opencv/opencv_3rdparty/${__commit_hash}/" to "/home/user/OpenCV/opencv_contrib/modules/ippicv/"

However, I still face the problem which shows that the file is likely to be missed. Please help.

A problem about building OpenCV4

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

I fixed the above problem by downloading the git clone from github. But I still face another problem when installing, which is stated as follows:

Install the project...

-- Install configuration: "Release" CMake Error at cmake_install.cmake:41 (file): file INSTALL cannot find "/home/user/OpenCV/opencv/build/3rdparty/ippicv/ippicv_lnx/icv/readme.htm".

Makefile:73: recipe for target 'install' failed make: * [install] Error 1


The OpenCV cannot be installed, which shows that I missed the ippicv files. I downloaded the ippicv file from the official website (https://github.com/opencv/opencv_3rdparty/blob/ippicv/master_20170822/ippicv/ippicv_2017u3_lnx_intel64_general_20170822.tgz),

and extract the file to /home/user/OpenCV/opencv_contrib/modules. Besides, I changed the path in /home/hyleung/OpenCV/opencv/3rdparty/ippicv/ippicv.cmake /home/user/OpenCV/opencv/3rdparty/ippicv/ippicv.cmake from "https://raw.githubusercontent.com/opencv/opencv_3rdparty/${__commit_hash}/" to "/home/user/OpenCV/opencv_contrib/modules/ippicv/"

However, I still face the problem which shows that the file is likely to be missed. Please help.

A problem about building OpenCV4

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

I fixed the above problem by downloading the git clone from github. But I still face another problem when installing, which is stated as follows:

Install the project...

-- Install configuration: "Release" CMake Error at cmake_install.cmake:41 (file): file INSTALL cannot find "/home/user/OpenCV/opencv/build/3rdparty/ippicv/ippicv_lnx/icv/readme.htm".

Makefile:73: recipe for target 'install' failed make: * [install] Error 1


The OpenCV cannot be installed, which shows that I missed the ippicv files. I downloaded the ippicv file from the official website (https://github.com/opencv/opencv_3rdparty/blob/ippicv/master_20170822/ippicv/ippicv_2017u3_lnx_intel64_general_20170822.tgz),

and extract the file to /home/user/OpenCV/opencv_contrib/modules. Besides, I changed the path in /home/user/OpenCV/opencv/3rdparty/ippicv/ippicv.cmake from "https://raw.githubusercontent.com/opencv/opencv_3rdparty/${__commit_hash}/" to "/home/user/OpenCV/opencv_contrib/modules/ippicv/"

However, I still face the problem which shows that the file is likely to be missed. Please help.