joakimlindblad / imhausdorff Goto Github PK
View Code? Open in Web Editor NEWMatlab code for fast Hausdorff distance for binary images or segmentation maps
License: BSD 2-Clause "Simplified" License
Matlab code for fast Hausdorff distance for binary images or segmentation maps
License: BSD 2-Clause "Simplified" License
This is nice code and useful, but I'm not sure it will give values that correspond to what you would get when explicitly looking at point correspondence on the boundaries of two regions. In particularfor binary label maps A & B, as an image and its negation share the same boundary, imhausdorff(A,B) should be equal to imhausdorff(~A,~B). This is not guaranteed with the current code.
For instance the following script constructs two circular images centred on the same point with different radii and some modifications. The larger circle has a short additional linear segment added to the outside and the smaller circle has a longer linear segment removed. In this toy example imhausdorff only picks up on one of the lines resulting in two different returned distances for the images and their negations.
Atemp = false(127);
Atemp(64,64)=true;
Btemp = Atemp;
se = strel('disk',15,0);
Atemp = imdilate(Btemp, se);
se = strel('disk',20,0);
Btemp = imdilate(Btemp, se);
Atemp(63:65,64:end) = false;
Atemp(63:65,64) = true;
Btemp(63:65,40:64) = true;
[D1,indx] = imhausdorff(Atemp,Btemp);
[I11,J11]=ind2sub([127,127],indx(1));
[I12,J12]=ind2sub([127,127],indx(2));
[D2,indx2] = imhausdorff(~Atemp,~Btemp);
[I21,J21]=ind2sub([127,127],indx2(1));
[I22,J22]=ind2sub([127,127],indx2(2));
Hello,
First, thank you for this useful work. What is the unit of the result got as output as a result of the code? mm or pixel?
Best regards,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.