A Bayesian Approach to the Hough Transform for Line Detection