 <?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://Robo.Fish/wiki/index.php?action=history&amp;feed=atom&amp;title=OpenCV</id>
	<title>OpenCV - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://Robo.Fish/wiki/index.php?action=history&amp;feed=atom&amp;title=OpenCV"/>
	<link rel="alternate" type="text/html" href="https://Robo.Fish/wiki/index.php?title=OpenCV&amp;action=history"/>
	<updated>2026-04-22T11:26:55Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://Robo.Fish/wiki/index.php?title=OpenCV&amp;diff=2923&amp;oldid=prev</id>
		<title>Kai at 2019-08-14T23:30:40</title>
		<link rel="alternate" type="text/html" href="https://Robo.Fish/wiki/index.php?title=OpenCV&amp;diff=2923&amp;oldid=prev"/>
		<updated>2019-08-14T23:30:40Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 2019-08-14T23:30:40&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Introduction ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Introduction ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;OpenCV (http://opencv.org) is a successful, open-source framework full of solutions for computer vision and related tasks. The robo.fish projects &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;standardize on &lt;/del&gt;OpenCV version &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;3&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;3&lt;/del&gt;, or a newer &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;3&lt;/del&gt;.x release&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, in which the &#039;&#039;dnn&#039;&#039; module is a main module&lt;/del&gt;. The OpenCV installation path is assumed to be &#039;&#039;/usr/local/opencv-&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;3&lt;/del&gt;.x.y&#039;&#039;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;OpenCV (http://opencv.org) is a successful, open-source framework full of solutions for computer vision and related tasks. The robo.fish projects &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;expect &lt;/ins&gt;OpenCV version &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;4&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1&lt;/ins&gt;, or a newer &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;4&lt;/ins&gt;.x release. The OpenCV installation path is assumed to be &#039;&#039;/usr/local/opencv-&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;4&lt;/ins&gt;.x.y&#039;&#039;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Kai</name></author>
	</entry>
	<entry>
		<id>https://Robo.Fish/wiki/index.php?title=OpenCV&amp;diff=2922&amp;oldid=prev</id>
		<title>Kai at 2019-08-14T23:27:16</title>
		<link rel="alternate" type="text/html" href="https://Robo.Fish/wiki/index.php?title=OpenCV&amp;diff=2922&amp;oldid=prev"/>
		<updated>2019-08-14T23:27:16Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 2019-08-14T23:27:16&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l26&quot;&gt;Line 26:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 26:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;cd OpenCV&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;cd OpenCV&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;git tag&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;git tag&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;git checkout -b &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;v3&lt;/del&gt;.4.1 &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;3.4&lt;/del&gt;.1&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;git checkout -b &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;v4&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1.1 &lt;/ins&gt;4.1.1&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;where we created the branch &#039;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;v3&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;4&lt;/del&gt;.1&#039;&#039; for the release tagged &#039;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;3&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;4&lt;/del&gt;.1&#039;&#039;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;where we created the branch &#039;&#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;v4&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1&lt;/ins&gt;.1&#039;&#039; for the release tagged &#039;&#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;4&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1&lt;/ins&gt;.1&#039;&#039;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Don&amp;#039;t forget to repeat this procedure for OpenCV-Contrib using the same tag.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Don&amp;#039;t forget to repeat this procedure for OpenCV-Contrib using the same tag.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l89&quot;&gt;Line 89:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 89:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;DPYTHON3_PACKAGES_PATH&amp;#039;&amp;#039;&amp;#039; is the folder where the shared library files for Python modules need to be installed&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;DPYTHON3_PACKAGES_PATH&amp;#039;&amp;#039;&amp;#039; is the folder where the shared library files for Python modules need to be installed&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;DPYTHON_LIBRARY&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;DPYTHON3_LIBRARY&amp;#039;&amp;#039;&amp;#039; are the shared library file for Python itself&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;DPYTHON_LIBRARY&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;DPYTHON3_LIBRARY&amp;#039;&amp;#039;&amp;#039; are the shared library file for Python itself&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br /&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;On &#039;&#039;&#039;Ubuntu 16.04&#039;&#039;&#039;, with Python 3.6 provided by a miniconda3 environment that is currently active we could use&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;pre class=&quot;terminal&quot;&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  -DPYTHON_DEFAULT_EXECUTABLE=`python3-config --prefix`/bin/python3 \&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  -DPYTHON3_EXECUTABLE=`python3-config --prefix`/bin/python3 \&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  -DPYTHON3_INCLUDE_DIR=`python3-config --prefix`/include/python3.6m \&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  -DPYTHON3_PACKAGES_PATH=`python3-config --prefix`/lib/python3.6/site-packages \&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;On &amp;#039;&amp;#039;&amp;#039;Ubuntu 18.04&amp;#039;&amp;#039;&amp;#039;, where Python 3.6 is available as a main package, this works fine:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;On &amp;#039;&amp;#039;&amp;#039;Ubuntu 18.04&amp;#039;&amp;#039;&amp;#039;, where Python 3.6 is available as a main package, this works fine:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l128&quot;&gt;Line 128:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 120:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==== CUDA Settings ====&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==== CUDA Settings ====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To enable support for &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[&lt;/del&gt;CUDA&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]] &lt;/del&gt;use this setting&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;I am assuming that your system is Ubuntu 18.04.3 with [[CUDA]] 10.1 installed (via the [https://developer.nvidia.com/cuda-downloads?target_os=Linux&amp;amp;target_arch=x86_64&amp;amp;target_distro=Ubuntu&amp;amp;target_version=1804 CUDA Toolkit download page]). &lt;/ins&gt;To enable support for CUDA &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;in OpenCV &lt;/ins&gt;use this setting&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre class=&amp;quot;terminal&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre class=&amp;quot;terminal&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   -DWITH_CUDA=ON \&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   -DWITH_CUDA=ON \&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l146&quot;&gt;Line 146:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 138:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;where 61 specifies compute capability level 6.1 and is given as an example. The compute capability versions supported by your NVIDIA hardware are listed in the cmake output when you run it without setting &amp;#039;&amp;#039;CUDA_ARCH_BIN&amp;#039;&amp;#039;. There is also [https://en.wikipedia.org/wiki/CUDA#GPUs_supported a list at Wikipedia] that shows which compute capability level is supported by which NVIDIA hardware.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;where 61 specifies compute capability level 6.1 and is given as an example. The compute capability versions supported by your NVIDIA hardware are listed in the cmake output when you run it without setting &amp;#039;&amp;#039;CUDA_ARCH_BIN&amp;#039;&amp;#039;. There is also [https://en.wikipedia.org/wiki/CUDA#GPUs_supported a list at Wikipedia] that shows which compute capability level is supported by which NVIDIA hardware.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;====&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;= CUDA 9.1 on Ubuntu 18.04 =&lt;/del&gt;====&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br /&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Currently, &lt;/del&gt;the &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;CUDA 9&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1 SDK can not be used with GCC 7&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;which is the default version of GCC in Ubuntu 18.04. Read [[GCC&lt;/del&gt;#&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Switching_between_GCC_versions_in_Ubuntu | Switching between GCC version in Ubuntu]] how to switch to GCC 6. You will also need to pass to cmake the flag&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==== &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Fixing the &#039;&#039;eigen3&#039;&#039; Header Path &lt;/ins&gt;====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre class=&quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;terminal&lt;/del&gt;&quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;In &lt;/ins&gt;the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;file &#039;&#039;&#039;modules/core/include/opencv2/core/private&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;hpp&#039;&#039;&#039;&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;edit line 66 &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;-DCUDA_NVCC_FLAGS=--expt-relaxed-constexpr&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;pre class=&quot;code&quot;&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; include &amp;lt;Eigen/Core&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;by inserting &#039;&#039;eigen/&#039;&#039; before &#039;&#039;Eigen&#039;&#039; like this&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre class=&quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;code&lt;/ins&gt;&quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;#  include &amp;lt;eigen3/Eigen/Core&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;in order to avoid NVCC compilation errors.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br /&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==== Intel Optimizations ====&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==== Intel Optimizations ====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The build option &amp;#039;&amp;#039;-DWITH_IPP=ON&amp;#039;&amp;#039; is for workstations with Intel processors and enables accelerated computation by using the [https://software.intel.com/en-us/articles/intel-integrated-performance-primitives-intel-ipp-open-source-computer-vision-library-opencv-faq/ Intel IPP-ICV] library. The library will be downloaded automatically into the subfolder &amp;#039;&amp;#039;3rdparty/ippicv&amp;#039;&amp;#039; during the build process.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The build option &amp;#039;&amp;#039;-DWITH_IPP=ON&amp;#039;&amp;#039; is for workstations with Intel processors and enables accelerated computation by using the [https://software.intel.com/en-us/articles/intel-integrated-performance-primitives-intel-ipp-open-source-computer-vision-library-opencv-faq/ Intel IPP-ICV] library. The library will be downloaded automatically into the subfolder &amp;#039;&amp;#039;3rdparty/ippicv&amp;#039;&amp;#039; during the build process.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Kai</name></author>
	</entry>
	<entry>
		<id>https://Robo.Fish/wiki/index.php?title=OpenCV&amp;diff=2852&amp;oldid=prev</id>
		<title>Kai: /* CUDA 9.1 on Ubuntu 18.04 */</title>
		<link rel="alternate" type="text/html" href="https://Robo.Fish/wiki/index.php?title=OpenCV&amp;diff=2852&amp;oldid=prev"/>
		<updated>2018-05-16T19:43:19Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;CUDA 9.1 on Ubuntu 18.04&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=== Introduction ===&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenCV (http://opencv.org) is a successful, open-source framework full of solutions for computer vision and related tasks. The robo.fish projects standardize on OpenCV version 3.3, or a newer 3.x release, in which the &amp;#039;&amp;#039;dnn&amp;#039;&amp;#039; module is a main module. The OpenCV installation path is assumed to be &amp;#039;&amp;#039;/usr/local/opencv-3.x.y&amp;#039;&amp;#039;.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Building From Source ===&lt;br /&gt;
If your system does not provide an up-to-date version of OpenCV, including Python 3 modules, you can always resort to building it from source. Make sure that &amp;#039;&amp;#039;cmake&amp;#039;&amp;#039; is installed. On [[Ubuntu]] Linux open a shell terminal and make sure &amp;#039;&amp;#039;cmake&amp;#039;&amp;#039; is installed.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;terminal&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Get the source code of OpenCV from Github:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;terminal&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/opencv/opencv.git OpenCV&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Also get the OpenCV extra modules:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;terminal&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/opencv/opencv_contrib.git OpenCV-Contrib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Change to the new &amp;#039;&amp;#039;OpenCV&amp;#039;&amp;#039; folder, look at the list of version tags, decide which tagged release version you want to build, then check out that version by creating a branch for it:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;terminal&amp;quot;&amp;gt;&lt;br /&gt;
cd OpenCV&lt;br /&gt;
git tag&lt;br /&gt;
git checkout -b v3.4.1 3.4.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
where we created the branch &amp;#039;&amp;#039;v3.4.1&amp;#039;&amp;#039; for the release tagged &amp;#039;&amp;#039;3.4.1&amp;#039;&amp;#039;.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Don&amp;#039;t forget to repeat this procedure for OpenCV-Contrib using the same tag.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Make sure all dependencies for building the OpenCV source code are installed:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;terminal&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gcc g++ cmake cmake-curses-gui python3.6-dev \&lt;br /&gt;
libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libavresample-dev libswresample-dev \&lt;br /&gt;
libopenblas-dev libatlas-base-dev libatlas-dev liblapack-dev liblapacke-dev python3-numpy \&lt;br /&gt;
doxygen qt5-default python3-pyqt5 libqt5opengl5-dev libgphoto2-dev \&lt;br /&gt;
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libv4l-dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
where I assume a Ubuntu 18.04 Bionic system with Python 3.6 packages available from the default repositories. On Ubuntu 16.04 you can install Python 3.6 via [https://conda.io/miniconda.html miniconda3].&lt;br /&gt;
Also, there should be no previously installed OpenCV libraries in &amp;#039;&amp;#039;/usr/lib/&amp;#039;&amp;#039;, which could confuse the linker. You can check by typing&lt;br /&gt;
&amp;lt;pre class=&amp;quot;terminal&amp;quot;&amp;gt;&lt;br /&gt;
find /usr/lib/ -name &amp;#039;libopencv*&amp;#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Create the &amp;#039;&amp;#039;build&amp;#039;&amp;#039; subfolder in which we will run &amp;#039;&amp;#039;cmake&amp;#039;&amp;#039;.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;terminal&amp;quot;&amp;gt;&lt;br /&gt;
mkdir build&lt;br /&gt;
cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Running cmake with the options shown below and will generate the make files for building GUI-less OpenCV binaries.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;terminal&amp;quot;&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE=RELEASE \&lt;br /&gt;
  -DCMAKE_INSTALL_PREFIX=/usr/local/opencv-3.4.1 \&lt;br /&gt;
  -DOPENCV_EXTRA_MODULES_PATH=../../OpenCV-Contrib/modules -DBUILD_opencv_legacy=OFF \&lt;br /&gt;
  &amp;lt;&amp;lt;&amp;lt; Python settings &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
  -DBUILD_TIFF=ON \&lt;br /&gt;
  -DBUILD_opencv_java=OFF \&lt;br /&gt;
  -DWITH_QT=ON \&lt;br /&gt;
  -DWITH_OPENGL=ON \&lt;br /&gt;
  -DWITH_OPENCL=ON \&lt;br /&gt;
  &amp;lt;&amp;lt;&amp;lt; CUDA settings &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
  -DWITH_IPP=ON \&lt;br /&gt;
  -DWITH_TBB=ON \&lt;br /&gt;
  -DWITH_EIGEN=ON \&lt;br /&gt;
  -DWITH_V4L=ON \&lt;br /&gt;
  -DWITH_VTK=OFF \&lt;br /&gt;
  -DBUILD_TESTS=OFF \&lt;br /&gt;
  -DBUILD_PERF_TESTS=OFF \&lt;br /&gt;
  ..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
==== Python Settings ====&lt;br /&gt;
This part of the build settings is responsible for generating the Python bindings, so that OpenCV can be used when programming in Python. Since it&amp;#039;s 2018 and we are not interested in Python 2.7 anymore, we will build OpenCV exclusively for Python 3.6. These two settings are therefore fixed:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;terminal&amp;quot;&amp;gt;&lt;br /&gt;
  -DBUILD_opencv_python2=OFF \&lt;br /&gt;
  -DBUILD_opencv_python3=ON \&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
With that settled, we need to specify the special directories of the Python installation.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;DPYTHON_DEFAULT_EXECUTABLE&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;DPYTHON3_EXECUTABLE&amp;#039;&amp;#039;&amp;#039; are both paths to the Python 3 binary&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;PYTHON_INCLUDE_DIR&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;PYTHON3_INCLUDE_DIR&amp;#039;&amp;#039;&amp;#039; are the folder in which the C API header file is located&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;DPYTHON3_PACKAGES_PATH&amp;#039;&amp;#039;&amp;#039; is the folder where the shared library files for Python modules need to be installed&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;DPYTHON_LIBRARY&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;DPYTHON3_LIBRARY&amp;#039;&amp;#039;&amp;#039; are the shared library file for Python itself&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
On &amp;#039;&amp;#039;&amp;#039;Ubuntu 16.04&amp;#039;&amp;#039;&amp;#039;, with Python 3.6 provided by a miniconda3 environment that is currently active we could use&lt;br /&gt;
&amp;lt;pre class=&amp;quot;terminal&amp;quot;&amp;gt;&lt;br /&gt;
  -DPYTHON_DEFAULT_EXECUTABLE=`python3-config --prefix`/bin/python3 \&lt;br /&gt;
  -DPYTHON3_EXECUTABLE=`python3-config --prefix`/bin/python3 \&lt;br /&gt;
  -DPYTHON3_INCLUDE_DIR=`python3-config --prefix`/include/python3.6m \&lt;br /&gt;
  -DPYTHON3_PACKAGES_PATH=`python3-config --prefix`/lib/python3.6/site-packages \&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
On &amp;#039;&amp;#039;&amp;#039;Ubuntu 18.04&amp;#039;&amp;#039;&amp;#039;, where Python 3.6 is available as a main package, this works fine:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;terminal&amp;quot;&amp;gt;&lt;br /&gt;
 -DPYTHON_DEFAULT_EXECUTABLE=/usr/bin/python3 \&lt;br /&gt;
 -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m \&lt;br /&gt;
 -DPYTHON3_INCLUDE_DIR=/usr/include/python3.6m \&lt;br /&gt;
 -DPYTHON3_NUMPY_INCLUDE_DIRS=/usr/lib/python3/dist-packages/numpy/core/include \&lt;br /&gt;
 -DPYTHON3_PACKAGES_PATH=/usr/lib/python3/dist-packages \&lt;br /&gt;
 -DPYTHON3_EXECUTABLE=/usr/bin/python3 \&lt;br /&gt;
 -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.6m.so \&lt;br /&gt;
 -DPYTHON3_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.6m.so \&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that both DPYTHON_INCLUDE_DIR and DPYTHON3_INCLUDE_DIR need to point to the Python 3 directory.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
The directory paths can also be extracted from the Python runtime. For example:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;terminal&amp;quot;&amp;gt;&lt;br /&gt;
-DPYTHON3_EXECUTABLE=$(which python3) \&lt;br /&gt;
-DPYTHON_DEFAULT_EXECUTABLE=$(which python3) \&lt;br /&gt;
-DPYTHON_INCLUDE_DIR=$(python3 -c &amp;quot;from distutils.sysconfig import get_python_inc; print(get_python_inc())&amp;quot;) \&lt;br /&gt;
-DPYTHON_INCLUDE_DIR2=$(python3 -c &amp;quot;from os.path import dirname; from distutils.sysconfig import get_config_h_filename; print(dirname(get_config_h_filename()))&amp;quot;) \&lt;br /&gt;
-DPYTHON3_INCLUDE_DIR=$(python3 -c &amp;quot;from distutils.sysconfig import get_python_inc; print(get_python_inc())&amp;quot;) \&lt;br /&gt;
-DPYTHON3_NUMPY_INCLUDE_DIRS=$(python3 -c &amp;quot;import numpy; print(numpy.get_include())&amp;quot;) \&lt;br /&gt;
-DPYTHON3_PACKAGES_PATH=$(python3 -c &amp;quot;from distutils.sysconfig import get_python_lib; print(get_python_lib())&amp;quot;) \&lt;br /&gt;
-DPYTHON_LIBRARY=$(python3 -c &amp;quot;from distutils.sysconfig import get_config_var;from os.path import dirname,join ; print(join(dirname(get_config_var(&amp;#039;LIBPC&amp;#039;)),get_config_var(&amp;#039;LDLIBRARY&amp;#039;)))&amp;quot;) \&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
One more note on Python: If you choose to install the Python module &amp;quot;cv2&amp;quot; to a different packages folder, don&amp;#039;t forget to add that folder to the &amp;#039;&amp;#039;PYTHONPATH&amp;#039;&amp;#039; environment variable.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
==== CUDA Settings ====&lt;br /&gt;
To enable support for [[CUDA]] use this setting&lt;br /&gt;
&amp;lt;pre class=&amp;quot;terminal&amp;quot;&amp;gt;&lt;br /&gt;
  -DWITH_CUDA=ON \&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
You probably also want to enable Fast Math and cuBLAS:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;terminal&amp;quot;&amp;gt;&lt;br /&gt;
-DENABLE_FAST_MATH=ON \&lt;br /&gt;
-DCUDA_FAST_MATH=ON \&lt;br /&gt;
-DWITH_CUBLAS=ON \&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
To shorten the build time, you should restrict the target architectures for the CUDA compiler (&amp;#039;&amp;#039;NVCC&amp;#039;&amp;#039;) to the architecture (or [http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#compute-capabilities compute capability level]) of the installed NVIDIA card. Use the cmake option&lt;br /&gt;
&amp;lt;pre class=&amp;quot;terminal&amp;quot;&amp;gt;&lt;br /&gt;
-DCUDA_ARCH_BIN=61&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
where 61 specifies compute capability level 6.1 and is given as an example. The compute capability versions supported by your NVIDIA hardware are listed in the cmake output when you run it without setting &amp;#039;&amp;#039;CUDA_ARCH_BIN&amp;#039;&amp;#039;. There is also [https://en.wikipedia.org/wiki/CUDA#GPUs_supported a list at Wikipedia] that shows which compute capability level is supported by which NVIDIA hardware.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===== CUDA 9.1 on Ubuntu 18.04 =====&lt;br /&gt;
Currently, the CUDA 9.1 SDK can not be used with GCC 7, which is the default version of GCC in Ubuntu 18.04. Read [[GCC#Switching_between_GCC_versions_in_Ubuntu | Switching between GCC version in Ubuntu]] how to switch to GCC 6. You will also need to pass to cmake the flag&lt;br /&gt;
&amp;lt;pre class=&amp;quot;terminal&amp;quot;&amp;gt;&lt;br /&gt;
-DCUDA_NVCC_FLAGS=--expt-relaxed-constexpr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
in order to avoid NVCC compilation errors.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Intel Optimizations ====&lt;br /&gt;
The build option &amp;#039;&amp;#039;-DWITH_IPP=ON&amp;#039;&amp;#039; is for workstations with Intel processors and enables accelerated computation by using the [https://software.intel.com/en-us/articles/intel-integrated-performance-primitives-intel-ipp-open-source-computer-vision-library-opencv-faq/ Intel IPP-ICV] library. The library will be downloaded automatically into the subfolder &amp;#039;&amp;#039;3rdparty/ippicv&amp;#039;&amp;#039; during the build process.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
==== More Options ====&lt;br /&gt;
All the build options can be explored with the &amp;#039;&amp;#039;ccmake&amp;#039;&amp;#039; tool&lt;br /&gt;
&amp;lt;pre class=&amp;quot;terminal&amp;quot;&amp;gt;&lt;br /&gt;
ccmake ..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Gtk+ 3 development files need to be present if you want [http://docs.opencv.org/3.1.0/d7/dfc/group__highgui.html#ga453d42fe4cb60e5723281a89973ee563 imshow()] to work. On Debian based distros look for the &amp;#039;&amp;#039;libgtk-3-dev&amp;#039;&amp;#039; package.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
==== Make &amp;amp; Install ====&lt;br /&gt;
After the configuration completes successfully simply enter&lt;br /&gt;
&amp;lt;pre class=&amp;quot;terminal&amp;quot;&amp;gt;&lt;br /&gt;
make -j7&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to build OpenCV, where the optional parameter &amp;#039;&amp;#039;-j&amp;lt;n&amp;gt;&amp;#039;&amp;#039; specifies the number of parallel build processes to run. After OpenCV has been built type&lt;br /&gt;
&amp;lt;pre class=&amp;quot;terminal&amp;quot;&amp;gt;&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to install the headers (into /usr/local/include/) and the library files (into /usr/local/lib/).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
To uninstall, run&lt;br /&gt;
&amp;lt;pre class=&amp;quot;terminal&amp;quot;&amp;gt;&lt;br /&gt;
sudo make uninstall&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Just make sure you don&amp;#039;t delete the &amp;#039;&amp;#039;build&amp;#039;&amp;#039; subfolder before uninstalling. The file &amp;#039;&amp;#039;install_manifest.txt&amp;#039;&amp;#039; inside the &amp;#039;&amp;#039;build&amp;#039;&amp;#039; folder is needed by the uninstaller script. Otherwise you will need to manually delete the copied files.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
==== Test ====&lt;br /&gt;
Testing whether OpenCV was successfully installed is easy. Just check the contents of the installation folder that you provided with the setting CMAKE_INSTALL_PREFIX, which defaults to &amp;#039;&amp;#039;/usr/local&amp;#039;&amp;#039;.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
To check whether the Python library was successfully installed, look for the file &amp;#039;&amp;#039;cv2.cpython-36m-x86_64-linux-gnu.so&amp;#039;&amp;#039; in the Python libraries directory that you specified (PYTHON3_PACKAGES_PATH) and run the test script&lt;br /&gt;
&amp;lt;pre class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
import os&lt;br /&gt;
import cv2                     # loads the OpenCV module&lt;br /&gt;
from cv2 import __version__&lt;br /&gt;
os.path.dirname(cv2.__file__)  # prints the directory from which OpenCV was loaded&lt;br /&gt;
__version__                    # prints the version of the loaded OpenCV module&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== Embedding OpenCV-Python In Your C++ Application ===&lt;br /&gt;
[https://wiki.python.org/moin/boost.python/GettingStarted Boost Python] is often used for make integration of the Python C API into your C++ project easier. It takes care of memory management and with its more compact syntax makes your code more readable.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Recent versions of OpenCV-Python can import/export matrices from/to Numpy arrays. That&amp;#039;s why in C++, when you want to inject an OpenCV matrix to the Python environment, you will most likely have to deal with the Numpy C API. And there is a gotcha regarding the Numpy C API: Calling the macro &amp;#039;&amp;#039;import_array()&amp;#039;&amp;#039; only once is not enough if your Python interaction code spans multiple C++ compile units, i.e., &amp;#039;&amp;#039;cpp&amp;#039;&amp;#039; file. You either need to call &amp;#039;&amp;#039;import_array()&amp;#039;&amp;#039; in each cpp file or you need to use the &amp;#039;&amp;#039;#define&amp;#039;&amp;#039; statements &amp;#039;&amp;#039;PY_ARRAY_UNIQUE_SYMBOL&amp;#039;&amp;#039; and &amp;#039;&amp;#039;NO_IMPORT_ARRAY&amp;#039;&amp;#039; as explained in the [http://docs.scipy.org/doc/numpy-1.11.0/reference/c-api.array.html#miscellaneous Numpy documentation].&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== Mat vs. GpuMat vs. UMat ===&lt;br /&gt;
OpenCV stores images data in matrix form. In addition to the core &amp;#039;&amp;#039;&amp;#039;Mat&amp;#039;&amp;#039;&amp;#039; class, there are two matrix classes that you will be potentially dealing with.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GpuMat&amp;#039;&amp;#039;&amp;#039; is defined in &amp;lt;opencv/core/cuda.hpp&amp;gt; and represents image data stored in the memory space of a [[CUDA]]-capable parallel processing hardware (graphics processing unit). To convert from or into a &amp;#039;&amp;#039;Mat&amp;#039;&amp;#039; object use the GpuMat methods&lt;br /&gt;
&amp;lt;pre class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
void GpuMat::upload(InputArray m)&lt;br /&gt;
void GpuMat::download(OutputArray m)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The full class documentation can be found [https://docs.opencv.org/3.4.1/d0/d60/classcv_1_1cuda_1_1GpuMat.html here].&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;UMat&amp;#039;&amp;#039;&amp;#039; is defined in &amp;lt;opencv2/core/mat.hpp&amp;gt; and bridges &amp;#039;&amp;#039;Mat&amp;#039;&amp;#039; to the image data structure used in the OpenCL-accelerated functions of OpenCV (make sure OpenCV was built with the flag &amp;#039;&amp;#039;WITH_OPENCL&amp;#039;&amp;#039; set to &amp;#039;&amp;#039;ON&amp;#039;&amp;#039;). Support for &amp;#039;&amp;#039;UMat&amp;#039;&amp;#039; is integrated much deeper into OpenCV functions than for &amp;#039;&amp;#039;GpuMat&amp;#039;&amp;#039;. To convert from or into a &amp;#039;&amp;#039;Mat&amp;#039;&amp;#039; object use&lt;br /&gt;
&amp;lt;pre class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
cv::UMat m = cv::Mat::getUMat(int accessFlags, UMatUsageFlags usageFlags) &lt;br /&gt;
cv::Mat m = cv::UMat::getMat(int flags)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The full documentation can be found [https://docs.opencv.org/3.4.1/d7/d45/classcv_1_1UMat.html here].&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kai</name></author>
	</entry>
</feed>