This paper proposed a robust segmentation method which can adopt varied conditions. The local binarization algorithm and global binarization are used as well as the blob analysis algorithm. Based on the long line fitting algorithm, the bottom frame connected with the characters is removed; based on the characters' gradient lines and average width and height information, the left and right frames are removed. Connected characters, separated characters and lost characters problems are solved. This segmentation algorithm can process fast and accurately in various conditions. Compared with existing segmentation methods, the method we proposed is much better than others'