Code covered by the BSD License

Highlights from Modified Hausdorff Distance

4.33333
4.3 | 3 ratings Rate this file 45 Downloads (last 30 days) File Size: 1.91 KB File ID: #29968

Modified Hausdorff Distance

SasiKanth (view profile)

08 Jan 2011 (Updated )

This function computes the Modified Hausdorff Distance (MHD) as per Dubuisson et al.

File Information
Description

This function computes the Modified Hausdorff Distance (MHD) which is
proven to function better than the directed HD as per Dubuisson et al.
in the following work:

M. P. Dubuisson and A. K. Jain. A Modified Hausdorff distance for object
matching. In ICPR94, pages A:566-568, Jerusalem, Israel, 1994.
http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=576361

The function computed the forward and reverse distances and outputs the
minimum of both.

Format for calling function:

MHD = ModHausdorffDist(A,B);

where
MHD = Modified Hausdorff Distance.
A -> Point set 1
B -> Point set 2

No. of samples of each point set may be different but the dimension of
the points must be the same.

Acknowledgements

Hausdorff Distance and Hausdorff Distance inspired this file.

MATLAB release MATLAB 7.10 (R2010a)
27 Feb 2015 S. Arslan

S. Arslan (view profile)

Thanks, it was really helpful. You can, however, replace the for loops with the following lines:

D = pdist2(A,B);

% Calculating the forward HD
mins = min(D, [], 2);
fhd = sum(mins) / Asize(1);

% Calculating the reverse HD
mins = min(D, [], 1);
rhd = sum(mins) / Bsize(1);

This will work much much faster but may need more memory to run for very large point sets.

05 Sep 2012 shaho

shaho (view profile)

Comment only
12 Jul 2011 longan

longan (view profile)

let me see,thank you anyway~

04 Jul 2011 Yang

Yang (view profile)

OK，I know ，thank you!

10 Jan 2011 SasiKanth

SasiKanth (view profile)

An elementary correction has been made to the code in the last line where a 'min' instead of a 'max' has been submitted. Please note the correction.

Comment only