Ai edge computing camera system

By integrating image acquisition, personnel detection, three-axis motion control, and intelligent image processing modules through an AI edge computing camera system, the problem of traditional ID photo shooting relying on manual operation has been solved, realizing an automated, standardized, and efficient ID photo shooting process.

CN120935451AInactive Publication Date: 2025-11-11SHENZHEN DONGPENG CLOUD TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511022361.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-24
Publication Date
2025-11-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional ID photo taking relies on manual operation, which is inefficient and the quality of the photos is affected by the skill level. Post-processing is also cumbersome and it is difficult to meet the needs of automation and standardization.

Method used

Employing an AI edge computing camera system, it integrates image acquisition, personnel detection, three-axis motion control, automatic shooting control, and intelligent image processing modules. Through deep learning algorithms, it achieves automated adjustment and intelligent shooting, and combines semantic segmentation algorithms to generate standard ID photos.

Benefits of technology

It achieves highly efficient automated shooting without human intervention, ensuring stable photo quality, meeting the strict specifications of ID photos, and improving overall processing efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120935451A_ABST
    Figure CN120935451A_ABST
Patent Text Reader

Abstract

The invention provides an AI edge computing camera system which comprises an image acquisition and personnel detection module, a three-axis motion control module, an automatic shooting control module, an intelligent image processing module and a master control and cooperation module, and all the modules are connected through a data bus and carry out real-time data transmission and instruction interaction. The position and angle of the camera can be automatically adjusted according to the position and posture of a shot object by means of a three-axis motion control system and combining an algorithm, manual intervention is not needed, dependence of manual operation is greatly reduced, the efficiency and accuracy of the shooting preparation stage are improved, automatic shooting and image processing are achieved, and the efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of image processing and intelligent imaging technology, and in particular to an AI edge computing camera system. Background Technology

[0002] Traditional ID photo taking has the following core problems:

[0003] Reliance on manual operation: Camera position and angle adjustment need to be done manually, resulting in low shooting efficiency and the quality of photos being greatly affected by the photographer's skill level (such as composition deviation, inaccurate focus, etc.).

[0004] Background processing is cumbersome: the background needs to be manually cut out and removed in post-processing, which is not only time-consuming and labor-intensive, but also difficult to accurately meet the strict specifications (such as background color, size ratio, etc.) of different ID photos (such as ID cards, passports).

[0005] Automation demand gap: With social development, the demand for automation, standardization and efficiency in ID photo shooting is growing, and traditional methods can no longer meet the demand for fast and high-quality shooting. Summary of the Invention

[0006] This invention provides an AI edge computing camera system to solve one or more of the problems mentioned above.

[0007] To achieve the above objectives, the present invention adopts the following technical solution:

[0008] The AI ​​edge computing camera system includes an image acquisition and personnel detection module, a three-axis motion control module, an automatic shooting control module, an intelligent image processing module, and a main control and coordination module. These modules are connected via a data bus for real-time data transmission and command interaction, as detailed below:

[0009] The image acquisition and personnel detection module acquires images and identifies personnel positions, posture angles, and facial feature points using a personnel detection algorithm based on YOLOv7.

[0010] The three-axis motion control module consists of X-axis and Y-axis linear guides and a Z-axis hollow rotating platform. It receives the position and posture angle of the personnel, optimizes the X / Y axis motion trajectory through a surface fitting algorithm, controls the rotation of the Z-axis by combining a single pendulum wave model, calculates the rotation angle and angular velocity of the Z-axis, adjusts the position and angle of the camera, and monitors and generates motion status feedback in real time, including whether the target position has been reached and whether the motion is stable.

[0011] The automatic shooting control module receives facial feature points, Z-axis rotational angular velocity, and motion state feedback. Only when the motion state feedback indicates that the target position has been reached and is stable, it determines the shooting state of the person based on the improved MTCNN facial state detection algorithm, and determines the exposure time in combination with the Z-axis rotational angular velocity. When the Z-axis rotational angular velocity is 0, it is the optimal exposure time, and generates a shutter trigger signal and exposure time.

[0012] The intelligent image processing module receives the captured image, camera position and angle, Z-axis rotation angle and exposure time obtained by shooting based on the shutter trigger signal. It uses a Transformer-based semantic segmentation algorithm to correct the perspective distortion of the captured image by using the camera position, adjusts the image orientation of the captured image by using the camera angle and Z-axis rotation angle, optimizes the image brightness and contrast of the captured image by combining the exposure time, segments the person and the background, and then generates a standard ID photo by combining the built-in ID photo template.

[0013] The main control and coordination module connects to all other modules, receives and transmits data from each module, and coordinates the work of each module.

[0014] In this specification, the network structure of the improved YOLOv7-based person detection algorithm consists of three parts: Backbone, Neck, and Head. The Backbone is responsible for extracting features from the input image by progressively extracting low-level and high-level features through multiple convolutional layers and residual blocks. The Neck adopts the PANet structure to fuse features at different scales, enhancing the algorithm's ability to detect targets of different sizes. The Head part outputs three types of detection results, including person location, person pose angle, and facial feature points.

[0015] In this specification, the surface fitting algorithm controls the movement of the X and Y axes within the range of 0 to 1000 mm. Sample data containing actual displacement and measured deviation are collected by a grating ruler. The least squares method is used to solve for 9 quadratic surface fitting coefficients, so that the fitting error is ≤0.005 mm. The surface fitting algorithm corrects the target position through the deviation surface function, with a correction coefficient of 0.8, which is optimized based on historical error data.

[0016] In this specification, the pendulum wave model has a pendulum period of 0.6s, a damping coefficient of 0.1, and the maximum rotation angle is determined by the absolute value of the personnel posture angle output by the image acquisition and personnel detection module. Data training is performed under different maximum rotation angles to make the minimum stabilization time of the Z-axis rotation to the target posture angle 0.8s, and the rotation angle error ≤0.001°.

[0017] In this manual, the surface fitting algorithm is integrated with PID control to correct the target position. The process is as follows: the surface fitting algorithm calculates the deviation surface function value based on the current position of the camera and corrects the target position on the X / Y axis; the corrected target position is input into the PID control algorithm, and the PID control parameters are dynamically adjusted according to the deviation surface function value to drive the X / Y axis motors to move.

[0018] In this specification, the improved MTCNN facial state detection algorithm calculates binocular opening and expression stability using facial feature points: binocular opening is the ratio of the distance between the upper and lower eyelids to the distance between the two eyes, and the opening of both the left and right eyes must be ≥80%; expression stability is the average value of the positional changes of facial feature points within 30 frames, and must be ≤2 pixels.

[0019] In this specification, the shooting triggering conditions of the automatic shooting control module are as follows: both eyes have an opening degree of ≥80% and the expression stability is ≤2 pixels, as determined by the improved MTCNN facial state detection algorithm, and the Z-axis angular velocity output by the three-axis motion control module is 0, which is the exposure time point calculated by the single pendulum wave model. At this time, a shutter trigger signal is generated to ensure that there is no dynamic blur and the facial state is optimal.

