Portrait image processing method based on multi-feature parameter global linkage adjustment

Through the portrait image processing method based on global linkage adjustment of multi-feature parameters, the problems of incoordinated adjustment of multi-feature parameters, complex operation and insufficient personalized experience in the prior art are solved, and the intelligence, personalization and efficiency of image processing are realized.

CN119540035AInactive Publication Date: 2025-02-28深圳市本质科技有限公司
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411643127.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-02-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing image processing technology has shortcomings in the linkage adjustment of multiple feature parameters, user operation simplicity and personalized experience, and it is difficult to meet the needs of modern image processing applications for intelligence, personalization and efficiency.

Method used

A portrait image processing method based on global linkage adjustment of multi-feature parameters is proposed. Through steps such as image acquisition, face detection and feature extraction, weighted combination of multi-feature parameters and recording and feedback of user preference values ​​are realized.

Benefits of technology

This method ensures that the multi-feature weight matrix and optimization objective function are synchronously and linked when adjusting, improving the harmonious and beautiful image overall effect, simplifying user operations, enhancing personalized experience, and realizing efficient management and personalized calls of user preference data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119540035A_ABST
    Figure CN119540035A_ABST
Patent Text Reader

Abstract

The invention discloses a portrait image processing method based on multi-feature parameter global linkage adjustment, and the method comprises the steps: S1, obtaining a portrait image through an image collection module, and carrying out the primary processing of the portrait image; s2, extracting feature parameters of each feature region; s3, initializing a plurality of adjustment items based on a preset style of a user or a style template provided by a system; s4, calculating the optimal adjustment value of the associated core feature parameters or the multi-feature parameter combination; s5, after the user completes adjustment, the system locks the current adjustment state as a user preference value; s6, allowing the user to select a single core feature or adjust through a one-key preset template by the system; and S7, after the user confirms the final adjustment result, the system generates a portrait image conforming to the expectation of the user. According to the invention, each image adjustment operation not only retains a specific style of a user, but also can dynamically adapt to new parameter updating requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of portrait image processing, and in particular to a portrait image processing method based on global linkage adjustment of multiple feature parameters. Background Art

[0002] With the development of image processing technology, the beautification and adjustment of portrait images has become an important part of image editing applications. In the fields of social media, photography and advertising design, users' demand for high-quality processing of portrait images is increasing. Current image processing systems usually allow users to customize image effects by adjusting brightness, contrast and saturation to achieve portrait optimization and beautification. However, traditional image processing methods have some significant technical bottlenecks in the process of adjusting multiple feature parameters, which makes it difficult to meet users' needs for intelligent, personalized and fast adjustment.

[0003] Existing image processing technologies mostly use independent parameter adjustment methods, that is, users need to manually adjust each feature parameter and repeatedly fine-tune it to obtain a satisfactory overall effect. This method is not only cumbersome to operate, but also often has conflicts between different feature parameters. For example, when users adjust the image brightness to enhance the visual effect, it may cause contrast distortion or unnatural changes in skin color, resulting in an inharmonious overall image effect. Due to the lack of a linkage mechanism between feature parameters, users need to adjust each parameter one by one and try and error many times before they can obtain the desired effect. The process is time-consuming and requires high operating skills from the user. In addition, due to the lack of intelligent global optimization functions, traditional methods often have problems with inharmonious adjustments when adjusting multiple features, resulting in the inability to guarantee the overall image quality.

[0004] In recent years, some image processing software have begun to introduce intelligent parameter adjustment functions, using preset style templates or automated image processing algorithms to help users obtain portrait effects in a specific style. Existing systems usually use a single parameter or preset template adjustment method, and fail to effectively realize the linkage adjustment of multiple feature parameters during the adjustment process, resulting in the style template being unable to flexibly adapt to personalized user needs. In addition, the existing system lacks an effective preference value recording and feedback mechanism after the user completes the adjustment, making it difficult to store and call customized parameters according to the user's personalized preferences, affecting the user's convenience in subsequent operations.

[0005] In summary, existing image processing technologies have obvious deficiencies in the linkage adjustment of multiple feature parameters, user convenience and personalized experience, and are difficult to meet the requirements of modern image processing applications for intelligence, personalization and efficiency. Based on this, an image processing method that can achieve linkage adjustment of multiple feature parameters is urgently needed to effectively solve the problems of traditional technologies in terms of operation complexity, consistency of adjustment effects, and user preference recording and feedback. Summary of the invention

[0006] One object of the present invention is to propose a portrait image processing method based on global linkage adjustment of multi-feature parameters. The present invention enables each image adjustment operation to retain the user's specific style and dynamically adapt to new parameter update requirements.

[0007] A portrait image processing method based on global linkage adjustment of multiple feature parameters according to an embodiment of the present invention comprises the following steps:

[0008] S1. Acquire a portrait image through an image acquisition module and perform preliminary processing on the portrait image;

[0009] S2. segmenting the facial features and skin areas in the preliminarily processed portrait image using a face detection and feature extraction algorithm, and extracting feature parameters of each feature area;

[0010] S3. Based on the user's preset style or the style template provided by the system, multiple adjustment items are initialized, each adjustment item corresponds to a single core feature parameter or a weighted combination of a set of multiple feature parameters, and the initial weight of each feature parameter is assigned according to its importance in the image effect;

[0011] S4. When the user performs an adjustment, the system calculates the optimal adjustment value of the associated core feature parameter or multi-feature parameter combination based on the adjustment position and the multi-feature linkage weight matrix;

