<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic OpenCV g++ compile in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/OpenCV-g-compile/m-p/1296151#M175849</link>
    <description>&lt;P&gt;I got imx8mpevk and implemented imx-image-full on the board with Yocto rev.5.10.9_1.0.0.&lt;/P&gt;&lt;P&gt;I want to build tensorflow-lite with c ++, but I don't know how to link the opencv library with g++ options.&lt;/P&gt;&lt;P&gt;How do I compile the opencv library?&lt;/P&gt;&lt;P&gt;For example, on ubuntu, amd64&lt;BR /&gt;g++ -o &amp;lt;&amp;gt; .o &amp;lt;&amp;gt; .cpp `pkg-config opencv4 --libs --cflags`&lt;BR /&gt;If you command like, the compilation will succeed.&lt;/P&gt;&lt;P&gt;On the board, I found the opencv library in find in the following location:&lt;BR /&gt;/usr/lib/libopencv_core.so.4.4.0&lt;BR /&gt;/usr/lib/libopencv_imgproc.so.4.4.0&lt;/P&gt;</description>
    <pubDate>Tue, 22 Jun 2021 12:11:45 GMT</pubDate>
    <dc:creator>HT_MOB</dc:creator>
    <dc:date>2021-06-22T12:11:45Z</dc:date>
    <item>
      <title>OpenCV g++ compile</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/OpenCV-g-compile/m-p/1296151#M175849</link>
      <description>&lt;P&gt;I got imx8mpevk and implemented imx-image-full on the board with Yocto rev.5.10.9_1.0.0.&lt;/P&gt;&lt;P&gt;I want to build tensorflow-lite with c ++, but I don't know how to link the opencv library with g++ options.&lt;/P&gt;&lt;P&gt;How do I compile the opencv library?&lt;/P&gt;&lt;P&gt;For example, on ubuntu, amd64&lt;BR /&gt;g++ -o &amp;lt;&amp;gt; .o &amp;lt;&amp;gt; .cpp `pkg-config opencv4 --libs --cflags`&lt;BR /&gt;If you command like, the compilation will succeed.&lt;/P&gt;&lt;P&gt;On the board, I found the opencv library in find in the following location:&lt;BR /&gt;/usr/lib/libopencv_core.so.4.4.0&lt;BR /&gt;/usr/lib/libopencv_imgproc.so.4.4.0&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 12:11:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/OpenCV-g-compile/m-p/1296151#M175849</guid>
      <dc:creator>HT_MOB</dc:creator>
      <dc:date>2021-06-22T12:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: OpenCV g++ compile</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/OpenCV-g-compile/m-p/1296924#M175936</link>
      <description>&lt;P&gt;Hello HT_MOB,&lt;/P&gt;
&lt;P&gt;One alternative to using Tensorflow C++ API I found is to use &lt;A href="https://github.com/serizba/cppflow" rel="noreferrer" target="_blank"&gt;cppflow&lt;/A&gt;.&lt;/P&gt;
&lt;DIV class="s-prose js-post-body"&gt;
&lt;P&gt;It's a lightweight C++ wrapper around &lt;A href="https://www.tensorflow.org/install/lang_c" rel="noreferrer" target="_blank"&gt;Tensorflow C API&lt;/A&gt;. You get very small executables and it links against the &lt;CODE&gt;libtensorflow.so&lt;/CODE&gt; already compiled file. There are also examples of use and you use CMAKE instead of Bazel.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.tensorflow.org/lite/api_docs/cc" target="_blank"&gt;https://www.tensorflow.org/lite/api_docs/cc&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 13:25:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/OpenCV-g-compile/m-p/1296924#M175936</guid>
      <dc:creator>Bio_TICFSL</dc:creator>
      <dc:date>2021-06-23T13:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: OpenCV g++ compile</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/OpenCV-g-compile/m-p/1297638#M176009</link>
      <description>&lt;P&gt;Hellow Bio_TICFSL.&lt;/P&gt;&lt;P&gt;I was able to compile the tensorflow library with c ++ on my host pc using the method you showed.&lt;/P&gt;&lt;P&gt;How do I deploy this compiled bin to imx8mpevk?&lt;/P&gt;&lt;P&gt;I copied the bin generated on the host pc to imx8mpevk and ran it, resulting in an error like this:&lt;/P&gt;&lt;P&gt;root @ imx8mpevk: ~ / source / tensolflow_test # ./main&lt;BR /&gt;-sh: ./main: cannot execute binary file: Exec format error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think this error is due to an architectural difference.&lt;BR /&gt;I'm assuming you have a device cross-compilation environment, do you have one?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 23:46:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/OpenCV-g-compile/m-p/1297638#M176009</guid>
      <dc:creator>HT_MOB</dc:creator>
      <dc:date>2021-06-24T23:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: OpenCV g++ compile</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/OpenCV-g-compile/m-p/1310380#M177188</link>
      <description>&lt;P&gt;Does anyone know the problem above?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 10:15:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/OpenCV-g-compile/m-p/1310380#M177188</guid>
      <dc:creator>HT_MOB</dc:creator>
      <dc:date>2021-07-20T10:15:35Z</dc:date>
    </item>
  </channel>
</rss>

