Using an image as the query retrieval input, the image is retrieved according to the similarity between the layout analysis features, statistical features, and texture features of the image and the image in the database. Firstly, the mathematical morphology is used to segment and line segmentation of document images, which are used as the layout structure characteristics of document images. Then, according to the statistical characteristics of the image, including the number of characters, statistical features, and texture features, the document image extraction algorithm is given. Finally, the retrieval algorithm model is given. Experimental results show that the proposed algorithm has good accuracy and recall rate, and has application value in content-based document image retrieval.