[0012] S5. After the user completes the adjustment, the system locks the current adjustment status as the user's preferred value. If the user makes a custom adjustment, the system directly records the previous parameter value or obtains the parameter from the cloud or other channels;

[0013] S6. When the user adjusts the core feature parameters, the system allows the user to select a single core feature or adjust it through a one-click preset template;

[0014] S7. After the user confirms the final adjustment result, the system generates a portrait image that meets the user's expectations, and stores all adjustment parameters, adjustment positions, optimization paths and user preference states in the database for subsequent calls and iterations.

[0015] Optionally, the S1 includes the following steps:

[0016] S11. Obtaining a portrait image through an image acquisition module;

[0017] S12. De-noise the collected portrait image, use a multi-scale decomposition algorithm to separate the noise in different areas of the portrait image, and set the noise threshold θ noise Control denoising strength, noise threshold θ noise It is set according to the noise distribution characteristics of the portrait image and the requirements of the portrait area;

[0018] S13. Perform color equalization on the denoised portrait image, calculate the overall brightness distribution histogram of the portrait image, and map the brightness values ​​of the red channel, green channel, and blue channel to a target interval based on a histogram matching algorithm. The target interval is defined as [L min ,L max ], where L min is the minimum brightness value, L max is the maximum brightness value;

[0019] S14. Use the illumination enhancement algorithm to process the illumination of the equalized portrait image, optimize the contrast and layering of the portrait image through the dynamic range adjustment method, and set the dynamic range gain value α gain Control the brightness change of the portrait image, dynamic range gain value α gain The size of depends on the degree of uneven light distribution in the portrait image, so that the lighting effect of the portrait area reaches the expected standard;

[0020] S15. After the portrait image is collected and processed, the pre-processed portrait image data is output:

[0021]

[0022] Among them, I out The (x, y) table represents the pixel value of the portrait image at position (x, y) after preprocessing. raw (x, y) represents the pixel value of the original portrait image at position (x, y), α gain Represents the dynamic range gain value, which is used to control the overall brightness enhancement of the portrait image, θ noise represents the denoising threshold, which determines the denoising strength, ψ k (x, y) represents the k-th layer multi-scale decomposition noise function, which is used to process noise of different frequencies and scales. There are N layers in total.

[0023] Optionally, S2 includes the following steps:

[0024] S21. Use the multi-scale feature pyramid model Φ(x, y, s) to detect facial features on the preprocessed portrait image, where (x, y) is the portrait image coordinates, s is the scale parameter, and the gradient features of the portrait image at different scales are calculated. Construct a characteristic response function:

[0025]

[0026] Among them, det represents the matrix determinant, trace represents the trace of the matrix, κ sis the adjustment coefficient under scale s, which is used to adjust the detection sensitivity; according to the characteristic response function R s The local maximum point of (x,y) identifies and frames the main area of ​​the face Ω face ;

[0027] S22. In the face detection area Ω face In the image, the key point detection algorithm is used to extract the initial position point set of the facial features {P i,j}, where P i,j =(x i,j ,y i,j ) represents the coordinates of the jth feature point in the i-th facial feature area, i is the facial feature area number, j is the number of the feature point in the face detection area, and the facial feature contour curve is fitted by the least squares method:

[0028]

[0029] Among them, C i (t) is the contour curve of the i-th facial feature, β i,k is the control point parameter of the ith facial feature, is the kth Bernstein basis function, n is the order of the curve;

[0030] S23. Using the region growing algorithm to take the key point P i,j The facial features detected initially are segmented into fine segments as seed points to construct the facial contour model Ω i , according to the similarity function:

[0031]

[0032] Among them, μ i and σ i are the average pixel value and standard deviation of the i-th facial feature area, ∥·∥ represents the Euclidean distance; when the similarity S i (x,y) is greater than the threshold θ i When , the pixel point (x, y) is classified into the facial contour model Ω i ;

[0033] S24. Extracting characteristic parameters of each facial feature area, including:

[0034] The eye contour curvature κ is extracted by calculating the first and second derivatives of the curve C1(t) e (t):

[0035]

[0037] Where C′1(t) and C″1(t) are the first-order and second-order derivatives of the eye contour curve, respectively, × represents the vector cross product, and ∥·∥ is the norm of the vector, which is used to describe the curvature of the eye contour;

[0038] By converting the lip region Ω3 into the HSV color space, the hue saturation S of the lips is extracted lips :

[0039]

[0040] Among them, N3 is the total number of pixels in the lip area, and S(x,y) is the saturation value of the pixel, which is used to evaluate the color vividness of the lips;

[0041] Extracting the nose's shadow depth D via shape-from-lighting method n , estimate the depth map D(x,y) of the nose area Ω2:

[0042]

[0043] Where N2 is the total number of pixels in the nose area, and D(x,y) is the depth value of the pixel, which is used to describe the three-dimensional sense and shadow effect of the nose;

[0044] S25. Skin area Ω s Extract feature parameters, including:

[0045] The local binary pattern algorithm is used to extract the texture distribution of the skin. s (x,y):

[0046]

[0047] Among them, I c is the center pixel value, I p is the pth neighborhood pixel value, s(x) is the sign function, defined as:

[0048]

[0049] P is the number of neighborhood pixels, T s (x,y) is used to describe the local pattern of skin texture;

[0050] Extract skin color distribution parameters, including mean μ s and variance

[0051]

[0052] Among them, N s is the total number of pixels in the skin area, C(x,y) is the chromaticity value of the pixel μ s and Used to describe the overall distribution characteristics of skin color;

