è questa funzione di OpenCV drawMatches()
:OpenCV drawMatches - queryIdx e trainIdx
void drawMatches(Mat img1, vector<KeyPoint> keypoints1,
Mat img2, vector<KeyPoint> keypoints2,
vector<DMatch> matches,
Mat outImg) //want keypoints1[i] = keypoints2[matches[i]]
noti che matches
è di tipo vector<DMatch>
. Ecco il DMatch
costruttore:
DMatch(int queryIdx, int trainIdx, float distance)
Presumibilmente, queryIdx
è un indice in una serie di punti chiave, e trainIdx
è un indice nell'altra serie di punti chiave.
La domanda: E 'vero che queryIdx
indici in keypoints1
e trainIdx
indici in keypoints2
? O è il contrario?
Dovrebbero rendere più chiara la funzione. L'interfaccia e il linguaggio non sono coerenti. – aledalgrande