[0020] In this specification, the intelligent image processing module uses a Transformer-based semantic segmentation algorithm and surface fitting to collaboratively correct coordinates. The process is as follows: First, based on the camera angle output by the three-axis motion control module, the image pixel coordinates are rotated and corrected using a rotation formula. Then, based on the deviation surface function value calculated by the surface fitting algorithm, combined with the correction coefficient determined through edge error data optimization, the rotated and corrected pixel coordinates are further optimized to eliminate image distortion caused by changes in camera angle and improve the accuracy of human contour positioning.

[0021] In this specification, the training process of the Transformer-based semantic segmentation algorithm is as follows: portrait images with different rotation angles are used as the training set, and each image is labeled with a segmentation mask for the person and the background; the SegFormer network is used as the base network, and the input image is the image after rotation correction and surface fitting optimization; the Dice loss combined with a loss function of 0.5 times cross-entropy loss is used for training, so that the network segmentation accuracy is ≥96% and the person edge localization error is ≤0.5 pixels.

[0022] In this manual, based on the segmentation mask output by the semantic segmentation algorithm, the foreground image of the person is extracted by pixel multiplication to remove the background; the built-in ID photo template is called to resize the foreground image and replace the background; at the same time, the deviation between the person's edge and the standard contour is calculated as the edge error.

[0023] In summary, the present invention has at least the following beneficial effects:

[0024] Automated adjustment and positioning: With the help of a three-axis motion control system and algorithms, the camera can automatically adjust its position and angle according to the position and posture of the subject being photographed, without the need for manual intervention. This greatly reduces the reliance on human operation and improves the efficiency and accuracy of the shooting preparation stage.

[0025] Intelligent shooting trigger: The deep learning-based automatic shooting system can judge the facial state of the subject in real time (such as expression, eye state, etc.) and automatically trigger the shooting at the best time, avoiding the shooting timing deviation caused by human operation delay and ensuring the stability of photo quality.

[0026] Highly efficient and standardized processing: Real-time processing of photos after shooting is achieved through edge computing capabilities. With the help of intelligent algorithms, background removal and ID photo generation are completed accurately without relying on external devices for post-processing. It can also strictly follow the specifications of various ID photos, meet the standardized output requirements, and significantly improve the overall processing efficiency.

[0027] Multi-module collaborative optimization: Each system module works collaboratively through algorithm fusion. While improving its own performance, it continuously optimizes the overall process through feedback mechanisms, further enhancing the system's stability and adaptability, and enabling it to better cope with different shooting scenarios and needs. Attached Figure Description

[0028] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0029] Figure 1 This is a schematic diagram of the AI ​​edge computing camera system involved in this invention.

[0030] Figure 2 This is a flowchart illustrating the image acquisition and personnel detection module involved in this invention.

[0031] Figure 3 This is a flowchart illustrating the three-axis motion control module involved in this invention.

[0032] Figure 4 This is a flowchart illustrating the automatic shooting control module involved in this invention.

[0033] Figure 5 This is a flowchart illustrating the intelligent image processing module involved in this invention. Detailed Implementation

[0034] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of the embodiments of the invention. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.

[0035] The following disclosure provides many different implementations or examples for carrying out different structures of the embodiments of the present invention. To simplify the disclosure of the embodiments of the present invention, specific examples of components and arrangements are described below. Of course, these are merely examples and are not intended to limit the embodiments of the present invention. Furthermore, reference numerals and / or reference letters may be repeated in different examples of the embodiments of the present invention; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various implementations and / or arrangements discussed.

[0036] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0037] like Figure 1 As shown, this embodiment provides an AI edge computing camera system, including an image acquisition and personnel detection module, a three-axis motion control module, an automatic shooting control module, an intelligent image processing module, and a main control and coordination module. Each module is connected via a data bus and performs real-time data transmission and command interaction, as detailed below:

[0038] The image acquisition and personnel detection module acquires images and identifies personnel positions, posture angles, and facial feature points using a personnel detection algorithm based on YOLOv7.

[0039] The three-axis motion control module consists of X-axis and Y-axis linear guides and a Z-axis hollow rotating platform. It receives the position and posture angle of the personnel, optimizes the X / Y axis motion trajectory through a surface fitting algorithm, controls the rotation of the Z-axis by combining a single pendulum wave model, calculates the rotation angle and angular velocity of the Z-axis, adjusts the position and angle of the camera, and monitors and generates motion status feedback in real time, including whether the target position has been reached and whether the motion is stable.

[0040] The automatic shooting control module receives facial feature points, Z-axis rotational angular velocity, and motion state feedback. Only when the motion state feedback indicates that the target position has been reached and is stable, it determines the shooting state of the person based on the improved MTCNN facial state detection algorithm, and determines the exposure time in combination with the Z-axis rotational angular velocity. When the Z-axis rotational angular velocity is 0, it is the optimal exposure time, and generates a shutter trigger signal and exposure time.

[0041] The intelligent image processing module receives the captured image, camera position and angle, Z-axis rotation angle and exposure time obtained by shooting based on the shutter trigger signal. It uses a Transformer-based semantic segmentation algorithm to correct the perspective distortion of the captured image by using the camera position, adjusts the image orientation of the captured image by using the camera angle and Z-axis rotation angle, optimizes the image brightness and contrast of the captured image by combining the exposure time, segments the person and the background, and then generates a standard ID photo by combining the built-in ID photo template.

[0042] The main control and coordination module connects to all other modules, receives and transmits data from each module, and coordinates the work of each module.

[0043] In some embodiments, the network structure of the YOLOv7-based improved person detection algorithm consists of three parts: Backbone, Neck, and Head. Backbone is responsible for extracting features from the input image by progressively extracting low-level and high-level features of the image through multiple convolutional layers and residual blocks. Neck adopts the PANet structure to fuse features at different scales, enhancing the algorithm's ability to detect targets of different sizes. Head outputs three types of detection results, including person position, person pose angle, and facial feature points.

[0044] In some embodiments, the surface fitting algorithm controls the movement of the X-axis and Y-axis within the range of 0 to 1000 mm, collects sample data containing actual displacement and measured deviation using a grating ruler, and obtains nine quadratic surface fitting coefficients using the least squares method, so that the fitting error is ≤0.005 mm; the surface fitting algorithm corrects the target position through the deviation surface function, with a correction coefficient of 0.8, which is optimized based on historical error data.

[0045] In some embodiments, the pendulum wave model has a pendulum period of 0.6s, a damping coefficient of 0.1, and a maximum rotation angle determined by the absolute value of the personnel posture angle output by the image acquisition and personnel detection module. Data training is performed under different maximum rotation angles to make the stabilization time of the Z-axis rotating to the target posture angle as small as 0.8s, and the rotation angle error ≤0.001°.

[0046] In some embodiments, the surface fitting algorithm is integrated with PID control to correct the target position. The process is as follows: the surface fitting algorithm calculates the deviation surface function value based on the current position of the camera and corrects the target position on the X / Y axis; the corrected target position is input into the PID control algorithm, and the PID control parameters are dynamically adjusted according to the deviation surface function value to drive the X / Y axis motors to move.