[0053] S26. Output facial features area {Ω i} and skin areaΩ s The segmentation results and feature parameter set of:

[0054]

[0055] Optionally, S3 includes the following steps:

[0056] S31. According to the user's preset style or the style template provided by the system, select the target style F and define multiple adjustment items {A j}, each adjustment item A j A weighted combination of a single core feature parameter or a set of multiple feature parameters to achieve a specific style effect;

[0057] S32. Set each adjustment item A j The feature parameter weight {w j,k}, according to the influence of feature parameters on style and user target style requirements, by solving the feature parameter weight {w j,k}:

[0058]

[0059] Among them, R(F,A j ) represents the target style F and the adjustment item A j The style similarity response function, M is the total number of adjustment items, K is the adjustment item A j The number of internal feature parameters, λ is the weight regularization coefficient, which is used to balance the style similarity and the uniformity of weight distribution. This optimization model makes the weight allocation more accurate and achieves a feature combination that meets the expected style.

[0060] S33. Constructing a weighted combination function G of adjustment items j (x), where x represents the target feature value adjusted by the user, and the weighted combination function G j (x) is defined as follows:

[0061]

[0062] Among them, P k (x) and Q k (x) are the basic response functions of the kth feature parameters, which are used for nonlinear feature mapping of different styles; α k,j , β k,j , γ k,j is the weighted combination coefficient, used to adjust the response function P k (x) and Q k (x) to meet the target style requirements; γ k,j The item realizes the interactive linkage of feature parameters;

[0063] S34. Initialize the weighted combination coefficient α of each adjustment item j , and set its initial value according to the target style:

[0064]

[0065] Among them, H(F,x) represents the influence weight function of the target style F in the feature space Ω, which is used to balance the style requirements and the local response of the adjustment item; the numerator is the adjustment item A j The global mapping integral with style F makes the adjustment item obtain the ideal initialization effect under the style requirements; the denominator makes the adjustment item A j Match the user's preset style effect during initialization.

[0066] Optionally, S4 includes the following steps:

[0067] S41. When the user performs an adjustment operation, the system obtains the position x of the current adjustment item j And according to this position, find the corresponding weight vector w in the multi-feature linkage weight matrix W j ={w j,k}, used to calculate the adjustment response of the associated core feature parameter;

[0068] S42. Constructing multi-feature linkage optimization objective function L(A j ), the multi-feature linkage optimization objective function is defined as the current adjustment item A j The sum of the responses combined with multiple feature parameters and in line with the user's adjustment goals:

[0069]

[0070] Among them, R j,k , δ j,k ,θ j,k They represent the weighting coefficients in the weight vector, which are used to adjust the influence of each basic response function; k (x j ) and Q k (x j ) is the response function of the kth characteristic parameter, which is used to control its change effect at a specific adjustment position;

[0071] S43. By calculating and optimizing the objective function L(A j ) to obtain the optimal adjustment value of multi-feature linkage The adjusted portrait image effect achieves optimal consistency under the linkage of core feature parameters:

[0072]

[0073] Among them, β is an adjustment parameter, which is used to control the influence of the first-order and second-order derivatives on the smoothness of the objective function.

[0074] Optionally, S5 includes the following steps:

[0075] S51. After the user completes the adjustment operation, the system obtains the current adjustment item state vector X={x j}, and adjust the characteristic parameters of position X to combine the results As the user's preference value;

[0076] S52. When the user makes a custom adjustment, the system directly calls and records the previous parameter value set X prev , so that users can restore to the previous state after completing the custom adjustment. If the user chooses to obtain parameters from the cloud or other channels, the system reads the parameter vector X from the specified data source ext ={x j,ext}, and update the user preference value according to the following formula:

[0077] P update =α·X prev +(1-α)·X ext ;

[0078] Among them, α is the user preference fusion coefficient, and its value range is 0≤α≤1; P update Represents the fused user preference value;

[0079] S53. The system will finally determine the user preference state P final Stored to local database.

[0080] The beneficial effects of the present invention are:

[0081] (1) The present invention utilizes a multi-feature weight matrix and an optimization objective function to ensure that multiple features can be synchronously linked when adjusting a single parameter. Different from the traditional method of adjusting parameters individually, the global optimization algorithm of the present invention calculates the optimal adjustment values ​​of other related features through the multi-feature linkage matrix while the user adjusts a feature parameter, thereby ensuring the overall harmony and beauty of the image. Through the multi-scale gradient feature response and parameter weight optimization model, not only the adjustment efficiency is improved, but also the problems of skin color distortion and contrast deviation caused by brightness adjustment are solved, thereby enhancing the uniformity and naturalness of the adjustment effect.

[0082] (2) The present invention adopts a dynamic weighted combination function to perform weighted combination of multi-feature parameters through a preset style template and a personalized adjustment target selected by the user. In response to different style requirements, the system automatically calls the corresponding multi-feature parameter response function and adjusts the weighted combination function in real time through a weight optimization algorithm to ensure that the effect of multi-feature linkage meets user expectations. By introducing a dynamic adjustment mechanism of weighted combination, the present invention does not require users to adjust parameters one by one when achieving a specific style effect. Users only need to select the target style to generate an image that meets expectations, which significantly reduces the complexity of operation and improves the convenience of user experience and the accuracy of style matching.

