Effacer les filtres
Effacer les filtres

find diameter based on the centreline and edge

3 vues (au cours des 30 derniers jours)
NaviD
NaviD le 23 Oct 2023
Commenté : Image Analyst le 28 Fév 2024
Hi,
I need to find the diameter of the artery model by knowing the centreline and the edges of the artery as:
The black area shows the artery and the white line shows its centreline. I need to calculate the diameter of model at different locations.
Any helps on how to approach it is appreciated.
Thanks
Navid

Réponse acceptée

Image Analyst
Image Analyst le 23 Oct 2023
Compute the Euclidean Distance Transform using bwdist and the skeleton using bwskel then multiply those two images together. Full demo attached.
  10 commentaires
NaviD
NaviD le 28 Fév 2024
Déplacé(e) : Image Analyst le 28 Fév 2024
Thanks both. The width issue has been resolved. Just followed the steps @DGM suggested.
Regarding the length: yes, Iam trying to use the Pythagorean theorem. The issue that I have, when there is a curve/twist in the model, the length calcualted using the code I shared previously, gave me incorrect results. I tried to sort them both in x and y directions, but doesn't help.
These two are how they look like when I sort them out in vertical and horizontal directions. None of them give the correct length, as a portion of path is not sorted.
Any thought on how to solve this issue?
Thanks
Navid
Image Analyst
Image Analyst le 28 Fév 2024
I don't know why the skeleton should give a "solid" patch. Be aware that bwboundaries is meant to give the perimeter of the blob and I'm not sure what the coordinates would be in the degenerate case of a single pixel wide line - not sure if the coordinates are doubled as it traces around the line. You have to make sure that the boundary starts at the ENDPOINT of the skeleton. bwboundaries starts at the left most point of the blob which quite likely is not the same location at the endpoint. You might have to use bwtraceboundary where you can tell it where to start tracing at and use bwmorph to find the endpoints of the skeleton and start there.
But again, you're only giving small snippets of code. I have neither the Crystal Ball Toolbox nor the Mind Reading Toolbox.
If you have any more questions, then attach your image and code to process it in with the paperclip icon after you read this:
Or:

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by