The defects in the 20 inch PMTs’ glass shell is very harmful for the stress distribution of the whole body and reduce the its lifetime. In this paper, we develop a digital image processing for the detection of 20 inch PMTs’ glass shell, which can detect defects in hollow ellipsoid surface of the PMTs’ glass shell with large aperture. The theory and the final system is showed in this paper, we use a telecentric system with a fixed working distance, a special cylindrical long optic illuminator is placed in the center position of the glass shell, and illuminate the detected surface with uniform intensity light. The image system is placed in a specially made elliptical guideway with the same shape of the glass shell, which is suitable for digital image processing. Finally, by the process of classification and statistics of surface defects ,we can get the result, the defects of the 20 inch PMTs’ glass shell can be examined with a resolution of micron, and the discrimination, classification, accuracy and the detection speed can meet the required indicators.