[0083] (3) The present invention automatically records each adjustment result of the user as a preference state through a preference locking and parameter storage mechanism, and can call external parameters through cloud or local data to achieve highly personalized image processing. After the user completes the customized adjustment, the system can directly lock and record the adjustment state as the default preference value for subsequent processing. If the user chooses to obtain parameters from the cloud, the system will integrate the user's current operation with the external parameter data, so that each image adjustment operation can retain the user's specific style and dynamically adapt to new parameter update requirements, thereby improving the flexibility of operation, realizing efficient management and personalized call of user preference data, and providing accurate data support for subsequent adjustments. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0085] Figure 1 This is a flow chart of a portrait image processing method based on global linkage adjustment of multiple feature parameters proposed by the present invention. DETAILED DESCRIPTION

[0086] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.

[0087] refer to Figure 1 , a portrait image processing method based on global linkage adjustment of multiple feature parameters, comprising the following steps:

[0088] S1. Acquire a portrait image through an image acquisition module and perform preliminary processing on the portrait image;

[0089] S2. segmenting the facial features and skin areas in the preliminarily processed portrait image using a face detection and feature extraction algorithm, and extracting feature parameters of each feature area;

[0090] S3. Based on the user's preset style or the style template provided by the system, multiple adjustment items are initialized, each adjustment item corresponds to a single core feature parameter or a weighted combination of a set of multiple feature parameters, and the initial weight of each feature parameter is assigned according to its importance in the image effect;

[0091] S4. When the user performs an adjustment, the system calculates the optimal adjustment value of the associated core feature parameter or multi-feature parameter combination based on the adjustment position and the multi-feature linkage weight matrix;

[0092] S5. After the user completes the adjustment, the system locks the current adjustment status as the user's preferred value. If the user makes a custom adjustment, the system directly records the previous parameter value or obtains the parameter from the cloud or other channels;

[0093] S6. When the user adjusts the core feature parameters, the system allows the user to select a single core feature or adjust it through a one-click preset template;

[0094] S7. After the user confirms the final adjustment result, the system generates a portrait image that meets the user's expectations, and stores all adjustment parameters, adjustment positions, optimization paths and user preference states in the database for subsequent calls and iterations.

[0095] In this implementation, S1 includes the following steps:

[0096] S11. Obtaining a portrait image through an image acquisition module;

[0097] S12. De-noise the collected portrait image, use a multi-scale decomposition algorithm to separate the noise in different areas of the portrait image, and set the noise threshold θ noise Control denoising strength, noise threshold θ noise It is set according to the noise distribution characteristics of the portrait image and the requirements of the portrait area;

[0098] S13. Perform color equalization on the denoised portrait image, calculate the overall brightness distribution histogram of the portrait image, and map the brightness values ​​of the red channel, green channel, and blue channel to a target interval based on a histogram matching algorithm. The target interval is defined as [L min ,L max ], where L min is the minimum brightness value, L max is the maximum brightness value;

[0099] S14. Use the illumination enhancement algorithm to process the illumination of the equalized portrait image, optimize the contrast and layering of the portrait image through the dynamic range adjustment method, and set the dynamic range gain value α gain Control the brightness change of the portrait image, dynamic range gain value α gainThe size of depends on the degree of uneven light distribution in the portrait image, so that the lighting effect of the portrait area reaches the expected standard;

[0100] S15. After the portrait image is collected and processed, the pre-processed portrait image data is output:

[0101]

[0102] Among them, I out The (x, y) table represents the pixel value of the portrait image at position (x, y) after preprocessing. raw (x, y) represents the pixel value of the original portrait image at position (x, y), α gain Represents the dynamic range gain value, which is used to control the overall brightness enhancement of the portrait image, θ noise represents the denoising threshold, which determines the denoising strength, ψ k (x, y) represents the k-th layer multi-scale decomposition noise function, which is used to process noise of different frequencies and scales. There are N layers in total.

[0103] In this implementation, S2 includes the following steps:

[0104] S21. Use the multi-scale feature pyramid model Φ(x, y, s) to detect facial features on the preprocessed portrait image, where (x, y) is the portrait image coordinates, s is the scale parameter, and the gradient features of the portrait image at different scales are calculated. Construct a characteristic response function:

[0105]

[0106] Among them, det represents the matrix determinant, trace represents the trace of the matrix, κ s is the adjustment coefficient under scale s, which is used to adjust the detection sensitivity; according to the characteristic response function R s The local maximum point of (x,y) identifies and frames the main area of ​​the face Ω face ;

[0107] S22. In the face detection area Ω face In the image, the key point detection algorithm is used to extract the initial position point set of the facial features {P i,j}, where P i,j =(x i,j ,y i,j ) represents the coordinates of the jth feature point in the i-th facial feature area, i is the facial feature area number, j is the number of the feature point in the face detection area, and the facial feature contour curve is fitted by the least squares method:

[0108]

[0109] Among them, C i (t) is the contour curve of the i-th facial feature, β i,k is the control point parameter of the ith facial feature, is the kth Bernstein basis function, n is the order of the curve;

[0110] S23. Using the region growing algorithm to take the key point P i,j The facial features detected initially are segmented into fine segments as seed points to construct the facial contour model Ω i , according to the similarity function:

[0111]

[0112] Among them, μ i and σ i are the average pixel value and standard deviation of the i-th facial feature area, ∥·∥ represents the Euclidean distance; when the similarity S i (x,y) is greater than the threshold θ i When , the pixel point (x, y) is classified into the facial contour model Ω i ;

[0113] S24. Extracting characteristic parameters of each facial feature area, including:

