View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Modified Hausdorff Distance

4.5 | 4 ratings Rate this file 35 Downloads (last 30 days) File Size: 1.91 KB File ID: #29968 Version: 1.1

Modified Hausdorff Distance


Sasikanth (view profile)


08 Jan 2011 (Updated )

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

| Watch this File

File Information

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.

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

Format for calling function:

MHD = ModHausdorffDist(A,B);

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.


Hausdorff Distance and Hausdorff Distance inspired this file.

MATLAB release MATLAB 7.10 (R2010a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (6)
30 Sep 2015 KaMu

KaMu (view profile)

27 Feb 2015 Salim Arslan

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)

Hi, I have a question regrading about this function. Can you tell me how I can normalize the output for this output?

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
10 Jan 2011 1.1

Elementary Correction => 'min' of the last line in the code changed to 'max' as per the paper mentioned in the description.

Contact us