[0047] In some embodiments, the improved MTCNN facial state detection algorithm calculates binocular opening and expression stability using facial feature points: binocular opening is the ratio of the distance between the upper and lower eyelids to the distance between the two eyes, and the opening of both the left and right eyes must be ≥80%; expression stability is the average value of the positional changes of facial feature points within 30 frames, and must be ≤2 pixels.

[0048] In some embodiments, the shooting triggering condition of the automatic shooting control module is: simultaneously satisfying the improved MTCNN facial state detection algorithm's determination that the opening and closing of both eyes are ≥80% and the expression stability is ≤2 pixels, and the Z-axis angular velocity output by the three-axis motion control module is 0, which is the exposure time point calculated by the single pendulum wave model. At this time, a shutter trigger signal is generated to ensure that there is no dynamic blur and the facial state is optimal.

[0049] In some embodiments, the semantic segmentation algorithm based on Transformer and the surface fitting in the intelligent image processing module are used to collaboratively correct coordinates. The process is as follows: First, the image pixel coordinates are rotated and corrected according to the camera angle output by the three-axis motion control module using a rotation formula; then, based on the deviation surface function value calculated by the surface fitting algorithm, and combined with the correction coefficient determined by edge error data optimization, the rotated and corrected pixel coordinates are further optimized to eliminate image distortion caused by changes in camera angle and improve the accuracy of human contour positioning.

[0050] In some embodiments, the training process of the Transformer-based semantic segmentation algorithm is as follows: portrait images with different rotation angles are used as the training set, and each image is labeled with a segmentation mask for the person and the background; the SegFormer network is used as the base network, and the image after rotation correction and surface fitting optimization is input; the loss function combining Dice loss and 0.5 times cross-entropy loss is used for training, so that the network segmentation accuracy is ≥96% and the person edge localization error is ≤0.5 pixels.

[0051] In some embodiments, based on the segmentation mask output by the semantic segmentation algorithm, the foreground image of the person is extracted by pixel multiplication to remove the background; the built-in ID photo template is called to scale the foreground image and replace the background; at the same time, the deviation between the person's edge and the standard contour is calculated as the edge error.

[0052] The technical concept of this invention is as follows:

[0053] I. System Overview

[0054] This AI edge computing camera system is specifically designed for ID photo shooting scenarios, aiming to solve the problems of traditional ID photo shooting, such as reliance on manual operation, low efficiency, unstable photo quality, and cumbersome post-processing. By integrating high-precision hardware and advanced AI algorithms, the system achieves full automation from personnel detection, automatic camera adjustment, intelligent shooting to photo processing and generation. The system is centered on a main control and coordination module, coordinating the work of the image acquisition and personnel detection module, the three-axis motion control module, the automatic shooting control module, and the intelligent image processing module. These modules exchange data and commands in real time via a data bus, ensuring the efficient and accurate operation of the entire system.

[0055] II. System Module Composition and Connection Relationships

[0056] 2.1 Module Details

[0057] Image Acquisition and Person Detection Module: This module is equipped with a high-resolution CMOS image sensor with a resolution of no less than 48 megapixels, capable of acquiring image data of the shooting scene at a rate of 30 frames per second. Its core function is to use a person detection algorithm based on YOLOv7 to identify the position, posture, and facial feature points of people entering the shooting range in real time, providing accurate data support for subsequent camera adjustments and shooting. (Workflow Reference) Figure 2 And the content that follows.

[0058] Three-axis motion control module: This module is crucial for achieving automatic camera adjustment. It consists of linear guides on the X and Y axes and a hollow rotating platform on the Z axis. (This mechanical structure is a solution obtained through existing technology or a simple superposition of existing technologies; therefore, the structural details are not described here. Refer to existing technologies. The focus of this module is on using algorithms to control specific movements, without involving improvements to the mechanical structure.) The X and Y axes employ linear ball screw structures. The X / Y axis motion trajectory is optimized through surface fitting algorithms, and the Z-axis rotation is controlled by a single pendulum wave model, enabling the camera to quickly and smoothly adjust to the optimal shooting position and angle. (Flowchart reference) Figure 3 And the content that follows.

[0059] Automatic shooting control module: Primarily responsible for triggering the camera shutter at the appropriate time to complete the shot. This module receives facial feature point information from the image acquisition and personnel detection module and Z-axis angular velocity data from the three-axis motion control module. Based on an improved MTCNN facial state detection algorithm, it determines whether the person is in the optimal shooting state and, combined with the Z-axis motion state, determines the exposure time, ultimately generating a shutter trigger signal. (Flowchart reference) Figure 4 And the content that follows.

[0060] Intelligent Image Processing Module: After shooting, this module processes the photo using a semantic segmentation algorithm based on the Transformer architecture. First, it accurately identifies the subject and background in the photo and removes the background. Then, based on a variety of built-in ID photo templates (covering over 20 common ID photo specifications such as ID cards, passports, and driver's licenses), it performs processing such as cropping, color correction, and brightness adjustment to generate a standard ID photo. Simultaneously, this module calculates edge errors, providing feedback for parameter optimization in the three-axis motion control module. (Process Reference) Figure 5 And the content that follows.

[0061] Main Control and Coordination Module: As the "brain" of the system, this module is responsible for coordinating data interaction and workflow between various modules. It receives status data from each module, monitors the system's operating status in real time, and sends control commands and parameter update values ​​to each module based on the system's operating conditions, ensuring that the entire system can work efficiently and collaboratively.

[0062] 2.2 Module Connection and Data Transmission

[0063] The modules are connected via a data bus composed of a CAN bus and an Ethernet bus to achieve real-time data transmission and command interaction. The specific connection relationships and data transmission are as follows:

[0064] The image acquisition and personnel detection module will detect the coordinates (x, y) of the personnel. p ,y p ), attitude angle θ p Facial feature point P f The data is transmitted to the three-axis motion control module and the automatic shooting control module.

[0065] The three-axis motion control module will position the camera (x) c ,y c ), angle θ c Motion status feedback is transmitted to the image acquisition module and the automatic shooting control module so that these modules can adjust their operation according to the camera status.

[0066] The shutter trigger signal T generated by the automatic shooting control module 拍 and exposure time t 曝 It sends data to the camera shutter and intelligent image processing module to control the camera's shooting and provide parameters for image processing.

[0067] Standard ID photo generated by the intelligent image processing module 证 and edge error e 边 Edge error e 边 The data is transmitted to the three-axis motion control module, which optimizes its parameters based on the edge error.

[0068] The main control and coordination module is connected to all other modules, receives status data from each module, and sends control commands and parameter update values ​​to each module, thereby achieving unified management and coordination of the entire system.

[0069] III. Core Algorithm Model and Fusion Process

[0070] Module 1: Image Acquisition and Person Detection Module

[0071] Sub-algorithm: A person detection algorithm based on improved YOLOv7

[0072] 1. Model Building

