Method and system for automatically generating a same-size layout of a photo of an identity card
By using OpenCV and dlib libraries for face detection and feature point recognition, automatic background removal and replacement are achieved. Combined with photo paper settings, automatic layout of ID photos is realized, solving the problem of automatic generation of ID photos of the same size and improving production efficiency and photo quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- FUJIAN TQ ONLINE INTERACTIVE INC
- Filing Date
- 2024-12-06
- Publication Date
- 2026-06-09
AI Technical Summary
Existing technologies in automatic image cutout and automatic layout generation systems are insufficient to effectively solve the problem of automatically generating ID photos of the same size, especially in terms of ensuring the quality of ID photos and the aesthetics of the layout.
The system uses OpenCV and dlib libraries for face detection and feature point recognition. It calculates the size of the ID card by the center of the face, automatically extracts the portrait image with a transparent background, replaces the ID card background, and synthesizes the image. It also achieves automatic layout by combining photo paper settings.
It enables ordinary users to automatically generate ID photos by uploading everyday photos, lowering the barrier to entry, improving efficiency, and ensuring the accuracy and aesthetics of the photos.
Smart Images

Figure CN122176003A_ABST