In vision detection system of mobile phone keyboard, images coming from product line are often slant. Those images have to be corrected in order to facilitate match and recognition in further image processing. This paper proposes an effective slant correction method based on the characteristics of mobile phone keyboard image. In this method, straight line edge detection is done only by horizontal Sobel operator. The angle parameter of straight line is tested by multiresolution Hough transform. Then the angle relation is deduced between the tested line and slant mobile phone keyboard image. The slant image is corrected by rotation algorithm which combines the fast rotation algorithm with bilinear interpolation algorithm. The results of experiment indicates that the method and its algorithm are effective and accurate.