How to pair two set of coordinates together based on their Euclidean distance?

3 views (last 30 days)
Hi! I got two sets of pixels as my feature points, one is red and another is blue, I want to use Euclidean distance between two features as the metric: if the distance is below a threshold, make the two features as a pair of correspondence. The threshold could be 1 or 2 (pixels). I want to count the number of correspondence pairs. Thank you so much if you can help meT
The image file is the "image.mat", the red pixel coordinates is in "red_pixel_coordinate.mat", and the blue pixel coordinates is in "blue_pixel_coordinate.mat".

Answers (1)

Matt J
Matt J on 3 Oct 2022
Edited: Matt J on 3 Oct 2022
The cost matrix can be obtained using pdist2.
  6 Comments

Sign in to comment.

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by