[0073] The algorithm's network structure consists of three parts: Backbone (CSPDarknet), Neck (PANet), and Head. The Backbone is responsible for feature extraction from the input 48-megapixel image (8000×6000 resolution), progressively extracting low-level and high-level features through multiple convolutional layers and residual blocks. The Neck uses a PANet structure to fuse features at different scales, enhancing the algorithm's ability to detect targets of varying sizes. The Head outputs three types of detection results: a person bounding box (containing the center coordinates (x, y, y)). p ,y p ), width w p and high h p (i.e., position) and personnel posture angle θ p and facial feature point P f =(p1,p2,...,p 68 (where p) i =(u i ,v i (where ) represents pixel coordinates.

[0074] 2. Model Training

[0075] Dataset preparation: Collect 100,000 portrait images containing different poses, clothing, and lighting conditions, and accurately annotate each image, including the person's bounding box, pose angle, and 68 facial feature points.

[0076] Loss function definition: To enable the model to accurately detect personnel information, a multi-task loss function is used, expressed as follows:

[0077] L = L box +λ1L angle +λ2L landmark ;

[0078] Among them, L boxFor bounding box loss, the CIoU loss function is used to measure the difference between the predicted bounding box and the ground truth bounding box; L angle For attitude angle loss, the absolute error loss function is used, i.e. L landmark For facial feature point loss, the Euclidean distance loss function is used, i.e. λ1 = 0.5 and λ2 = 0.3 are weighting coefficients used to balance the importance of different loss terms.

[0079] Training process: The SGD optimizer was used to train the model, with an initial learning rate of 0.001 and momentum of 0.9. During training, validation was performed every 1000 iterations, and training stopped when the loss function value L on the validation set was less than 5.0. The final trained model achieved a person detection accuracy of ≥98%, which meets the real-time detection requirements of the system.

[0080] 3. Model Application

[0081] This model is applied to the image acquisition and personnel detection module, receiving image data from a CMOS image sensor in real time, and outputting the personnel coordinates (x, y, t) after processing. p ,y p ), attitude angle θ p and facial feature point P f These data are transmitted at a frequency of 30Hz to the three-axis motion control module and the automatic shooting control module, serving as the basis for subsequent camera adjustments and shooting triggers.

[0082] Module 2: Three-axis motion control module

[0083] Sub-algorithm 1: Surface Fitting (X / Y Axis Trajectory Optimization)

[0084] 1. Model Building

[0085] The goal of the surface fitting algorithm is to correct the target trajectory of PID control by constructing a surface that shows the deviation between the actual and ideal positions of the X / Y axes, thereby reducing oscillations during camera movement and improving the smoothness and accuracy of the motion.

[0086] Variable definition:

[0087] x, y: represent the actual displacement along the X-axis and Y-axis, respectively, in mm;

[0088] S(x,y): Represents the deviation surface function, in mm, and its value is the deviation between the actual position and the ideal position;

[0089] a ij : represents the surface fitting coefficients, where i = 0, 1, 2, j = 0, 1, 2, a total of 9 parameters.

[0090] The model expression adopts the form of a quadratic surface, as follows:

[0091] S(x,y)=a 00 +a 10 x+a 01 y+a 20 x 2 +a 11 xy+a 02 y 2 .

[0092] 2. Model Training

[0093] Data acquisition: The X and Y axes are controlled to move within the range of 0–1000 mm. 2000 sets of sample data are collected using a linear encoder (accuracy ±0.001 mm). Each set of data includes x… k ,y k (actual displacement) and S k (Measured deviation)

[0094] Parameter determination: The least squares method is used to solve for the surface fitting coefficients α. ij That is, minimizing the sum of squared errors. Calculate the sum of squared errors for each coefficient a. ij Taking the partial derivatives of and setting them to 0, we obtain the system of equations:

[0095]

[0096] Similarly, equations for the other coefficients can be obtained, and these equations can be expressed in matrix form as A. T Aa=A T S, where A is a 2000×6 sample matrix, a=[a 00 ,a 10 ,a 01 ,a 20 ,a 11 ,a 02 ] T Let S be the deviation vector. By solving this matrix equation, the coefficient vector a can be obtained:

[0097] a=(A T A) -1 A T S;

[0098] Training results: After calculation, the surface fitting coefficients are as follows:

[0099] a 00 =0.02,a 10 =0.001,a 01 =0.001,a 20 = -5 × 10-7 ,a 11 =2×10 -7 ,a 02 = -5 × 10 -7 ;

[0100] At this point, the fitting error is ≤0.005mm, which meets the system accuracy requirements.

[0101] 3. Model Application (Integration with PID Control)

[0102] Input: The algorithm receives the target position of the person (x target, y target) output by the image acquisition and personnel detection module, and the current position of the camera (x current, y current) fed back by the grating ruler.

[0103] Correcting the target position: The target position is corrected based on the deviation surface function S(x,y), and the correction formula is as follows:

[0104] x 目标 '=x 目标 -S(x 当前 ,y 当前 )·k s ;

[0105] y 目标 '=y 目标 -S(x 当前 ,y 当前 )·k s ;

[0106] Where k s =0.8 is the correction factor, which is obtained by optimization based on historical error data.

[0107] PID control algorithm: corrected target position (x) 目标 ',y 目标 The input is fed into the PID control algorithm to calculate the control deviations on the X and Y axes:

[0108] e x =x 目标 '-x 当前 ;

[0109] e y =y 目标 '-y 当前 ;

[0110] Then, the output voltage of the motor is calculated according to the PID control formula to drive the X-axis and Y-axis motors. The specific formula is as follows:

[0111]

[0112] Among them, K p1=5.0,K i1 =0.1,K d1 =0.5 is the X-axis PID parameter, K p2 =4.5,K i2 =0.1,K d2 =0.4 represents the Y-axis PID parameters. These parameters are dynamically adjusted according to the changes in the deviation surface function S(x,y) to ensure that the motor outputs appropriate driving force, enabling the camera to reach the target position quickly and smoothly.

[0113] Sub-algorithm 2: Single pendulum wave model (Z-axis rotation and exposure coordination)

[0114] 1. Model Building

[0115] The purpose of designing the pendulum wave model is to simulate the periodicity of pendulum motion, optimize the angular velocity of Z-axis rotation, and correlate Z-axis rotation with exposure time to reduce motion blur during shooting and improve image quality.

[0116] Variable definition:

[0117] θ(t): Represents the rotation angle along the Z-axis, in degrees; t represents time, in seconds.

[0118] θ0: Represents the maximum rotation angle (amplitude), its value is the attitude angle θ output by the image acquisition and personnel detection module. p The decision is that θ0 = |θ p |;

[0119] T: represents the period of the simple pendulum, in seconds, which was optimized to be 0.6 seconds;

[0120] ω0: Represents angular frequency, with units of rad / s, ω0 = 2π / T;

[0121] β: represents the damping coefficient, with a value of 0.1, used to suppress oscillations during rotation.

[0122] The model expression is as follows:

[0123] θ(t)=θ0e -βt sin(ω0t).

[0124] 2. Model Training

[0125] Data acquisition: At different maximum rotation angles θ0 (ranging from 1° to 10°), 100 sets of Z-axis rotation data were collected, and the rotation of the Z-axis to the target attitude angle θ was recorded. p Required settling time t 稳定 .

[0126] Optimization objective: To achieve a stable time t 稳定With the goal of minimizing the period T of the pendulum, a grid search method was used to optimize it. Experiments showed that when T = 0.6 s, the settling time t... 稳定 =0.8s, which is the minimum value, so T=0.6s is determined as the optimal period.

[0127] Verification: After training, the Z-axis rotation angle error is ≤0.001°, which meets the accuracy requirements of the system.

[0128] 3. Model Application (in conjunction with Z-axis control and shutter speed)

[0129] Input: The model receives the person pose angle θ output by the image acquisition and person detection module. p Calculate the Z-axis angular velocity: Differentiate the rotation angle function θ(t) to obtain the Z-axis angular velocity ω(t), as shown in the following formula:

[0130]

[0131] Motor drive voltage: Z-axis motor drive voltage u z It is directly proportional to the angular velocity ω(t), and the specific relationship is as follows:

[0132] u z =K ω ·ω(t);

[0133] Where K ω =0.5 is the proportionality coefficient.

[0134] In conjunction with shutter speed and exposure: To reduce motion blur, the exposure time t 曝 We need to choose a moment when the Z-axis angular velocity ω(t) is 0, at which point the Z-axis rotational speed is at its lowest. Let ω(t) = 0, that is:

[0135] θ0e -βt [-βsin(ω0t)+ω0cos(ω0t)]=0;

[0136] Due to θ0e -βt Since ≠0, we have -βsin(ω0t) + ω0cos(ω0t) = 0, which means tan(ω0t) = ω0 / β. Substituting ω0 = 2π / 0.6 ≈ 10.47 rad / s and β = 0.1, we can solve for t. 曝 =0.15s.

[0137] The calculated exposure time t 曝 The data is transmitted to the automatic shooting control module as a basis for determining the shooting timing. Simultaneously, the Z-axis motor adjusts its speed according to the drive voltage u. z Rotate the camera to adjust the angle to the optimal position.

[0138] Module 3: Automatic Shooting Control Module

[0139] Sub-algorithm: Facial state detection algorithm based on improved MTCNN

[0140] 1. Model Building

[0141] The goal of this algorithm is to detect whether the person's face is in a suitable shooting state, that is, the facial expression is natural, the eyes are open and remain stable for more than 1 second, so as to trigger the shutter at the best time.

[0142] Input: Facial feature points P from the image acquisition and people detection module f .

[0143] Feature parameter definition:

[0144] Eye opening and closing degree i For the left eye (o1) and the right eye (o2), Where d 上下眼 d is the distance between the upper and lower eyelids. 眼距 The distance between the two eyes, when o i A value ≥0.8 indicates that both eyes are open;

[0145] Facial expression stability (s): Where N = 30 frames, and when s ≤ 2 pixels, the expression is considered stable.

[0146] 2. Model Training

[0147] Dataset preparation: Collect 50,000 images containing different facial states (such as open eyes, closed eyes, frowning, natural expressions, etc.) and label each image as "qualified" or "unqualified".

[0148] Classifier selection: The SVM classifier is used, with input feature parameters (o1,o2,s) and output as "qualified" (1) or "unqualified" (0).

[0149] Training results: After training, the accuracy of the classifier is ≥99% and the detection speed is ≤50ms / frame, which can meet the requirements of real-time detection.

[0150] 3. Model Application (in conjunction with a single pendulum wave)

[0151] Input: The algorithm receives facial feature points P output by the image acquisition and personnel detection module. f And the Z-axis angular velocity ω(t) output by the three-axis motion control module.

[0152] Triggering conditions: When the binocular opening angle o1≥0.8 and o2≥0.8 are detected, the facial expression stability s≤2 pixels, and the time t is equal to the exposure time t calculated by the single pendulum wave model. 曝 At that time, output shutter trigger signal T拍 =1, triggering the camera shutter to take a picture and obtain an image.

[0153] Module 4: Intelligent Image Processing Module

[0154] Sub-algorithm 1: Semantic segmentation based on Transformer (in conjunction with surface fitting)

[0155] 1. Model Building

[0156] Transformer-based semantic segmentation algorithms are used to accurately segment subjects and backgrounds in captured images, providing a foundation for background removal and ID photo generation. This algorithm works in conjunction with surface fitting algorithms to correct image distortion caused by camera angle variations, thereby improving segmentation accuracy.

[0157] Variable definition:

[0158] (x p ,y p ): Represents the pixel coordinates of the image;

[0159] θ c : Indicates the camera angle output by module 2;

[0160] The rotated pixel coordinates (x', y') are calculated using the following formula:

[0161]

[0162] The pixel coordinates (x”, y”) after surface fitting correction are:

[0163] x”=x'-S(x',y')·k p ,y”=y'-S(x',y')·k p , where k p =0.3 is the correction factor.

[0164] 2. Model Training

[0165] Dataset preparation: Collect 10,000 portrait images with different rotation angles, and label each image with a segmentation mask (M(x,y)=1 represents the person, M(x,y)=0 represents the background).

[0166] Network selection: The SegFormer network is used as the base network for semantic segmentation. The input to this network is the image corresponding to the pixel coordinates (x”, y”) after rotation correction and surface fitting optimization.

[0167] Loss function: A combination of Dice loss and cross-entropy loss is used, specifically expressed as L. seg= Dice loss + 0.5 × cross-entropy loss, to improve the accuracy of segmentation.

[0168] Training results: After training, the network achieves a segmentation accuracy of ≥96% and an edge error of ≤0.5 pixels.

[0169] 3. Model Application

[0170] Background removal: Based on the segmentation mask M, the foreground image I is obtained through pixel dot multiplication. 前景 =I⊙M, to remove the background.

[0171] ID photo generation: Based on the system's built-in ID photo templates (such as the ID card template with a size of 26mm × 32mm), the foreground image I... 前景 The image is scaled and the background is replaced with a standard color (such as the white background of an ID photo, with RGB values ​​of (255, 255, 255)) to generate a standard ID photo. 证 Simultaneously, the edge error e is calculated. 边 This feedback is then sent to the three-axis motion control module to optimize the surface fitting coefficient 'a'. ij .

[0172] Edge error e 边 The algorithm is used to measure the accuracy of semantic segmentation algorithms in segmenting people and background edges. Its calculation logic and application scenarios are as follows:

[0173] Edge error e 边 This refers to the pixel-level deviation between the outline edge of a person and the actual edge in the semantic segmentation result, reflecting the precision of the background removal algorithm. 边 The smaller the pixel size, the closer the segmentation edges are to the real contours of a person (such as details like strands of hair and clothing folds), resulting in higher quality ID photos. Calculation formula:

[0174] 1. Error calculation based on pixel distance

[0175]

[0176] The formula means: for each point p on the true edge, calculate the distance from it to the nearest point q on the predicted edge, and then take the average value.

[0177] in:

[0178] The actual edge contour marked by manual annotation is C gt (Pixel coordinate set); the edge contour obtained by the algorithm segmentation is C. pred (Set of pixel coordinates); n is C gt The total number of edge points in the array; dist(p,q) represents the Euclidean distance (in pixels) between pixels p and q.

[0179] Cgt Based on the system's built-in ID photo template generation: Step 1: Call the standard outline template (including the standard proportions of the head and shoulders) of the current document type (such as ID card) from the template library; Step 2: Scale the template outline to the same size as the person in the photographed image, and integrate the coordinates of the points on the template outline to obtain the pixel-level ideal edge point set C. gt .

[0180] C pred Step 1: The intelligent image processing module receives the captured image I and obtains the segmentation mask M through a Transformer-based semantic segmentation algorithm; Step 2: Edge detection is performed on M (using the Canny operator) to extract the pixel set of the person's outline, denoted as the original edge set. Step 3: Combine the camera angle θ output by the three-axis motion control module c Using the surface fitting function S(x,y), coordinate correction is applied to the original edge point set (eliminating distortion caused by camera rotation and position deviation), resulting in...

[0181] k p =0.3 is the contour correction coefficient, which is a parameter shared with the surface fitting algorithm;

[0182] 2. Optimized weighted error (considering edge curvature)

[0183]

[0184] Where w(p) is the curvature weight: the greater the curvature (such as a hair strand or an edge), the greater w(p) (usually w(p)∈[1,3]), highlighting the precision of detail segmentation.

[0185] Edge error e 边 Interaction with other modules:

[0186] Input source:

[0187] The semantic segmentation result C of Module 4 (Intelligent Image Processing) pred ;

[0188] The true edge C obtained by manual annotation or 3D reconstruction gt (Training phase) or historically optimized baseline edge (Application phase).

[0189] Output application:

[0190] Feedback to Module 2 (Three-axis motion control): If e 边 > Threshold (e.g., 0.8 pixels) triggers surface fitting coefficient a ij Dynamically adjust and optimize the camera position deviation correction amount for the next shot;

[0191] Iteration of the edge refinement algorithm for module 4: based on e 边 Adjusting the bilateral filter parameters or the intensity of morphological operations can improve the subsequent segmentation accuracy.

[0192] IV. Module Collaborative Interaction Process

[0193] Initialization phase: The main control and coordination modules start the entire device, and each module performs a self-test to ensure that the device is working properly. The self-test process is completed within 300ms.

[0194] Personnel Detection Phase: The image acquisition and personnel detection module acquires images of the scene using a CMOS image sensor, processes the images using a personnel detection algorithm based on YOLOv7, and outputs the personnel coordinates (x, y). p ,y p ), attitude angle θ p and facial feature point P f These data are transmitted at a frequency of 30Hz to the three-axis motion control module and the automatic shooting control module.

