Beginner's question- correction in matlab code for road detection from satellite images project

1 次查看(过去 30 天)
for k = 1:length(lines)
len = norm(lines(k).point1 - lines(k).point2);
if (len > minlinelen)
xy = [lines(k).point1; lines(k).point2];
plot(xy(:,1),xy(:,2),'LineWidth',2,'Color','green');
% Plot beginnings and ends of lines
plot(xy(1,1),xy(1,2),'.','LineWidth',2,'Color','yellow');
start(k,1) = xy(1,1);
start(k,2) = xy(1,2);
plot(xy(2,1),xy(2,2),'.','LineWidth',2,'Color','red');
end1(k,1) = xy(2,1);
end1(k,2) = xy(2,2);
end
In this lines of code, the output also includes the points where the start and end points are 0,0 i should somehow eliminate it by giving the condition that fr values greater than 0,0 i.e the values of k > 0... like that plese help me in this code.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by