FERN は他のマッチャーと違いはありません。FERN を Key point Descriptor Matcher として使用するためのサンプル コードを次に示します。
int octaves= 3;
int octaveLayers=2;
bool upright=false;
double hessianThreshold=0;
std::vector<KeyPoint> keypoints_1,keypoints_2;
SurfFeatureDetector detector1( hessianThreshold, octaves, octaveLayers, upright );
detector1.detect( image1, keypoints_1 );
detector1.detect( image2, keypoints_2 );
std::vector< DMatch > matches;
FernDescriptorMatcher matcher;
matcher.match(image1,keypoints_1,image2,keypoints_2,matches);
Mat img_matches;
drawMatches( templat_img, keypoints_1,tempimg, keypoints_2,matches, img_matches,Scalar::all(-1), Scalar::all(-1),vector<char>(), DrawMatchesFlags::NOT_DRAW_SINGLE_POINTS);
imshow( "Fern Matches", img_matches);
waitKey(0);
*しかし、私の提案は、FERN と比較して高速な FAST を使用することです。また、FERN を使用してキーポイントを使用して一連の画像をトレーニングすることもできます。トレーニングされた FERN は、他のすべてと同様に分類器として使用できます。