Computation of Match Metric in matchFeatures

조회 수: 3 (최근 30일)
Jonathan Bittner
Jonathan Bittner 2020년 3월 17일
댓글: Jonathan Bittner 2020년 10월 8일
I'm using the matchFeatures function to match two sets of SURF features. Running with the default arguments, I know that sum-of-squares distances (SSD) are computed and both a threshold test and ratio test are used. I'm a little curious at how the threshold test works. Ratio tests and nearest neighbor matching are well documented.
From generating C code output, I know with the default threshold parameter of 1%, match metrics greater than 0.4 are rejected. This is because (per the documentation) ideal matches have a metric of 0 and the worst matches have a metric of 4. Everything else is buried in library code.
If I were trying to replicate this threshold test in Python (or even C++ without Coder) and OpenCV, what kind of math would I be doing to compute the metrics? Why is the max distance 4? Is there some sort of normalization or statistical technique being used?

채택된 답변

Prabhan Purwar
Prabhan Purwar 2020년 3월 27일
Hi,
  • Each feature vector is normalized before computing similarity score between feature vectors. This brings each value of feature vector to range [-1,1].
Normalization =(fVec-mean(fVec))/norm(fVec);
  • SSD is computed using formula
(|| fVec1 - fVec2 ||L2 ) / || fVec2||);
and match score computed between normalized feature vectors rather than exact feature vectors.
  • Ideal matches have a metric of 0 and the worst matches have a metric of 4 as maximum value of the above equation is 4 when fVec1 = -fVec2 and min is 0 when fVec1 = fVec2.
Hope it helps!!
  댓글 수: 1
Jonathan Bittner
Jonathan Bittner 2020년 10월 8일
I'm just seeing this now as I went in to look for an archived answer to one of my other questions. Thank you! I believe this answered my question.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Subspace Methods에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by