75 m_nMaxInterestPoints = nMaxInterestPoints;
77 m_fThreshold = fThreshold;
78 m_fMinDistance = 5.0f;
80 m_bPerform80PercentCheck =
true;
82 m_pInterestPoints =
new Vec2d[m_nMaxInterestPoints];
83 m_nInterestPoints = 0;
86 m_pResultListTemplate = 0;
87 m_bTemplateList =
true;
88 m_bManageMemory =
true;
95 delete [] m_pInterestPoints;
112 printf(
"error: input image is not a grayscale image\n");
116 m_bTemplateList =
false;
117 m_bManageMemory = bManageMemory;
119 m_pResultList = pResultList;
122 FindInterestPoints(pImage, 1, m_nLevels);
131 printf(
"error: input image is not a grayscale image\n");
135 m_bTemplateList =
true;
137 m_pResultListTemplate = &resultList;
140 FindInterestPoints(pImage, 1, m_nLevels);
145 void CHarrisSIFTFeatureCalculator::FindInterestPoints(
const CByteImage *pImage,
float scale,
int nLevel)
152 for (
int i = 0; i < m_nInterestPoints; i++)
157 for (
int i = 0; i < m_nInterestPoints; i++)
166 FindInterestPoints(&scaled_image, scale *
scale_factor, nLevel - 1);
bool Resize(const CByteImage *pInputImage, CByteImage *pOutputImage, const MyRegion *pROI=0, bool bInterpolation=true)
Resizes a CByteImage and writes the result to a CByteImage.
Data structure for the representation of a 2D vector.
static void InitializeVariables()
static const float scale_factor
Base class for the representation of local features.
CFeatureEntry * CreateCopy(const CFeatureEntry *pFeatureEntry)
~CHarrisSIFTFeatureCalculator()
CHarrisSIFTFeatureCalculator(float fThreshold=0.01f, int nLayers=3, int nMaxInterestPoints=500)
ImageType type
The type of the image.
int width
The width of the image in pixels.
int height
The height of the image in pixels.
Data structure for the representation of SIFT features.
Data structure for the representation of 8-bit grayscale images and 24-bit RGB (or HSV) color images ...
int CalculateFeatures(const CByteImage *pImage, CDynamicArray *pResultList, bool bManageMemory=true)
int CalculateHarrisInterestPoints(const CByteImage *pInputImage, Vec2d *pInterestPoints, int nMaxPoints, float fQualityLevel=0.01f, float fMinDistance=5.0f)
Computes interest points within a CByteImage by applying the Harris corner detector.
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)