[0195] X / Y axis adjustment phase: The three-axis motion control module receives the personnel's target position (x...Y...) 目标 ,y 目标 After that, the target position is corrected using a surface fitting algorithm to obtain the corrected target position (x). 目标 ',y 目标 Then, the X-axis and Y-axis motors are driven by a PID control algorithm, and the grating ruler provides real-time feedback on the camera's current position, ensuring that the camera adjusts to the appropriate X / Y-axis position within ≤2 seconds.

[0196] Z-axis adjustment and exposure preparation stage: The three-axis motion control module adjusts the personnel posture angle θ p The rotation angle θ(t) and angular velocity ω(t) of the Z-axis are calculated using a single pendulum wave model to drive the Z-axis motor to rotate, while the exposure time t is calculated simultaneously. 曝 =0.15s.

[0197] Shooting triggering phase: The automatic shooting control module receives facial feature points P f And the Z-axis angular velocity ω(t), when the facial state is detected to meet the shooting conditions and the exposure time t is reached. 曝 At that time, output shutter trigger signal T 拍 =1, triggering the camera shutter to complete the shot.

[0198] Image processing stage: The intelligent image processing module receives the captured image I, corrects the image pixel coordinates using a rotation correction formula and a surface fitting algorithm, and then segments the subject and background using a Transformer-based semantic segmentation algorithm to remove the background. Afterwards, based on a built-in ID photo template, the image is processed to generate a standard ID photo I. 证 The entire process takes ≤5 seconds. Simultaneously, the edge error e is calculated. 边 And feedback is sent to the main control and collaboration module.