[0114] The eye contour curvature κ is extracted by calculating the first and second derivatives of the curve C1(t) e (t):

[0116]

[0118] Where C′1(t) and C″1(t) are the first-order and second-order derivatives of the eye contour curve, respectively, × represents the vector cross product, and ∥·∥ is the norm of the vector, which is used to describe the curvature of the eye contour;

[0119] By converting the lip region Ω3 into the HSV color space, the hue saturation S of the lips is extracted lips :

[0120]

[0121] Among them, N3 is the total number of pixels in the lip area, and S(x,y) is the saturation value of the pixel, which is used to evaluate the color vividness of the lips;

[0122] Extracting the nose's shadow depth D via shape-from-lighting method n , estimate the depth map D(x,y) of the nose area Ω2:

[0123]

[0124] Where N2 is the total number of pixels in the nose area, and D(x,y) is the depth value of the pixel, which is used to describe the three-dimensional sense and shadow effect of the nose;

[0125] S25. Skin area Ω s Extract feature parameters, including:

[0126] The local binary pattern algorithm is used to extract the texture distribution of the skin. s (x,y):

[0127]

[0128] Among them, I c is the center pixel value, I p is the pth neighborhood pixel value, s(x) is the sign function, defined as:

[0129]

[0130] P is the number of neighborhood pixels, T s (x,y) is used to describe the local pattern of skin texture;

[0131] Extract skin color distribution parameters, including mean μ s and variance

[0132]

[0133] Among them, N s is the total number of pixels in the skin area, C(x,y) is the chromaticity value of the pixel μ s and Used to describe the overall distribution characteristics of skin color;

[0134] S26. Output facial features area {Ω i} and skin areaΩ s The segmentation results and feature parameter set of:

[0135]

[0136] In this implementation, S3 includes the following steps:

[0137] S31. According to the user's preset style or the style template provided by the system, select the target style F and define multiple adjustment items {A j}, each adjustment item A j A weighted combination of a single core feature parameter or a set of multiple feature parameters to achieve a specific style effect;

[0138] S32. Set each adjustment item A j The feature parameter weight {w j,k}, according to the influence of feature parameters on style and user target style requirements, by solving the feature parameter weight {w j,k}:

[0139]

[0140] Among them, R(F,A j ) represents the target style F and the adjustment item A j The style similarity response function, M is the total number of adjustment items, K is the adjustment item A j The number of internal feature parameters, λ is the weight regularization coefficient, which is used to balance the style similarity and the uniformity of weight distribution. This optimization model makes the weight allocation more accurate and achieves a feature combination that meets the expected style.

[0141] S33. Constructing a weighted combination function G of adjustment items j (x), where x represents the target feature value adjusted by the user, and the weighted combination function G j (x) is defined as follows:

[0142]

[0143] Among them, P k (x) and Q k (x) are the basic response functions of the kth feature parameters, which are used for nonlinear feature mapping of different styles; α k,j , β k,j , γ k,j is the weighted combination coefficient, used to adjust the response function P k (x) and Q k (x) to meet the target style requirements; γ k,j The item realizes the interactive linkage of feature parameters;

[0144] S34. Initialize the weighted combination coefficient α of each adjustment item j , and set its initial value according to the target style:

[0145]

[0146] Among them, H(F,x) represents the influence weight function of the target style F in the feature space Ω, which is used to balance the style requirements and the local response of the adjustment item; the numerator is the adjustment item A j The global mapping integral with style F makes the adjustment item obtain the ideal initialization effect under the style requirements; the denominator makes the adjustment item A j Match the user's preset style effect during initialization.

[0147] In this implementation, S4 includes the following steps:

[0148] S41. When the user performs an adjustment operation, the system obtains the position x of the current adjustment item j And according to this position, find the corresponding weight vector w in the multi-feature linkage weight matrix W j ={w j,k}, used to calculate the adjustment response of the associated core feature parameter;

[0149] S42. Constructing multi-feature linkage optimization objective function L(A j ), the multi-feature linkage optimization objective function is defined as the current adjustment item A j The sum of the responses combined with multiple feature parameters and in line with the user's adjustment goals:

[0150]

[0151] Among them, R j,k , δ j,k ,θ j,k They represent the weighting coefficients in the weight vector, which are used to adjust the influence of each basic response function; k (x j ) and Q k (x j ) is the response function of the kth characteristic parameter, which is used to control its change effect at a specific adjustment position;

[0152] S43. By calculating and optimizing the objective function L(A j ) to obtain the optimal adjustment value of multi-feature linkage The adjusted portrait image effect achieves optimal consistency under the linkage of core feature parameters:

[0153]

[0154] Among them, β is an adjustment parameter, which is used to control the influence of the first-order and second-order derivatives on the smoothness of the objective function.

[0155] In this implementation, S5 includes the following steps:

[0156] S51. After the user completes the adjustment operation, the system obtains the current adjustment item state vector X={x j}, and adjust the characteristic parameters of position X to combine the results As the user's preference value;

[0157] S52. When the user makes a custom adjustment, the system directly calls and records the previous parameter value set X prev , so that users can restore to the previous state after completing the custom adjustment. If the user chooses to obtain parameters from the cloud or other channels, the system reads the parameter vector X from the specified data source ext ={xj,ext}, and update the user preference value according to the following formula:

[0158] P update =α·X prev +(1-α)·X ext ;

[0159] Among them, α is the user preference fusion coefficient, and its value range is 0≤α≤1; P update Represents the fused user preference value;

