bwdistgeodesic with Euclidean distance as metric

조회 수: 4 (최근 30일)
BiologicalPhysicist
BiologicalPhysicist 2014년 7월 18일
댓글: BiologicalPhysicist 2020년 1월 17일
Hello,
bwdist allows one to use Euclidean distance as metric while for bwdistgeodesic that is not an option. Is there a specific reason for this behavior? Is there a standard workaround?
Any advice welcome! Thanks!
  댓글 수: 2
rtransform
rtransform 2020년 1월 10일
Looking for the exact same thing. Did you find a solution?
Kind regards
BiologicalPhysicist
BiologicalPhysicist 2020년 1월 17일
I eventually used a Python implementation of the fast marching method:

댓글을 달려면 로그인하십시오.

답변 (1개)

Adam Danz
Adam Danz 2020년 1월 10일
편집: Adam Danz 2020년 1월 10일
According to Steve Eddins's image processing blog post on this topic, the bwdistgeodesic function (since r2011b) computes the shortest path that avoids objects. One of the distance metrics options is 'quasi-euclidean' which measures the total Euclidean distance along a set of horizontal, vertical, and diagonal line segments that cicumvent the objects. A true Euclidean metric would pass through the object if it were between the two endpoints. For a visual depiction of this and other distance metrics, see this page.
A nice description of geodesic distance transform and its relationship to Euclidean distance is described in this Jupyter Notebook blog post (not Matlab code).
Lastly, a really nice depiction of the difference between the Euclidean distance and the Geodesic distance is shown in the reference below.
  댓글 수: 8
Adam Danz
Adam Danz 2020년 1월 17일
bwdistgeodesic is used to find shortest paths subject to constraints.
BiologicalPhysicist
BiologicalPhysicist 2020년 1월 17일
I agree.
The problem I had was that using the quasi-euclidean distance results in significant, unintended lattice artefacts (if you use the lattice to approximate a continuum system as I did).

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by