Image processing method and device, electronic equipment and storage medium
By detecting the highlight area in the image processing and turning on the adaptive sharpening function according to it, and using different sharpening intensities for different edges, the problem of black and white edge phenomena in image sharpening processing in highlight scenes is solved, and the clarity and visual sense of the image are improved.
Patent Information
- Application Number
- CN202311182755.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-13
- Publication Date
- 2025-03-18
AI Technical Summary
When sharpening images in highlight scenes, unnatural black or white edges are likely to appear, affecting the user's visual perception.
By detecting whether the image to be processed contains a highlight area, if it is included, a prompt message will be displayed, and asking whether the adaptive sharpening function is enabled. If turned on, different sharpening intensities are used to sharpen different edges. Specifically, different sharpening intensities are used for highlight and non-highlight edges.
While ensuring the sharpening effect, it reduces the unnatural black or white edges caused by the sharpening process, and improves the image and user experience.
Smart Images

Figure CN119648576A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technology, and in particular to an image processing method, device, electronic device and storage medium. Background Art
[0002] With the rapid development of electronic devices, the requirements for image quality in electronic devices are getting higher and higher. Image sharpening can appropriately enhance the sharpness of image contours. It is an important method to improve image clarity and is widely used in the field of image processing. In related technologies, the method of suppressing image noise is usually used to sharpen images to improve their clarity. However, when sharpening images acquired in high-light scenes, such as sharpening images with high ambient brightness and low object brightness, unnatural black or white edges usually appear in the processed images, affecting the user's perception. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides an image processing method, device, electronic device and storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an image processing method, the method comprising:
[0005] It is detected that the image to be processed contains a highlight area, and prompt information is displayed, wherein the prompt information is used to indicate whether to turn on the adaptive sharpening function, and the highlight area is an area where the brightness value is greater than a preset value;
[0006] In the case where it is determined to turn on the adaptive sharpening function, different edges in the image to be processed are sharpened with different sharpening intensities to obtain a processed image, where the edge is the edge of the photographed object in the image to be processed.
[0007] In an exemplary embodiment, the sharpening of different edges in the image to be processed with different sharpening intensities to obtain a processed image includes:
[0008] Acquire a first edge and a second edge of the edge of the image to be processed, wherein the first edge is a highlight edge and the second edge is a non-highlight edge;
[0009] Performing a sharpening process on the first edge based on a first sharpening strength to obtain a sharpened first edge, and performing a sharpening process on the second edge based on a second sharpening strength to obtain a sharpened second edge, wherein the first sharpening strength is less than the second sharpening strength;
[0010] The processed image is obtained based on the sharpened first edge and the sharpened second edge.
[0011] In an exemplary embodiment, the step of obtaining a first edge and a second edge in the image to be processed includes:
[0012] If the gradient information of the edge in the image to be processed is greater than the gradient threshold, determining that the edge is the first edge;
[0013] If the gradient information of the edge in the image to be processed is less than or equal to the gradient threshold, the edge is determined to be the second edge.
[0014] In an exemplary embodiment, the image to be processed is an image after a preset sharpening process is performed, the first sharpening strength includes a first value and a second value, and the sharpening process is performed on the first edge based on the first sharpening strength to obtain the sharpened first edge, including:
[0015] Based on the brightness information of the first edge, obtaining a first black edge and a first white edge in the first edge;
[0016] Based on the first value, the first black edge is sharpened to obtain a sharpened first black edge; and based on the second value, the first white edge is sharpened to obtain a sharpened first white edge, wherein the second value is greater than the first value;
[0017] The sharpened first edge is obtained based on the sharpened first black edge and the sharpened first white edge.
[0018] In an exemplary embodiment, the obtaining the sharpened first edge based on the sharpened first black edge and the sharpened first white edge includes:
[0019] The sharpened first black edge and the sharpened first white edge are weightedly superimposed to obtain the sharpened first edge.
[0020] In an exemplary embodiment, the image to be processed is an image after a preset sharpening process is performed, the second sharpening strength includes a third value and a fourth value, and the sharpening process is performed on the second edge based on the second sharpening strength to obtain the sharpened second edge, including:
[0021] Based on the brightness information of the second edge, obtaining a second black edge and a second white edge in the second edge;
[0022] Based on the third value, the second black edge is sharpened to obtain a sharpened second black edge; and based on the fourth value, the second white edge is sharpened to obtain a sharpened second white edge, wherein the fourth value is less than the third value;
[0023] The sharpened second edge is obtained based on the sharpened second black edge and the sharpened second white edge.
[0024] In an exemplary embodiment, the obtaining the sharpened second edge based on the sharpened second black edge and the sharpened second white edge includes:
[0025] The sharpened second black edge and the sharpened second white edge are weightedly superimposed to obtain the sharpened second edge.
[0026] In an exemplary embodiment, the image to be processed is an image before a preset sharpening process is performed, and the method further includes:
[0027] Performing sharpening processing on an image region in the image to be processed based on a third sharpening strength to obtain a sharpened image region, wherein the image region is a region in the image to be processed excluding the first edge and the second edge, and the third sharpening strength is greater than the second sharpening strength;
[0028] The processed image is obtained based on the sharpened image area, the sharpened first edge and the sharpened second edge.
[0029] In an exemplary embodiment, the third sharpening strength includes a fifth value and a sixth value, and the sharpening process is performed on the image region in the image to be processed based on the third sharpening strength to obtain the sharpened image region, including:
[0030] If the image to be processed contains biometric information, obtaining a biometric region and a background region in the image region;
[0031] Based on the fifth value, the biometric feature region is sharpened to obtain a sharpened biometric feature region, and based on the sixth value, the background region is sharpened to obtain a sharpened background region, wherein the fifth value is greater than the sixth value;
[0032] The sharpened image region is acquired based on the sharpened biometric region and the sharpened background region.
[0033] According to a second aspect of an embodiment of the present disclosure, there is provided an image processing apparatus, the apparatus comprising:
[0034] A detection module, configured to display a prompt message when detecting that the image to be processed contains a highlight area, wherein the prompt message is used to indicate whether to turn on the adaptive sharpening function, and the highlight area is an area where the brightness value is greater than a preset value;
[0035] The processing module is configured to sharpen different edges in the image to be processed with different sharpening intensities to obtain a processed image when the adaptive sharpening function is turned on, wherein the edge is the edge of the object in the image to be processed.
[0036] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0037] processor;
[0038] a memory for storing processor-executable instructions;
[0039] Wherein, the processor is configured to execute the image processing method as described in the first aspect of the embodiment of the present disclosure.
[0040] According to the fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can perform the image processing method as described in the first aspect of the embodiment of the present disclosure.
[0041] The above method disclosed in the present invention has the following beneficial effects: when the image to be processed contains a highlight area and the adaptive sharpening function is turned on, different edges are sharpened with different sharpening intensities, so that the sharpening processing for different edges is more targeted, and it can reduce the unnatural black or white edge phenomenon caused by the sharpening processing while ensuring the sharpening effect and improving the overall clarity of the image, thereby improving the image perception and user experience.
[0042] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0044] Figure 1 is a flow chart showing an image processing method according to an exemplary embodiment;
[0045] Figure 2 is an example diagram of an image to be processed according to an exemplary embodiment;
[0046] Figure 3 is a schematic diagram of prompt information according to an exemplary embodiment;
[0047] Figure 4 is a flow chart showing an image processing method according to an exemplary embodiment;
[0048] Figure 5 is an example diagram of an edge according to an exemplary embodiment;
[0049] Figure 6 is a flowchart of an image processing method according to an exemplary embodiment;
[0050] Figure 7 is a schematic diagram of processing an image according to an exemplary embodiment;
[0051] Figure 8 is a flowchart of an image processing method according to an exemplary embodiment;
[0052] Fig. 9 is a flowchart of an image processing method according to an exemplary embodiment;
[0053] Fig.10 is a block diagram of an image processing device according to an exemplary embodiment;
[0054] Fig.11 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0055] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0056] In an exemplary embodiment of the present disclosure, in order to overcome the black and white edge phenomenon that occurs when sharpening an image in the related art, an image processing method is provided, including: detecting that the image to be processed contains a highlight area, displaying a prompt message, the prompt message is used to indicate whether to turn on the adaptive sharpening function, and the highlight area is an area with a brightness value greater than a preset value; in the case of determining to turn on the adaptive sharpening function, different edges in the image to be processed are sharpened with different sharpening intensities to obtain a processed image, and the edge is the edge of the photographed object in the image to be processed. When the image processing method performs sharpening processing on an image containing a highlight area, it can reduce the unnatural black or white edge phenomenon caused by the sharpening processing while ensuring the sharpening effect and improving the image clarity, thereby improving the image perception and user experience.
[0057] In an exemplary embodiment of the present disclosure, an image processing method is provided. Figure 1 is a flow chart showing an image processing method according to an exemplary embodiment. Figure 1As shown, the following steps are included:
[0058] Step S101, when it is detected that the image to be processed contains a highlight area, a prompt message is displayed, the prompt message is used to indicate whether to turn on the adaptive sharpening function, and the highlight area is an area with a brightness value greater than a preset value;
[0059] Step S102, when it is determined that the adaptive sharpening function is turned on, different edges in the image to be processed are sharpened with different sharpening intensities to obtain a processed image, where the edge is the edge of the photographed object in the image to be processed.
[0060] The image processing method in the embodiments of the present disclosure is applied to electronic devices, including smart phones, tablets, computer devices, cameras, monitoring devices, and other electronic devices with image capture functions or image processing functions.
[0061] In step S101, the image to be processed may be an image in the process of image capture of the electronic device, such as a preview image, or an image stored in the electronic device after the image capture is completed, such as an image in an album. The image to be processed may be an image after a preset sharpening process is performed, or an image before a preset sharpening process is performed, wherein the preset sharpening process refers to a sharpening method for performing a sharpening process on the entire image to be processed, and may be any sharpening method.
[0062] When detecting whether the image to be processed contains a highlight area, it is detected whether there is an area in the image to be processed whose brightness value is greater than a preset value. The brightness value can be determined by at least one of the adaptive dynamic range compression (ADRC) gain, dark area brightness (DarkLuma), and luminance (Luminance) of the image to be processed. Among them, the ADRC gain represents the difference between the ambient brightness and the brightness of the main body of the picture. For example, the ADRC gain can be determined by the ratio between the overall average exposure and the average exposure of the bright area. The larger the value of the ADRC gain, the larger the brightness value of the area. When the value of the ADRC gain is greater than the preset ADRC gain threshold, the area is a highlight area. Figure 2 is an example diagram of an image to be processed according to an exemplary embodiment. Figure 2As shown, the preset ADRC gain threshold is 4, the difference between the ambient brightness and the building brightness in the picture is large, and its ADRC gain is 4.5, then it is determined that the image contains a highlight area. DarkLuma is a parameter representing the average brightness of the dark area in the image. The larger the value of DarkLuma, the smaller the brightness value of the area. When the value of DarkLuma is less than the preset DarkLuma value, the area is a highlight area. Brightness is a parameter representing the brightness of the surface. The larger the value of brightness, the larger the brightness value of the area. When the value of brightness is greater than the preset brightness threshold, the area is a highlight area. It is also possible to determine whether the image to be processed contains a highlight area by using any two or three of the above three parameters. For example, when the value of ADRC gain is greater than the preset ADRC gain threshold, and the value of DarkLuma is less than the preset DarkLuma value, the area is a highlight area. Among them, the preset thresholds are all empirical values.
[0063] The prompt information can be information in any display mode, for example, a related virtual button is set in the display interface to turn on or off the adaptive sharpening function. When it is detected that the image to be processed contains a highlight area, a prompt text is displayed next to the virtual button to prompt the user to turn on the adaptive sharpening function by clicking the virtual button, or a pop-up message such as Figure 3 For example, when the image to be processed contains a highlight area, the following dialog box will pop up automatically: Figure 3 The dialog box showing "Whether to turn on the highlight scene adaptive sharpening function" is shown.
[0064] In step S102, in the image to be processed containing a highlight area, different edges have different black edges or white edges generated during sharpening. For example, the highlight edges in the image are prone to produce white edges, the low-light edges are prone to produce black edges, and the other edges are not prone to produce black and white edges. Therefore, different edges are sharpened with different sharpening intensities. For example, edges that are prone to produce black and white edges are sharpened with a lower sharpening intensity to reduce the black and white edge phenomenon, and edges that are not prone to produce black and white edges are sharpened with a higher sharpening intensity to improve clarity.
[0065] In an exemplary embodiment of the present disclosure, when the image to be processed contains a highlight area and the adaptive sharpening function is turned on, different edges are sharpened with different sharpening intensities, so that the sharpening processing for different edges is more targeted. While ensuring the sharpening effect and improving the overall clarity of the image, the unnatural black or white edge phenomenon caused by the sharpening processing can be reduced, thereby improving the image viewing experience and enhancing the user experience.
[0066] In an exemplary embodiment of the present disclosure, an image processing method is provided. Figure 4is a flow chart showing an image processing method according to an exemplary embodiment. Figure 4 As shown, the following steps are included:
[0067] Step S401, detecting that the image to be processed contains a highlight area, displaying prompt information, the prompt information is used to indicate whether to turn on the adaptive sharpening function, and the highlight area is an area with a brightness value greater than a preset value;
[0068] Step S402, when it is determined that the adaptive sharpening function is turned on, obtaining a first edge and a second edge of the edge of the image to be processed, wherein the first edge is a highlight edge and the second edge is a non-highlight edge;
[0069] Step S403, sharpening the first edge based on a first sharpening strength to obtain a sharpened first edge, and sharpening the second edge based on a second sharpening strength to obtain a sharpened second edge, wherein the first sharpening strength is less than the second sharpening strength;
[0070] Step S404: obtaining a processed image based on the sharpened first edge and the sharpened second edge.
[0071] The specific implementation of step S401 refers to step S101 and will not be described in detail here.
[0072] In step S402, when it is determined that the adaptive sharpening function is turned on, the edge in the image to be processed is extracted by an edge detection algorithm, for example, the edge in the image to be processed is extracted by using edge detection operators such as Prewitt operator, Sobel operator, Roberts operator, Canny operator, Laplacian operator, etc. For example, the image to be processed is represented as f(x, y), the template operator is represented as h(u, v), and the image after edge extraction is represented as f(x, y)*h(u, v), where x and y represent each pixel in the image, and u and v represent the processing of each pixel.
[0073] In some possible implementations, the first edge and the second edge in the edge are obtained by using the gradient information of the edge. If the gradient information of the edge in the image to be processed is greater than the gradient threshold, the edge is determined to be the first edge; if the gradient information of the edge in the image to be processed is less than or equal to the gradient threshold, the edge is determined to be the second edge. For example, the gradient information of each pixel in the edge is recorded as G(x, y), and the gradient threshold is recorded as th G , if G(x,y)>th G , then the pixel is a pixel in the highlight edge. If G(x,y) <th G , then the pixel is a pixel in the non-highlight edge. Figure 5 is an example diagram of an edge according to an exemplary embodiment. Figure 5 As shown, the left side is an example image of the first edge, that is, an example image of the highlight edge, and the right side is an example image of the second edge, that is, an example image of the non-highlight edge.
[0074] In step S403, since the first edge is a highlight edge and the second edge is a non-highlight edge, when they are sharpened, under the same sharpening intensity, the black and white edges produced by the first edge are more obvious than the black and white edges produced by the second edge. Therefore, it is necessary to make the sharpening intensity of the first edge smaller than the sharpening intensity of the second edge, that is, the first sharpening intensity is smaller than the second sharpening intensity. The first sharpening intensity and the second sharpening intensity are empirical values, which are determined according to a preset sharpening processing method. At this time, the image to be processed is the image before the preset sharpening processing is performed. When the image to be processed is sharpened based on the preset image sharpening method, the sharpening parameters in the preset image sharpening method can be adjusted. For example, when the sharpening parameter is γ, the first sharpening intensity and the second sharpening intensity are both sharpening parameters less than γ, and the first sharpening intensity is less than the second sharpening intensity. The first sharpening intensity and the second sharpening intensity are used to sharpen the edge of the image to be processed; the method of controlling the edge overshoot amount can also be adopted. At this time, the image to be processed is the image after the preset sharpening processing is performed. After the image to be processed is sharpened using the preset sharpening processing method, the sharpening effects of the first edge and the second edge are adjusted to suppress their sharpening intensity so that their sharpening intensity is reduced to the first sharpening intensity and the second sharpening intensity.
[0075] In step S404, the pixel values of the pixels in the image to be processed except the first edge and the second edge are superimposed with the pixel values of the pixels in the sharpened first edge and the sharpened second edge to obtain a processed image. ori , the first edge after sharpening is recorded as I h , the second edge after sharpening is recorded as I l , then the processed image is: I out =I ori +β h I h +β l I l , where β h and β l Respectively represent the superposition coefficients of the first edge and the second edge, which are empirical values.
[0076] For example, the pixel value of pixel 1 in the image to be processed is a, the pixel value of pixel 2 is b, and the pixel value of pixel 3 is c, wherein pixel 1 is a pixel on the first edge, and the pixel value of pixel 1 in the first edge after sharpening is a1, pixel 2 is a pixel on the second edge, and the pixel value of pixel 2 in the second edge after sharpening is b1, and pixel 3 is a pixel outside the first edge and the second edge. In the obtained processed image, the pixel value of pixel 1 is the weighted sum of a and a1, the pixel value of pixel 2 is the weighted sum of b and b1, and the pixel value of pixel 3 is c.
[0077] In the exemplary embodiments of the present disclosure, highlight edges and non-highlight edges in the image to be processed are extracted, and sharpening is performed on the highlight edges and non-highlight edges with different sharpening intensities. This allows for more targeted processing of the highlight edges and non-highlight edges, while ensuring the sharpening effect and improving the overall clarity of the image, reducing the unnatural black or white edge phenomenon caused by the sharpening process, thereby improving the image perception and user experience.
[0078] In an exemplary embodiment of the present disclosure, an image processing method is provided. Figure 6 is a flow chart showing an image processing method according to an exemplary embodiment. Figure 6 As shown, the following steps are included:
[0079] Step S601, detecting that the image to be processed contains a highlight area, and displaying prompt information, wherein the prompt information is used to indicate whether to turn on the adaptive sharpening function, and the highlight area is an area where the brightness value is greater than a preset value;
[0080] Step S602, when it is determined that the adaptive sharpening function is turned on, obtaining a first edge and a second edge of the edge of the image to be processed, wherein the first edge is a highlight edge and the second edge is a non-highlight edge;
[0081] Step S603, acquiring a first black edge and a first white edge in the first edge based on the brightness information of the first edge;
[0082] Step S604, based on the first value, sharpening the first black edge to obtain a sharpened first black edge; and based on the second value, sharpening the first white edge to obtain a sharpened first white edge, the second value being greater than the first value;
[0083] Step S605, obtaining a sharpened first edge based on the sharpened first black edge and the sharpened first white edge;
[0084] Step S606, acquiring a second black edge and a second white edge in the second edge based on the brightness information of the second edge;
[0085] Step S607, based on the third value, sharpening the second black edge to obtain a sharpened second black edge, and based on the fourth value, sharpening the second white edge to obtain a sharpened second white edge, the fourth value being less than the third value;
[0086] Step S608, obtaining a sharpened second edge based on the sharpened second black edge and the sharpened second white edge;
[0087] Step S609, performing sharpening processing on the image region in the image to be processed based on the third sharpening strength to obtain a sharpened image region, the image region being a region of the image to be processed excluding the first edge and the second edge, and the third sharpening strength is greater than the second sharpening strength;
[0088] Step S610, obtaining a processed image based on the sharpened image area, the sharpened first edge and the sharpened second edge.
[0089] The specific implementation of steps S601-S602 refers to the implementation of steps S401-S402, which will not be repeated here.
[0090] In step S603, the image to be processed is an image after a preset sharpening process is performed. The preset sharpening process represents a sharpening method for performing sharpening process on the entire image to be processed, and may be any sharpening method. The brightness information of each pixel in the first edge is obtained, and the brightness information represents the pixel value of each pixel. Based on the first brightness threshold, the first black edge and the first white edge are determined. The pixel whose brightness information is higher than the first brightness threshold is the pixel of the first white edge, and the pixel whose brightness information is lower than the first brightness threshold is the pixel of the first black edge. For example, the brightness information of each pixel is recorded as I1(x,y), and the first brightness threshold is recorded as th I1 , if I1(x,y)>th I1 , then the pixel is the pixel on the first white edge. If I1(x,y) <th I1 , then the pixel is the pixel on the first black edge.
[0091] In step S604, the first value and the second value both represent suppression parameters, which are used to suppress the sharpening intensity of the preset sharpening processing method. In the highlight edge, the black edge and the white edge produced by the sharpening processing have different degrees of obviousness. Under the same sharpening intensity, the white edge is more obvious than the black edge. Therefore, in order to avoid obvious white edges caused by excessive sharpening intensity, the suppression parameter of the first white edge sharpening intensity is greater than the suppression parameter of the first black edge sharpening intensity, so that the sharpening intensity of the first white edge is less than the sharpening intensity of the first black edge, that is, the second value is greater than the first value. After suppressing the first white edge sharpening intensity and the first black edge sharpening intensity, the sharpened first black edge and the sharpened first white edge are obtained. The first value and the second value are empirical values.
[0092] In some possible implementations, the sharpening effect after a preset image sharpening process can be suppressed by controlling the edge overshoot amount. For example, the pixel value overshoot amount of the pixel point after the preset sharpening process is controlled. That is, when the pixel value of the pixel point after initial sharpening exceeds the maximum value or the minimum value, the pixel value is adjusted so that the pixel value of the adjusted pixel point is close to the maximum value or the minimum value, thereby achieving the effect of suppressing the sharpening intensity and obtaining the pixel value of the target pixel point after sharpening.
[0093] In one example, the first value is recorded as μ1, the second value is recorded as μ2, and the sharpening parameter in the preset image sharpening method is recorded as γ. The first black edge after sharpening and the first white edge after sharpening are obtained by the following formula:
[0094]
[0095]
[0096] Among them, m′ 12 (x, y) and m′2(x, y) represent the pixel values of the first black edge and the first white edge after adjustment, that is, the pixel values of the first black edge and the first white edge after sharpening, m(x, y) represents the pixel value of the pixel point (x, y) after sharpening based on the sharpening parameter γ, m min and m max represents the minimum and maximum values of the pixel values of the pixel points, which are preset values, and μ1 and μ2 represent the first value and the second value respectively.
[0097] In step S605, the sharpened first black edge and the sharpened first white edge are weightedly superimposed to obtain the sharpened first edge, and the sharpened first white edge is recorded as I hp , the first black edge after sharpening is recorded as I hb , the first edge after sharpening is recorded as I h , then the first edge after sharpening is expressed as: I h =α h1 I hp -α h2 I hn , where α h1 and α h2 Respectively represent the superposition weights of the first white edge and the first black edge, which are empirical values. When the superposition weight is 0, it means that the edge is not sharpened. For example, pixel a is a pixel on the first white edge after sharpening, and its pixel value is a. Pixel b is a pixel on the first black edge after sharpening, and its pixel value is b. Then the first edge after sharpening includes pixel a and pixel b, and the pixel value of pixel a is α. h1 a, the pixel value of pixel b is α h2 b.
[0098] Sharpening the first black edge and the first white edge at different sharpening intensities in the highlight edge can process the black edge or the white edge more specifically, and can further reduce the unnatural black edge or white edge phenomenon caused by the sharpening process.
[0099] In step S606, the image to be processed is an image after a preset sharpening process. The brightness information of each pixel in the second edge is obtained, and the brightness information represents the pixel value of each pixel. Based on the second brightness threshold, the second black edge and the second white edge are determined. The pixel points whose brightness information is higher than the second brightness threshold are the pixel points of the second white edge, and the pixel points whose brightness information is lower than the second brightness threshold are the pixel points of the second black edge. Since the second edge is a non-highlight edge and the first edge is a highlight edge, the first brightness threshold is greater than the second brightness threshold. For example, the brightness information of each pixel is recorded as I2(x,y), and the second brightness threshold is recorded as th I2 , if I2(x,y)>th I2 , then the pixel is the pixel on the second white edge. If I2(x,y) <th I2 , then the pixel is the pixel on the second black edge.
[0100] In step S607, the third value and the fourth value both represent suppression parameters, which are used to suppress the sharpening intensity of the preset sharpening processing method. In the non-highlight edges, the black edges and white edges produced by the sharpening processing have different degrees of obviousness. Under the same sharpening intensity, the black edges are more obvious than the white edges. Therefore, in order to avoid obvious black edges caused by excessive sharpening intensity, the suppression parameter for the first white edge sharpening intensity is less than the suppression parameter for the first black edge sharpening intensity, and the sharpening intensity of the first black edge is less than the sharpening intensity of the first white edge, that is, the third value is greater than the fourth value. The third value and the fourth value are empirical values. The specific method for determining the third value and the fourth value can be found in the method for determining the first value and the second value in step S504, which will not be repeated here.
[0101] In step S608, the sharpened second black edge and the sharpened second white edge are weightedly superimposed to obtain a sharpened second edge, and the sharpened second white edge is recorded as I lp , the second black edge after sharpening is recorded as I ln , the second edge after sharpening is recorded as I l , then the sharpened second edge is expressed as: I l =α l1 I lp -α l2 I ln , where α l1 and α l2They represent the superposition weights of the second white edge and the second black edge respectively, which are empirical values. When the superposition weight is 0, it means that no sharpening is performed on the edge.
[0102] Sharpening the second black edge and the second white edge at different sharpening intensities in the non-highlight edge can process the black edge or the white edge more specifically, and can further reduce the unnatural black edge or white edge phenomenon caused by the sharpening process.
[0103] In step S609, the third sharpening intensity is determined by the sharpening parameters in the preset image sharpening method. Since the second sharpening intensity is based on the sharpening intensity of the preset image sharpening method and the sharpening intensity is suppressed, the third sharpening intensity is greater than the second sharpening intensity. If the image to be processed is the image before the preset sharpening process, the image to be processed is divided into an image area and an edge, the first edge and the second edge are sharpened based on the first sharpening intensity and the second sharpening intensity respectively, and the image area is sharpened based on the third sharpening intensity to sharpen the entire image to be processed; if the processed image is the image after the reverse preset sharpening process, the entire image to be processed is sharpened based on the third sharpening intensity, and the processed image is divided into an image area and an edge, and the sharpening intensity is suppressed and adjusted to reduce the sharpening intensity of the edge, so that the sharpening intensity of the first edge is reduced to the first sharpening intensity, and the sharpening intensity of the second edge is reduced to the second sharpening intensity.
[0104] In some possible implementations, the third sharpening strength includes a fifth value and a sixth value. This step may also include the following steps:
[0105] S1, if the image to be processed contains biometric information, obtain a biometric region and a background region in the image region.
[0106] A preset detection algorithm is used to detect whether the image to be processed contains biometric information. The preset detection algorithm can be a target detection algorithm or a neural network algorithm specifically used for face detection. If the image to be processed contains biometric information, the image is divided into a biometric area and a background area.
[0107] S2, based on the fifth value, sharpen the biometric feature area to obtain a sharpened biometric feature area, and based on the sixth value, sharpen the background area to obtain a sharpened background area, the fifth value is greater than the sixth value.
[0108] The fifth value and the sixth value both represent the sharpening intensity, which is determined by the preset image sharpening method. In order to make the biometric feature area in the sharpened image clearer, to highlight the biometric feature area and weaken the background area, the sharpening intensity of the biometric feature area is greater than the sharpening intensity of the background area, that is, the fifth value is greater than the sixth value.
[0109] S3, obtaining a sharpened image region based on the sharpened biometric region and the sharpened background region.
[0110] The sharpened biometric region and the sharpened background region are weightedly superimposed to obtain the sharpened image region. The sharpened biometric region is denoted as I f , the sharpened background area is recorded as I b , the image area after sharpening is recorded as I o , then the sharpened image area is expressed as: I o =α f I f +α b I b , where α f and α b They represent the superposition coefficients of the biometric area and the background area respectively, which are empirical values.
[0111] Different sharpening intensities are performed on the biological feature area and the background area respectively, so that the sharpening process is more targeted and the sharpening effect is improved.
[0112] In step S610, the sharpened image area, the sharpened first edge, and the sharpened second edge are weightedly superimposed to obtain a processed image. The sharpened image area is denoted as I o , the first edge after sharpening is recorded as I h , the second edge after sharpening is recorded as I l , the image to be processed is denoted as I ori , then the processed image is: I out =I ori +β o I o +β h I h +β l I l =I ori +β o (α f i f +α b i b )+β h (α h1 i hp -α h2 I hn )+β l (α l1 I lp -α l2 I ln ), where α f and α b Represents the superposition coefficient of the biometric area and the background area, αh1 and α h2 Respectively represent the superposition weights of the first white edge and the first black edge, α l1 and α l2 Represent the superposition weights of the second white edge and the second black edge, β o , β h and β l They represent the overlay coefficients of the image area, the first edge, and the second edge respectively. The overlay weights are all empirical values. When any overlay weight is 0, it means that no sharpening is performed on it.
[0113] Figure 7 is a schematic diagram of processing an image according to an exemplary embodiment. Figure 7 As shown, the left side is a processed image obtained by using the image sharpening processing method in the prior art, the middle side is a processed image obtained by using the image processing method in the embodiment of the present disclosure, and the right side is an unprocessed image to be processed. It can be seen that the processed image obtained by using the image processing method in the embodiment of the present disclosure is clearer than the image on the right, and the black and white edge phenomenon is less obvious than the image on the left, and the viewing experience is better.
[0114] In some possible implementations, at least one of the three processing methods of steps S503-S505, steps S506-S508, and step S509 in this embodiment can be executed. For example, steps S503-S505 are executed to process the first edge, and the second edge and the image area are processed using a preset sharpening processing method or other implementation methods mentioned in the embodiments of the present disclosure; or all of them can be executed. When all of them are executed, there is no distinction between the order of execution, and they can be executed simultaneously or sequentially.
[0115] In some possible implementations, when the image to be processed is an image before a preset sharpening process is performed, the above steps S503-S505 or steps S506-S508 can be replaced by: based on the brightness information of the first edge, obtaining the first sub-edge and the second sub-edge in the first edge, wherein the first sub-edge is an edge that is prone to produce a black edge, and the second sub-edge is an edge that is prone to produce a white edge. When the sharpening parameter for the preset sharpening process for the image to be processed is γ, when the sharpening parameter for the first edge is γ1, γ1 is adjusted to obtain the sharpening parameter γ11 of the first sub-edge and the sharpening parameter γ12 of the second sub-edge, the sharpening parameters of the first sub-edge and the second sub-edge are both empirical values, and γ12<γ11, the first sub-edge and the second sub-edge are sharpened based on γ11 and γ12, respectively, to obtain the sharpened first edge. For the specific implementation of obtaining the sharpened second edge, refer to the implementation of obtaining the sharpened first edge above.
[0116] In an exemplary embodiment of the present disclosure, an image processing method is provided. Figure 8 is a flowchart of an image processing method according to an exemplary embodiment. Figure 8 As shown, the following steps are included:
[0117] Step S8-1, using the Prewitt operator to extract the edge of the image to be processed;
[0118] Step S8-2, gradient threshold determines whether it is a highlight edge;
[0119] If yes, execute steps S8-3-S8-6; if no, execute steps S8-7-S8-10;
[0120] Step S8-3, extracting the outline of the highlight black edge;
[0121] Step S8-4, extracting the outline of the highlight white edge;
[0122] Step S8-5, suppressing the intensity of highlight black and white edges, that is, using the first sharpening intensity for sharpening processing;
[0123] Step S8-6, weighted fusion of highlight black and white edges;
[0124] Step S8-7, non-highlight black edge contour extraction;
[0125] Step S8-8, non-highlight white edge contour extraction;
[0126] Step S8-9, suppressing the intensity of non-highlight black and white edges, that is, using a second sharpening intensity for sharpening, where the second sharpening intensity is greater than the first sharpening intensity;
[0127] Step S8-10, weighted fusion of non-highlight black and white edges;
[0128] Step S8-11, recombining the high and low light multi-segment images, that is, recombining the highlight edge and the non-highlight edge.
[0129] In an exemplary embodiment of the present disclosure, an image processing method is provided. Fig. 9 is a flowchart of an image processing method according to an exemplary embodiment. Fig. 9 As shown, the following steps are included:
[0130] Step S9-1, performing brightness information statistics on the image to be processed;
[0131] Step S9-2, determining whether ADRC Gain is greater than a threshold;
[0132] If yes, execute steps S9-3-S9-12; if no, execute step S9-13;
[0133] Step S9-3, whether facial information of a human face is recognized;
[0134] If yes, execute steps S9-4-S9-9; if no, execute steps S9-8-S9-12;
[0135] Step S9-4, separating the biometric region and the background region;
[0136] Step S9-5, sharpening the biometric feature area;
[0137] Step S9-6, sharpening the background area;
[0138] Step S9-7, weighted fusion of the biometric region and the background region;
[0139] Step S9-8, scene edge separation;
[0140] Step S9-9, whether it is recognized as a highlight edge;
[0141] If yes, go to step S9-10; if no, go to step S9-11;
[0142] Step S9-10, black and white edge suppression, that is, low sharpening intensity processing;
[0143] Step S9-11, black and white edge suppression, that is, normal sharpening intensity processing;
[0144] Step S9-12, weighted fusion.
[0145] Step S9-13, normal sharpening debugging, that is, processing using the sharpening intensity of the preset sharpening method.
[0146] In an exemplary embodiment of the present disclosure, an image processing device is provided. Fig.10 is a block diagram of an image processing device according to an exemplary embodiment. Fig.10 As shown, including:
[0147] The detection module 1001 is configured to display a prompt message when detecting that the image to be processed contains a highlight area, the prompt message is used to indicate whether to turn on the adaptive sharpening function, and the highlight area is an area with a brightness value greater than a preset value;
[0148] The processing module 1002 is configured to perform sharpening processing on different edges in the image to be processed with different sharpening intensities to obtain a processed image when the adaptive sharpening function is determined to be turned on, where the edge is the edge of the object in the image to be processed.
[0149] In an exemplary embodiment, the processing module 1002 is further configured to:
[0150] When it is determined that the adaptive sharpening function is turned on, a first edge and a second edge in the image to be processed are obtained, where the first edge is a highlight edge and the second edge is a non-highlight edge;
[0151] Performing a sharpening process on the first edge based on a first sharpening strength to obtain a sharpened first edge, and performing a sharpening process on the second edge based on a second sharpening strength to obtain a sharpened second edge, wherein the first sharpening strength is less than the second sharpening strength;
[0152] A processed image is obtained based on the sharpened first edge and the sharpened second edge.
[0153] In an exemplary embodiment, the processing module 1002 is further configured to:
[0154] If the gradient information of the edge in the image to be processed is greater than the gradient threshold, determining the edge as the first edge;
[0155] If the gradient information of the edge in the image to be processed is less than or equal to the gradient threshold, the edge is determined to be the second edge.
[0156] In an exemplary embodiment, the image to be processed is an image after a preset sharpening process is performed, the first sharpening intensity includes a first value and a second value, and the processing module 1002 is further configured to:
[0157] Based on the brightness information of the first edge, obtaining a first black edge and a first white edge in the first edge;
[0158] Based on the first value, the first black edge is sharpened to obtain the sharpened first black edge; and based on the second value, the first white edge is sharpened to obtain the sharpened first white edge, wherein the second value is greater than the first value;
[0159] A sharpened first edge is obtained based on the sharpened first black edge and the sharpened first white edge.
[0160] In an exemplary embodiment, the processing module 1002 is further configured to:
[0161] A weighted sum of the sharpened first black edge and the sharpened first white edge is determined as the sharpened first edge.
[0162] In an exemplary embodiment, the image to be processed is an image after a preset sharpening process is performed, the second sharpening intensity includes a third value and a fourth value, and the processing module 1002 is further configured to:
[0163] Based on the brightness information of the second edge, obtaining a second black edge and a second white edge in the second edge;
[0164] Based on the third value, the second black edge is sharpened to obtain a sharpened second black edge; and based on the fourth value, the second white edge is sharpened to obtain a sharpened second white edge, wherein the fourth value is less than the third value;
[0165] A sharpened second edge is obtained based on the sharpened second black edge and the sharpened second white edge.
[0166] In an exemplary embodiment, the processing module 1002 is further configured to:
[0167] A weighted sum of the sharpened second black edge and the sharpened second white edge is determined as the sharpened second edge.
[0168] In an exemplary embodiment, the image to be processed is an image before a preset sharpening process is performed, and the processing module 1002 is further configured to:
[0169] Performing sharpening processing on an image region in the image to be processed based on a third sharpening strength to obtain a sharpened image region, the image region being a region in the image to be processed excluding the first edge and the second edge shown, and the third sharpening strength being greater than the second sharpening strength;
[0170] A processed image is obtained based on the sharpened image area, the sharpened first edge and the sharpened second edge.
[0171] In an exemplary embodiment, the third sharpening strength includes a fifth value and a sixth value, and the processing module 1002 is further configured to:
[0172] If the image to be processed contains biometric information, obtaining a biometric region and a background region in the image region;
[0173] Based on the fifth value, sharpening the biometric feature region to obtain a sharpened biometric feature region, and based on the sixth value, sharpening the background region to obtain a sharpened background region, the fifth value being greater than the sixth value;
[0174] A sharpened image region is obtained based on the sharpened biometric region and the sharpened background region.
[0175] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0176] Fig.11 is a block diagram of an electronic device 1100 according to an exemplary embodiment.
[0177] Reference Fig.11, the electronic device 1100 may include one or more of the following components: a processing component 1102 , a memory 1104 , a power component 1106 , a multimedia component 1108 , an audio component 1110 , an input / output (I / O) interface 1112 , a sensor component 1114 , and a communication component 1116 .
[0178] The processing component 1102 generally controls the overall operation of the electronic device 1100, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1102 may include one or more processors 1120 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 1102 may include one or more modules to facilitate the interaction between the processing component 1102 and other components. For example, the processing component 1102 may include a multimedia module to facilitate the interaction between the multimedia component 1108 and the processing component 1102.
[0179] The memory 1104 is configured to store various types of data to support operations on the electronic device 1100. Examples of such data include instructions for any application or method operating on the electronic device 1100, contact data, phone book data, messages, pictures, videos, etc. The memory 1104 may 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 memory, flash memory, magnetic disk, or optical disk.
[0180] The power supply component 1106 provides power to various components of the electronic device 1100. The power supply component 1106 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 1100.
[0181] The multimedia component 1108 includes a screen that provides an output interface between the electronic device 1100 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 touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1108 includes a front camera and / or a rear camera. When the electronic device 1100 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0182] The audio component 1110 is configured to output and / or input audio signals. For example, the audio component 1110 includes a microphone (MIC), and when the electronic device 1100 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1104 or sent via the communication component 1116. In some embodiments, the audio component 1110 also includes a speaker for outputting audio signals.
[0183] I / O interface 1112 provides an interface between processing component 1102 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0184] The sensor assembly 1114 includes one or more sensors for providing various aspects of status assessment for the electronic device 1100. For example, the sensor assembly 1114 can detect the open / closed state of the electronic device 1100, the relative positioning of components, such as the display and keypad of the electronic device 1100, and the sensor assembly 1114 can also detect the position change of the electronic device 1100 or a component of the electronic device 1100, the presence or absence of user contact with the electronic device 1100, the orientation or acceleration / deceleration of the electronic device 1100, and the temperature change of the electronic device 1100. The sensor assembly 1114 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1114 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1114 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0185] The communication component 1116 is configured to facilitate wired or wireless communication between the electronic device 1100 and other devices. The electronic device 1100 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1116 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1116 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0186] In an exemplary embodiment, the electronic device 1100 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 above methods.
[0187] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1104 including instructions, and the instructions can be executed by a processor 1120 of the electronic device 1100 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0188] A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform an image processing method, the method including any of the above methods.
[0189] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0190] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. An image processing method, characterized in that: The method comprises: It is detected that the image to be processed contains a highlight area, and prompt information is displayed, wherein the prompt information is used to indicate whether to turn on the adaptive sharpening function, and the highlight area is an area where the brightness value is greater than a preset value; When it is determined that the adaptive sharpening function is turned on, different edges in the image to be processed are sharpened with different sharpening intensities to obtain a processed image, where the edge is the edge of the photographed object in the image to be processed.
2. The image processing method according to claim 1, characterized in that: The step of sharpening different edges in the image to be processed with different sharpening intensities to obtain a processed image comprises: Acquire a first edge and a second edge of the edge of the image to be processed, wherein the first edge is a highlight edge and the second edge is a non-highlight edge; sharpening the first edge based on a first sharpening strength to obtain a sharpened first edge, and sharpening the second edge based on a second sharpening strength to obtain a sharpened second edge, wherein the first sharpening strength is less than the second sharpening strength; The processed image is obtained based on the sharpened first edge and the sharpened second edge.
3. The image processing method according to claim 2, characterized in that: The step of obtaining a first edge and a second edge in the image to be processed includes: If the gradient information of the edge in the image to be processed is greater than the gradient threshold, determining that the edge is the first edge; If the gradient information of the edge in the image to be processed is less than or equal to the gradient threshold, the edge is determined to be the second edge.
4. The image processing method according to claim 2, characterized in that: The image to be processed is an image after a preset sharpening process is performed, the first sharpening strength includes a first value and a second value, and the sharpening process is performed on the first edge based on the first sharpening strength to obtain the sharpened first edge, including: Based on the brightness information of the first edge, obtaining a first black edge and a first white edge in the first edge; Based on the first value, the first black edge is sharpened to obtain a sharpened first black edge; and based on the second value, the first white edge is sharpened to obtain a sharpened first white edge, wherein the second value is greater than the first value; The sharpened first edge is obtained based on the sharpened first black edge and the sharpened first white edge.
5. The image processing method according to claim 4, characterized in that: The obtaining the sharpened first edge based on the sharpened first black edge and the sharpened first white edge includes: The sharpened first black edge and the sharpened first white edge are weightedly superimposed to obtain the sharpened first edge.
6. The image processing method according to claim 2, characterized in that: The image to be processed is an image after a preset sharpening process is performed, the second sharpening strength includes a third value and a fourth value, and the sharpening process is performed on the second edge based on the second sharpening strength to obtain the sharpened second edge, including: Based on the brightness information of the second edge, obtaining a second black edge and a second white edge in the second edge; Based on the third value, the second black edge is sharpened to obtain a sharpened second black edge; and based on the fourth value, the second white edge is sharpened to obtain a sharpened second white edge, wherein the fourth value is less than the third value; The sharpened second edge is obtained based on the sharpened second black edge and the sharpened second white edge.
7. The image processing method according to claim 6, characterized in that: The obtaining the sharpened second edge based on the sharpened second black edge and the sharpened second white edge includes: The sharpened second black edge and the sharpened second white edge are weightedly superimposed to obtain the sharpened second edge.
8. The image processing method according to claim 2, characterized in that: The image to be processed is an image before a preset sharpening process is performed, and the method further includes: Performing sharpening processing on an image region in the image to be processed based on a third sharpening strength to obtain a sharpened image region, wherein the image region is a region in the image to be processed excluding the first edge and the second edge, and the third sharpening strength is greater than the second sharpening strength; The processed image is obtained based on the sharpened image area, the sharpened first edge and the sharpened second edge.
9. The image processing method according to claim 8, characterized in that: The third sharpening strength includes a fifth value and a sixth value, and the sharpening process is performed on the image region in the image to be processed based on the third sharpening strength to obtain the sharpened image region, including: If the image to be processed contains biometric information, obtaining a biometric region and a background region in the image region; Based on the fifth value, the biometric feature region is sharpened to obtain a sharpened biometric feature region, and based on the sixth value, the background region is sharpened to obtain a sharpened background region, wherein the fifth value is greater than the sixth value; The sharpened image region is acquired based on the sharpened biometric region and the sharpened background region.
10. An image processing device, characterized in that: The device comprises: A detection module, configured to display a prompt message when detecting that the image to be processed contains a highlight area, wherein the prompt message is used to indicate whether to turn on the adaptive sharpening function, and the highlight area is an area where the brightness value is greater than a preset value; The processing module is configured to sharpen different edges in the image to be processed with different sharpening intensities to obtain a processed image when the adaptive sharpening function is turned on, wherein the edge is the edge of the object in the image to be processed.
11. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the image processing method as described in any one of claims 1 to 9.
12. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the image processing method as described in any one of claims 1 to 9.