GDAL

- Main Page
- Related Pages
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Classes | Public Member Functions | Static Public Member Functions | List of all members
GDALSimpleSURF Class Reference

Class for searching corresponding points on images. More...

`#include <gdal_simplesurf.h>`

## Public Member Functions
| GDALSimpleSURF (int nOctaveStart, int nOctaveEnd)
| Prepare class according to specified parameters. More...
std::vector< GDALFeaturePoint > * | ExtractFeaturePoints (GDALIntegralImage *poImg, double dfThreshold)
| Find feature points using specified integral image. More...

## Static Public Member Functions
static CPLErr | ConvertRGBToLuminosity (GDALRasterBand *red, GDALRasterBand *green, GDALRasterBand *blue, int nXSize, int nYSize, double **padfImg, int nHeight, int nWidth)
| Convert image with RGB channels to grayscale using "luminosity" method. More...
static CPLErr | MatchFeaturePoints (std::vector< GDALFeaturePoint * > *poMatchPairs, std::vector< GDALFeaturePoint > *poFirstCollect, std::vector< GDALFeaturePoint > *poSecondCollect, double dfThreshold)
| Find corresponding points (equal points in two collections). More...

## Detailed Description

Class for searching corresponding points on images.

Author
  Andrew Migal migal.nosp@m..dre.nosp@m.w@gma.nosp@m.il.c.nosp@m.om

Provides capability for detection feature points and finding equal points on different images. Class implements simplified version of SURF algorithm (Speeded Up Robust Features). As original, this realization is scale invariant, but sensitive to rotation. Images should have similar rotation angles (maximum difference is up to 10-15 degrees), otherwise algorithm produces incorrect and very unstable results.

## Constructor & Destructor Documentation

GDALSimpleSURF::GDALSimpleSURF | ( | int | nOctaveStart,
|  | int | nOctaveEnd
| ) |  |

Prepare class according to specified parameters.

Octave numbers affects to amount of detected points and their robustness. Range between bottom and top octaves also affects to required time of detection points (if range is large, algorithm should perform more operations).

Parameters

  nOctaveStart | Number of bottom octave. Octave numbers starts with one
  nOctaveEnd | Number of top octave. Should be equal or greater than OctaveStart

Note
  Every octave finds points with specific size. For small images use small octave numbers, for high resolution - large. For 1024x1024 images it's normal to use any octave numbers from range 1-6. (for example, octave start - 1, octave end - 3, or octave start - 2, octave end - 2.) For larger images, try 1-10 range or even higher. Pay attention that number of detected point decreases quickly per octave for particular image. Algorithm finds more points in case of small octave numbers. If method detects nothing, reduce bottom bound of octave range.

NOTICE that every octave requires time to compute. Use a little range or only one octave if execution time is significant.

## Member Function Documentation

CPLErr GDALSimpleSURF::ConvertRGBToLuminosity | ( | GDALRasterBand * | red,
|  | GDALRasterBand * | green,
|  | GDALRasterBand * | blue,
|  | int | nXSize,
|  | int | nYSize,
|  | double ** | padfImg,
|  | int | nHeight,
|  | int | nWidth
| ) |  |
| static

Convert image with RGB channels to grayscale using "luminosity" method.

Result is used in SURF-based algorithm, but may be used anywhere where grayscale images with nice contrast are required.

Parameters

  red | Image's red channel
  green | Image's green channel
  blue | Image's blue channel
  nXSize | Width of initial image
  nYSize | Height of initial image
  padfImg | Array for resulting grayscale image
  nHeight | Height of resulting image
  nWidth | Width of resulting image

Returns
  CE_None or CE_Failure if error occurs.

std::vector< GDALFeaturePoint > * GDALSimpleSURF::ExtractFeaturePoints | ( | GDALIntegralImage * | poImg,
|  | double | dfThreshold
| ) |  |

Find feature points using specified integral image.

Parameters

  poImg | Integral image to be used
  dfThreshold | Threshold for feature point recognition. Detected feature point will have Hessian value greater than this provided threshold.

Note
  Typical threshold's value is 0,001. But this value can be various in each case and depends on image's nature. For example, value can be 0.002 or 0.005. Fill free to experiment with it. If threshold is high, than number of detected feature points is small, and vice versa.

CPLErr GDALSimpleSURF::MatchFeaturePoints | ( | std::vector< GDALFeaturePoint * > * | poMatchPairs,
|  | std::vector< GDALFeaturePoint > * | poFirstCollect,
|  | std::vector< GDALFeaturePoint > * | poSecondCollect,
|  | double | dfThreshold
| ) |  |
| static

Find corresponding points (equal points in two collections).

Parameters

  poMatchPairs | Resulting collection for matched points
  poSecondCollect | Points on the first image
  poSecondCollect | Points on the second image
  dfThreshold | Value from 0 to 1. Threshold affects to number of matched points. If threshold is lower, amount of corresponding points is larger, and vice versa

Returns
  CE_None or CE_Failure if error occurs.

Parameters

  poMatched | Resulting collection for matched points
  poFirstCollection | Points on the first image
  poSecondCollection | Points on the second image
  dfThreshold | Value from 0 to 1. Threshold affects to number of matched points. If threshold is higher, amount of corresponding points is larger, and vice versa

Note
  Typical threshold's value is 0,1. BUT it's a very approximate guide. It can be 0,001 or even 1. This threshold provides direct adjustment of point matching. NOTICE that if threshold is lower, matches are more robust and correct, but number of matched points is smaller. Therefore if algorithm performs many false detections and produces bad results, reduce threshold. Otherwise, if algorithm finds nothing, increase threshold.

Returns
  CE_None or CE_Failure if error occurs.

The documentation for this class was generated from the following files:

- gdal_simplesurf.h
- gdal_simplesurf.cpp

Generated for GDAL by 1.8.8.