Azzera filtri
Azzera filtri

Calculate Hausdorff distance in millimiter

4 visualizzazioni (ultimi 30 giorni)
sbei arafet
sbei arafet il 10 Ago 2016
Commentato: Image Analyst il 10 Ago 2016
Hi,
i have calculated the hausdorff distance, the code that computes the euclidean distance is
function[dist] = compute_dist(A, B)
m = size(A, 1);
n = size(B, 1);
dim= size(A, 2);
for k = 1:m
C = ones(n, 1) * A(k, :);
D = (C-B) .* (C-B);
D = sqrt(D * ones(dim,1));
dist(k) = min(D);
end
giving pixel spacing wich is 1.093x1.093 mm²
if i do
function[dist] = compute_dist(A, B)
m = size(A, 1);
n = size(B, 1);
dim= size(A, 2);
for k = 1:m
C = ones(n, 1) * A(k, :);
D = (1.0973*C-1.0973*B) .* (1.0973*C-1.0973*B);
D = sqrt(D * ones(dim,1));
%D=D*1.0937;
dist(k) = min(D);
end
is it true
Thanks
  1 Commento
Image Analyst
Image Analyst il 10 Ago 2016
What's A and C represent? And what's their size/shape? Why are there no comments in this code???

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Convert Image Type 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!

Translated by