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.

CN122176003APending Publication Date: 2026-06-09FUJIAN TQ ONLINE INTERACTIVE INC

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

Technical Problem

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.

Method used

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.

Benefits of technology

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.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122176003A_ABST
    Figure CN122176003A_ABST
Patent Text Reader

Abstract

This invention provides a method and system for automatically extracting and generating ID photo layouts of the same size. The method includes the following steps: Step S1, loading the image input by the user; Step S2, the user sets the ID type; Step S3, detecting whether there is a face in the photo; Step S4, detecting whether the face area is aligned; Step S5, extracting the portrait image with a transparent background and using face recognition to determine the center of the face; Step S6, calculating the ID size starting from the center of the face and cropping the photo to form a large headshot for the ID; Step S7, replacing the user-defined ID background; Step S8, compositing a single ID photo using the transparent image and the background; Step S9, the user sets the photo paper and lays out the photo. This invention lowers the barrier to creating ID photos, improves production efficiency, and reduces the user's living costs.
Need to check novelty before this filing date? Find Prior Art