c++ - How can we use both Hamming distance and distance between coordinates to match features? -


as known, tracking objects in opencv can use:

for matching features descriptormatcher uses hamming distance (value of difference between 2 sequences of same size, not distance between coordinates).

i.e. find similar object in current frame, not nearest previous position (if know it).

how can use match both hamming distance , distance between coordinates, example, given weight of both, not hamming distance?

it solve following problems:

  • if start track object position (x,y) on previous frame, , current frame contains 2 similar objects, find similar, not nearest. due inertia coordinates changes slower similarity (a sharp change in light or rotation of object). , must find similar object nearest coordinates.

  • thus find features, not similar, give accurate homography, because exclude features, which, although similar, far away in coordinates , belong other objects.

what need like:

  1. compute matches usual.
  2. dmatch has queryidx , trainidx indices. can use these retrieve corresponding keypoints. compute euclidean distance between them, , update value distance if dmatch kind of weighting function.
  3. sort matches distance (since distance has changed).

now matches vector sorted according both hamming distance between descriptors , euclidean distance between keypoints.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -