Beginner's question- correction in matlab code for road detection from satellite images project
1 view (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on CubeSat and Satellites in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!