简体   繁体   English

培训形象在openCV中意味着什么?

[英]What does training image mean in openCV?

I've started using opencv to detect features: 我已经开始使用opencv来检测功能:

A sequence like: 像这样的序列:

 cv::SurfFeatureDetector detector( 40  );
 std::vector<cv::KeyPoint> keypoints_object;
 detector.detect( img_object, keypoints_object );
 //-- Step 2: Calculate descriptors (feature vectors)
 cv::SurfDescriptorExtractor extractor;
 cv::Mat descriptors_object, descriptors_scene;
 extractor.compute( img_object, keypoints_object, descriptors_object );
 //-- Step 3: Matching descriptor vectors using FLANN matcher

will extract features of the image which can be matched against features extracted from other images. 将提取图像的特征,该特征可以与从其他图像提取的特征相匹配。 What does the term 'training image' mean in this context. 在这种情况下,术语“训练图像”意味着什么。

Do I have to rotate and/or scale the image multiple times? 我是否需要多次旋转和/或缩放图像?

If so. 如果是这样的话。 can the features be merged to a single descriptor? 功能可以合并到一个描述符?

Training image in the context of feature extraction makes me think of classification. 在特征提取的背景下训练图像让我想到分类。 There you have a set of training images from different classes from which you extract features. 在那里,您有一组来自不同类的训练图像,您可以从中提取特征。 Then you try to learn some kind of classifier using this features. 然后,您尝试使用此功能学习某种分类器。 So you used these images to train a classifier. 所以你用这些图像训练了一个分类器。

SURF Features are scale and rotational invariant. SURF特征是比例和旋转不变。 So there is no need to scale or rotate an image. 因此无需缩放或旋转图像。

To get one single feature vector per image you could use a bag of words model . 要为每个图像获取一个单一的特征向量,您可以使用一袋单词模型

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM