Giter Club home page Giter Club logo

imhausdorff's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

imhausdorff's Issues

Negating binary images changes calculated Hausdorff distance

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));

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.