in IsometricPatternMatcher/PatternMatcherIsometric.cpp [138:171]
PatternMatcherIsometric::Result PatternMatcherIsometric::Match(
const Image<uint8_t>& imageU8) const {
PatternMatcherIsometric::Result res;
// detect dots
Eigen::Matrix2Xd detectedDots = DotDetection(imageU8);
for (int i = 0; i < detectedDots.cols(); ++i) {
res.debug.feature_pts.push_back(detectedDots.col(i));
}
// get intensity of the extracted dots
Eigen::VectorXd intensity = GetIntensity(detectedDots, imageU8);
// detect pattern from the extracted dot
Eigen::Vector2d centerXY;
centerXY << imageU8.w / 2, imageU8.h / 2;
double spacing = 1.0;
int numNeighboursForPoseEst = 3;
int numberSegX = 3;
int numberSegY = 3; // devide the dots into numberSegX*numberSegY patches
HexGridFitting grid(detectedDots, centerXY, opts_.focalLength, intensity,
opts_.ifDistort, false, false, spacing,
numNeighboursForPoseEst, numberSegX, numberSegY);
// store detected pattern into a storagemap
Eigen::Vector2i offset;
int rotationIndx;
StoreIntoMap(grid, detectedDots, res, rotationIndx, offset);
// Generate result
generateResult(grid, detectedDots, rotationIndx, offset, res);
return res;
}