Code Monkey home page Code Monkey logo

opencv-wrapper-egbis's Introduction

OpenCV wrapper for the "egbis" segmentation algorithm

OpenCV wrapper for Efficient Graph-Based Image Segmentation algorithm developed by Pedro F. Felzenszwalb and Daniel P. Huttenlocher. This is done as a part of my report about using the Efficient Graph-Based Image segmentation method to detect roads from Bing maps.

How to use

This program is tested to work on Ubuntu 16.04.2 LTS with cmake from Ubuntu repository and OpenCV compiled from source with Qt support.

Clone and compile OpenCV 2.4.9 for Ubuntu 16.04

# General Ubuntu OS update
sudo apt-get update
sudo apt-get upgrade

# Install some required applications (1GB+)
# Depending on what features you want you can remove some of this, e.g. texlive
sudo apt-get install build-essential libgtk2.0-dev libjpeg-dev libtiff5-dev \
libjasper-dev libopenexr-dev cmake python-dev python-numpy python-tk libtbb-dev \
libeigen3-dev yasm libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev \
libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev libqt4-dev \
libqt4-opengl-dev sphinx-common texlive-latex-extra libv4l-dev libdc1394-22-dev \
libavcodec-dev libavformat-dev libswscale-dev default-jdk ant libvtk5-qt4-dev
# Download and compile OpenCV
git clone https://github.com/Itseez/opencv
git checkout -b temp_branch 2.4.9

mkdir build
cd build

# Configure OpenCV build settings
# Some of this can be removed depending on what features you want
cmake -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D \
INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D \
WITH_QT=ON -D WITH_OPENGL=ON -D WITH_VTK=ON ../

# Use "make -j4" to use 4 threads when compiling but can cause gcc internal errors
# when compiling OpenCV
make
sudo make install

# Configure OpenCV
sudo vim /etc/ld.so.conf.d/opencv.conf
Add "/usr/local/lib" to the possibly empty file.

sudo ldconfig
sudo gedit /etc/bash.bashrc

# Add the following to the bash.bashrc file:
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH

Reboot your computer (logout and login is probably enough)

Git master HEAD

Use same procedure as described below for tag v2.0.0

Version 2.0.0

OpenCV wrapper Example

Tag v2.0.0

The root directory in this version has an example using the OpenCV wrapper inside main.cpp. To build and run it do the following:

**To build**
cd <project_root_directory>/
mkdir build
cd build/
cmake ../
make

**To run**
./main ../images/lulea1.ppm

This will open the OpenCV highgui/Qt interface for two images. The original in color and a segmentet image in the other one. The segmentet image can be save using the "Save" trackbar.

opencv-wrapper-egbis's People

Contributors

burak-yildizoz avatar christofferholmstedt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

opencv-wrapper-egbis's Issues

Undefined method random

In the segment-image.cpp, i come across an error from the compiler saying that the method 'random' is undefined.
Is that i just need to write a function that generates an integer from 0 to 255 will be alright?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.