0

I am trying to find the tortuosity of a vessel in an image using function given here.

The inputs to the function are x and y coordinates of a signal/vessel. In my case, if I have a vessel of this type:

figimage

Then if I plot [x,y] coordinates of the vessel it looks like:

Fig1

Then the function is able to track the vessel from one point to other and find the tortuosity index, see an example:

fig2

But If my vessel is of this type:

vesseltest

whose plot of [x,y] coordinates looks like:

fig3

then function track it in a zig-zag manner

zigzagtrack

My questions are:

  1. How to make vessel track from one end to other endpoints in order to calculate tortuosity=

  2. How to refine a vessel coordinates in the following manner, i.e define by signal pixel (see green signal)?

    refine

code:

i1=[91 92 93 94 95 96 97 88 89 90 98 99 100 101 102 103 87 104 105 106 107 84 85 86 108 83 109 110 
    111 112 113 114 115 116 117 117 117 117 117 117 117];
i2=[134 134 134 134 134 134 134 135 135 135 135 135 135 135 135 135 136 136 136 136 136 137 137 137 
    137 138 138 138 139 140 141 141 142 143 144 145 146 147 148 149 150];
 figure, plot(i2',i1','*r')
[VTI, sd, mean_dm, num_inflection_pts, num_cpts, l_arch, l_cord]=vessel_tortousity_index(i2',i1',1);
James Z
  • 12,209
  • 10
  • 24
  • 44
Dev
  • 329
  • 10
  • 21
  • Does this answer your question? [sorting points to form a continuous line](https://stackoverflow.com/questions/37742358/sorting-points-to-form-a-continuous-line) – Cris Luengo Apr 26 '20 at 00:24
  • The dupe target is Python, not MATLAB, but the concepts and algorithms would be the same. – Cris Luengo Apr 26 '20 at 00:26

1 Answers1

0

if you the curves you are handling are mostly in a convex shape (and 1 pixel wide), you can call convhull to compute the convex hull of the point cloud and then remove the longest cord to obtain the curved portion, from which you can compute the tortousity, try this

tt=convhull(i2,i1);
plot(i2(tt),i1(tt))
FangQ
  • 1,444
  • 10
  • 18