Detecting Traffic Violations with Opencv

Opencv contains more than 2500 functions, and almost any mature algorithm you can think of can be implemented by calling Opencv’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). System environment: Ubuntu16.04LTS+OpenCV3.3.0+Python2.7.12 Background extraction 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. ...

November 5, 2017 · 6 min · Simplestory

Installing OpenCV on Linux

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. System environment: Ubuntu16.04 Software installed: OpenCV3.3.0+Python2.7.12 Updating the system packages: $ sudo apt update $ sudo apt upgrade Installing some developer tools: $ sudo apt-get install build-essential cmake pkg-config 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. ...

October 20, 2017 · 4 min · Simplestory