21 #ifndef otbImageToSIFTKeyPointSetFilter_h
22 #define otbImageToSIFTKeyPointSetFilter_h
26 #include "itkExpandImageFilter.h"
27 #include "itkDiscreteGaussianImageFilter.h"
28 #include "itkRecursiveGaussianImageFilter.h"
29 #include "itkSubtractImageFilter.h"
30 #include "itkShrinkImageFilter.h"
31 #include "itkConstNeighborhoodIterator.h"
32 #include "itkImageRegionConstIterator.h"
33 #include "itkVector.h"
34 #include "itkMinimumMaximumImageCalculator.h"
35 #include "itkUnaryFunctorImageFilter.h"
36 #include "itkGradientImageFilter.h"
52 template <
class TInputPixel,
class TOutputPixel>
58 return std::sqrt(input[0] * input[0] + input[1] * input[1]);
68 template <
class TInputPixel,
class TOutputPixel>
74 TOutputPixel resp = std::atan2(input[1], input[0]);
115 template <
class TInputImage,
class TOutputPo
intSet>
145 itkSetMacro(OctavesNumber,
unsigned int);
146 itkGetMacro(OctavesNumber,
unsigned int);
150 itkSetMacro(ScalesNumber,
unsigned int);
151 itkGetMacro(ScalesNumber,
unsigned int);
155 itkSetMacro(ExpandFactors,
unsigned int);
156 itkGetMacro(ExpandFactors,
unsigned int);
160 itkSetMacro(ShrinkFactors,
unsigned int);
161 itkGetMacro(ShrinkFactors,
unsigned int);
165 itkSetMacro(Sigma0,
double);
166 itkGetMacro(Sigma0,
double);
172 itkSetMacro(DoGThreshold,
double);
173 itkGetMacro(DoGThreshold,
double);
179 itkSetMacro(EdgeThreshold,
double);
180 itkGetMacro(EdgeThreshold,
double);
184 itkSetMacro(SigmaFactorOrientation,
double);
185 itkGetMacro(SigmaFactorOrientation,
double);
189 itkSetMacro(SigmaFactorDescriptor,
double);
190 itkGetMacro(SigmaFactorDescriptor,
double);
234 void GenerateData()
override;
245 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
248 void InitializeInputImage();
254 void ComputeDifferenceOfGaussian(InputImagePointerType input);
257 void DetectKeyPoint(
const unsigned int octave);
267 bool IsLocalExtremum(
const NeighborhoodIteratorType& currentScale,
const NeighborhoodIteratorType& previousScale,
268 const NeighborhoodIteratorType& nextScale)
const;
283 bool RefineLocationKeyPoint(
const NeighborhoodIteratorType& currentScale,
const NeighborhoodIteratorType& previousScale,
284 const NeighborhoodIteratorType& nextScale, VectorPointType& solution);
294 std::vector<PixelType> ComputeKeyPointOrientations(
const NeighborhoodIteratorType& currentScale,
const unsigned int scale,
const PixelType translation);
304 std::vector<PixelType> ComputeKeyPointDescriptor(
const NeighborhoodIteratorType& currentScale,
const unsigned int scale,
const PixelType& orientation);
308 void operator=(
const Self&) =
delete;
335 typename GaussianFilterType::ScalarRealType
m_Sigma0;
399 #ifndef OTB_MANUAL_INSTANTIATION