I have a greyscale image similar to the one below that I have achieved after some post-processing steps (image 0001). I would like a vector corresponding to the bottom of the lower bright strip (as depicted in image 0001b). I can use im2bw with various thresholds to achieve the vectors in image 0002 (the higher the threshold value the higher the tendency for the vector line to blip upwards, the lower the threshold the higher the tendency for the line to blip downwards)..and then I was thinking of going through each vector and measuring arclength over some increment (maybe 100 pixels or so) and choosing that vector with the lowest arclength...and adding that 100 pixel stretch to the final vector, creating a frankenstein-like vector using the straightest segments from each of the thresholded vectors.. I should also mention that when there are multiple straightish/parallel vectors, the top one is the best fit.

First off, is there some better strategy I should be employing here to find that line on image 0001? (this needs to be fast so some long fitting code wouldn't work). If my current Frankenstein's monster solution works, any suggestions as to how to best go about this?

Thanks in advance

```
image=im2bw(image,0.95); %or 0.85, 0.75, 0.65, 0.55
vec=[];
for v=1:x
    for x=1:z
        if image(c,v)==1
            vec(v)=c;
        end
    end
end
vec=fastsmooth(vec,60,20,1);

```

[![enter image description here](https://i.stack.imgur.com/aczpq.png)](https://i.stack.imgur.com/aczpq.png)

[![enter image description here](https://i.stack.imgur.com/SJ0S6.png)](https://i.stack.imgur.com/SJ0S6.png)

[![enter image description here](https://i.stack.imgur.com/zA1su.png)](https://i.stack.imgur.com/zA1su.png)

[![enter image description here](https://i.stack.imgur.com/etEBi.png)](https://i.stack.imgur.com/etEBi.png)

[![enter image description here](https://i.stack.imgur.com/f228K.png)](https://i.stack.imgur.com/f228K.png)

[![enter image description here](https://i.stack.imgur.com/kiQPz.png)](https://i.stack.imgur.com/kiQPz.png)

[![enter image description here](https://i.stack.imgur.com/pOoJP.png)](https://i.stack.imgur.com/pOoJP.png)