Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/antonioredondo/imagefeaturedetector

A C++ Qt GUI desktop program to calculate Harris, FAST, SIFT and SURF image features with OpenCV
https://github.com/antonioredondo/imagefeaturedetector

feature-extraction image-analysis opencv qt

Last synced: about 2 hours ago
JSON representation

A C++ Qt GUI desktop program to calculate Harris, FAST, SIFT and SURF image features with OpenCV

Awesome Lists containing this project

README

        

# Image Feature Detector

Image Feature Detector (IFD) is a desktop computer program with an intuitive graphic user interface aimed to calculate and show image features and descriptors obtained with some of the most usual [image feature detectors](https://en.wikipedia.org/wiki/Feature_detection_%28computer_vision%29) in computer vision: [Harris](https://en.wikipedia.org/wiki/Harris_affine_region_detector), [FAST](https://en.wikipedia.org/wiki/Features_from_accelerated_segment_test), [SIFT](https://en.wikipedia.org/wiki/Scale-invariant_feature_transform) and [SURF](https://en.wikipedia.org/wiki/Speeded_up_robust_features). It is programmed in C++ with the [Qt framework](http://qt.io). To calculate features IFD makes use of the [OpenCV libraries](http://opencv.org).

## Table of Contents

1. [Introduction](#introduction)
1. [Details](#details)
1. [Compiling the project](#compiling-the-project)
1. [Resolving dependencies](#resolving-dependencies)
1. [Contribute](#contribute)
1. [License](#license)

## Introduction

This program was originally part of my end of degree project _Image Features Extraction for Mobile Robots Navigation_ of my Telecommunications Degree, presented at the [Cáceres Polytechnic School](https://www.unex.es/conoce-la-uex/centros/epcc) of the [University of Extremadura](http://www.unex.es), Spain, on February 2011.

The project memory and presentation are available for download on PDF from the [doc folder](http://github.com/AntonioRedondo/ImageFeatureDetector/tree/master/doc). They are published under Creative Commons Attribution-Share Alike license. If you want to have a laugh and guess how terrible my English was just a few years ago these PDFs are the right material to find out.

From the beginning of the project in 2011 to 2015 the project was hosted on Google Code. In 2015 I moved it to GitHub.

The image detectors used in IFD have been the result of complex research projects. The papers which presented them to the scientific community are:

- **Harris**: [A Combined Corner And Edge Detector](http://www.bmva.org/bmvc/1988/avc-88-023.pdf), by Chris Harris and Mike Stephens, [Roke Manor Research](http://roke.co.uk).
- **FAST**: [Machine learning for high-speed corner detection](http://www.edwardrosten.com/work/fast.html), by Edward Rosten and Tom Drummond, [University of Cambridge](http://cam.ac.uk).
- **SIFT**: [Distinctive Image Features from Scale-Invariant Keypoints](http://www.cs.ubc.ca/~lowe/papers/ijcv04.pdf), by David G. Lowe, [University of British Columbia](http://ubc.ca).
- **SURF**: [SURF: Speeded Up Robust Features](http://www.vision.ee.ethz.ch/~surf/), by Herbert Bay, Andreas Ess, Tinne Tuytelaars and Luc Van Gool, [ETH Zurich](http://ethz.ch) and [K. U. Leuven](http://kuleuven.be).

## Details

The program let you choose an image stored on your computer and apply one of the four feature detectors. The obtained descriptors are overimposed in red on the image, and the number of them and the calculation time is shown on the status bar.

Pictures can be taken directly from a webcam within the program.

FAST features can be calculated in real time from the video stream of a webcam.

The input parameters for every detector can be tweaked from the _Detector parameters_ bar.

**Harris**

**FAST**

**SIFT**

**SURF**

All four detectors can be compared at the same time with the _Do4!_ option. A new window will pop up showing four images with a different detector applied to each picture. The parameter values of every detector are those ones set on each detector parameters bar.

The time shown only represents the time taken to calculate the features on an image which has already been prepared to be analised. That is it, it does not take into account the extra time needed to transform the images from 8U3C/8U4C (colour) to 8U1C (black and white, the detector's input requires an image on this format) and the time taken to paint the red circles showing the detected features. My guess™ is that it is a neglectable amount of time.

## Compiling the project

IFD is a simple C++ project. It only has 9 `cpp` classes, 8 `h` headers and 12 `ui` Qt GUI files. Once you have the dependencies solved compiling the code is a matter of seconds.

To configure the project building and binary linking IFD makes use of [CMake](https://cmake.org). Thanks to this IFD can be built on Linux, macOS and Windows. The screenshots shown here have been taken from a computer running Linux with KDE 5.

#### Resolving dependencies

IFD only makes use of two external libraries: Qt framework (v5) and OpenCV (v3):

- [Installing Qt](http://doc.qt.io/qt-5/linux.html): on Linux and Debian-based distributions you do not need to compile Qt. The easiest and fastest way to install Qt is with `apt-get`.
- [Installing OpenCV](http://opencv.org/): due to some OpenCV copyrighted code, the modules containing SIFT and SURF detectors aren't available on Debian repositories like the rest of [OpenCV modules](https://packages.debian.org/search?keywords=opencv). This means you will have to compile OpenCV libraries by yourself. By and large you will need to download the main [OpenCV modules](https://github.com/Itseez/opencv) plus the [OpenCV contrib](https://github.com/Itseez/opencv_contrib) ones (the code containing SIFT and SURF detectors), and when you are about to compile the main OpenCV modules set the `OPENCV_EXTRA_MODULES_PATH` CMake variable to `/modules`. Better explained on the [OpenCV contrib repo](https://github.com/Itseez/opencv_contrib).

On Unix machines, once you have these two dependencies solved, from the shell run:

```
cd
mkdir CMakeFiles
cd CMakeFiles
cmake ..
make
```

and in a minute IFD should be compiled and ready to be executed in the `/bin` folder. `CMakeFiles` is an empty folder created to store the temporary files created by CMake so that IFD root folder remains clean.

## Is there any compiled version of IFD ready to use like a `deb` package or a Windows `exe`?

I have tried to build a Linux Debian `deb` package for x86-64 machines. But after compiling statically OpenCV libraries to include them together with the IFD binary, when building IFD and at linking time `make` complains time after time about endless number of missing libraries. Once all missing libraries have been added to the `make -lanotherlibrary` command, again a new dependency misses, thus meaning I'm probably in the middle of a deep [dependency hell](https://en.wikipedia.org/wiki/Dependency_hell). Some day I will find out the right order of library inclusion and will be able to generate a `deb` package.

## Contribute

If you have an awesome pull request no matter whether it is a new feature or a bug fix, send it over! Your contribution to the computer vision community is priceless.

## License

Image Feature Detector makes use of the [GNU GPL v3.0](http://choosealicense.com/licenses/gpl-3.0/) license. Remember to make public your project source code when reusing IFD.

Icons come from the KDE Plasma 5 Breeze theme: https://github.com/KDE/breeze-icons.