In mathematics, we define a line using two parameters--a slope and a constant (the point of intersection with the y axis). In this algorithm, we exploit the same concept and try to find the slope and constants of the lines (if any) in an image. Given any two points in the image, we substitute in the equation of the line (as shown next) and solve for the slope and intercept of the line. For example, let the two given points be (*x _{1}*,

*y*), (

_{1}*x*,

_{2}*y*).

_{2}The equation of a line is defined as follows:

At (*x _{1}*,

*y*):

_{1}At (*x _{2}*,

*y*):

_{2}We will solve ...