[0199] Feedback optimization phase: The main control and collaborative modules optimize based on the edge error e fed back by the intelligent image processing module. 边 The surface fitting coefficient α for the three-axis motion control module ij Fine-tuning is performed, with each adjustment being ≤1%, to continuously improve the system's accuracy.

[0200] Through the collaborative work of the above modules and the integrated application of algorithms, the AI ​​edge computing camera system has achieved automation, standardization, and efficiency in ID photo shooting, effectively solving many problems existing in traditional ID photo shooting and improving the quality and efficiency of ID photo shooting. The following are the core functions and collaborative contributions of each algorithm:

[0201] I. A Person Detection Algorithm Based on YOLOv7 (Module 1)

[0202] Core function: Accurately locate personnel and extract key features to provide "initial coordinates" for subsequent system adjustments.

[0203] Solving traditional problems: Traditional manual shooting requires manually determining the position of people, which is inefficient and prone to errors; this algorithm uses a 48-megapixel CMOS sensor and a processing speed of 30 frames per second to output the coordinates, posture angle and facial feature points of people in real time (detection accuracy ≥98%), providing a data foundation for camera movement adjustment and shooting trigger.

[0204] Collaborative contribution: directly used as input parameter (x) of the three-axis motion control module (module 2). p ,y p Drive X / Y axis adjustment, θ p The Z-axis rotation amplitude is determined, and the facial state detection is based on the automatic shooting control module (module 3). f (Used to determine facial expressions and eye-opening status).

[0205] II. Surface Fitting Algorithm (Module 2, X / Y Axis Trajectory Optimization)

[0206] Core function: Correcting mechanical motion deviations to achieve "smooth and precise camera movement".

[0207] This algorithm addresses the traditional problem that X / Y axis mechanical motion may experience positional deviations due to guide rail errors and load variations, leading to camera adjustment oscillations or overshoot. It uses a quadratic surface S(x,y) to fit the deviation between the actual and ideal positions (fitting error ≤ 0.005mm) and corrects the target position of PID control.

[0208] Specific contributions:

[0209] Improved motion smoothness: The revised PID control reduces the X / Y axis adjustment time to ≤2 seconds and achieves a positioning accuracy of ±0.01mm, avoiding shooting angle deviation caused by mechanical vibration;

[0210] This provides a foundation for subsequent algorithms: the corrected coordinates (x”, y”) are directly used for edge optimization in the intelligent image processing module (module 4) to reduce segmentation edge errors caused by positional deviations.

[0211] III. Single Pendulum Wave Model (Module 2, Z-axis Rotation and Exposure Coordination)

[0212] Core function: To achieve "smooth rotation and precise exposure" along the Z-axis, eliminating dynamic blur.

[0213] Solving traditional problems: If the angular velocity is unstable during Z-axis rotation, it can easily lead to blurry images during shooting; the traditional exposure time is disconnected from the rotation state, which further aggravates the blur.

[0214] Specific contributions:

