how to extend line of image
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
hello everyone,
i have detect two coordinate of pixel which is (1,1) and (2,5). i already join the two coordinate to make a line. i have done it.. my question is i want to extend the line to the end. how to do this.. here i attach picture illustration for your understanding. help me please how to extend line
0 comentarios
Respuestas (2)
Walter Roberson
el 24 de Mayo de 2012
Standard algebra. Solve the equation of a line, y = m*x + b, knowing that m = (y2-y1)/(x2-x1) . Use your initial data to calculate m and b, then use those two to fill in the line.
0 comentarios
Stephen
el 24 de Mayo de 2012
if... x1=1,x2=2 and... y1=1,y2=5
(2,5)-(1,1)=m=(1,4), is your slope
so m1=1,m2=4
try
plot([x1 x2]+1e6*[-m1 m1],[y1 y2]+1e6*[-m2 m2])
brute force wins again
0 comentarios
Ver también
Categorías
Más información sobre Image Processing Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!