[0160] S53. The system will finally determine the user preference state P final Stored to local database.

[0161] Embodiment 1:

[0162] In August 2024, a well-known social media company needs to launch a new function in its user portrait beautification application to realize intelligent, multi-feature linkage portrait image processing. The project requirements include improving image processing efficiency, maintaining the natural effect of multi-feature adjustment, and the ability to record and store user preferences. In the past three months, the main problems reported by users have focused on inconsistent image effects after adjustment, cumbersome manual operations, and lack of preference saving mechanism. Therefore, the company decided to apply the method of the present invention to optimize the user experience through global linkage multi-feature parameter adjustment.

[0163] In an application test, the test engineer selected an everyday selfie image uploaded by a user as a sample. The image was taken under natural light, but due to the strong light, the user's face had uneven shadows and highlights, resulting in uneven skin color. The image resolution was 2048x1536 pixels and had been denoised and color balanced. The test engineer's goal was to adjust the user's facial brightness, skin color saturation, contrast, and facial contours to produce a natural and harmonious image effect.

[0164] The system first automatically detects the face area in the image and extracts the key feature points of the facial features and skin area. For example, the system identifies the coordinates of the feature points of the user's eyes, nose, lips, and cheeks. The key points of the eyes are (523, 789) and (688, 790), and the key points of the nose are (605, 910). After identifying these feature areas, the system loads the image into the multi-feature linkage adjustment module, and the user selects the preset "natural and soft" style.

[0165] The user first adjusts the overall image effect through the brightness slider. From weak to strong, the slider range is set from 0% to 100%, and each slide triggers the system to calculate the global linkage adjustment value of the current feature parameter. For example, when the slider slides from 0% to 50%, the system gradually increases the brightness, and at the same time calculates the linkage adjustment value of skin color saturation to +4%, contrast reduction by 2%, and shadow softening by 3%. When the user stops the slider at 70%, the system records all the linkage values ​​of the feature parameters in this state:

[0166]

[0167] After the slider stops, the user can further fine-tune the basic result of the system adjustment. For example, based on 70% brightness, the user manually increases the shadow softening parameter to +10%. At this time, the system automatically links other parameters again, adjusts the skin brightness by 3%, and reduces the contrast by 1%. This fine-tuning process ensures that the final effect is more in line with the user's personalized needs.

[0168] After the user completes the basic adjustment through the slider and fine-tuning, the user customizes the facial contour and optimizes the shadow effect of the right cheek to highlight the contour. The system identifies the right face area through the regional segmentation algorithm and dynamically adjusts the relevant parameters, such as reducing the brightness by 2% and enhancing the contrast by 3%. At the same time, the user chooses to call the previously stored "artistic retro" style parameters from the cloud. The system merges the user's current adjustment results with the cloud parameters, and the fusion coefficient is set to α=0.6, and finally obtains the parameter combination after global linkage optimization:

[0169] P 融合后 =0.6·X 当前 +0.4·X 云端 .

[0170] In order to verify the actual effect of the method of the present invention, the test team processed 20 sample images using traditional manual adjustment and the method of the present invention, and recorded the processing time, number of user adjustments and image evaluation scores:

[0171] Table 1 Comparison results of image processing methods

[0172]

[0173]

[0174] This embodiment solves the problems of uncoordinated multi-parameter adjustment and complicated operation in traditional methods by introducing a sliding bar-type linkage adjustment method from weak to strong. The sliding bar provides a more intuitive adjustment path. Combined with the linkage optimization algorithm, the user can obtain a preliminary optimization effect after the sliding bar stops, and further fine-tune on this basis to achieve personalized adjustment. Data show that the method of the present invention significantly shortens the processing time, reduces the complexity of user adjustment, and significantly improves the overall natural coordination of the image and user satisfaction.

[0175] This embodiment shows that through the linkage adjustment of multi-feature parameters of the present invention, portrait image processing becomes more efficient and easy to use. Users do not need to adjust each parameter one by one to achieve synchronous linkage optimization of multiple features. The system makes the adjustment more natural through intelligent weight matrix calculation to avoid conflicts between different parameter adjustments in traditional methods. The present invention shows excellent coordination in the adjustment of multi-feature parameters such as brightness, shadow softening, and skin color saturation. The final results prove that the method of the present invention greatly improves the efficiency and quality of image processing, especially in the image processing requirements that require high precision and natural effects, and has significant practical value.

[0176] The present invention utilizes a multi-feature weight matrix and an optimization objective function to ensure that multiple features can be synchronously linked when adjusting a single parameter. Different from the traditional method of adjusting parameters individually, the global optimization algorithm of the present invention calculates the optimal adjustment values ​​of other related features through the multi-feature linkage matrix while the user adjusts a feature parameter, thereby ensuring the overall harmony and beauty of the image. Through the multi-scale gradient feature response and parameter weight optimization model, not only the adjustment efficiency is improved, but also the problems of skin color distortion and contrast deviation caused by brightness adjustment are solved, thereby enhancing the uniformity and naturalness of the adjustment effect.

[0177] The present invention adopts a dynamic weighted combination function to perform weighted combination of multi-feature parameters through a preset style template and a personalized adjustment target selected by the user. For different style requirements, the system automatically calls the corresponding multi-feature parameter response function, and adjusts the weighted combination function in real time through a weight optimization algorithm to ensure that the effect of multi-feature linkage meets user expectations. By introducing a dynamic adjustment mechanism of weighted combination, the present invention does not require users to adjust parameters one by one when achieving a specific style effect. Users only need to select the target style to generate an image that meets expectations, which significantly reduces the complexity of operation and improves the convenience of user experience and the accuracy of style matching.

[0178] The present invention automatically records each adjustment result of the user as a preference state through a preference locking and parameter storage mechanism, and can call external parameters through cloud or local data to achieve highly personalized image processing. After the user completes the customized adjustment, the system can directly lock and record the adjustment state as the default preference value for subsequent processing. If the user chooses to obtain parameters from the cloud, the system will integrate the user's current operation with the external parameter data, so that each image adjustment operation can retain the user's specific style and dynamically adapt to new parameter update requirements, thereby improving the flexibility of operation, realizing efficient management and personalized calling of user preference data, and providing accurate data support for subsequent adjustments.

[0179] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A portrait image processing method based on global linkage adjustment of multiple feature parameters, characterized in that: The steps include: S1. Acquire a portrait image through an image acquisition module and perform preliminary processing on the portrait image; S2. segmenting the facial features and skin areas in the preliminarily processed portrait image using a face detection and feature extraction algorithm, and extracting feature parameters of each feature area; S3. Based on the user's preset style or the style template provided by the system, multiple adjustment items are initialized, each adjustment item corresponds to a single core feature parameter or a weighted combination of a set of multiple feature parameters, and the initial weight of each feature parameter is assigned according to its importance in the image effect; S4. When the user performs an adjustment, the system calculates the optimal adjustment value of the associated core feature parameter or multi-feature parameter combination based on the adjustment position and the multi-feature linkage weight matrix; S5. After the user completes the adjustment, the system locks the current adjustment status as the user's preferred value. If the user makes a custom adjustment, the system directly records the previous parameter value or obtains the parameter from the cloud or other channels; S6. When the user adjusts the core feature parameters, the system allows the user to select a single core feature or adjust it through a one-click preset template; S7. After the user confirms the final adjustment result, the system generates a portrait image that meets the user's expectations, and stores all adjustment parameters, adjustment positions, optimization paths and user preference states in the database for subsequent calls and iterations.

2. The portrait image processing method based on global linkage adjustment of multiple feature parameters according to claim 1, characterized in that: The S1 comprises the following steps: S11. Obtaining a portrait image through an image acquisition module; S12. De-noise the collected portrait image, use a multi-scale decomposition algorithm to separate the noise in different areas of the portrait image, and set the noise threshold θ noise Control denoising strength, noise threshold θ noise It is set according to the noise distribution characteristics of the portrait image and the requirements of the portrait area; S13. Perform color equalization on the denoised portrait image, calculate the overall brightness distribution histogram of the portrait image, and map the brightness values ​​of the red channel, green channel, and blue channel to a target interval based on a histogram matching algorithm. The target interval is defined as [L min ,L max ], where L min is the minimum brightness value, L max is the maximum brightness value; S14. Use the illumination enhancement algorithm to process the illumination of the equalized portrait image, optimize the contrast and layering of the portrait image through the dynamic range adjustment method, and set the dynamic range gain value α gain Control the brightness change of the portrait image, dynamic range gain value α gain The size of depends on the degree of uneven light distribution in the portrait image, so that the lighting effect of the portrait area reaches the expected standard; S15. After the portrait image is collected and processed, the pre-processed portrait image data is output: Among them, I out The (x, y) table represents the pixel value of the portrait image at position (x, y) after preprocessing. raw (x, y) represents the pixel value of the original portrait image at position (x, y), α gain Represents the dynamic range gain value, which is used to control the overall brightness enhancement of the portrait image, θ noise represents the denoising threshold, which determines the denoising strength, ψ k (x, y) represents the k-th layer multi-scale decomposition noise function, which is used to process noise of different frequencies and scales. There are N layers in total.

3. The portrait image processing method based on global linkage adjustment of multiple feature parameters according to claim 1, characterized in that: The S2 comprises the following steps: S21. Use the multi-scale feature pyramid model Φ(x, y, s) to detect facial features on the preprocessed portrait image, where (x, y) is the portrait image coordinates, s is the scale parameter, and the gradient features of the portrait image at different scales are calculated. Construct a characteristic response function: Among them, det represents the matrix determinant, trace represents the trace of the matrix, κ s is the adjustment coefficient under scale s, which is used to adjust the detection sensitivity; according to the characteristic response function R s The local maximum point of (x,y) identifies and frames the main area of ​​the face Ω face ; S22. In the face detection area Ω face In the image, the key point detection algorithm is used to extract the initial position point set of the facial features {P i,j }, where P i,j =(x i,j ,y i,j ) represents the coordinates of the jth feature point in the i-th facial feature area, i is the facial feature area number, j is the number of the feature point in the face detection area, and the facial feature contour curve is fitted by the least squares method: Among them, C i (t) is the contour curve of the i-th facial feature, β i,k is the control point parameter of the i-th facial feature, is the kth Bernstein basis function, n is the order of the curve; S23. Using the region growing algorithm to take the key point P i,j The facial features detected initially are segmented into fine segments as seed points to construct the facial contour model Ω i , according to the similarity function: Among them, μ i and σ i are the average pixel value and standard deviation of the i-th facial feature area, ∥·∥ represents the Euclidean distance; when the similarity S i (x,y) is greater than the threshold θ i When , the pixel point (x, y) is classified into the facial contour model Ω i ; S24. Extracting characteristic parameters of each facial feature area, including: The eye contour curvature κ is extracted by calculating the first and second derivatives of the curve C1(t) e (t): Where C′1(t) and C″1(t) are the first-order and second-order derivatives of the eye contour curve, respectively, × represents the vector cross product, and ∥·∥ is the norm of the vector, which is used to describe the curvature of the eye contour; By converting the lip region Ω3 into the HSV color space, the hue saturation S of the lips is extracted lips : Among them, N3 is the total number of pixels in the lip area, and S(x,y) is the saturation value of the pixel, which is used to evaluate the color vividness of the lips; Extracting the nose's shadow depth D via shape-from-lighting method n , estimate the depth map D(x,y) of the nose area Ω2: Where N2 is the total number of pixels in the nose area, and D(x,y) is the depth value of the pixel, which is used to describe the three-dimensional sense and shadow effect of the nose; S25. Skin area Ω s Extract feature parameters, including: The local binary pattern algorithm is used to extract the texture distribution of the skin. s (x,y): Among them, I c is the center pixel value, I p is the pth neighborhood pixel value, s(x) is the sign function, defined as: P is the number of neighborhood pixels, T s (x,y) is used to describe the local pattern of skin texture; Extract skin color distribution parameters, including mean μ s and variance Among them, N s is the total number of pixels in the skin area, C(x,y) is the chromaticity value of the pixel μ s and Used to describe the overall distribution characteristics of skin color; S26. Output facial features area {Ω i } and skin areaΩ s The segmentation results and feature parameter set of:

