Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #ifndef _SIFT_FEATURE_CALCULATOR__H_
00042 #define _SIFT_FEATURE_CALCULATOR__H_
00043
00044
00045
00046
00047
00048
00049 #include "Interfaces/FeatureCalculatorInterface.h"
00050 #include "DataStructures/DynamicArrayTemplatePointer.h"
00051 #include "DataStructures/DynamicArrayTemplate.h"
00052 #include <vector>
00053
00054
00055
00056
00057
00058
00059 class CFeatureEntry;
00060 class CFloatMatrix;
00061 class CByteImage;
00062 struct Vec2d;
00063
00064
00065
00066
00067
00068
00069 #define MAX_SCALES 10
00070
00071
00072
00073
00074
00075
00076
00081 class CSIFTFeatureCalculator : public CFeatureCalculatorInterface
00082 {
00083 public:
00084
00085 CSIFTFeatureCalculator(float fThreshold = 0.05f, int nOctaves = 3);
00086
00087
00088 ~CSIFTFeatureCalculator();
00089
00090
00091
00092 int CalculateFeatures(const CByteImage *pImage, CDynamicArray *pResultList, bool bManageMemory = true);
00093
00094
00095 void SetThreshold(float fThreshold) { m_fThreshold = fThreshold;}
00096 void SetNumberOfOctaves(int nOctaves) { m_nOctaves = nOctaves; }
00097
00098 float GetThreshold() { return m_fThreshold; }
00099 int GetNumberOfOctaves() { return m_nOctaves; }
00100
00101
00102 static void InitializeVariables();
00103 static void CreateSIFTDescriptors(const CFloatMatrix *pImage, CDynamicArray *pResultList, float x, float y, float scale, float sigma, const float *pOrientationWeights, bool bManageMemory = true, bool bPerform80PercentCheck = true);
00104 static void CreateSIFTDescriptors(const CByteImage *pImage, CDynamicArray *pResultList, float x, float y, float scale = 1.0f, bool bManageMemory = true, bool bPerform80PercentCheck = true);
00105 static void CreateSIFTDescriptors(const CByteImage *pImage, CDynamicArrayTemplatePointer<CFeatureEntry> &resultList, float x, float y, float scale = 1.0f, bool bPerform80PercentCheck = true);
00106
00107
00108 private:
00109
00110 static void DetermineDominatingOrientations(const CFloatMatrix *pAngleMatrix, const CFloatMatrix *pMagnitudeMatrix, CDynamicArrayTemplate<float> &orientations, bool bPerform80PercentCheck);
00111 void FindScaleSpaceExtrema(const CFloatMatrix *pImage, float scale, int nOctave);
00112
00113
00114 float m_fThreshold;
00115 int m_nOctaves;
00116
00117 CDynamicArray *m_pResultList;
00118 bool m_bManageMemory;
00119
00120
00121 static float edgethreshold_;
00122 static float k_;
00123 static float diffk_;
00124 static float prescaledsigma_;
00125 static float diffsigma0_;
00126
00127 static int SIFTPointers[256];
00128 static float SIFTWeights[256];
00129 static float SIFTOrientationWeights[256 * (MAX_SCALES + 1)];
00130 static float SIFTDescriptorWeights[256];
00131
00132 static float SIFTDiffSigmas[MAX_SCALES];
00133 static float SIFTSigmas[MAX_SCALES];
00134 static float* SIFTGaussianFilters[MAX_SCALES];
00135 static int SIFTKernelRadius[MAX_SCALES];
00136
00137 static int m_bInitialized;
00138 };
00139
00140
00141
00142 #endif
asr_ivt
Author(s): Allgeyer Tobias, Hutmacher Robin, Kleinert Daniel, Meißner Pascal, Scholz Jonas, Stöckle Patrick
autogenerated on Thu Jun 6 2019 21:46:58