GDAL
|
Class for searching corresponding points on images. More...
#include <gdal_simplesurf.h>
Classes | |
class | MatchedPointPairInfo |
Class stores indexes of pair of point and distance between them. | |
Public Member Functions | |
GDALSimpleSURF (int nOctaveStart, int nOctaveEnd) | |
Prepare class according to specified parameters. | |
std::vector< GDALFeaturePoint > * | ExtractFeaturePoints (GDALIntegralImage *poImg, double dfThreshold) |
Find feature points using specified integral image. | |
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. | |
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). |
Class for searching corresponding points on images.
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.
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).
nOctaveStart | Number of bottom octave. Octave numbers starts with one |
nOctaveEnd | Number of top octave. Should be equal or greater than OctaveStart |
NOTICE that every octave requires time to compute. Use a little range or only one octave if execution time is significant.
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.
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 |
std::vector< GDALFeaturePoint > * GDALSimpleSURF::ExtractFeaturePoints | ( | GDALIntegralImage * | poImg, |
double | dfThreshold | ||
) |
Find feature points using specified integral image.
poImg | Integral image to be used |
dfThreshold | Threshold for feature point recognition. Detected feature point will have Hessian value greater than this provided threshold. |
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).
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 |
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 |