This paper presented an algorithm to measure the distance between the displaying area and the frame of LCD.In this algorithm,a Hough transform and a least square fitting method were combined.First,the Canny operator was implemented to find the edges of the displaying area and the frame of LCD.Second,a line position with low-precision was located using the Hough transform, and the point set near the line can be detected after that.Finally,the least square fitting method was applied to obtain the precise line...