We present a method to automatically correct the radial distortion caused by wide-angle lenses using the distorted lines generated by the projection of 3D straight lines onto the image. Lens distortion is estimated by the division model using one parameter, which allows to state the problem into the Hough transform scheme by adding a distortion parameter to better extract straight lines from the image. This paper describes an algorithm which applies this technique, providing all the details of the design of an improved Hough transform. We perform experiments using calibration patterns and real scenes showing a strong distortion to illustrate the performance of the proposed method.