A statistical approach to the detection of lines in digital images