kahlertl / Computer-Vision-2

Repository for the practical seminar and exercise in Computer Vision course @ TU Dresden 2014/15

Home Page:https://git.square-src.de/lucas/computer-vision-2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Computer Vision 2

build status

Source code for the exercises related to my Computer Vision 2 course, taken at the TU Dresden in summer semester 2015.

The programs and scripts are written in Python using the OpenCV library. All tests are run on an Ubuntu 14.04 LTS.

Building on Windows

First, choose a Windows C++ compiler. I have chosen MinGW64) because the normal MinGW has a bug with C++11

  • and I like software that is up-to-date.

Installation of MinGW64

Because I have got an error with the Windows installer of MinGW64, so I decided to download the build directly from SourceForge.net.

Building OpenCV

Because the normal OpenCV Windows distribution does not contain a build for MinGW64, we have to build it on our own.

First, download OpenCV package and run the installer. Open a command line (Win+R and cmd) and navigate to the location where you extracted the OpenCV lib.

% create a directory for the new build
mkdir mingw64build
cd mingw64build

% configure with cmake - this can also be done with CMake-GUI
% If you have no OpenCL, pass "-D WITH_OPENCL=OFF" as additional definition
cmake -G "MinGW Makefiles" -D CMAKE_BUILD_TYPE=Release -D CMAKE_CXX_COMPILER=g++  -D CMAKE_C_COMPILER=gcc  ..\sources

% build
mingw32-make opencv_modules

After this, you should create a new environmental variable called "OpenCV_DIR" which targets the mingw64build directory. If you do this, you do not need to configure the OpenCV location for each separate project.

Building tasks

% create build directory
mkdir build
cd build

% building
cmake -G "MinGW Makefiles" -D CMAKE_BUILD_TYPE=Debug -D CMAKE_CXX_COMPILER=g++ MAKE_MAKE_PROGRAM=mingw32-make ..

Python implementations

Requirements

# install OpenCV as python package together with python-numpy
$ sudo apt-get install python-opencv

C++ implementations

The C++ implementation uses cmake as build system

$ mkdir build
$ cd build/
# You can also specify "Debug" as build type to get some more verbose
# print statements
$ cmake -D CMAKE_BUILD_TYPE=Release ..
$ make patchmatch

# run your binary
$ bin/patchmatch ../frame1.png ../frame2.png

About

Repository for the practical seminar and exercise in Computer Vision course @ TU Dresden 2014/15

https://git.square-src.de/lucas/computer-vision-2


Languages

Language:C 54.0%Language:C++ 37.2%Language:Python 5.8%Language:CMake 1.8%Language:TeX 1.2%Language:JavaScript 0.1%