<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Opencv on Simplestory</title><link>https://simplestory.github.io/en/tags/opencv/</link><description>Recent content in Opencv on Simplestory</description><generator>Hugo</generator><language>en-us</language><copyright>Simplestory</copyright><lastBuildDate>Sun, 05 Nov 2017 00:00:00 +0000</lastBuildDate><atom:link href="https://simplestory.github.io/en/tags/opencv/index.xml" rel="self" type="application/rss+xml"/><item><title>Detecting Traffic Violations with Opencv</title><link>https://simplestory.github.io/en/posts/20171104_bb6e9cb8623b3bf044c62bbbca472d53/</link><pubDate>Sun, 05 Nov 2017 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20171104_bb6e9cb8623b3bf044c62bbbca472d53/</guid><description>&lt;blockquote&gt;
&lt;p&gt;Opencv contains more than 2500 functions, and almost any mature algorithm you can think of can be implemented by calling Opencv&amp;rsquo;s functions, which is super convenient. This post combines Python and Opencv to detect cars in surveillance video and check whether they commit a violation (crossing the double yellow line).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;System environment: Ubuntu16.04LTS+OpenCV3.3.0+Python2.7.12&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id="background-extraction"&gt;Background extraction&lt;/h2&gt;
&lt;p&gt;For surveillance the position is relatively fixed, so the background will not change considerably over a long period of time. We can therefore consider using background subtraction to roughly extract the background.&lt;/p&gt;</description></item><item><title>Installing OpenCV on Linux</title><link>https://simplestory.github.io/en/posts/20171020_df3860e05b3ca04bdc2f774c5c1914fd/</link><pubDate>Fri, 20 Oct 2017 00:00:00 +0000</pubDate><guid>https://simplestory.github.io/en/posts/20171020_df3860e05b3ca04bdc2f774c5c1914fd/</guid><description>&lt;blockquote&gt;
&lt;p&gt;Recently, because a project needed computer vision recognition, I started tinkering with OpenCV. Although the installation process was long and winding, the experience of using it together with Python is actually quite good. Here I record the OpenCV installation and compilation process.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;System environment: Ubuntu16.04&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Software installed: OpenCV3.3.0+Python2.7.12&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id="updating-the-system-packages"&gt;Updating the system packages:&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ sudo apt update
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ sudo apt upgrade
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="installing-some-developer-tools"&gt;Installing some developer tools:&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ sudo apt-get install build-essential cmake pkg-config
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The pkg-config package is very likely already installed by default, but just in case, add it in as well. The cmake program is used later to compile OpenCV.&lt;/p&gt;</description></item></channel></rss>