Face recognition based image quality enhancement method and system
By using two rounds of localization point detection and weighted fusion coordinate calculation with anchor point constraints, the problem of face alignment transformation matrix deviation under low-quality images was solved, realizing the refinement and correction of alignment deviation and the preservation of identity features, thus improving the accuracy of the face recognition system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING WATU INFORMATION TECH CO LTD
- Filing Date
- 2026-05-27
- Publication Date
- 2026-06-26
AI Technical Summary
In existing face recognition systems operating under low light, motion blur, or low resolution conditions, the positioning coordinate errors of the key point detection network cause systematic deviations in the face alignment transformation matrix, which in turn lead to semantic misalignment artifacts and irreversible identity feature shifts in subsequent enhancement operations.
By using two rounds of localization point detection and displacement amplitude perception, combined with weighted fusion coordinate calculation based on anchor point constraints, a refined affine transformation matrix is generated to align and enhance the original low-quality image, ensuring the fidelity of identity features.
It effectively reduces the systematic bias of the alignment transformation matrix, reduces semantic region misalignment, improves the matching degree between the face structure and the real structure, and ensures the accuracy and fidelity of identity features in the enhancement process.
Smart Images

Figure CN122289006A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to an image quality enhancement method and system based on face recognition. Background Technology
[0002] In applications such as mobile payment and smart terminal identity verification, facial recognition systems need to align and enhance facial images captured by cameras to improve the accuracy of subsequent feature extraction and comparison. Existing technical solutions typically first obtain the coordinates of positioning points such as the eyes, nose tip, and corners of the mouth through a key point detection network, use these coordinates to calculate an affine transformation matrix and perform alignment operations on the facial region, and then feed the aligned facial image into an enhancement network for super-resolution reconstruction or illumination correction.
[0003] However, existing solutions exhibit significant technical shortcomings under uncontrolled acquisition conditions such as low light, motion blur, or low resolution. First, when the input image quality is severely degraded, the keypoint detection network outputs positioning coordinates with a deviation of several to more than ten pixels. The existing process directly uses these deviation coordinates to solve the transformation matrix and perform alignment, without assessing the confidence level of the detection error or setting up a compensation and correction mechanism. This results in the alignment transformation matrix carrying a systematic bias that persists throughout all subsequent processing stages.
[0004] Secondly, the alignment operation with bias causes the actual position of facial features in the standard coordinate system to deviate from the expected position. Subsequent local adaptive enhancement based on the prior of this space will apply sharpening or smoothing operations to the wrong semantic region, producing structural semantic misalignment artifacts that are difficult to detect by general quality indicators.
[0005] Furthermore, when images containing semantic misalignment artifacts enter the super-resolution reconstruction stage, the prior constraints of the facial structure on which the reconstruction network relies are inconsistent with the actual image structure. The network tends to forcibly cover the structural information of the input image with the prior template, causing key identity features such as eye shape, eyebrow shape, and mouth shape in the reconstruction result to shift towards the standard template, resulting in irreversible distortion of individual identity features. Existing identity consistency verification mechanisms are unable to identify such local identity shifts when the overall similarity is still higher than the threshold. Summary of the Invention
[0006] This application provides an image quality enhancement method and system based on face recognition, which solves the problem in the prior art where the face alignment transformation matrix in low-quality images suffers from systematic deviations due to the accumulation of key point detection errors, leading to semantic misalignment artifacts in subsequent enhancement operations and ultimately causing irreversible shifts in face identity features. It achieves perceptible and refined alignment deviations and effective maintenance of the fidelity of identity features.
[0007] This application provides an image quality enhancement method based on face recognition, including: acquiring an original low-quality image, performing a first round of localization point detection operation on the original low-quality image, and obtaining initial localization point coordinates; Perform pre-enhancement processing on the original low-quality image to generate a pre-enhancement image; A second round of localization point detection is performed on the pre-enhanced image to obtain refined localization point coordinates; The displacement vector is calculated based on the refined positioning point coordinates and the initial positioning point coordinates, and the displacement amplitude is calculated based on the displacement vector. The displacement amplitude is compared with a reasonable fluctuation threshold. Based on the comparison result, a weighted fusion coordinate calculation operation based on anchor point constraints is performed on the initial positioning point coordinates to obtain the final positioning point coordinate set. Calculate the refined affine transformation matrix based on the final set of positioning point coordinates; The refined affine transformation matrix is used to perform image alignment on the original low-quality image to generate a refined aligned image, and the refined aligned image is used to perform subsequent enhancement processing.
[0008] Furthermore, the steps of performing pre-enhancement processing on the original low-quality image to generate a pre-enhancement image include: Construct independent grayscale histogram data for each local sub-block; The portion of the independent grayscale histogram data whose frequency exceeds the contrast limit threshold is truncated and cropped. The total number of pixels in the cropped portion is divided equally and then redistributed to each gray level; The original pixel grayscale values within each local sub-block are mapped and updated according to the redistribution histogram data; All updated local sub-blocks are reassembled according to their initial spatial positions to output an intermediate transition image.
[0009] Furthermore, the steps for outputting the intermediate transition image include: Perform a bilateral filtering operation on the intermediate transition image; The spatial proximity weight distribution parameter is mapped to the first Gaussian kernel standard deviation, and its value range is configured as [1.0, 2.5]. The pixel value similarity weight distribution parameter is mapped to the standard deviation of the second Gaussian kernel, and its value range is configured as [10, 30]. By combining the standard deviation of the first Gaussian kernel and the standard deviation of the second Gaussian kernel, a joint weighted convolution calculation is performed pixel by pixel on the intermediate transition image; Perform smooth updates on discrete noise points in areas with flat brightness, while preserving the original discrete feature state of strong edge contours.
[0010] Furthermore, the steps for calculating the displacement amplitude based on the displacement vector include: Extract the initial horizontal axis coordinates and initial vertical axis coordinates from the initial positioning point coordinates corresponding to each location; Extract the refined horizontal axis coordinates and refined vertical axis coordinates from the refined positioning point coordinates of the matching positions; Subtracting the initial horizontal axis coordinate value from the refined horizontal axis coordinate value yields the horizontal displacement component data. Subtracting the initial vertical axis coordinate value from the refined vertical axis coordinate value yields the vertical displacement component data. The horizontal displacement component data and the vertical displacement component data are combined to form a two-dimensional displacement vector. For each of the two-dimensional displacement vectors, the square values of the horizontal component and the vertical component are calculated respectively, and the two are added together to obtain the comprehensive deviation area value. Based on the comprehensive deviation area value, the displacement amplitude of the current processing position is obtained.
[0011] Furthermore, the steps to obtain the final set of location point coordinates include: Read the pre-stored reasonable fluctuation threshold data; Perform a comparison and branching operation on each shift amplitude data with the reasonable fluctuation threshold data; If the displacement amplitude is not greater than the reasonable fluctuation threshold, the initial positioning point coordinates of the corresponding position will be directly confirmed as the final positioning point coordinate data of that position. If the displacement amplitude is greater than the reasonable fluctuation threshold, the weighted fusion coordinate calculation operation based on anchor point constraints is triggered for the initial positioning point coordinates corresponding to the position, generating the final positioning point coordinate data for that position. The comparison and branching operations are performed on all the positioning points, and the final positioning point coordinate data output by each branch is summarized to generate the final positioning point coordinate set.
[0012] Furthermore, the steps for triggering a weighted fusion coordinate calculation operation based on anchor point constraints for the initial positioning point coordinates corresponding to this location include: Set the initial positioning point coordinates corresponding to this location as the spatial anchor point reference coordinates; The direction of spatial correction evolution is determined by the two-dimensional plane spatial orientation indicated by the displacement vector corresponding to this position. Retrieve the pre-configured dynamic attenuation coefficient value, and multiply the displacement amplitude data with the dynamic attenuation coefficient value to obtain the spatial correction step size constraint information; The horizontal displacement component data is multiplied and converted with the dynamic attenuation coefficient value to generate the horizontal weighted displacement correction control quantity. The initial horizontal axis coordinate value is added to the horizontal weighted displacement correction control value to generate the updated target horizontal axis coordinate value. The vertical displacement component data is multiplied and converted with the dynamic attenuation coefficient value to generate the vertical weighted displacement correction control quantity. The initial vertical axis coordinate value is added to the vertical weighted displacement correction control value to generate the updated target vertical axis coordinate value. The target's horizontal axis coordinates and vertical axis coordinates are combined to form the final location point coordinates.
[0013] Furthermore, the steps for retrieving the pre-configured dynamic attenuation coefficient value include: Load a set of parameter mapping configurations that contain multiple consecutive and non-overlapping sets; The current displacement amplitude data is used as a retrieval index and input into the coefficient association mapping structure table to confirm the target value determination interval that the displacement amplitude data actually falls into. When the value falls within the first-level numerical judgment interval, the first proportional adjustment parameter bound to that interval is extracted as the dynamic attenuation coefficient value of the first level. When the value falls within the second-level numerical judgment interval, the second proportional adjustment parameter bound to that interval is extracted as the dynamic attenuation coefficient value of the second level. The extracted dynamic attenuation coefficient value is multiplied by the displacement amplitude data to output the spatial correction step size constraint information.
[0014] Furthermore, the steps for calculating the refined affine transformation matrix based on the final set of location point coordinates include: Read the preset standard structural template spatial distribution data, which contains a set of target reference coordinate points with ideal spatial proportions; Configure the final positioning point coordinate set as the source coordinate point set, and configure the target reference coordinate point set as the alignment calibration target area reference; Construct a basic framework of six degrees of freedom transformation matrices, including planar rotation control variables, two-dimensional scaling control variables, and orthogonal axis translation control variables; Each coordinate point in the source coordinate point set is substituted into the basic framework of the transformation matrix and mapped to the target coordinate space to obtain the deduced coordinate data. Calculate the spatial distance residual between the generated coordinate data and the corresponding benchmark point in the target reference coordinate point set, and aggregate them to generate an overall deviation evaluation value; The optimization solution logic is driven to perform least squares iterative operations, adjusting the parameters of each variable within the transformation matrix framework until the overall deviation evaluation value converges to the minimum extreme value state. Extract the configuration data of the matrix variable parameters generated in the convergent state and use it as the output of the refined affine transformation matrix.
[0015] This application provides an image quality enhancement system based on face recognition, used to implement an image quality enhancement method based on face recognition, including: The module includes: initial positioning point coordinate acquisition module, pre-enhanced image generation module, refined positioning point coordinate acquisition module, displacement amplitude calculation module, positioning point coordinate set acquisition module, matrix calculation module, and refined aligned image generation module. The initial positioning point coordinate acquisition module is used to acquire the original low-quality image, perform a first round of positioning point detection operation on the original low-quality image, and obtain the initial positioning point coordinates. The pre-enhanced image generation module is used to perform pre-enhanced processing on the original low-quality image to generate a pre-enhanced image; The refined positioning point coordinate acquisition module is used to perform a second round of positioning point detection operation on the pre-enhanced image to obtain the refined positioning point coordinates; The displacement amplitude calculation module is used to calculate the displacement vector based on the refined positioning point coordinates and the initial positioning point coordinates, and to calculate the displacement amplitude based on the displacement vector. The positioning point coordinate set acquisition module is used to compare the displacement amplitude with a reasonable fluctuation threshold, and perform a weighted fusion coordinate calculation operation based on anchor point constraints on the initial positioning point coordinates based on the comparison result to obtain the final positioning point coordinate set. The matrix calculation module is used to calculate the refined affine transformation matrix based on the final set of positioning point coordinates; The refined and aligned image generation module is used to perform image alignment operation on the original low-quality image using the refined affine transformation matrix to generate a refined and aligned image, and to perform subsequent enhancement processing operations using the refined and aligned image.
[0016] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: By performing two rounds of positioning point detection and using displacement amplitude to perceive positioning deviations in low-quality images, the existing scheme breaks the process limitation of being unaware of detection errors; then, anchor point constraint weighted fusion is performed based on the comparison results of displacement amplitude and threshold, so that the final positioning coordinates both absorb clear edge gain and suppress over-correction, reducing the systematic deviation of the alignment transformation matrix.
[0017] Furthermore, the refinement transformation matrix is applied to the original unenhanced image to complete the alignment, so that subsequent local differential enhancement operations are accurately applied within the preset physiological region boundaries, reducing structural artificial traces caused by semantic region misalignment.
[0018] Furthermore, refining the aligned image improves the matching degree between the prior facial structure and the real structure, so that when generating facial details through super-resolution reconstruction, it is mainly guided by the original image information rather than being forced by the standard template. This controls the cumulative offset of identity features such as eye shape and eyebrow shape during the enhancement process, ensuring an effective balance between quality improvement and identity fidelity. Attached Figure Description
[0019] Figure 1 A flowchart of an image quality enhancement method based on face recognition is provided for embodiments of this application; Figure 2 This is a schematic diagram of the structure of an image quality enhancement system based on face recognition, provided in an embodiment of this application. Detailed Implementation
[0020] This application provides an image quality enhancement method and system based on face recognition, which solves the problem in the prior art where the face alignment transformation matrix in low-quality images suffers from systematic deviations due to the accumulation of key point detection errors, leading to semantic misalignment artifacts in subsequent enhancement operations and ultimately causing irreversible shifts in facial identity features. By performing pre-enhancement processing on the original image to trigger a second round of localization point detection, and performing weighted fusion coordinate calculation based on anchor point constraints on the initial localization point coordinates according to the comparison results of displacement amplitude and reasonable fluctuation threshold, the method achieves perceptible and refined correction of alignment deviations and effective maintenance of the fidelity of identity features during the enhancement process.
[0021] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.
[0022] like Figure 1 The diagram shown is a flowchart of an image quality enhancement method based on face recognition provided in an embodiment of this application. The method is applied to an image quality enhancement system based on face recognition and includes the following steps: acquiring an original low-quality image, performing a first round of localization point detection operation on the original low-quality image, and obtaining initial localization point coordinates; Perform pre-enhancement processing on the original low-quality image to generate a pre-enhancement image; A second round of localization point detection is performed on the pre-enhanced image to obtain refined localization point coordinates; The displacement vector is calculated based on the refined positioning point coordinates and the initial positioning point coordinates, and the displacement amplitude is calculated based on the displacement vector. The displacement amplitude is compared with a reasonable fluctuation threshold. Based on the comparison result, a weighted fusion coordinate calculation operation based on anchor point constraints is performed on the initial positioning point coordinates to obtain the final positioning point coordinate set. Calculate the refined affine transformation matrix based on the final set of positioning point coordinates; The refined affine transformation matrix is used to perform image alignment on the original low-quality image to generate a refined aligned image, and the refined aligned image is used to perform subsequent enhancement processing.
[0023] The specific steps include: The original low-quality image that has not undergone any pixel grayscale modification is retrieved, and its complete pixel matrix data is imported into the spatial warp mapping processing pipeline. Based on the refined affine transformation matrix, a matrix multiplication mapping transformation is performed on the position coordinates of each original pixel in the original low-quality image to calculate and obtain the target floating-point position coordinates projected onto the standard coordinate system; Create a blank target pixel-carrying grid array with the same size as the standard template within the target image canvas space; Scan each integer-level coordinate intersection node of the blank target pixel-bearing grid array, and call the spatial distance inverse proportional interpolation algorithm to retrieve the pixel grayscale data corresponding to the neighboring target floating-point position coordinates; Based on the distance weighting factor, a weighted fusion resampling and filling operation is performed on the grayscale data of multiple neighboring pixels obtained by retrieval, and the final display grayscale value of each integer-level coordinate intersection node is calculated. The refined and aligned image is generated by combining all the final displayed grayscale values after filling. The refined and aligned image is pushed into the subsequent processing flow, and the image parsing mask extraction logic and spatial local structured reconstruction logic are called to perform depth enhancement reconstruction output processing on the refined and aligned image.
[0024] In this embodiment, firstly, a raw low-quality image is acquired through an image acquisition interface or data transmission bus. This image may be affected by insufficient lighting, sensor noise, or motion blur. After acquisition, a preset basic detection network is invoked to perform a first round of localization point detection on the raw low-quality image, extracting the initial localization point coordinates including key physiological locations such as the left eye, right eye, tip of the nose, left corner of the mouth, and right corner of the mouth.
[0025] Based on this, instead of directly using the initial coordinates for spatial alignment, pre-enhancement processing is performed on the original low-quality image to generate a pre-enhanced image. The purpose of this step is to temporarily boost the edge gradients of the image, not for the final visual presentation. Subsequently, a second round of localization point detection is performed on the pre-enhanced image to obtain refined localization point coordinates. Since the network model parameters are consistent in the two detections, the coordinate shift is purely caused by changes in the local quality of the image.
[0026] Subsequently, the core coordinate calibration logic is entered, which calculates the displacement vector and displacement amplitude based on the refined positioning point coordinates and the initial positioning point coordinates, and compares the displacement amplitude with a reasonable fluctuation threshold. This comparison mechanism can adaptively distinguish between "effective feature manifestation" and "texture distortion caused by over-enhancement".
[0027] Based on the alignment results, a weighted fusion coordinate calculation operation based on anchor point constraints is performed, outputting the final set of localization point coordinates. Finally, a refined affine transformation matrix is solved based on this set, and this matrix is applied to the original low-quality image (rather than the pre-enhanced image) to generate a refined aligned image for subsequent super-resolution or feature parsing tasks.
[0028] It should be noted that the networks called in the first and second rounds of localization point detection operations are not limited to multi-task concatenated convolutional networks (MTCNN). They can also be replaced with lightweight detection models based on anchor point regression or heatmap prediction, as long as the state of the instance is consistent in the two rounds of calls. This provides flexibility for deployment on different computing power platforms.
[0029] Furthermore, the steps of performing pre-enhancement processing on the original low-quality image to generate a pre-enhancement image include: The original low-quality image is divided into multiple local sub-blocks of the same size according to a preset grid division rule, ensuring that all local sub-blocks cover the entire area of the original low-quality image without overlap. For each local sub-block, the brightness distribution feature information of all pixels inside is extracted. Based on the extracted brightness distribution feature information, the pixel frequency of each brightness level is counted, and independent grayscale histogram data corresponding to each local sub-block is constructed. Read the pre-set contrast limit threshold, check the independent grayscale histogram data corresponding to each local sub-block one by one, and perform a truncation and cropping operation on the peak areas in the independent grayscale histogram data that exceed the contrast limit threshold in frequency, separating the over-limit cropped data part and the compliant retained data part. The total number of pixels represented by the over-limit cropped data portion is divided equally, and the equally divided data is appended to each gray level coordinate of the compliant retained data portion to generate smooth redistribution histogram data. The original pixel grayscale values in each local sub-block are mapped and updated according to the smooth redistribution histogram data, thus completing the local contrast difference adjustment process for all local sub-blocks. Extract all local sub-blocks that have completed the mapping update operation, and reassemble and align all the extracted local sub-blocks according to their initial spatial coordinates in the partitioning stage; For the boundary regions of adjacent local sub-blocks generated after splicing and alignment, a spatial interpolation algorithm is called to update the boundary pixel values, eliminate the structural fragmentation regions caused by discrete splicing boundaries, and output an intermediate transition image with improved structural edge clarity. The intermediate transition image is then passed to the next processing node to generate a pre-enhanced image.
[0030] In this embodiment, the first stage of the pre-enhancement process employs improved Limiting Contrast Adaptive Histogram Equalization (CLAHE) logic. The original low-quality image is divided into a seamlessly stitched grid, for example, divided into... The local sub-block array. For each local sub-block, the brightness values (e.g., gray levels 0-255) of all pixels within it are counted, and independent gray-level histogram data is constructed.
[0031] To prevent excessive amplification of dark noise in low-quality images, a contrast limiting threshold (ClipLimit) is introduced. The frequency of each gray level in the histogram is iterated, and when the frequency of a gray level exceeds the threshold, the excess frequency value is truncated. Subsequently, all truncated and accumulated excess cropped data is evenly divided, and its base value (constant offset) is appended to each gray level coordinate of the histogram, generating a smooth redistribution histogram.
[0032] Based on the redistributed histogram, the pixel values within the local sub-blocks are updated. To eliminate the obvious boundary separation caused by independent equalization of adjacent sub-blocks, after all local sub-blocks are re-stitched and aligned, a bilinear spatial interpolation algorithm is applied to the boundary region.
[0033] Specifically, for any boundary pixel, the mapping function calculation results of the four adjacent sub-blocks are summed inversely proportionally based on the geometric distance of the pixel from the center of the four adjacent sub-blocks, thereby outputting an intermediate transition image with improved structural edge clarity and no block artifacts.
[0034] The size of the grid is not limited to It can dynamically adjust according to the actual resolution of the input image; for example, it can adaptively adjust to a resolution higher than 1080P. The preferred contrast limiting threshold range is 1.5 to 3.0, which balances edge enhancement and noise suppression.
[0035] Furthermore, the steps for outputting the intermediate transition image include: Receive the output intermediate transition image and perform bilateral filtering feature extraction operation on the global pixel matrix of the intermediate transition image; Read the pre-configured conservative filter parameter set, which includes spatial proximity weight distribution parameters and pixel value similarity weight distribution parameters; The spatial proximity weight distribution parameter is mapped to the first Gaussian kernel standard deviation input, which is configured to take values in the range of [1.0, 2.5] to limit the coverage radius of the spatial filtering window and ensure that non-zero computational weights are assigned only to spatially neighboring pixels that are close to the center pixel. The pixel value similarity weight distribution parameter is mapped to the second Gaussian kernel standard deviation input, which is configured to take values in the range of [10, 30] to constrain the activation threshold of feature smoothing intensity, ensuring that averaging is performed only on neighboring pixels with minimal gray value differences. By combining the input values of the first Gaussian kernel standard deviation and the second Gaussian kernel standard deviation, a joint weighted convolution calculation is performed pixel by pixel on the intermediate transition image; During the joint weighted convolution calculation process, when scanning to a structural region containing brightness jumps, the fusion path across edge pixels is truncated by the constraint of the input of the second Gaussian kernel standard deviation; A smooth update operation is performed on the discrete noise data in the region with a gentle brightness distribution in the intermediate transition image, while simultaneously preserving the original discrete feature state of the strong edge contours that are not affected by the smooth update operation. After completing the joint weighted convolution calculation traversal process for all coordinate grids of the intermediate transition image, all updated pixel data are aggregated and the pre-enhanced image is output.
[0036] In this embodiment, regarding the second stage of pre-enhancement processing, an intermediate transition image is received and subjected to bilateral filtering to smooth discrete noise in flat regions while preserving strong edges crucial for localization point detection. The joint weighted convolution calculation formula for bilateral filtering is as follows: ; in, The pre-enhanced image output at the center coordinates Pixel value at that location, For The filtering window (neighborhood) centered on the center. coordinates within the neighborhood The input pixel value at that location, To normalize the weighting coefficients, ensuring that the sum of all weights is 1, and These represent the spatial distance differences between the neighboring pixel coordinates and the center pixel coordinates in the horizontal and vertical directions, respectively, obtained in real time by performing subtraction operations on the coordinate values. It represents the difference between the gray values of neighboring pixels and the gray value of the center pixel, which is obtained in real time by performing a subtraction operation on the gray value.
[0037] In this formula, the first Gaussian kernel standard deviation is the input quantity. The spatial proximity weight distribution and the second Gaussian kernel standard deviation input are determined. This determines the pixel value similarity weight distribution. By adopting a "conservative" configuration: The value range is configured as [1.0, 2.5], limiting the spatial filtering window to primarily affect adjacent pixels; The value range is configured as [10, 30], which serves as the activation threshold for feature smoothing intensity.
[0038] When scanning reaches structural areas with abrupt changes in brightness, such as the eyelids or lip lines... The increase in size causes the similarity weight index to approach 0 sharply, thereby truncating the fusion path across edge pixels and maximizing the maintenance of edge sharpness.
[0039] In the optimization of specific parameters, The preferred value range is [1.0, 2.5]. The preferred value range for is [10, 30]. This relatively conservative parameter range not only reduces computational overhead but also avoids the loss of features of small key points on the face (such as pupil highlights) caused by aggressive smoothing.
[0040] Furthermore, the steps for calculating the displacement amplitude based on the displacement vector include: For an initial positioning point coordinate set containing multiple different physiological positional features, extract the initial horizontal axis coordinate value and the initial vertical axis coordinate value from the initial positioning point coordinates corresponding to each position. Simultaneously, from a set of refined positioning point coordinates containing an equal number of corresponding physiological position features, the refined horizontal axis coordinate values and refined vertical axis coordinate values of the refined positioning point coordinates matching the position are extracted. In a two-dimensional Cartesian coordinate system, the refined horizontal axis coordinate value is subtracted from the initial horizontal axis coordinate value of the matching position to calculate the algebraic difference along the horizontal axis. This algebraic difference is then used as the horizontal displacement component data of the current processing position. Subtract the initial vertical coordinate value of the matching position from the extracted refined vertical coordinate value, calculate the algebraic difference value along the vertical axis, and determine the vertical displacement component data of the current processing position. Extract the calculated horizontal and vertical displacement components, and logically package and combine them to construct a complete two-dimensional displacement vector indicating the spatial deviation state. For each independently generated two-dimensional displacement vector at each position, the horizontal displacement component data is read and multiplied by itself to obtain the square value of the horizontal component. Read the vertical displacement component data and perform a self-multiplication operation to obtain the square value of the vertical component; Perform an arithmetic addition operation on the generated square values of the horizontal and vertical components to combine them and generate a comprehensive deviation area value. Perform a square root dimensionality reduction operation on the comprehensive deviation area value, extract the generated unsigned scalar length data as the final displacement amplitude of the current processing position, and use the displacement amplitude as the input basis for subsequent state determination.
[0041] In this embodiment, after obtaining the initial set of positioning point coordinates and the refined set of positioning point coordinates, the spatial deviation state evaluation logic is initiated. For each key physiological location of the face (e.g., the center point of the left eye), its initial positioning point coordinates are set as follows: The refined positioning point coordinates are .
[0042] First, the displacement components in the horizontal direction are calculated and obtained in a two-dimensional Cartesian coordinate system. and displacement components in the longitudinal direction These two components are logically packaged and combined to form a two-dimensional displacement vector indicating the spatial deviation state. .
[0043] Subsequently, the overall deviation distance of the vector in two-dimensional space, i.e., the displacement amplitude, is calculated. Perform self-multiplication on both the horizontal and vertical components, then combine them and perform square root dimensionality reduction to extract the pure scalar length data without positive or negative signs. The mathematical expression is as follows: ; Calculated displacement amplitude The impact of pre-enhancement processing on local detection results was objectively quantified. For each detection point of the facial features, the above-mentioned dimensionality reduction analysis was performed independently to generate a corresponding set of displacement amplitude data.
[0044] Furthermore, the steps to obtain the final set of location point coordinates include: Read the pre-stored and configured reasonable fluctuation threshold data from the system memory space. This reasonable fluctuation threshold data indicates the natural drift tolerance limit of the detection algorithm output coordinates in the spatial domain under normal image processing conditions. For all the location points that have completed the parsing process, extract the displacement amplitude data corresponding to each location, and introduce the displacement amplitude data into the numerical comparison logic unit to perform a magnitude comparison operation with the reasonable fluctuation threshold data. If the numerical comparison logic unit outputs the first comparison status indication information, that is, it determines that the absolute magnitude of the displacement amplitude data has not exceeded the specified limit of the reasonable fluctuation threshold data, then the first processing branch logic is activated. Under the control of the first processing branch logic, the initial positioning point coordinate data corresponding to the current processing position is directly extracted, and the initial positioning point coordinate data is directly confirmed as the final positioning point coordinate data of the final output position without modification. If the numerical comparison logic unit outputs the second comparison status indication information, that is, if it determines that the absolute magnitude of the displacement amplitude data exceeds the specified limit of the reasonable fluctuation threshold data, then the original coordinate direct release instruction is intercepted and the second processing branch logic is activated. Under the control of the second processing branch logic, a weighted fusion coordinate calculation operation based on anchor point constraints is triggered for the initial positioning point coordinates corresponding to the current processing position, and the final positioning point coordinate data corresponding to the position is generated in a dynamic damping attenuation mode. The system iterates through all the location points, performs magnitude comparison operations and branch processing logic, and summarizes all the final location point coordinate data output by each branch to generate the final location point coordinate set.
[0045] In this embodiment, the displacement amplitude at each position is obtained. Then, it is introduced into a numerical comparison logic unit and compared with a reasonable fluctuation threshold pre-stored in memory. Perform a comparison. This threshold... This represents the inherent natural drift limit of the algorithm under normal image conditions.
[0046] Logical comparison results in two branching paths: like The numerical comparison logic unit outputs the first comparison status indication. This indicates that the pre-enhancement processing has minimal impact on the texture of the region, or that the original features of the region were already sufficiently clear, and the slight changes in coordinates are due to natural algorithm jitter. At this point, the first processing branch logic is activated, directly discarding the refined coordinates. The final coordinates of the location are confirmed without modification, eliminating the cumulative error introduced by meaningless fine-tuning.
[0047] like This indicates that the pre-enhancement process effectively and significantly alters the feature response of the region, but it also carries the risk of local texture distortion. At this point, the numerical comparison logic outputs a second comparison status indication, intercepts the original coordinate release instruction, and activates the second processing branch logic. Under this branch, instead of blindly trusting excessively deviated refined coordinates, a weighted fusion calculation based on anchor point constraints is triggered on the initial coordinates to generate more robust final positioning point coordinates in a dynamically damped mode.
[0048] Reasonable fluctuation threshold It can typically be statically hard-coded to a length unit of 1.5 pixels; or it can be designed as a dynamic threshold proportional to the resolution of the input image (e.g., 0.1% of the diagonal pixel length) to ensure the scale invariance of the logic under different image input sizes.
[0049] Furthermore, the steps for triggering a weighted fusion coordinate calculation operation based on anchor point constraints for the initial positioning point coordinates corresponding to this location include: The current processing position of the second processing branch logic is analyzed, and the initial positioning point coordinates corresponding to this position are set as the spatial anchor point reference coordinates of the spatial fusion transformation. Extract the displacement vector data corresponding to the position, and determine the two-dimensional plane spatial direction indicated by the displacement vector data as the spatial correction evolution direction of the spatial fusion transformation; The system retrieves the pre-configured dynamic attenuation coefficient value, extracts the displacement amplitude data corresponding to the position, and performs a multiplication scaling operation on the displacement amplitude data and the dynamic attenuation coefficient value to obtain the spatial correction step size constraint information. Separate the horizontal displacement component data from the displacement vector data corresponding to the position, multiply the horizontal displacement component data with the dynamic attenuation coefficient value, and generate a weighted displacement correction control quantity mapped on the horizontal axis. Extract the initial horizontal axis coordinate values inside the spatial anchor point reference coordinates, and perform a linear addition operation on the initial horizontal axis coordinate values and the weighted displacement correction control quantity to generate the combined updated target horizontal axis coordinate values; Separate the vertical displacement component data from the displacement vector data corresponding to the position, multiply the vertical displacement component data with the dynamic attenuation coefficient value, and generate a weighted displacement correction control quantity mapped on the vertical axis. Extract the initial vertical axis coordinate values inside the spatial anchor point reference coordinates, and perform a linear addition operation on the initial vertical axis coordinate values and the weighted displacement correction control quantity mapped in the vertical vertical axis direction to generate the combined updated target vertical axis coordinate values. The target's horizontal axis coordinates and vertical axis coordinates are combined to form the final location point coordinate data.
[0050] In this embodiment, when the second processing branch logic is executed, the weighted fusion stage based on anchor point constraints is entered. The initial coordinates obtained from the low-quality image are used as absolute safety anchor points, and the displacement direction obtained after pre-enhancement is used as the correction evolution direction. A dynamic attenuation coefficient is then applied. Limit the step size of corrections to prevent overcorrection.
[0051] Let the coordinates of the final positioning point be Its calculation logic is implemented through the following space vector mapping formula: ; ; in, These are the initial x and y coordinate values used as the reference for the spatial anchor point. and These are displacement component data in the horizontal and vertical directions, respectively. The preset dynamic attenuation coefficient (range of values) is retrieved. ). Compare the displacement component data with Multiplicative scaling is performed to generate weighted displacement correction control values mapped to the horizontal and vertical directions, respectively. These control values are then linearly superimposed with the initial horizontal and vertical coordinates to synthesize the final values. and .
[0052] This elastic damping mechanism effectively filters out coordinate jumps caused by pre-enhancement artifacts, ensuring that the generated feature points absorb both the enhanced, clear boundary information and are strongly constrained by the original face structure. In the basic implementation, A fixed empirical value (such as 0.7) can be used; however, in complex lighting scenarios, the system can further fine-tune this coefficient based on the estimated signal-to-noise ratio of local areas of the image.
[0053] Furthermore, the steps for retrieving the pre-configured dynamic attenuation coefficient value include: Initialize and load a parameter mapping configuration set for multi-dimensional interval division in system memory. The parameter mapping configuration set encapsulates multiple consecutive and non-overlapping numerical judgment interval segments. For each of the numerical judgment intervals, an independent decreasing proportional adjustment parameter is pre-assigned to form a coefficient correlation mapping structure table for the nonlinear damping response characteristics; Extract the displacement amplitude data calculated corresponding to the current processing position, and input the displacement amplitude data as a retrieval index keyword into the coefficient association mapping structure table to start the interval positioning scanning logic; Verify the upper and lower boundary numerical constraints between the displacement amplitude data and each of the numerical determination interval data one by one, and confirm that the displacement amplitude data actually falls into the target numerical determination interval on the real number axis. When it is confirmed that the value falls within the first-level numerical judgment interval, the first proportional adjustment parameter bound to the first-level numerical judgment interval is parsed and extracted from the coefficient association mapping structure table as the dynamic attenuation coefficient value of the first level. When it is confirmed that the value falls within the second-level numerical judgment interval, the second proportional adjustment parameter bound to the second-level numerical judgment interval is parsed and extracted from the coefficient association mapping structure table as the dynamic attenuation coefficient value of the second level. The final dynamic attenuation coefficient value is read and extracted, and then transmitted to the numerical multiplier module to perform multiplication and scaling calculations with the displacement amplitude data to output the spatial correction step size constraint information.
[0054] In this embodiment, to more accurately control the fusion step size, a coefficient correlation mapping structure table of nonlinear damping response characteristics is loaded. The specific execution flow is as follows: Extracting displacement amplitude The search keywords are used as inputs into the lookup table. The preset intervals are configured in a stepped manner, and the larger the displacement amplitude, the smaller the allocated proportional adjustment parameter (damping coefficient).
[0055] The underlying technical logic is as follows: the greater the deviation between the refined coordinates and the initial coordinates, the more drastic the changes to local pixels caused by the pre-enhancement operation, leading to a sharp increase in the probability of semantic structure misalignment artifacts. Therefore, it is necessary to reduce the confidence in this refined displacement. For example, when the scan determines... Falling into the first-level numerical judgment interval (e.g.) When this occurs, it is determined that the feature is displayed normally, and the corresponding first proportional adjustment parameter (e.g., ...) is extracted. ); when judged Falling into the second-level numerical judgment interval (e.g.) When artifact risk is identified, a more conservative second proportional adjustment parameter (such as...) is extracted through analysis. After extraction, the parameter is sent to the numerical multiplier module to perform the aforementioned step size constraint calculation.
[0056] Furthermore, the steps for calculating the refined affine transformation matrix based on the final set of location point coordinates include: Read the preset standard structural template spatial distribution data from the system memory. The standard structural template spatial distribution data contains a set of target reference coordinate points with ideal spatial proportions. Extract the final set of location point coordinates generated in the previous processing stage, and configure all discrete spatial coordinate points contained in the final set of location point coordinates as the source coordinate point set of the spatial mapping solution process; Using the target reference coordinate point set as the alignment calibration target area benchmark and the source coordinate point set as the basic data source for the mapping transformation to be applied, an error cost evaluation function model for cross-space mapping transformation is constructed. The error cost evaluation function model introduces a basic framework of six-degree-of-freedom transformation matrices, including planar rotation control variables, two-dimensional scaling control variables, and orthogonal axis translation control variables. Each discrete spatial coordinate point in the source coordinate point set is individually substituted into the basic framework of the six-degree-of-freedom transformation matrix and mapped to the target coordinate space to obtain the derived coordinate data. Calculate the spatial Euclidean distance residuals between all the generated coordinate data and the corresponding reference points in the target reference coordinate point set, and aggregate and accumulate all the calculated residual data to generate an overall deviation evaluation value. The optimization solver is driven to perform least squares iterative approach operation, continuously adjusting and updating the variable parameters within the basic framework of the six-degree-of-freedom transformation matrix, until the overall deviation evaluation value converges to the minimum extreme value state. Extract the matrix variable parameter configuration dataset when it converges to the minimum extreme state, solidify and output the refined affine transformation matrix for subsequent use by the spatial reconstruction module.
[0057] In this embodiment, after obtaining the final set of coordinates of the five facial features, this set is used as the source coordinate point set (denoted as...). And read the spatial distribution data of the standard structural template from the memory as the target reference coordinate point set (denoted as ). ).
[0058] Construct an error cost evaluation function model for cross-spatial mapping transformation, which introduces a factor including the rotation angle. Scaling factor And horizontal / vertical translation 6-DOF affine transformation matrix The goal is to find the optimal set of matrix parameters that minimizes the residuals when mapping source coordinates to the target space. The optimization solver employs a least-squares iterative approximation operation, and its core solution formula is expressed as: ; in, The total number of positioning points (in this embodiment) ), The six-DOF refined affine transformation matrix to be solved contains planar rotation control variables, two-dimensional scaling control variables, and orthogonal axis translation control variables. The final value of this matrix is obtained through optimization operations. The solver calculates the spatial Euclidean distance residuals between the projected coordinates and the reference point, and accumulates them to generate the overall deviation evaluation value. Through matrix decomposition and inverse operations (such as singular value decomposition (SVD), the matrix variable parameters that cause the overall deviation evaluation value to converge to the minimum extreme state are quickly obtained, and the refined affine transformation matrix is then output as a fixed value.
[0059] After matrix derivation is complete, the crucial alignment operation is performed. At this point, the original low-quality image, which has not undergone any pixel grayscale modification, is retrieved and imported into the spatial warp mapping pipeline. By decoupling the "pre-enhanced image for localization" from the "original image for reconstruction," the path of oversharpening or structural misalignment artifacts in the pre-enhanced process that could contaminate the input source for subsequent super-resolution reconstruction is cut off.
[0060] Using refined affine transformation matrix For blank target pixels, carry a grid array (usually set to) Each integer-level coordinate intersection node in the standard size) Perform inverse mapping to calculate the floating-point position coordinates in the original image space. : ; In the formula, To refine the affine transformation matrix The inverse matrix, and These represent the pixel coordinates of a given integer-level intersection node in the blank target pixel carrier grid array, in the horizontal and vertical directions, respectively. The size of the blank target pixel carrier grid array is pre-set based on the standard input resolution of the subsequent enhancement processing network, for example, both width and height are 256 pixels or 512 pixels. This size is a preset constant. and These represent the horizontal and vertical coordinates of the floating-point position in the original low-quality image space after inverse mapping. Since the result of the inverse matrix mapping is usually non-integer, these coordinates are floating-point numbers, with 1 indicating the third-dimensional normalized component of the homogeneous coordinates. This allows the two-dimensional affine transformation to uniformly express translation operations in matrix multiplication form, forming a standard component of the homogeneous coordinate representation. For the obtained floating-point position coordinates, a spatial distance inverse proportional interpolation algorithm (preferably bilinear or bicubic interpolation) is called. Taking bilinear interpolation as an example, the four nearest integer pixel grayscale data around the floating-point coordinates are retrieved and weighted fusion is performed according to the distance weight factor to fill the target canvas. Finally, a refined and aligned image with accurately corrected spatial pose and well-preserved original pixel frequency domain distribution features is generated and pushed into the downstream face parsing mask extraction and super-resolution feature reconstruction function stack. like Figure 2 The diagram shown is a structural schematic of an image quality enhancement system based on face recognition provided in an embodiment of this application. The image quality enhancement system based on face recognition provided in this embodiment of this application includes: an initial positioning point coordinate acquisition module, a pre-enhanced image generation module, a refined positioning point coordinate acquisition module, a displacement amplitude calculation module, a positioning point coordinate set acquisition module, a matrix calculation module, and a refined aligned image generation module. The initial positioning point coordinate acquisition module is used to acquire the original low-quality image, perform a first round of positioning point detection operation on the original low-quality image, and obtain the initial positioning point coordinates. The pre-enhanced image generation module is used to perform pre-enhanced processing on the original low-quality image to generate a pre-enhanced image; The refined positioning point coordinate acquisition module is used to perform a second round of positioning point detection operation on the pre-enhanced image to obtain the refined positioning point coordinates; The displacement amplitude calculation module is used to calculate the displacement vector based on the refined positioning point coordinates and the initial positioning point coordinates, and to calculate the displacement amplitude based on the displacement vector. The positioning point coordinate set acquisition module is used to compare the displacement amplitude with a reasonable fluctuation threshold, and perform a weighted fusion coordinate calculation operation based on anchor point constraints on the initial positioning point coordinates based on the comparison result to obtain the final positioning point coordinate set. The matrix calculation module is used to calculate the refined affine transformation matrix based on the final set of positioning point coordinates; The refined and aligned image generation module is used to perform image alignment operation on the original low-quality image using the refined affine transformation matrix to generate a refined and aligned image, and to perform subsequent enhancement processing operations using the refined and aligned image.
[0061] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0062] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, in the form of a computer program product.
[0063] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0064] In addition, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
[0065] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0066] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. An image quality enhancement method based on face recognition, characterized in that, Includes the following steps: Acquire the original low-quality image, perform the first round of localization point detection operation on the original low-quality image, and obtain the initial localization point coordinates; Perform pre-enhancement processing on the original low-quality image to generate a pre-enhancement image; A second round of localization point detection is performed on the pre-enhanced image to obtain refined localization point coordinates; The displacement vector is calculated based on the refined positioning point coordinates and the initial positioning point coordinates, and the displacement amplitude is calculated based on the displacement vector. The displacement amplitude is compared with a reasonable fluctuation threshold. Based on the comparison result, a weighted fusion coordinate calculation operation based on anchor point constraints is performed on the initial positioning point coordinates to obtain the final positioning point coordinate set. Calculate the refined affine transformation matrix based on the final set of positioning point coordinates; The refined affine transformation matrix is used to perform image alignment on the original low-quality image to generate a refined aligned image, and the refined aligned image is used to perform subsequent enhancement processing.
2. The image quality enhancement method based on face recognition as described in claim 1, characterized in that, The steps for performing pre-enhancement processing on the original low-quality image to generate a pre-enhancement image include: Construct independent grayscale histogram data for each local sub-block; The portion of the independent grayscale histogram data whose frequency exceeds the contrast limit threshold is truncated and cropped. The total number of pixels in the cropped portion is divided equally and then redistributed to each gray level; The original pixel grayscale values within each local sub-block are mapped and updated according to the redistribution histogram data; All updated local sub-blocks are reassembled according to their initial spatial positions to output an intermediate transition image.
3. The image quality enhancement method based on face recognition as described in claim 2, characterized in that, The steps for outputting the intermediate transition image include: Perform a bilateral filtering operation on the intermediate transition image; The spatial proximity weight distribution parameter is mapped to the first Gaussian kernel standard deviation, and its value range is configured as [1.0, 2.5]. The pixel value similarity weight distribution parameter is mapped to the standard deviation of the second Gaussian kernel, and its value range is configured as [10, 30]. By combining the standard deviation of the first Gaussian kernel and the standard deviation of the second Gaussian kernel, a joint weighted convolution calculation is performed pixel by pixel on the intermediate transition image; Perform smooth updates on discrete noise points in areas with flat brightness, while preserving the original discrete feature state of strong edge contours.
4. The image quality enhancement method based on face recognition as described in claim 1, characterized in that, The steps for calculating the displacement magnitude based on the displacement vector include: Extract the initial horizontal axis coordinates and initial vertical axis coordinates from the initial positioning point coordinates corresponding to each location; Extract the refined horizontal axis coordinates and refined vertical axis coordinates from the refined positioning point coordinates of the matching positions; Subtracting the initial horizontal axis coordinate value from the refined horizontal axis coordinate value yields the horizontal displacement component data. Subtracting the initial vertical axis coordinate value from the refined vertical axis coordinate value yields the vertical displacement component data. The horizontal displacement component data and the vertical displacement component data are combined to form a two-dimensional displacement vector. For each of the two-dimensional displacement vectors, the square values of the horizontal component and the vertical component are calculated respectively, and the two are added together to obtain the comprehensive deviation area value. Based on the comprehensive deviation area value, the displacement amplitude of the current processing position is obtained.
5. The image quality enhancement method based on face recognition as described in claim 1, characterized in that, The steps to obtain the final set of location point coordinates include: Read the pre-stored reasonable fluctuation threshold data; Perform a comparison and branching operation on each shift amplitude data with the reasonable fluctuation threshold data; If the displacement amplitude is not greater than the reasonable fluctuation threshold, the initial positioning point coordinates of the corresponding position will be directly confirmed as the final positioning point coordinate data of that position. If the displacement amplitude is greater than the reasonable fluctuation threshold, the weighted fusion coordinate calculation operation based on anchor point constraints is triggered for the initial positioning point coordinates corresponding to the position, generating the final positioning point coordinate data for that position. The comparison and branching operations are performed on all the positioning points, and the final positioning point coordinate data output by each branch is summarized to generate the final positioning point coordinate set.
6. The image quality enhancement method based on face recognition as described in claim 5, characterized in that, The steps for triggering a weighted fusion coordinate calculation operation based on anchor point constraints for the initial positioning point coordinates corresponding to this location include: Set the initial positioning point coordinates corresponding to this location as the spatial anchor point reference coordinates; The direction of spatial correction evolution is determined by the two-dimensional plane spatial orientation indicated by the displacement vector corresponding to this position. Retrieve the pre-configured dynamic attenuation coefficient value, and multiply the displacement amplitude data with the dynamic attenuation coefficient value to obtain the spatial correction step size constraint information; The horizontal displacement component data is multiplied and converted with the dynamic attenuation coefficient value to generate the horizontal weighted displacement correction control quantity. The initial horizontal axis coordinate value is added to the horizontal weighted displacement correction control value to generate the updated target horizontal axis coordinate value. The vertical displacement component data is multiplied and converted with the dynamic attenuation coefficient value to generate the vertical weighted displacement correction control quantity. The initial vertical axis coordinate value is added to the vertical weighted displacement correction control value to generate the updated target vertical axis coordinate value. The target's horizontal axis coordinates and vertical axis coordinates are combined to form the final location point coordinates.
7. The image quality enhancement method based on face recognition as described in claim 6, characterized in that, The steps to retrieve the pre-configured dynamic attenuation coefficient value include: Load a set of parameter mapping configurations that contain multiple consecutive and non-overlapping sets; The current displacement amplitude data is used as a retrieval index and input into the coefficient association mapping structure table to confirm the target value determination interval that the displacement amplitude data actually falls into. When the value falls within the first-level numerical judgment interval, the first proportional adjustment parameter bound to that interval is extracted as the dynamic attenuation coefficient value of the first level. When the value falls within the second-level numerical judgment interval, the second proportional adjustment parameter bound to that interval is extracted as the dynamic attenuation coefficient value of the second level. The extracted dynamic attenuation coefficient value is multiplied by the displacement amplitude data to output the spatial correction step size constraint information.
8. The image quality enhancement method based on face recognition as described in claim 1, characterized in that, The steps for calculating the refined affine transformation matrix based on the final set of location point coordinates include: Read the preset standard structural template spatial distribution data, which contains a set of target reference coordinate points with ideal spatial proportions; Configure the final positioning point coordinate set as the source coordinate point set, and configure the target reference coordinate point set as the alignment calibration target area reference; Construct a basic framework of six degrees of freedom transformation matrices, including planar rotation control variables, two-dimensional scaling control variables, and orthogonal axis translation control variables; Each coordinate point in the source coordinate point set is substituted into the basic framework of the transformation matrix and mapped to the target coordinate space to obtain the deduced coordinate data. Calculate the spatial distance residual between the generated coordinate data and the corresponding benchmark point in the target reference coordinate point set, and aggregate them to generate an overall deviation evaluation value; The optimization solution logic is driven to perform least squares iterative operations, adjusting the parameters of each variable within the transformation matrix framework until the overall deviation evaluation value converges to the minimum extreme value state. Extract the configuration data of the matrix variable parameters generated in the convergent state and use it as the output of the refined affine transformation matrix.
9. An image quality enhancement system based on face recognition, used to implement the image quality enhancement method based on face recognition as described in any one of claims 1-8, characterized in that, include: The module includes: initial positioning point coordinate acquisition module, pre-enhanced image generation module, refined positioning point coordinate acquisition module, displacement amplitude calculation module, positioning point coordinate set acquisition module, matrix calculation module, and refined aligned image generation module. The initial positioning point coordinate acquisition module is used to acquire the original low-quality image, perform a first round of positioning point detection operation on the original low-quality image, and obtain the initial positioning point coordinates. The pre-enhanced image generation module is used to perform pre-enhanced processing on the original low-quality image to generate a pre-enhanced image; The refined positioning point coordinate acquisition module is used to perform a second round of positioning point detection operation on the pre-enhanced image to obtain the refined positioning point coordinates; The displacement amplitude calculation module is used to calculate the displacement vector based on the refined positioning point coordinates and the initial positioning point coordinates, and to calculate the displacement amplitude based on the displacement vector. The positioning point coordinate set acquisition module is used to compare the displacement amplitude with a reasonable fluctuation threshold, and perform a weighted fusion coordinate calculation operation based on anchor point constraints on the initial positioning point coordinates based on the comparison result to obtain the final positioning point coordinate set. The matrix calculation module is used to calculate the refined affine transformation matrix based on the final set of positioning point coordinates; The refined and aligned image generation module is used to perform image alignment operation on the original low-quality image using the refined affine transformation matrix to generate a refined and aligned image, and to perform subsequent enhancement processing operations using the refined and aligned image.