[0215] Rotational stability: via a damped pendulum wave model θ(t)=θ0e -βt sin(ω0t) makes the rotational angular velocity ω(t) of the Z-axis change periodically, with a rotational angle error ≤0.001°, thus avoiding sudden stops and turns;

[0216] Exposure coordination: Calculating the time t when the angular velocity is 0 曝 =0.15s, ensuring the shutter is triggered at its lowest rotation speed, reducing motion blur by 20%;

[0217] Linked with Module 3: ω(t) is directly used as the basis for determining the exposure timing of the automatic shooting control module, realizing seamless coordination of "rotation-exposure".

[0218] IV. Facial State Detection Algorithm Based on Improved MTCNN (Module 3)

[0219] Core function: Accurately determine the "best shooting time" to ensure consistent photo quality.

[0220] Addressing traditional problems: Manual photography relies on visual judgment of facial expressions and eye openness, which can easily lead to unacceptable photos due to timing delays; This algorithm calculates the opening and closing of the eyes and the stability of facial expressions using facial feature points (detection speed ≤50ms / frame).

[0221] Specific contributions:

[0222] Quantification of shooting conditions: When o1≥0.8, o2≥0.8 and s≤2 pixels (stable for 1 second), the t value is combined with the single pendulum wave model. 曝 Trigger the shutter to avoid unsuitable conditions such as closed eyes or furrowed brows;

[0223] Hardware Collaboration: Output Exposure Time t 曝 Directly control the camera shutter parameters (electromechanical hybrid shutter, speed 1 / 8000-30s) to ensure uniform facial brightness and clear details under different lighting conditions (10-10000Lux).

[0224] V. Semantic Segmentation Algorithm Based on Transformer (Module 4)

[0225] Core function: To achieve "pixel-level background removal", replacing traditional manual background removal.

[0226] Solving traditional problems: Traditional manual image cutout is time-consuming and the edge processing is rough (such as hair strands and clothing wrinkles that are prone to rough edges); This algorithm achieves accurate segmentation by combining the SegFormer network (segmentation accuracy ≥96%) with the contour coordinates optimized by surface fitting.

[0227] Specific contributions:

[0228] Edge refinement: Through bilateral filtering and morphological processing, the smoothness of the human figure's edges is improved by 30%, solving the "jagged edge problem" of traditional image cutout;

[0229] Template Collaboration: The segmented foreground image is combined with a built-in template (such as an ID card 26mm×32mm) to complete the size cropping and background replacement (such as white RGB(255,255,255)) within 5 seconds, generating a standard ID photo.

[0230] VI. Edge Error Calculation (Module 4, Feedback Optimization)

[0231] Core function: To build a "closed-loop optimization mechanism" and continuously improve system accuracy.

[0232] This algorithm addresses the traditional problem that mechanical wear and algorithm drift can lead to a decrease in accuracy after long-term use. It calculates edge errors and uses feedback to optimize the algorithm parameters in the early stages.

[0233] Specific contribution: Correcting surface fitting coefficients: via e 边 Adjust a ij This makes the deviation surface S(x,y) more closely match the actual error, further reducing the X / Y axis position deviation;

[0234] Enhance system robustness: Form a closed loop of "detection-adjustment-image capture-feedback-optimization" to ensure that the equipment maintains high segmentation accuracy even after long-term use.

[0235] Summary: Overall contribution of algorithmic collaboration

[0236] The algorithms do not operate independently, but form an organic whole through a "data chain": the personnel detection algorithm provides "initial coordinates" → surface fitting and single pendulum wave model achieve "precise positioning" → face detection and exposure coordination ensure "optimal shooting" → semantic segmentation and edge feedback complete "high-quality output".

[0237] Ultimately, three core breakthroughs were achieved:

[0238] Fully automated process: From personnel entry to ID photo generation, no manual intervention is required, improving processing efficiency;

[0239] High-precision standardization: Positioning accuracy ±0.01mm, segmentation accuracy ≥96%, meeting the strict standards of ID cards, passports, etc.

[0240] Low dynamic blur: Through rotation-exposure coordination, photo sharpness is improved, with edge error ≤0.5 pixels.

[0241] The embodiments described above are for illustrative purposes only and are not intended to limit the invention. Therefore, any changes in numerical values ​​or substitutions of equivalent elements should still fall within the scope of this invention.

[0242] The above detailed description will enable those skilled in the art to understand that the present invention can indeed achieve the aforementioned objectives and has complied with the provisions of the Patent Law.

[0243] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the invention. The above descriptions are merely preferred embodiments of the invention and are not intended to limit the invention. It should be noted that any modifications, equivalent substitutions, and improvements made within the spirit and principles of the invention should be included within the scope of protection of the invention.

[0244] It should be noted that the above description of the process is for illustrative purposes only and does not limit the scope of this specification. Those skilled in the art can make various modifications and changes to the process under the guidance of this specification. However, these modifications and changes remain within the scope of this specification.

[0245] The basic concepts have been described above. Obviously, for those skilled in the art who have read this application, the above disclosure is merely illustrative and does not constitute a limitation of this application. Although not explicitly stated herein, those skilled in the art may make various modifications, improvements, and corrections to this application. Such modifications, improvements, and corrections are suggested in this application, and therefore, such modifications, improvements, and corrections still fall within the spirit and scope of the exemplary embodiments of this application.

[0246] Furthermore, this application uses specific terms to describe its embodiments. For example, "an embodiment," "one embodiment," and / or "some embodiments" refer to a particular feature, structure, or characteristic related to at least one embodiment of this application. Therefore, it should be emphasized and noted that "an embodiment," "one embodiment," or "an alternative embodiment" mentioned twice or more in different positions in this specification do not necessarily refer to the same embodiment. In addition, certain features, structures, or characteristics in one or more embodiments of this application can be appropriately combined.

[0247] Furthermore, those skilled in the art will understand that aspects of this application can be described and illustrated through several patentable types or situations, including any new and useful combination of processes, machines, products, or substances, or any new and useful improvements thereof. Therefore, aspects of this application can be implemented entirely in hardware, entirely in software (including firmware, resident software, microcode, etc.), or a combination of hardware and software. All of the above hardware or software can be referred to as a “unit,” “module,” or “system.” Furthermore, aspects of this application can take the form of a computer program product embodied in one or more computer-readable media, wherein computer-readable program code is contained therein.

[0248] The computer program code required for the operation of each part of this application can be written in any one or more programming languages, including object-oriented programming languages ​​such as Java, Scala, Smalltalk, Eiffel, JADE, Emerald, C++, C#, VB.NET, and Python; general programming languages ​​such as C; Visual Basic, Fortran2103, Perl, COBOL2102, PHP, and ABAP; dynamic programming languages ​​such as Python, Ruby, and Groovy; or other programming languages. This program code can run entirely on the user's computer, or as a standalone software package on the user's computer, or partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter case, the remote computer can be connected to the user's computer via any network, such as a local area network (LAN) or wide area network (WAN), or connected to an external computer (e.g., via the Internet), or in a cloud computing environment, or used as a service such as Software as a Service (SaaS).

