how to calculate the diameter of a vessel

조회 수: 9 (최근 30일)
bil bbil
bil bbil 2014년 4월 17일
댓글: Image Analyst 2022년 1월 24일
hello everyone
I really need help as soon as possible
I want a solution to calculate the diameter of each white line in the image(Vessel Diameter Measurement)
  댓글 수: 1
John D'Errico
John D'Errico 2014년 4월 17일
Compute the radius. Multiply by 2.
Really, we are not here to do your homework as soon as possible. IF you could not start it in a timely way, then why should we rush?
Make an effort, as that is the way to learn. Or don't make an effort. In that case, learn to say the phrase "Do ya want fries with that order?"

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

채택된 답변

Sean de Wolski
Sean de Wolski 2014년 4월 17일
You might find the second part of this webinar helpful:

추가 답변 (2개)

Image Analyst
Image Analyst 2014년 4월 17일
편집: Image Analyst 2020년 5월 7일
It's pretty easy - maybe 3 lines of code. First call bwdist to get the distance from the white pixels to the nearest black pixel. Then call bwmorph to skeletonize that so you get the distances along the centerlines. That's the radius so multiply by two to get the diameter. It will be an image looking like a skeleton and to find the diameter you simply look at the value of the pixel at the location you want the diameter of. Basically it's this (untested):
edtImage = 2 * bwdist(~binaryImage);
skeletonImage = bwmorph(binaryImage, 'skel', inf);
diameterImage = edtImage .* double(skeletonImage);
Can't get much simpler, though you may want to add a utility where you let the user call ginput() to report back the diameter at the closest pixel to where they clicked. It's pretty easy, though clever and not obvious (until you know about it), so most novices might embark on some complicated looping process to get cross sections (what a nightmare that would be).
  댓글 수: 8
Hasnain Iftikhar
Hasnain Iftikhar 2022년 1월 23일
did you extract thin vessels?

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


Nitin
Nitin 2014년 4월 17일
I would start by first experimenting with regionprops function in matlab
  댓글 수: 1
bil bbil
bil bbil 2014년 4월 17일
you have an idea how to fit in my case??

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

Community Treasure Hunt

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

Start Hunting!

Translated by