问题之由来
OpenCV中有一个类 DMatch
它有几个成员变量:
imgIdx, train image index
int _queryIdx, query descriptor index
int _trainIdx, train descriptor index
float _distance
但是这些名字的内涵我不了解,所以下文是了解后的内容:
解答
I suppose the reason for choosing these names should be that in some application we have got a set of images (training images) beforehand, for example 10 images taken inside your office.
The features can be extracted and the feature descriptors can be computed for these images.
And at run-time an image is given to the system to query the trained database. Hence the query image refers to this image.
I really don’t like the way they have named these parameters.
Where you have a pair of stereo images and you want to match the features, these names don’t make sense but you have to chose a convention say always call the left image the query image and the right image as the training image.
I did my PhD in computer vision and some naming conventions in OpenCV seem really confusing/silly to me. So if you find these confusing or silly you’re not alone.
To put it even more simple, train is the image you learned (extracted features) beforehand, query is the image that you are trying to match with the ones trained.
本文解释了OpenCV中DMatch类的参数含义,特别是query和train的概念。通常,train指预先提取特征的图像集,而query则是运行时用于匹配这些已训练图像的输入图像。
5811

被折叠的 条评论
为什么被折叠?