[0249] Furthermore, unless expressly stated in the claims, the order of processing elements and sequences, the use of numbers and letters, or other names described in this application are not intended to limit the order of the processes and methods of this application. Although some currently considered useful embodiments of the invention have been discussed in the foregoing disclosure by way of various examples, it should be understood that such details are for illustrative purposes only, and the appended claims are not limited to the disclosed embodiments; rather, the claims are intended to cover all modifications and equivalent combinations that conform to the substance and scope of the embodiments of this application. For example, although the implementation of the various components described above can be embodied in a hardware device, it can also be implemented as a purely software solution, such as an installation on an existing server or mobile device.

[0250] Similarly, it should be noted that, in order to simplify the description of the present application and thus aid in the understanding of one or more embodiments of the invention, the foregoing description of the embodiments of the present application sometimes combines multiple features into a single embodiment, drawing, or description thereof. However, this approach of the present application should not be construed as reflecting an intention that the claimed subject matter requires more features than expressly recited in each claim. Rather, the subject of the invention should possess fewer features than in any single embodiment described above.

Claims

1. An AI edge computing camera system, characterized in that, It includes an image acquisition and personnel detection module, a three-axis motion control module, an automatic shooting control module, an intelligent image processing module, and a main control and coordination module. These modules are connected via a data bus for real-time data transmission and command interaction, as detailed below: The image acquisition and personnel detection module acquires images and identifies personnel positions, posture angles, and facial feature points using a personnel detection algorithm based on YOLOv7. The three-axis motion control module consists of X-axis and Y-axis linear guides and a Z-axis hollow rotating platform. It receives the position and posture angle of the personnel, optimizes the X / Y axis motion trajectory through a surface fitting algorithm, controls the rotation of the Z-axis by combining a single pendulum wave model, calculates the rotation angle and angular velocity of the Z-axis, adjusts the position and angle of the camera, and monitors and generates motion status feedback in real time, including whether the target position has been reached and whether the motion is stable. The automatic shooting control module receives facial feature points, Z-axis rotational angular velocity, and motion state feedback. Only when the motion state feedback indicates that the target position has been reached and is stable, it determines the shooting state of the person based on the improved MTCNN facial state detection algorithm, and determines the exposure time in combination with the Z-axis rotational angular velocity. When the Z-axis rotational angular velocity is 0, it is the optimal exposure time, and generates a shutter trigger signal and exposure time. The intelligent image processing module receives the captured image, camera position and angle, Z-axis rotation angle and exposure time obtained by shooting based on the shutter trigger signal. It uses a Transformer-based semantic segmentation algorithm to correct the perspective distortion of the captured image by using the camera position, adjusts the image orientation of the captured image by using the camera angle and Z-axis rotation angle, optimizes the image brightness and contrast of the captured image by combining the exposure time, segments the person and the background, and then generates a standard ID photo by combining the built-in ID photo template. The main control and coordination module connects to all other modules, receives and transmits data from each module, and coordinates the work of each module.

2. The AI ​​edge computing camera system according to claim 1, characterized in that, The network structure of the improved YOLOv7 person detection algorithm consists of three parts: Backbone, Neck, and Head. Backbone is responsible for extracting features from the input image by progressively extracting low-level and high-level features of the image through multiple convolutional layers and residual blocks. The Neck uses a PANet structure to fuse features at different scales, enhancing the algorithm's ability to detect targets of different sizes. The Head part outputs three types of detection results, including the person's position, pose angle, and facial feature points.

3. The AI ​​edge computing camera system according to claim 1, characterized in that, The surface fitting algorithm controls the movement of the X and Y axes within the range of 0 to 1000 mm. Sample data containing actual displacement and measured deviation are collected by a grating ruler. The least squares method is used to solve for 9 quadratic surface fitting coefficients, so that the fitting error is ≤0.005 mm. The surface fitting algorithm corrects the target position through the deviation surface function, with a correction coefficient of 0.8, which is optimized based on historical error data.

4. The AI ​​edge computing camera system according to claim 3, characterized in that, The pendulum wave model has a pendulum period of 0.6s and a damping coefficient of 0.

1. The maximum rotation angle is determined by the absolute value of the personnel posture angle output by the image acquisition and personnel detection module. Data training is performed under different maximum rotation angles to make the stabilization time of the Z-axis rotating to the target posture angle as small as 0.8s and the rotation angle error ≤0.001°.

5. The AI ​​edge computing camera system according to claim 4, characterized in that, The surface fitting algorithm, combined with PID control, corrects the target position. The process is as follows: the surface fitting algorithm calculates the deviation surface function value based on the current position of the camera and corrects the target position on the X / Y axis; the corrected target position is input into the PID control algorithm, and the PID control parameters are dynamically adjusted according to the deviation surface function value to drive the X / Y axis motors.

6. The AI ​​edge computing camera system according to claim 1, characterized in that, The improved MTCNN facial state detection algorithm calculates binocular opening and expression stability using facial feature points: binocular opening is the ratio of the distance between the upper and lower eyelids to the distance between the two eyes, and the opening of both the left and right eyes must be ≥80%; expression stability is the average value of the positional changes of facial feature points within 30 frames, and must be ≤2 pixels.

7. The AI ​​edge computing camera system according to claim 6, characterized in that, The automatic shooting control module's shooting triggering conditions are as follows: simultaneously satisfying the improved MTCNN facial state detection algorithm's determination that both eyes have an opening degree of ≥80% and the expression stability is ≤2 pixels, and the Z-axis angular velocity output by the three-axis motion control module is 0, which is the exposure time point calculated by the single pendulum wave model. At this time, a shutter trigger signal is generated to ensure that there is no dynamic blur and the facial state is optimal.

8. The AI ​​edge computing camera system according to claim 1, characterized in that, The intelligent image processing module uses a Transformer-based semantic segmentation algorithm and surface fitting to collaboratively correct coordinates. The process is as follows: First, based on the camera angle output by the three-axis motion control module, the image pixel coordinates are rotated and corrected using a rotation formula. Then, based on the deviation surface function value calculated by the surface fitting algorithm, combined with the correction coefficient determined through edge error data optimization, the rotated and corrected pixel coordinates are further optimized to eliminate image distortion caused by changes in camera angle and improve the accuracy of character contour positioning.

9. The AI ​​edge computing camera system according to claim 8, characterized in that, The training process of the Transformer-based semantic segmentation algorithm is as follows: portrait images with different rotation angles are used as the training set, and each image is labeled with a segmentation mask for the person and the background; the SegFormer network is used as the base network, and the input image is the image after rotation correction and surface fitting optimization; the loss function combining Dice loss and 0.5 times cross-entropy loss is used for training, so that the network segmentation accuracy is ≥96% and the person edge localization error is ≤0.5 pixels.

10. The AI ​​edge computing camera system according to claim 9, characterized in that, Based on the segmentation mask output by the semantic segmentation algorithm, the foreground image of the person is extracted by pixel multiplication to remove the background; the built-in ID photo template is called to resize the foreground image and replace the background; at the same time, the deviation between the person's edge and the standard contour is calculated as the edge error.