could you send code of Hausdorrf distance and average Hausdorff distance for segmention evaluation for images
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have segment medical image and I want to evaluate the segmentation equality of the edges by Hausdorff distance and average Hausdorff distance because I have ground truth for segmented image. so could you send code read the two images(segmented image, ground truth image)and applies these metrics( Hausdorff distance and average Hausdorff distance). Many thanks in advance
0 Commenti
Risposte (1)
hossein
il 28 Ago 2019
function DistMap=f_hausdorf(Gt, Dc)
% Baptiste Magnier, 2017,
% compute the distance map based on the Hausdorff distance
% it corresponds to the max the the euclidean distance
% of the edge points between Gt and Dc
% biblio :
% D. P. Huttenlocher and W. J. Rucklidge,
% A multi-resolution technique for comparing images using the Hausdorff distance,
% IEEE Trans. on Pattern Analysis and Machine Intel.: Vol. 15(9), pp. 850�863, 1993.
if length(size(Gt))~=length(size(Dc))
error('Images Gt and Dc are not of the same size\n');
end
DistGt=bwdist(Gt);
DistDc=bwdist(Dc);
DistMap=double(xor(Gt,Dc)).*max(DistGt,DistDc);
0 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!