4. The portrait image processing method based on global linkage adjustment of multiple feature parameters according to claim 1, characterized in that: The S3 comprises the following steps: S31. According to the user's preset style or the style template provided by the system, select the target style F and define multiple adjustment items {A j }, each adjustment item A j A weighted combination of a single core feature parameter or a set of multiple feature parameters to achieve a specific style effect; S32. Set each adjustment item A j The feature parameter weight {w j,k }, according to the influence of feature parameters on style and user target style requirements, by solving the feature parameter weight {w j,k }: Among them, R(F,A j ) represents the target style F and the adjustment item A j The style similarity response function, M is the total number of adjustment items, K is the adjustment item A j The number of internal feature parameters, λ is the weight regularization coefficient, which is used to balance the style similarity and the uniformity of weight distribution. This optimization model makes the weight allocation more accurate and achieves a feature combination that meets the expected style. S33. Constructing a weighted combination function G of adjustment items j (x), where x represents the target feature value adjusted by the user, and the weighted combination function G j (x) is defined as follows: Among them, P k (x) and Q k (x) are the basic response functions of the kth feature parameters, which are used for nonlinear feature mapping of different styles; α k,j , β k,j , γ k,j is the weighted combination coefficient, used to adjust the response function P k (x) and Q k (x) to meet the target style requirements; γ k,j The item realizes the interactive linkage of feature parameters; S34. Initialize the weighted combination coefficient α of each adjustment item j , and set its initial value according to the target style: Among them, H(F,x) represents the influence weight function of the target style F in the feature space Ω, which is used to balance the style requirements and the local response of the adjustment item; the numerator is the adjustment item A j The global mapping integral with style F makes the adjustment item obtain the ideal initialization effect under the style requirements; the denominator makes the adjustment item A j Match the user's preset style effect during initialization.

5. The portrait image processing method based on global linkage adjustment of multiple feature parameters according to claim 1, characterized in that: The S4 comprises the following steps: S41. When the user performs an adjustment operation, the system obtains the position x of the current adjustment item j And according to this position, find the corresponding weight vector w in the multi-feature linkage weight matrix W j ={w j,k }, used to calculate the adjustment response of the associated core feature parameter; S42. Constructing multi-feature linkage optimization objective function L(A j ), the multi-feature linkage optimization objective function is defined as the current adjustment item A j The sum of the responses combined with multiple feature parameters and in line with the user's adjustment goals: Among them, R j,k ,δ j,k ,θ j,k They represent the weighting coefficients in the weight vector, which are used to adjust the influence of each basic response function; k (x j ) and Q k (x j ) is the response function of the kth characteristic parameter, which is used to control its change effect at a specific adjustment position; S43. By calculating and optimizing the objective function L(A j ) to obtain the optimal adjustment value of multi-feature linkage The adjusted portrait image effect achieves optimal consistency under the linkage of core feature parameters: Among them, β is an adjustment parameter, which is used to control the influence of the first-order and second-order derivatives on the smoothness of the objective function.

6. The portrait image processing method based on global linkage adjustment of multiple feature parameters according to claim 1, characterized in that: The S5 comprises the following steps: S51. After the user completes the adjustment operation, the system obtains the current adjustment item state vector X={x j }, and adjust the characteristic parameters of position X to combine the results As the user's preference value; S52. When the user makes a custom adjustment, the system directly calls and records the previous parameter value set X prev , so that users can restore to the previous state after completing the custom adjustment. If the user chooses to obtain parameters from the cloud or other channels, the system reads the parameter vector X from the specified data source ext ={x j,ext }, and update the user preference value according to the following formula: P update =α·X prev +(1-a)·X ext ; Among them, α is the user preference fusion coefficient, and its value range is 0≤α≤1; P update Represents the fused user preference value; S53. The system will finally determine the user preference state P final Stored to local database.

Citation Information

Patent Citations

  • Image processing method and device, storage medium and terminal

    CN112785488A

  • Face feature adjustment method and device, electronic equipment and readable storage medium

    CN114581995A

  • Dynamic beauty image parameter adjustment method based on deep learning algorithm

    CN118298489A