how to select and delete unwanted coordinates from a set of data obtained by find() command from an binary image of a river.

2 次查看(过去 30 天)
hi, i´m trying to find distances from a curve obtained by a binary image from a river. Precisely i´m using the "Arclength()" function (https://la.mathworks.com/matlabcentral/fileexchange/34871-arclength)
the principal issue is there´s some points that screw everything by being aberrant and not having the desired tendency
valdivia1analizar.png
talwegvaldivia1.png
to find the coordinates form this image i have used "find()" comand and get the local coordinates, but, after ploting the data i noticed that there´s some points in the same "x" axis that have multiple data in "y" axis.
dataplot.png
dataplot1.png
dataplot2.png
I need help to be able to optimize my code and automatically delete the data where this occurs and join them with the ends because I need to do this procedure with multiple images.
by the way, i use this code. thanks
a=imread('valdivia1analizar.png');
imshow(a);
impixelinfo;
b=im2bw(a);
%% step 2: Find TALWEG
figure,imshow(b)
impixelinfo;
C=watershed(bwdist(b))==0;
[icoords,jcoords]=find(C);

回答(0 个)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by