How to find the euclidean distance
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
how to find the euclidean distance for the 586 x 1 image
0 Commenti
Risposte (1)
Jan
il 6 Mar 2013
Modificato: Jan
il 6 Mar 2013
The term "distance" implies, that there are two different objects. So you can calculate trhe distance from one object to another only. Currently you have a "568x1 image", what is a really unusual format for an image, which are usually rectangular. Then you need another 568 x 1 vector to calculate the distance to:
img = rand(568, 1); % Test data!
img2 = rand(568, 1); % Missing in your question
dist = sqrt(sum((img - img2) .^ 2));
0 Commenti
Vedere anche
Categorie
Scopri di più su Image Processing Toolbox in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!