linescans - determine maximum one then assign to data to use
Informazioni
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
Mostra commenti meno recenti
Hi, I have an image "img" that I am performing horizontal line scans thru. I initially start at the centre of the image (Coordinates xc, yc). This is represented by green line. It is obvious that its not quite matching up with the features. I therefore want to look +- 2 pixels up or down.

I obtain these "searching" linescans via:
xstart=1900
xstop=2100
xFOV=[xstart:xstop];
xcount=numel(xFOV);
yth_row0=img(yc,xFOV);
yth_row-1=img(yc-1,xFOV);
yth_row-2=img(yc-2,xFOV);
yth_row+1=img(yc+1,xFOV);
yth_row+2=img(yc+2,xFOV);
I then want to assign whcih ever one gives the highest sum of the values summed in the horizontal direction to my data that I will then carry on and analyse
i.e. set which ever one is highest of these
sum(yth_row0(:))
sum(yth_row-1(:))
sum(yth_row-2(:))
sum(yth_row+1(:))
sum(yth_row+2(:))
to
yth_row_dataToUse
In the example, its clear that the horizontal linescan represented by the blue curve gives the highest values over the x field of view (xFOV). Maybe there is a neater way. Thanks for any advice.

Risposte (0)
Questa domanda è chiusa.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!