1. A method for detecting line segments in images, the method comprising: receiving an image taken by a camera; computing, using a processor, line segment array metrics for the image using a first equation, 
 linemetric=( n+ 1)( S *different−consistent), wherein “S” is an adjustable parameter used to distinguish a line from its surroundings, “n” in the first equation is a line segment length, “different” is a distinguishability metric that measures a distinguishability of the line from at least line neighbors and is computed using a second equation, different =  2 ⁢ ∑ pixels ⁢ ⁢ p ∈ LS ⁢ I ⁡ ( p ) - ∑ pixels ⁢ ⁢ p ∈ LS - ⁢ I ⁡ ( p ) - ∑ pixels ⁢ ⁢ p ∈ LS + ⁢ I ⁡ ( p )  / ( n + 1 ) wherein “n” in the second equation is a maximum pixel difference and I(p) is a function which measures an intensity of a pixel; wherein “consistent” in the first equation is a consistency metric and is computed using a third equation, 
 consistent=std pixels pϵLS {I ( p )}, wherein “std” denotes a standard deviation computed on a set of pixels on a potential line segment and “LS” is a line segment, finding, using the processor, a first maximum metric from the line segment array metrics; and determining, using the processor, a first line segment for the first maximum metric, wherein as a result of receiving, determining, computing, and finding, a processed image is created.