image-processing - FernDescriptorMatch - 如何使用它?怎么运行的?

标签 image-processing opencv machine-learning pattern-matching computer-vision

如何在 OpenCV 中使用 FERN 描述符匹配器?它是否将某些算法(sift/surf?)提取的关键点作为输入关键点,或者它自己计算所有内容?

编辑:
我正在尝试将其应用于图像数据库

fernmatcher->add(all_images, all_keypoints);
fernmatcher->train();

有20张图像,总共不到8MB,我使用SURF提取关键点。内存使用量跃升至 2.6GB,训练需要天知道要花多长时间...

最佳答案

FERN 与其他匹配器没有什么不同。以下是使用 FERN 作为关键点描述符匹配器的示例代码。

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);

*但是我的建议是使用 FAST,它比 FERN 更快,而且 FERN 可以用来训练一组带有关键点的图像,训练后的 FERN 可以像所有其他分类器一样用作分类器。

关于image-processing - FernDescriptorMatch - 如何使用它?怎么运行的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10893797/

相关文章:

c++ - 具有零行和 1000 列的矩阵?

java - 使用多个模型进行实体提取 - OpenNLP

android - 是否可以将位图切成小块而不将整个东西加载到内存中?

apache - 如何在Php中将上传的文件移动到另一个主机

opencv - opencv中网络摄像头的使用

c++ - 将 opencv 重映射代码从 c++ 转换为 python

image-processing - 使用 MATLAB 对图像进行边界框

java - 如何使用 ImageIO 获取有关文件压缩的​​信息?

search - 搜索引擎和推荐系统结合好还是不结合?

machine-learning - 在哪里可以找到 WEKA 中的 JAVA 或其他 API 中的 GSP 代码?