Image processing method and device, electronic equipment and storage medium
By determining the position and distance of specific facial key points in a face image, the problem of occlusion affecting the determination of the region of interest is solved, and accurate localization of the face region that is not occluded is achieved, thus improving the image processing effect.
Patent Information
- Application Number
- CN202411255285.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2026-03-10
AI Technical Summary
When a face is obscured by an object, existing technologies struggle to accurately determine the region of interest, resulting in poor performance of automatic white balance and automatic exposure control algorithms.
By acquiring specific first facial landmarks and two second facial landmarks in a face image, and based on the position and distance of these landmarks, the position and size information of the region of interest are determined, thereby identifying the face region that is not occluded by any occluder.
It enables simple and effective identification of the unobstructed facial area when the face is occluded, improving the performance of automatic white balance and automatic exposure control.
Smart Images

Figure CN121640533A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of image processing technology, and in particular to an image processing method, apparatus, electronic device and storage medium. Background Technology
[0002] Portrait photography is an extremely important form of photography. Currently, the common approach adopted by mobile imaging platforms for portrait photography scenarios is to inform the AWB (Auto White Balance), AEC (Auto Exposure Control), and AF (Auto Focus) algorithms (i.e., the 3A algorithms) about the location of the face in the image in the form of ROI (region of interest), so as to control the brightness, color, and focus of the face.
[0003] However, when there are occlusions in the face (such as masks, face coverings, etc.), the brightness and color of the occlusions differ greatly from the brightness and color of the facial skin area, which will affect the AWB algorithm and AEC algorithm, resulting in poor processing results. Therefore, in scenarios where the face is occluded, it is extremely important to determine the ROI. Summary of the Invention
[0004] To overcome the problems existing in related technologies, this disclosure provides an image processing method, apparatus, electronic device, and storage medium.
[0005] According to a first aspect of the present disclosure, an image processing method is provided, the method comprising:
[0006] Acquire a face image, wherein the face image includes multiple facial key points;
[0007] When the face in the face image is obscured by an occluder, a first facial key point and two second facial key points are determined in the face image. The first facial key point is a facial key point on the central axis of the face, and the two second facial key points are two facial key points on the face that are symmetrical about the central axis of the face.
[0008] Based on the position of the first facial key point in the face, the position information of the region of interest to be determined in the face image is determined;
[0009] Based on the distance between the two second facial key points, the size information of the region of interest to be determined in the face image is determined;
[0010] Based on the size information and the location information, a target region of interest is determined in the face image, and the target region of interest includes the face area in the face image that is not obscured by any occluder.
[0011] In some embodiments, the size information of the region of interest to be determined includes the width and length of the region of interest to be determined, and determining the size information of the region of interest to be determined in the face image based on the distance between the two second facial key points includes:
[0012] Based on the first difference between the horizontal coordinates of the two second facial key points in the first coordinate system, the width of the region of interest to be determined is determined, wherein the first coordinate system is a coordinate system established based on the facial image;
[0013] The length of the region of interest to be determined is determined based on the second difference between the ordinates of the two second facial key points in the first coordinate system.
[0014] In some embodiments, determining the width of the region of interest to be determined based on the first difference between the horizontal coordinates of the two second facial key points in the first coordinate system includes:
[0015] When the first difference is greater than or equal to the first threshold, the first difference is determined as the width; or,
[0016] When the first difference is less than the first threshold, the first threshold is determined as the width;
[0017] The first threshold is determined based on the distance between the two second facial key points and a first preset ratio.
[0018] In some embodiments, determining the length of the region of interest to be determined based on the second difference between the ordinates of the two second facial key points in the first coordinate system includes:
[0019] When the second difference is greater than or equal to the second threshold, the second difference is determined as the length; or,
[0020] When the second difference is less than the second threshold, the second threshold is determined as the length;
[0021] The second threshold is determined based on the distance between two second facial key points and a second preset ratio.
[0022] In some embodiments, the method further includes:
[0023] Based on preset reduction parameters, the width and length are adjusted respectively to obtain the adjusted width and adjusted length.
[0024] In some embodiments, the location information of the region of interest to be determined includes the center point of the region of interest to be determined, and determining the location information of the region of interest to be determined in the face image based on the position of the first facial key point in the face includes:
[0025] Obtain the movement parameters corresponding to the first facial key point, and the movement parameters are used to adjust the position of the first facial key point in the face;
[0026] Based on the movement parameters, the position of the first facial key point in the face is adjusted, and the adjusted position is determined as the center point of the region of interest to be determined.
[0027] In some embodiments, adjusting the position of the first facial key point in the face based on the movement parameters includes:
[0028] Based on the midpoint of the first facial key point and the two second facial key points, a vertically upward vector is determined in the second coordinate system, which is a coordinate system established based on the face.
[0029] Based on the movement parameters and the vector, the position of the first facial key point in the face is adjusted.
[0030] In some embodiments, determining the target region of interest in the face image based on the size information and the location information includes:
[0031] When the face in the face image is rotated, rotation parameters are obtained. The rotation parameters are used to characterize the degree of rotation of the face in a first coordinate system, which is a coordinate system established based on the face image.
[0032] Based on the rotation parameters, the size information and the position information are adjusted respectively to obtain the adjusted size information and the adjusted position information;
[0033] Based on the adjusted size information and the adjusted position information, the target region of interest is determined.
[0034] In some embodiments, obtaining the rotation parameters includes:
[0035] Obtain the third difference between the horizontal coordinates of the two rotated second facial key points in the first coordinate system, and the fourth difference between their vertical coordinates;
[0036] The rotation parameters are determined based on the third and fourth differences.
[0037] In some embodiments, determining the rotation parameters based on the third difference and the fourth difference includes:
[0038] Determine the ratio between the third difference and the fourth difference;
[0039] When the ratio is less than or equal to a preset threshold, the ratio is determined as the rotation parameter; or,
[0040] When the ratio is greater than the preset threshold, the reciprocal of the ratio is determined as the rotation parameter.
[0041] In some embodiments, adjusting the size information based on the rotation parameters to obtain adjusted size information includes:
[0042] Based on the rotation parameters and the maximum shrinkage parameter, a target shrinkage parameter is determined, wherein the maximum shrinkage parameter is used to characterize the degree of shrinkage of the size information when the face is rotated;
[0043] Based on the target reduction parameters, the size information is adjusted to obtain the adjusted size information.
[0044] In some embodiments, adjusting the position information based on the rotation parameters to obtain adjusted position information includes:
[0045] Based on the rotation parameters and the maximum movement parameters, the target movement parameters are determined, wherein the maximum movement parameters are used to characterize the degree of movement of position information when the face is rotated;
[0046] Based on the target movement parameters, the position information is adjusted to obtain the adjusted position information.
[0047] In some embodiments, the method further includes:
[0048] Identify multiple third-party facial key points in the face image;
[0049] Obtain occlusion information for each third facial key point, wherein the occlusion information is used to characterize whether the location of the third facial key point is occluded;
[0050] Based on the occlusion information of each third facial key point, it is determined whether the face in the face image is occluded by an occluder.
[0051] According to a second aspect of the present disclosure, an image processing apparatus is provided, the apparatus comprising:
[0052] The image acquisition module is configured to acquire a face image, which includes multiple facial key points;
[0053] The key point determination module is configured to determine a first facial key point and two second facial key points in the facial image when the face in the facial image is occluded by an occluder. The first facial key point is a facial key point on the central axis of the face, and the two second facial key points are two facial key points on the face that are symmetrical about the central axis of the face.
[0054] The location determination module is configured to determine the location information of the region of interest to be determined in the face image based on the position of the first facial key point in the face;
[0055] The size determination module is configured to determine the size information of the region of interest to be determined in the face image based on the distance between the two second facial key points;
[0056] The region of interest determination module is configured to determine a target region of interest in the face image based on the size information and the location information, wherein the target region of interest includes the face area in the face image that is not obscured by any occluder.
[0057] In some embodiments, the size information of the region of interest to be determined includes the width and length of the region of interest to be determined, and the size determination module is configured to:
[0058] Based on the first difference between the horizontal coordinates of the two second facial key points in the first coordinate system, the width of the region of interest to be determined is determined, wherein the first coordinate system is a coordinate system established based on the facial image;
[0059] The length of the region of interest to be determined is determined based on the second difference between the ordinates of the two second facial key points in the first coordinate system.
[0060] In some embodiments, the size determination module is configured to:
[0061] When the first difference is greater than or equal to the first threshold, the first difference is determined as the width; or,
[0062] When the first difference is less than the first threshold, the first threshold is determined as the width;
[0063] The first threshold is determined based on the distance between the two second facial key points and a first preset ratio.
[0064] In some embodiments, the size determination module is configured to:
[0065] When the second difference is greater than or equal to the second threshold, the second difference is determined as the length; or,
[0066] When the second difference is less than the second threshold, the second threshold is determined as the length;
[0067] The second threshold is determined based on the distance between two second facial key points and a second preset ratio.
[0068] In some embodiments, the apparatus further includes:
[0069] The adjustment module is configured to adjust the width and length based on preset shrinkage parameters to obtain the adjusted width and adjusted length.
[0070] In some embodiments, the location information of the region of interest to be determined includes the center point of the region of interest to be determined, and the location determination module is configured to:
[0071] Obtain the movement parameters corresponding to the first facial key point, and the movement parameters are used to adjust the position of the first facial key point in the face;
[0072] Based on the movement parameters, the position of the first facial key point in the face is adjusted, and the adjusted position is determined as the center point of the region of interest to be determined.
[0073] In some embodiments, the region of interest determination module is configured to:
[0074] Based on the midpoint of the first facial key point and the two second facial key points, a vertically upward vector is determined in the second coordinate system, which is a coordinate system established based on the face.
[0075] Based on the movement parameters and the vector, the position of the first facial key point in the face is adjusted.
[0076] In some embodiments, the region of interest determination module is configured to:
[0077] When the face in the face image is rotated, rotation parameters are obtained. The rotation parameters are used to characterize the degree of rotation of the face in a first coordinate system, which is a coordinate system established based on the face image.
[0078] Based on the rotation parameters, the size information and the position information are adjusted respectively to obtain the adjusted size information and the adjusted position information;
[0079] Based on the adjusted size information and the adjusted position information, the target region of interest is determined.
[0080] In some embodiments, the region of interest determination module is configured to:
[0081] Obtain the third difference between the horizontal coordinates of the two rotated second facial key points in the first coordinate system, and the fourth difference between their vertical coordinates;
[0082] The rotation parameters are determined based on the third and fourth differences.
[0083] In some embodiments, the region of interest determination module is configured to:
[0084] Determine the ratio between the third difference and the fourth difference;
[0085] When the ratio is less than or equal to a preset threshold, the ratio is determined as the rotation parameter; or,
[0086] When the ratio is greater than the preset threshold, the reciprocal of the ratio is determined as the rotation parameter.
[0087] In some embodiments, the region of interest determination module is configured to:
[0088] Based on the rotation parameters and the maximum shrinkage parameter, a target shrinkage parameter is determined, wherein the maximum shrinkage parameter is used to characterize the degree of shrinkage of the size information when the face is rotated;
[0089] Based on the target reduction parameters, the size information is adjusted to obtain the adjusted size information.
[0090] In some embodiments, the region of interest determination module is configured to:
[0091] Based on the rotation parameters and the maximum movement parameters, the target movement parameters are determined, wherein the maximum movement parameters are used to characterize the degree of movement of position information when the face is rotated;
[0092] Based on the target movement parameters, the position information is adjusted to obtain the adjusted position information.
[0093] In some embodiments, the apparatus further includes:
[0094] The key point determination module is also configured to determine multiple third facial key points in the face image;
[0095] The occlusion information acquisition module is configured to acquire occlusion information for each third facial key point, wherein the occlusion information is used to characterize whether the location of the third facial key point is occluded;
[0096] The occlusion determination module is configured to determine whether a face in the face image is occluded by an occluder based on the occlusion information of each third facial key point.
[0097] According to a third aspect of the present disclosure, an electronic device is provided, comprising:
[0098] processor;
[0099] Memory used to store processor-executable instructions;
[0100] The processor is configured to perform the image processing method as described in the first aspect of the embodiments of this disclosure.
[0101] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the image processing method as described in the first aspect of the present disclosure.
[0102] The method described above, as disclosed in this invention, has the following beneficial effects:
[0103] The method provided in this disclosure, when a face in a face image is occluded by an occluder, obtains a specific first facial key point and two second facial key points in the face image. Based on the position of the first facial key point in the face, the position information is determined, and based on the distance between the two second facial key points, the size information is determined. Thus, based on the size information and the position information, the target region of interest in the face image is determined. This achieves the determination of the face region in the face image that is not occluded by an occluder. Moreover, the determination by facial key points does not require the introduction of additional algorithms, and the determination method is simple.
[0104] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0105] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0106] Figure 1 This is a schematic diagram of an ROI according to an exemplary embodiment;
[0107] Figure 2 This is a flowchart illustrating an image processing method according to an exemplary embodiment;
[0108] Figure 3This is a flowchart illustrating an image processing method according to an exemplary embodiment;
[0109] Figure 4 This is a flowchart illustrating an image processing method according to an exemplary embodiment;
[0110] Figure 5 This is a schematic diagram of a human face image according to an exemplary embodiment;
[0111] Figure 6 This is a block diagram illustrating an image processing apparatus according to an exemplary embodiment;
[0112] Figure 7 This is a block diagram of an electronic device according to an exemplary embodiment. Detailed Implementation
[0113] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.
[0114] One related technology provides a method for determining the Region of Interest (ROI): obtaining the full ROI (the entire face region) and the mask ROI (the face region obscured by occlusions), and then determining the target ROI (the unobscured face and region) based on the full ROI and mask ROI. This method requires obtaining the mask ROI first, making it relatively difficult to implement. For details, see [link to relevant documentation]. Figure 1 The diagram shown illustrates the ROI. After obtaining the full ROI and mask ROI, four candidate ROIs are identified, such as... Figure 1 The areas shown are area1, area2, area3, and area4. Taking area2 as an example, the top edge of the mask ROI is used as the bottom edge of the new ROI. The left and right edges of the full ROI are shortened accordingly to become the left and right edges of the new ROI. The top edge of the full ROI remains unchanged as the top edge of the new ROI, thus obtaining area2. The other three areas are determined in the same way. Finally, the ROI with the largest area is selected from the candidate ROIs as the final target ROI.
[0115] The method provided in this disclosure, when a face in a face image is occluded by an occluder, obtains a specific first facial key point and two second facial key points in the face image. Based on the position of the first facial key point in the face, the position information is determined, and based on the distance between the two second facial key points, the size information is determined. Thus, based on the size information and the position information, the target region of interest in the face image is determined. This achieves the determination of the face region in the face image that is not occluded by an occluder. Moreover, the determination by facial key points does not require the introduction of additional algorithms, and the determination method is simple.
[0116] The image processing method provided in this disclosure can be applied to AEC, AWB, or other scenarios that require the use of a target region of interest. Taking the AEC scenario as an example, after determining the target region of interest using the image processing method provided in this disclosure, the target region of interest is input into the AEC algorithm, so that the AEC algorithm can perform automatic exposure control based on the target region of interest.
[0117] In one example, when a user wears a mask, the mask covers a large area of the face. When the brightness of the mask and the brightness of the face differ significantly, the mask can negatively impact the image brightness. For instance, when photographing an Asian person wearing a pure black mask under normal lighting conditions, the overall brightness of the face is relatively low. The AEC algorithm will attempt to increase the brightness, resulting in overexposure of the face area, which was originally normally bright. In such scenarios, the method provided in this embodiment can be used to determine the target region of interest, allowing the AEC algorithm to process based on the target region of interest and eliminate the influence of the mask.
[0118] The method provided in this disclosure is executed by an electronic device, which may be a mobile phone, tablet computer, laptop computer, wearable device, smart home device, vehicle terminal, or other device with image processing capabilities.
[0119] Figure 2 This is a flowchart illustrating an image processing method according to an exemplary embodiment, executed by an electronic device, see [link to flowchart]. Figure 2 The method includes the following steps:
[0120] Step S201: Obtain a face image, which includes multiple facial landmarks.
[0121] The facial image includes a face with multiple facial landmarks. This facial image can be a real-time captured image from an electronic device, a historically captured image, or an image obtained from another device. For example, when the facial image is a real-time captured image, the subsequent image processing is the same as the image capture process; when the facial image is a historically captured image or an image obtained from another device, the subsequent image processing is the same as the image editing process.
[0122] Step S202: When the face in the face image is occluded by an occluder, determine the first facial key point and two second facial key points in the face image. The first facial key point is the facial key point on the central axis of the face, and the two second facial key points are two facial key points on the face that are symmetrical about the central axis of the face.
[0123] When a face in a facial image is obscured by an object, the presence of the obscuration can affect subsequent image processing. For example, if a person is wearing a mask, the mask's color can influence the judgment of skin tone during automatic white balance processing, resulting in poor white balance. Therefore, when a face in an image is obscured, it is necessary to identify the unobscured facial regions within the image to ensure that the obscuration does not negatively impact subsequent image processing.
[0124] Directly identifying occluded areas in a face image is difficult and complex. Therefore, in this embodiment, instead of directly identifying occluded areas, specific first facial landmarks and two second facial landmarks are acquired from the face image. Based on these landmarks, the unoccluded facial areas in the image are determined. The first facial landmark is located on the central axis of the face, and the two second facial landmarks are two symmetrical landmarks on the face based on the central axis, which divides the face into left and right sides. The first and second facial landmarks are pre-defined, specific landmarks; for example, the first landmark could be the center of the forehead, and the second landmarks could be the corners of the eyes.
[0125] Step S203: Based on the position of the first facial key point in the face, determine the position information of the region of interest to be determined in the face image.
[0126] The location information indicates the position of the region of interest (ROI) within the face. This location information can be the center point of the ROI or other information that indicates its location. When the location information is the center point of the ROI, since the first facial keypoint is located on the face's central axis, it can be directly designated as the center point of the ROI. Alternatively, the position of the first facial keypoint can be adjusted vertically along the face's central axis, and the adjusted position can be used as the center point of the ROI.
[0127] Step S204: Based on the distance between two second facial key points, determine the size information of the region of interest to be determined in the face image.
[0128] The distance between two second facial key points includes: the straight-line distance between the two second facial key points, the distance between the horizontal coordinates of the two second facial key points in the first coordinate system, and the distance between the vertical coordinates of the two second facial key points in the first coordinate system. The size information of the region of interest to be determined includes the width and length of the region of interest.
[0129] It should be noted that the embodiments disclosed herein are only illustrated by taking the example of executing step S203 first and then step S204. In another embodiment, step S204 can be executed first and then step S203 can be executed, or steps S203 and S204 can be executed simultaneously. The embodiments disclosed herein do not restrict the order in which the position information and size information are determined.
[0130] Step S205: Based on size information and location information, determine the target region of interest in the face image. The target region of interest includes the face area in the face image that is not occluded by any occluder.
[0131] Once the size and location information of the region of interest to be determined are known, the target region of interest can be identified.
[0132] The method provided in this disclosure, when a face in a face image is occluded by an occluder, obtains a specific first facial key point and two second facial key points in the face image. Based on the position of the first facial key point in the face, the position information is determined, and based on the distance between the two second facial key points, the size information is determined. Thus, based on the size information and the position information, the target region of interest in the face image is determined. This achieves the determination of the face region in the face image that is not occluded by an occluder. Moreover, the determination by facial key points does not require the introduction of additional algorithms, and the determination method is simple.
[0133] Figure 3This is a flowchart illustrating an image processing method according to an exemplary embodiment, executed by an electronic device, see [link to flowchart]. Figure 3 The method includes the following steps:
[0134] Step S301: Obtain a face image.
[0135] Step S302: Determine multiple third facial key points in the face image and obtain occlusion information for each third facial key point.
[0136] Among them, the third facial key points are pre-set facial key points based on the position of the occlusion. For example, the occlusion is a mask, which usually covers the lower half of the face. Therefore, multiple third facial key points can be facial key points at the tip of the nose, the chin, and the mouth.
[0137] In some embodiments, it is identified whether the locations of multiple third-face key points are occluded, thereby determining the occlusion information of each third-face key point. The occlusion information is used to characterize whether the location of the third-face key point is occluded. For example, the occlusion information is represented by 0 or 1. When the occlusion information is 0, it indicates that the location is not occluded, and when the occlusion information is 1, it indicates that the location is occluded; or, when the occlusion information is 1, it indicates that the location is not occluded, and when the occlusion information is 0, it indicates that the location is occluded. Of course, the occlusion information can also be in other forms, and this disclosure does not limit it.
[0138] Step S303: Based on the occlusion information of each third facial key point, determine whether the face in the face image is occluded by an occluder.
[0139] Since occlusion information can indicate whether a third facial landmark is occluded by an occluder, and in some cases, the face may not be occluded, but some third facial landmarks may be occluded, the occlusion information of each third facial landmark is used to determine whether the face in the face image is occluded by an occluder.
[0140] In some embodiments, the weight corresponding to each third facial key point is obtained, which is used to characterize the importance of the third facial key point in determining whether the face is occluded; based on the weight corresponding to each third facial key point and the occlusion information, the credibility is determined, which is used to characterize the possibility that the face is occluded by an occluder.
[0141] Optionally, the credibility can be obtained by weighted summation based on the weight and occlusion information corresponding to each third-party facial key point.
[0142] Optionally, when occlusion information is 0 indicating no occlusion and occlusion information is 1 indicating occlusion, the higher the confidence level, the greater the possibility that the face is occluded by an occluding object. In this case, if the confidence level is greater than the first confidence level threshold, it is determined that the face is occluded by an occluding object; if the confidence level is less than or equal to the first confidence level threshold, it is determined that the face is not occluded by an occluding object. Alternatively, when occlusion information is 1 indicating no occlusion and occlusion information is 0 indicating occlusion, the lower the confidence level, the greater the possibility that the face is occluded by an occluding object. In this case, if the confidence level is less than the second confidence level threshold, it is determined that the face is occluded by an occluding object; if the confidence level is greater than or equal to the second confidence level threshold, it is determined that the face is not occluded by an occluding object.
[0143] It should be noted that when it is determined that the face in the face image is occluded by an occluder, step S304 is executed. When it is determined that the face in the face image is not occluded by an occluder, the entire face can be directly identified as the target region of interest, and subsequent steps are not executed.
[0144] Step S304: When the face in the face image is obscured by an occlusion, determine the first facial landmark and two second facial landmarks in the face image.
[0145] The first and second facial landmarks are pre-defined, specific facial landmarks. For example, the first facial landmark could be located at the center of the forehead, and the second facial landmark could be located at the corner of the eye. Furthermore, the first facial landmark is located on the central axis of the face, and the two second facial landmarks are two symmetrical facial landmarks on the face based on the central axis, which is the line that divides the face into left and right sides.
[0146] In some embodiments, a second coordinate system is established in the face image. This second coordinate system is based on the face, and its vertical axis is parallel to the midline of the face. The position of the second coordinate system in the face image changes as the face position changes. For two second facial key points, their vertical coordinates in the second coordinate system are the same.
[0147] Step S305: Based on the position of the first facial key point in the face, determine the position information of the region of interest to be determined in the face image.
[0148] The location information of the region of interest to be determined includes the center point of the region of interest.
[0149] In some embodiments, a motion parameter corresponding to a first facial key point is obtained. This motion parameter is used to adjust the position of the first facial key point within the face. Based on the motion parameter, the position of the first facial key point within the face is adjusted, and the adjusted position is determined as the center point of the region of interest to be determined. There is a correspondence between facial key points and motion parameters. For the first facial key point, the corresponding motion parameter is used to adjust its position within the face. The value range of the motion parameter can be (-3.0f, 3.0f], where f represents a float (floating-point number) type. This means that the motion parameter can be used to move the first facial key point upwards or downwards within the face.
[0150] Optionally, based on the movement parameters, the position of the first facial keypoint within the face is adjusted, including: determining a vertically upward vector in the second coordinate system based on the first facial keypoint and the midpoint of two second facial keypoints; adjusting the position of the first facial keypoint within the face based on the movement parameters and the vector to obtain the center point, i.e., multiplying the movement parameters by the vector, and using the resulting vector to control the upward or downward movement of the first facial keypoint, thus determining the position of the moved first facial keypoint as the center point of the region of interest to be determined. Of course, besides using the midpoint of the first facial keypoint and the two second facial keypoints to determine the vector, any two facial keypoints on the face's central axis can also be used to determine the vector.
[0151] Step S306: Based on the distance between two second facial key points, determine the size information of the region of interest to be determined in the face image.
[0152] The size information of the region of interest to be determined includes the width and length of the region of interest.
[0153] In some embodiments, the line connecting two second facial key points is used as the diagonal of the region of interest to be determined. Therefore, the width of the region of interest is determined based on a first difference between the abscissas of the two second facial key points in a first coordinate system; the length of the region of interest is determined based on a second difference between the ordinates of the two second facial key points in the first coordinate system. The first coordinate system is a fixed coordinate system established based on the face image. Specifically, the first difference is the absolute value of the difference between the abscissas of the two second facial key points in the first coordinate system, and the second difference is the absolute value of the difference between the ordinates of the two second facial key points in the first coordinate system.
[0154] Optionally, the width of the region of interest to be determined is determined based on a first difference between the horizontal coordinates of two second facial key points in the first coordinate system, including: when the first difference is greater than or equal to a first threshold, the first difference is determined as the width; or, when the first difference is less than the first threshold, the first threshold is determined as the width. The first threshold is determined based on the distance between the two second facial key points and a first preset ratio. That is, based on the horizontal and vertical coordinates of the two second facial key points in the first coordinate system, the distance between the two second facial key points is determined, and the product of this distance and the first preset ratio is determined as the first threshold. The first preset ratio is a pre-set ratio, and the value range of the first preset ratio can be (0.0f, 5.0f], where f represents a float (floating-point number) type.
[0155] Optionally, the length of the region of interest to be determined is determined based on a second difference between the ordinates of two second facial key points in the first coordinate system. This includes: determining the second difference as the length when it is greater than or equal to a second threshold; or determining the second threshold as the length when it is less than the second threshold. The second threshold is determined based on the distance between the two second facial key points and a second preset ratio. That is, the distance between the two second facial key points is determined based on their abscissa and ordinate in the first coordinate system, and the product of this distance and the second preset ratio is determined as the second threshold. The second preset ratio is a pre-set ratio, and its value range can be (0.0f, 5.0f], where f represents a float (floating-point number) type.
[0156] The first preset ratio and the second preset ratio are used to control the lower limit of the side length of the region of interest to be determined. This can be understood as the vertical side length of the region of interest to be determined when the face is nearly horizontal or vertical. The larger the first preset ratio and the second preset ratio, the higher the lower limit, and the longer the vertical side when the face is horizontal or vertical. The second preset ratio can be the same as or different from the first preset ratio.
[0157] It should be noted that when the first threshold is determined as the width and / or the second threshold is determined as the length, the line connecting the two second facial key points is no longer the diagonal of the region of interest to be determined.
[0158] In some embodiments, the directly determined length and width may not meet actual needs. Therefore, based on preset scaling parameters, the width and length are adjusted respectively to obtain the adjusted width and adjusted length. The preset scaling parameters are pre-set parameters with a value range of (0.0f, 3.0f], where f represents a float (floating-point number). These preset scaling parameters control the size information of the region of interest to be determined, scaling the length and width of the region of interest proportionally. The larger the value of the preset scaling parameter, the larger the determined length and width of the region of interest.
[0159] Step S307: Based on the size information and location information, determine the target region of interest.
[0160] Once the size and location information are determined, the target region of interest in the face image can be identified.
[0161] The method provided in this disclosure determines the unobstructed facial region in a face image, and the determination method is simple because it uses facial key points and does not require additional algorithms. Furthermore, multiple preset parameters are used when determining the target region of interest, and these parameters can be flexibly adjusted as needed, facilitating optimization for various scenarios.
[0162] In some embodiments, during image capture, rotation of the electronic device or the object being captured can cause face rotation in the acquired face image. When the face in the face image rotates, the target region of interest in the face image also changes with the change in face position; that is, the target region of interest jumps when the face in the face image rotates. In this embodiment of the disclosure, the following... Figure 4 The illustrated embodiment addresses the problem of jumps occurring in the target region of interest.
[0163] Figure 4 This is a flowchart illustrating an image processing method according to an exemplary embodiment, executed by an electronic device, see [link to flowchart]. Figure 4 The method includes the following steps:
[0164] Step S401: When the face in the face image is rotated, obtain the rotation parameters.
[0165] The rotation parameter is used to characterize the degree of rotation of the face in the first coordinate system.
[0166] In some embodiments, a third difference between the abscissas of the two rotated second facial key points in the first coordinate system and a fourth difference between their ordinates are obtained; rotation parameters are determined based on the third and fourth differences. The third difference is the absolute value of the difference between the abscissas of the two rotated second facial key points in the first coordinate system, and the fourth difference is the absolute value of the difference between the ordinates of the two rotated second facial key points in the first coordinate system.
[0167] In some embodiments, the ratio between the third difference and the fourth difference is determined; when the ratio is less than or equal to a preset threshold, the ratio is determined as a rotation parameter; or, when the ratio is greater than the preset threshold, the reciprocal of the ratio is determined as a rotation parameter. The preset threshold can be 1 or other pre-set values.
[0168] Step S402: Based on the rotation parameters, adjust the size information and position information respectively to obtain the adjusted size information and adjusted position information.
[0169] The methods for obtaining size information and location information are described in steps S305 and S306 above, and will not be repeated here.
[0170] In some embodiments, a target shrinkage parameter is determined based on rotation parameters and a maximum shrinkage parameter; based on the target shrinkage parameter, the size information is adjusted to obtain the adjusted size information. The maximum shrinkage parameter characterizes the degree of shrinkage of the size information when the face is rotated. The maximum shrinkage parameter is a pre-set parameter, and its value range is [0.0f, 1.0f), where f represents a float (floating-point) type.
[0171] Optionally, when the maximum reduction parameter characterizes the maximum degree of reduction that can be achieved, for example, a maximum reduction parameter of 0.8 indicates that the maximum reduction is 0.2 times the original size. In this case, the product between the rotation parameter and the maximum reduction parameter is determined, and the difference between 1 and this product is determined as the target reduction parameter. When the maximum reduction parameter characterizes the maximum degree of reduction that can be achieved, for example, a maximum reduction parameter of 0.2 indicates that the maximum reduction is 0.2 times the original size. In this case, the product between the rotation parameter and the maximum reduction parameter is determined as the target reduction parameter.
[0172] Optionally, based on the target reduction parameters, the size information is adjusted to obtain the adjusted size information, including: determining the adjusted width by multiplying the target reduction parameters by the width; and determining the adjusted length by multiplying the target reduction parameters by the length.
[0173] It should be noted that if the original dimensions were not adjusted using preset reduction parameters, then the overall reduction parameters can be determined based on the target reduction parameters and preset reduction parameters. Then, the dimensions can be adjusted based on these overall reduction parameters to obtain the adjusted dimensions. Optionally, the sum of the target reduction parameters and preset reduction parameters can be used as the overall reduction parameters.
[0174] In some embodiments, a target movement parameter is determined based on the rotation parameter and the maximum movement parameter; based on the target movement parameter, the position information is adjusted to obtain the adjusted position information. The maximum movement parameter characterizes the degree of movement of the position information during face rotation. The maximum movement parameter is a pre-set parameter with a value range of (0.0f, 3.0f], where f represents a float (floating-point) type. Optionally, the product of the rotation parameter and the maximum movement parameter is used to determine the target movement parameter.
[0175] Step S403: Based on the adjusted size information and adjusted position information, determine the target region of interest.
[0176] See one example. Figure 5 The diagram shown is a human face image. Figure 5 A is a diagram showing the face when it is not rotated. Figure 5 b and Figure 5 c are respectively Figure 5 The diagram in image 'a' shows the rotated face, with the target region of interest located in... Figure 5 The dashed box is used to represent the middle part, from Figure 5 It can be seen that as the face rotates, the target's region of interest also changes.
[0177] In this embodiment of the disclosure, when the face rotates, the target region of interest also changes accordingly, and the problem of target region of interest jumping will not occur.
[0178] Figure 6 This is a block diagram illustrating an image processing apparatus according to an exemplary embodiment, configured in an electronic device, see [link to relevant documentation]. Figure 6 The device includes:
[0179] The image acquisition module 601 is configured to acquire a face image, which includes multiple facial key points;
[0180] The key point determination module 602 is configured to determine a first facial key point and two second facial key points in a facial image when the face in the facial image is occluded by an occluder. The first facial key point is a facial key point on the central axis of the face, and the two second facial key points are two facial key points on the face that are symmetrical about the left and right sides of the central axis of the face.
[0181] The location determination module 603 is configured to determine the location information of the region of interest to be determined in the face image based on the location of the first facial key point in the face;
[0182] The size determination module 604 is configured to determine the size information of the region of interest to be determined in the face image based on the distance between two second facial key points;
[0183] The region of interest determination module 605 is configured to determine the target region of interest in a face image based on size information and location information. The target region of interest includes the face region in the face image that is not occluded by any occluder.
[0184] In some embodiments, the size information of the region of interest to be determined includes the width and length of the region of interest to be determined, and the size determination module 604 is configured to:
[0185] The width of the region of interest to be determined is determined based on the first difference between the horizontal coordinates of two second facial key points in the first coordinate system, where the first coordinate system is a coordinate system established based on the face image.
[0186] The length of the region of interest to be determined is determined based on the second difference between the ordinates of two second facial key points in the first coordinate system.
[0187] In some embodiments, the size determination module 604 is configured to:
[0188] When the first difference is greater than or equal to the first threshold, the first difference is determined as the width; or,
[0189] When the first difference is less than the first threshold, the first threshold is determined as the width;
[0190] The first threshold is determined based on the distance between two second facial key points and a first preset ratio.
[0191] In some embodiments, the size determination module 604 is configured to:
[0192] When the second difference is greater than or equal to the second threshold, the second difference is determined as the length; or,
[0193] When the second difference is less than the second threshold, the second threshold is determined as the length;
[0194] The second threshold is determined based on the distance between two second facial key points and a second preset ratio.
[0195] In some embodiments, the apparatus further includes:
[0196] The adjustment module is configured to adjust the width and length based on preset shrinkage parameters to obtain the adjusted width and length.
[0197] In some embodiments, the location information of the region of interest to be determined includes the center point of the region of interest to be determined, and the location determination module 603 is configured to:
[0198] Obtain the movement parameters corresponding to the first facial key point. The movement parameters are used to adjust the position of the first facial key point in the face.
[0199] Based on the movement parameters, the position of the first facial key point in the face is adjusted, and the adjusted position is determined as the center point of the region of interest to be determined.
[0200] In some embodiments, the position determination module 603 is configured to:
[0201] Based on the midpoints of the first facial key point and the two second facial key points, the vertical upward vector in the second coordinate system is determined. The second coordinate system is a coordinate system established based on the face.
[0202] Based on the movement parameters and vectors, the position of the first facial key point in the face is adjusted.
[0203] In some embodiments, the region of interest determination module 605 is configured to:
[0204] When the face in the face image is rotated, the rotation parameters are obtained. The rotation parameters are used to characterize the degree of rotation of the face in the first coordinate system, which is a coordinate system established based on the face image.
[0205] Based on the rotation parameters, the size information and position information are adjusted separately to obtain the adjusted size information and position information;
[0206] Based on the adjusted size and position information, the target region of interest is determined.
[0207] In some embodiments, the region of interest determination module 605 is configured to:
[0208] Obtain the third difference between the horizontal coordinates of the two rotated second face key points in the first coordinate system, and the fourth difference between their vertical coordinates;
[0209] The rotation parameters are determined based on the third and fourth differences.
[0210] In some embodiments, the region of interest determination module 605 is configured to:
[0211] Determine the ratio between the third difference and the fourth difference;
[0212] When the ratio is less than or equal to a preset threshold, the ratio is determined as the rotation parameter; or,
[0213] When the ratio is greater than a preset threshold, the reciprocal of the ratio is determined as the rotation parameter.
[0214] In some embodiments, the region of interest determination module 603 is configured to:
[0215] Based on the rotation parameter and the maximum shrinkage parameter, the target shrinkage parameter is determined. The maximum shrinkage parameter is used to characterize the degree of shrinkage of the size information when the face is rotated.
[0216] Based on the target reduction parameters, the size information is adjusted to obtain the adjusted size information.
[0217] In some embodiments, the region of interest determination module 603 is configured to:
[0218] Based on the rotation parameters and the maximum movement parameters, the target movement parameters are determined. The maximum movement parameters are used to characterize the degree of movement of positional information when the face is rotated.
[0219] Based on the target movement parameters, the position information is adjusted to obtain the adjusted position information.
[0220] In some embodiments, the apparatus further includes:
[0221] The key point determination module 602 is also configured to determine multiple third facial key points in the face image;
[0222] The occlusion information acquisition module is configured to acquire occlusion information for each third facial key point. The occlusion information is used to characterize whether the location of the third facial key point is occluded.
[0223] The occlusion determination module is configured to determine whether a face in a face image is occluded by an occluder based on the occlusion information of each third facial key point.
[0224] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0225] This disclosure also provides an electronic device, including: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the image processing method described above.
[0226] Figure 7 This is a block diagram of an electronic device 700 according to an exemplary embodiment.
[0227] Reference Figure 7The electronic device 700 may include one or more of the following components: a processing component 702, a memory 704, a power supply component 706, a multimedia component 708, an audio component 710, an input / output (I / O) interface 712, a sensor component 714, and a communication component 716.
[0228] Processing component 702 typically controls the overall operation of electronic device 700, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 702 may include one or more modules to facilitate interaction between processing component 702 and other components. For example, processing component 702 may include a multimedia module to facilitate interaction between multimedia component 708 and processing component 702.
[0229] Memory 704 is configured to store various types of data to support the operation of electronic device 700. Examples of this data include instructions for any application or method operating on electronic device 700, contact data, phonebook data, messages, pictures, videos, etc. Memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0230] Power supply component 706 provides power to various components of electronic device 700. Power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 700.
[0231] Multimedia component 708 includes a screen that provides an output interface between the electronic device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 708 includes a front-facing camera and / or a rear-facing camera. When the electronic device 700 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0232] Audio component 710 is configured to output and / or input audio signals. For example, audio component 710 includes a microphone (MIC) configured to receive external audio signals when electronic device 700 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 704 or transmitted via communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.
[0233] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0234] Sensor assembly 714 includes one or more sensors for providing state assessments of various aspects of electronic device 700. For example, sensor assembly 714 can detect the on / off state of electronic device 700, the relative positioning of components such as the display and keypad of electronic device 700, changes in position of electronic device 700 or a component of electronic device 700, the presence or absence of user contact with electronic device 700, orientation or acceleration / deceleration of electronic device 700, and temperature changes of electronic device 700. Sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 714 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.
[0235] Communication component 716 is configured to facilitate wired or wireless communication between electronic device 700 and other devices. Electronic device 700 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 716 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 716 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0236] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0237] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, which can be executed by a processor 720 of an electronic device 700 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0238] This disclosure also provides a non-transitory computer-readable storage medium, wherein when the instructions in the storage medium are executed by the processor of an electronic device, the electronic device is able to perform the image processing method described above.
[0239] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the following claims.
[0240] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. An image processing method, characterized by, The method comprises: obtaining a face image, the face image comprising a plurality of face key points; when a face in the face image is occluded by an occlusion object, determining a first face key point and two second face key points in the face image, the first face key point being a face key point on a face median axis in the face, and the two second face key points being two face key points on the face that are symmetric about the face median axis; based on a position of the first face key point in the face, determining position information of a region of interest to be determined in the face image; based on a distance between the two second face key points, determining size information of the region of interest to be determined in the face image; based on the size information and the position information, determining a target region of interest in the face image, the target region of interest comprising a face region in the face image that is not occluded by the occlusion object.
2. The image processing method of claim 1, wherein, The size information of the region of interest to be determined comprises a width and a length of the region of interest to be determined, and the determination of the size information of the region of interest to be determined in the face image based on the distance between the two second face key points comprises: based on a first difference between horizontal coordinates of the two second face key points in a first coordinate system, determining the width of the region of interest to be determined, the first coordinate system being a coordinate system established based on the face image; based on a second difference between vertical coordinates of the two second face key points in the first coordinate system, determining the length of the region of interest to be determined.
3. The image processing method of claim 2, wherein, The determination of the width of the region of interest to be determined based on the first difference between the horizontal coordinates of the two second face key points in the first coordinate system comprises: when the first difference is greater than or equal to a first threshold value, determining the first difference as the width; or when the first difference is less than the first threshold value, determining the first threshold value as the width; wherein the first threshold value is determined based on a distance between the two second face key points and a first preset proportion.
4. The image processing method of claim 2, wherein, The determination of the length of the region of interest to be determined based on the second difference between the vertical coordinates of the two second face key points in the first coordinate system comprises: when the second difference is greater than or equal to a second threshold value, determining the second difference as the length; or when the second difference is less than the second threshold value, determining the second threshold value as the length; wherein the second threshold value is determined based on a distance between the two second face key points and a second preset proportion.
5. The image processing method of claim 2, wherein, The method further comprises: based on a preset reduction parameter, adjusting the width and the length respectively to obtain an adjusted width and an adjusted length.
6. The image processing method of claim 1, wherein, The position information of the region of interest to be determined comprises a center point of the region of interest to be determined, and the determination of the position information of the region of interest to be determined in the face image based on the position of the first face key point in the face comprises: obtaining a movement parameter corresponding to the first face key point, the movement parameter being used to adjust the position of the first face key point in the face; adjust a position of the first facial landmark in the face based on the movement parameter, and determine an adjusted position as a center point of the target region of interest.
7. The image processing method of claim 6, wherein, The adjusting of the position of the first facial landmark in the face based on the movement parameter comprises: determining a vector pointing vertically upward in a second coordinate system based on the first facial landmark and a midpoint of the two second facial landmarks, the second coordinate system being a coordinate system established based on the face; adjusting the position of the first facial landmark in the face based on the movement parameter and the vector.
8. The image processing method of claim 1, wherein, The determining of the target region of interest in the face image based on the size information and the position information comprises: obtaining a rotation parameter when a face in the face image is rotated, the rotation parameter being used to represent a rotation degree of the face in a first coordinate system, the first coordinate system being a coordinate system established based on the face image; adjusting the size information and the position information respectively based on the rotation parameter to obtain adjusted size information and adjusted position information; determining the target region of interest based on the adjusted size information and the adjusted position information.
9. The image processing method of claim 8, wherein, The obtaining of the rotation parameter comprises: obtaining a third difference between horizontal coordinates and a fourth difference between vertical coordinates of the two second facial landmarks after rotation in the first coordinate system; determining the rotation parameter based on the third difference and the fourth difference.
10. The image processing method of claim 9, wherein, The determining of the rotation parameter based on the third difference and the fourth difference comprises: determining a ratio between the third difference and the fourth difference; when the ratio is less than or equal to a preset threshold, determining the ratio as the rotation parameter; or when the ratio is greater than the preset threshold, determining an inverse of the ratio as the rotation parameter.
11. The image processing method of claim 8, wherein, The adjusting of the size information based on the rotation parameter to obtain adjusted size information comprises: determining a target reduction parameter based on the rotation parameter and a maximum reduction parameter, the maximum reduction parameter being used to represent a reduction degree of the size information when the face is rotated; adjusting the size information based on the target reduction parameter to obtain the adjusted size information.
12. The image processing method of claim 8, wherein, The adjusting of the position information based on the rotation parameter to obtain adjusted position information comprises: determining a target movement parameter based on the rotation parameter and a maximum movement parameter, the maximum movement parameter being used to represent a movement degree of the position information when the face is rotated; adjusting the position information based on the target movement parameter to obtain the adjusted position information.
13. The image processing method of claim 1, wherein, The method further comprises: determining a plurality of third facial landmarks in the face image; obtaining occlusion information of each third facial landmark, the occlusion information being used to represent whether a position of the third facial landmark is occluded; determining whether the face in the face image is occluded by an occlusion object based on the occlusion information of each third facial landmark.
14. An image processing apparatus characterized by comprising: The apparatus comprises: an image obtaining module configured to obtain a face image, the face image comprising a plurality of facial landmarks; The key point determination module is configured to determine a first facial key point and two second facial key points in the facial image when a face in the facial image is occluded by an occlusion object, the first facial key point being a facial key point on a facial midline in the face, and the two second facial key points being two facial key points on the face that are symmetrical based on the facial midline. The position determination module is configured to determine position information of a region of interest to be determined in the facial image based on a position of the first facial key point in the face. The size determination module is configured to determine size information of the region of interest to be determined in the facial image based on a distance between the two second facial key points. The region of interest determination module is configured to determine a target region of interest in the facial image based on the size information and the position information, the target region of interest including a face region in the facial image that is not occluded by the occlusion object.
15. An electronic device, comprising: comprise: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform the image processing method according to any one of claims 1-13.
16. A non-transitory computer-readable storage medium, comprising: When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device can perform the image processing method according to any one of claims 1-13.