我正在嘗試爲iPhone創建應用程序,但我是openCV和iOS的新開發者。我有超過50個物體圖像,我有一個來自相機的場景圖像。每次我在場景中都有這些物體之一。我可以通過篩選算法找到一個對象,但我找不到一種計算置信度的方法,以便與對象之間進行比較,因爲某些對象非常相似。我使用了findHomography函數,但仍然不知道如何獲得信心。我從openCV庫找到這個,opencv篩選算法,如何從findHomography獲得信心
struct CV_EXPORTS MatchesInfo
{
MatchesInfo();
MatchesInfo(const MatchesInfo &other);
const MatchesInfo& operator =(const MatchesInfo &other);
int src_img_idx, dst_img_idx; // Images indices (optional)
std::vector<DMatch> matches;
std::vector<uchar> inliers_mask; // Geometrically consistent matches mask
int num_inliers; // Number of geometrically consistent matches
Mat H; // Estimated homography
double confidence; // Confidence two images are from the same panorama
};
但我不知道如何使用它。
謝謝