
I have extracted profile on cross-section of vessel by following code
imshow(image); % image is not shown
[cx,cy,c,xi,yi] = improfile;
Here c is the intensity along the profile and I plot them using:
x=1:length(c);
figure
plot(x,c,'o')
axis([0 45 80 150])
and it look like the one I have uploaded.
c is 33X1 intensity vector where, c=[123 126 131 138 139 141 143 143 144 141 136 126 102 96 91 100 100 113 109 96 94 90 101 107 116 123 127 130 131 132 131 129 131];
I want to detect index of c to find A (max in left side),B (max in right side),C (min in left side), D(min in rt side) and E (middle) points in the profile.
The function
peakdetreleased in the public domain (http://www.billauer.co.il/peakdet.html) seems to do the job on the first try. You can try to play with the second parameter of the function to be more / less selective.EDIT: this question could be of interest: How to differentiate between a double peak and a single peak array in MATLAB?