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:
Then if I plot [x,y] coordinates of the vessel it looks like:
Then the function is able to track the vessel from one point to other and find the tortuosity index, see an example:
But If my vessel is of this type:
whose plot of [x,y] coordinates looks like:
then function track it in a zig-zag manner
My questions are:
How to make vessel track from one end to other endpoints in order to calculate tortuosity=
How to refine a vessel coordinates in the following manner, i.e define by signal pixel (see green signal)?
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);