19#ifndef GDALSIMPLESURF_H_
20#define GDALSIMPLESURF_H_
174 double *padfDescriptor;
201 void Initialize(
const double **padfImg,
int nHeight,
int nWidth);
212 double GetValue(
int nRow,
int nCol);
264 double **pMatrix =
nullptr;
435 class MatchedPointPairInfo
438 MatchedPointPairInfo(
int nInd_1,
int nInd_2,
double dfDist)
439 : ind_1(nInd_1), ind_2(nInd_2), euclideanDist(dfDist)
445 double euclideanDist;
497 int nYSize,
double **padfImg,
498 int nHeight,
int nWidth);
515 std::vector<GDALFeaturePoint> *
540 std::vector<GDALFeaturePoint> *poFirstCollect,
541 std::vector<GDALFeaturePoint> *poSecondCollect,
562 static void NormalizeDistances(std::list<MatchedPointPairInfo> *poList);
Class of "feature point" in raster.
Definition: gdal_simplesurf.h:36
GDALFeaturePoint()
Standard constructor.
Definition: gdal_simplesurf.cpp:22
void SetY(int nY)
Set Y coordinate of point.
Definition: gdal_simplesurf.cpp:80
GDALFeaturePoint & operator=(const GDALFeaturePoint &point)
Assignment operator.
Definition: gdal_simplesurf.cpp:43
int GetSign() const
Fetch sign of Hessian determinant of point.
Definition: gdal_simplesurf.cpp:105
void SetX(int nX)
Set X coordinate of point.
Definition: gdal_simplesurf.cpp:70
static const int DESC_SIZE
Descriptor length.
Definition: gdal_simplesurf.h:93
int GetY() const
Fetch Y-coordinate (line) of point.
Definition: gdal_simplesurf.cpp:75
int GetRadius() const
Fetch radius of point.
Definition: gdal_simplesurf.cpp:95
int GetScale() const
Fetch scale of point.
Definition: gdal_simplesurf.cpp:85
int GetX() const
Fetch X-coordinate (pixel) of point.
Definition: gdal_simplesurf.cpp:65
void SetScale(int nScale)
Set scale of point.
Definition: gdal_simplesurf.cpp:90
void SetRadius(int nRadius)
Set radius of point.
Definition: gdal_simplesurf.cpp:100
void SetSign(int nSign)
Set sign of point.
Definition: gdal_simplesurf.cpp:110
double & operator[](int nIndex)
Provide access to point's descriptor.
Definition: gdal_simplesurf.cpp:115
Integral image class (summed area table).
Definition: gdal_simplesurf.h:187
int GetHeight()
Fetch height of integral image.
Definition: gdal_octave.cpp:22
double HaarWavelet_Y(int nRow, int nCol, int nSize)
Get value of vertical Haar wavelet in specified square grid.
Definition: gdal_octave.cpp:127
double GetValue(int nRow, int nCol)
Fetch value of specified position in integral image.
Definition: gdal_octave.cpp:74
double HaarWavelet_X(int nRow, int nCol, int nSize)
Get value of horizontal Haar wavelet in specified square grid.
Definition: gdal_octave.cpp:121
void Initialize(const double **padfImg, int nHeight, int nWidth)
Compute integral image for specified array.
Definition: gdal_octave.cpp:32
double GetRectangleSum(int nRow, int nCol, int nWidth, int nHeight)
Get sum of values in specified rectangular grid.
Definition: gdal_octave.cpp:82
int GetWidth()
Fetch width of integral image.
Definition: gdal_octave.cpp:27
Class for computation and storage of Hessian values in SURF-based algorithm.
Definition: gdal_simplesurf.h:279
int height
Image height in pixels.
Definition: gdal_simplesurf.h:330
int ** signs
Hessian signs for speeded matching.
Definition: gdal_simplesurf.h:338
double ** detHessians
Hessian values for image pixels.
Definition: gdal_simplesurf.h:334
int filterSize
Length of the side of filter.
Definition: gdal_simplesurf.h:314
int radius
Length of the border.
Definition: gdal_simplesurf.h:318
int octaveNum
Octave which contains this layer (1,2,3...)
Definition: gdal_simplesurf.h:310
int width
Image width in pixels.
Definition: gdal_simplesurf.h:326
int scale
Scale for this layer.
Definition: gdal_simplesurf.h:322
void ComputeLayer(GDALIntegralImage *poImg)
Perform calculation of Hessian determinants and their signs for specified integral image.
Definition: gdal_octave.cpp:156
Class for handling octave layers in SURF-based algorithm.
Definition: gdal_simplesurf.h:349
static const int INTERVALS
Value for constructing internal octave space.
Definition: gdal_simplesurf.h:403
int octaveStart
Number of bottom octave.
Definition: gdal_simplesurf.h:408
GDALOctaveLayer *** pMap
2-dimensional array of octave layers
Definition: gdal_simplesurf.h:398
GDALOctaveMap(int nOctaveStart, int nOctaveEnd)
Create octave space.
Definition: gdal_octave.cpp:228
void ComputeMap(GDALIntegralImage *poImg)
Calculate Hessian values for octave space (for all stored octave layers) using specified integral ima...
Definition: gdal_octave.cpp:240
int octaveEnd
Number of top octave.
Definition: gdal_simplesurf.h:413
static bool PointIsExtremum(int row, int col, GDALOctaveLayer *bot, GDALOctaveLayer *mid, GDALOctaveLayer *top, double threshold)
Method makes decision that specified point in middle octave layer is maximum among all points from 3x...
Definition: gdal_octave.cpp:247
A single raster band (or channel).
Definition: gdal_priv.h:1519
Class for searching corresponding points on images.
Definition: gdal_simplesurf.h:429
std::vector< GDALFeaturePoint > * ExtractFeaturePoints(GDALIntegralImage *poImg, double dfThreshold)
Find feature points using specified integral image.
Definition: gdal_simplesurf.cpp:238
GDALSimpleSURF(int nOctaveStart, int nOctaveEnd)
Prepare class according to specified parameters.
Definition: gdal_simplesurf.cpp:148
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).
Definition: gdal_simplesurf.cpp:369
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.
Definition: gdal_simplesurf.cpp:156
Various convenience functions for CPL.
CPLErr
Error category.
Definition: cpl_error.h:37
#define CPL_DISALLOW_COPY_ASSIGN(ClassName)
Helper to remove the copy and assignment constructors so that the compiler will not generate the defa...
Definition: cpl_port.h:1030