Image processing method and device, electronic equipment and storage medium

By extracting and weighting image components of different frequencies from the image to be processed, the problem of noise affecting image sharpening in existing technologies is solved, achieving higher quality image effects.

CN114612332BActive Publication Date: 2025-11-11BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210253578.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-15
Publication Date
2025-11-11
Estimated Expiration
2042-03-15

AI Technical Summary

Technical Problem

Existing technologies for image sharpening often result in poor image quality because high-frequency components contain noise.

Method used

The first image with a lower image signal frequency and the second image with a higher image signal frequency are extracted from the image to be processed. The third and fourth images with image signal frequencies that meet the preset frequency are further extracted from the second image. After weighting, they are added to the first image to form the target image.

Benefits of technology

It effectively suppresses background noise with high image signal frequency, improves image sharpening effect, avoids noise amplification, and enhances image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114612332B_ABST
    Figure CN114612332B_ABST
Patent Text Reader

Abstract

This disclosure relates to an image processing method, apparatus, electronic device, storage medium, and computer program product. The method includes: extracting a first image and a second image from an image to be processed; wherein the image signal frequency of the first image is lower than that of the second image; extracting a third image from the second image; wherein the third image is an image in the second image whose image signal frequency satisfies a preset image signal frequency; adding the third image to the first image to obtain a target image corresponding to the image to be processed; wherein the image quality of the target image is higher than that of the image to be processed. Using this method, background noise in the image can be suppressed, and the image quality of the processed image can be improved.
Need to check novelty before this filing date? Find Prior Art

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, storage medium, and computer program product. Background Technology

[0002] With the development of image processing technology, image quality can be improved by performing image enhancement processing on the original image, such as sharpening.

[0003] In related technologies, when performing sharpening processing, the high-frequency part of the original image is generally enhanced and then superimposed on the low-frequency part of the original image; however, the high-frequency part includes noise information, resulting in poor image quality after processing. Summary of the Invention

[0004] This disclosure provides an image processing method, apparatus, electronic device, storage medium, and computer program product to at least solve the problem of poor image quality after processing in related technologies. The technical solution of this disclosure is as follows:

[0005] According to a first aspect of the present disclosure, an image processing method is provided, comprising:

[0006] A first image and a second image are extracted from the image to be processed; the image signal frequency of the first image is lower than the image signal frequency of the second image.

[0007] Extract a third image from the second image; the third image is an image in the second image whose image signal frequency satisfies a preset image signal frequency;

[0008] The third image is added to the first image to obtain the target image corresponding to the image to be processed; the image quality of the target image is higher than that of the image to be processed.

[0009] In an exemplary embodiment, adding the third image to the first image to obtain the target image corresponding to the image to be processed includes:

[0010] The third image is weighted to obtain the processed third image;

[0011] The processed third image is added to the first image to obtain the processed first image, which serves as the target image corresponding to the image to be processed.

[0012] In one exemplary embodiment, before adding the third image to the first image to obtain the target image corresponding to the image to be processed, the method further includes:

[0013] A fourth image is extracted from the second image; the image signal frequency of the fourth image is higher than that of the third image.

[0014] A fifth image is extracted from the fourth image; the fifth image is an image in the fourth image whose image signal frequency satisfies the preset image signal frequency.

[0015] The step of adding the third image to the first image to obtain the target image corresponding to the image to be processed includes:

[0016] The third image and the fifth image are added to the first image to obtain the target image corresponding to the image to be processed.

[0017] In an exemplary embodiment, adding the third image and the fifth image to the first image to obtain the target image corresponding to the image to be processed includes:

[0018] The third image and the fifth image are weighted separately to obtain the processed third image and the processed fifth image;

[0019] The processed third image and the processed fifth image are added to the first image to obtain the processed first image, which serves as the target image corresponding to the image to be processed.

[0020] In one exemplary embodiment, extracting the third image from the second image includes:

[0021] The second image is filtered to obtain an image whose image signal frequency satisfies the preset image signal frequency, which is then used as the third image.

[0022] Extracting the fourth image from the second image includes:

[0023] The fourth image is obtained by subtracting the pixel values ​​of the second image from the pixel values ​​of the third image.

[0024] In one exemplary embodiment, extracting the fifth image from the fourth image includes:

[0025] The fourth image is filtered to obtain an image whose image signal frequency satisfies the preset image signal frequency, which is then used as the fifth image.

[0026] In an exemplary embodiment, extracting the first image and the second image from the image to be processed includes:

[0027] The image to be processed is filtered to obtain an image in which the image signal frequency satisfies the preset image signal frequency, which is used as the first image;

[0028] The second image is obtained by subtracting the pixel values ​​of the image to be processed from the pixel values ​​of the first image.

[0029] According to a second aspect of the present disclosure, an image processing apparatus is provided, comprising:

[0030] The first extraction unit is configured to extract a first image and a second image from the image to be processed; the image signal frequency of the first image is lower than the image signal frequency of the second image.

[0031] The second extraction unit is configured to extract a third image from the second image; the third image is an image in the second image whose image signal frequency satisfies a preset image signal frequency.

[0032] The image adding unit is configured to add the third image to the first image to obtain a target image corresponding to the image to be processed; the image quality of the target image is higher than that of the image to be processed.

[0033] In an exemplary embodiment, the image adding unit is further configured to perform weighted processing on the third image to obtain a processed third image; and to add the processed third image to the first image to obtain a processed first image, which serves as the target image corresponding to the image to be processed.

[0034] In one exemplary embodiment, the apparatus further includes a third extraction unit configured to extract a fourth image from the second image; the image signal frequency of the fourth image is higher than the image signal frequency of the third image; and to extract a fifth image from the fourth image; the fifth image being an image in the fourth image whose image signal frequency satisfies the preset image signal frequency.

[0035] The image adding unit is further configured to add the third image and the fifth image to the first image to obtain the target image corresponding to the image to be processed.

[0036] In an exemplary embodiment, the image adding unit is further configured to perform weighted processing on the third image and the fifth image respectively to obtain a processed third image and a processed fifth image; and to add the processed third image and the processed fifth image to the first image to obtain a processed first image, which serves as the target image corresponding to the image to be processed.

[0037] In an exemplary embodiment, the second extraction unit is further configured to perform filtering processing on the second image to obtain an image in the second image whose image signal frequency satisfies the preset image signal frequency, as a third image;

[0038] The third extraction unit is further configured to subtract the pixel values ​​of the second image from the pixel values ​​of the third image to obtain the fourth image.

[0039] In an exemplary embodiment, the third extraction unit is further configured to perform filtering processing on the fourth image to obtain an image in the fourth image whose image signal frequency satisfies the preset image signal frequency, which is then used as the fifth image.

[0040] In an exemplary embodiment, the first extraction unit is further configured to perform filtering processing on the image to be processed to obtain an image in the image to be processed whose image signal frequency satisfies the preset image signal frequency, as a first image; and to subtract the pixel value of the image to be processed from the pixel value of the first image to obtain the second image.

[0041] According to a third aspect of the present disclosure, an electronic device is provided, comprising:

[0042] processor;

[0043] Memory used to store the processor's executable instructions;

[0044] The processor is configured to execute the instructions to implement the image processing method as described in any of the preceding claims.

[0045] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided that, when instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform the image processing method as described in any of the preceding claims.

[0046] According to a fifth aspect of the present disclosure, a computer program product is provided, the computer program product including instructions that, when executed by a processor of an electronic device, enable the electronic device to perform the image processing method as described in any of the preceding claims.

[0047] The technical solutions provided by the embodiments of this disclosure have at least the following beneficial effects:

[0048] The first image and the second image are extracted from the image to be processed. The image signal frequency of the first image is lower than that of the second image. Then, a third image is extracted from the second image. The third image is an image in the second image whose image signal frequency meets a preset image signal frequency. Finally, the third image is added to the first image to obtain the target image corresponding to the image to be processed. The image quality of the target image is higher than that of the image to be processed. In this way, after obtaining the first image and the second image, instead of directly superimposing the second image with a higher image signal frequency onto the first image with a lower image signal frequency, the third image with a lower image signal frequency is extracted from the second image and then superimposed onto the first image. This helps to suppress the background noise with a higher image signal frequency in the second image, avoids amplifying the background noise with a higher image signal frequency in the second image, and avoids the defect of poor image quality after processing, thus improving the image quality of the processed image.

[0049] 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

[0050] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.

[0051] Figure 1 This is a flowchart illustrating an image processing method according to an exemplary embodiment.

[0052] Figure 2 This is a flowchart illustrating the steps of obtaining a target image according to an exemplary embodiment.

[0053] Figure 3 This is a flowchart illustrating another step in obtaining a target image according to an exemplary embodiment.

[0054] Figure 4 This is a flowchart illustrating another image processing method according to an exemplary embodiment.

[0055] Figure 5 This is a schematic diagram illustrating a sharpened image comparison according to an exemplary embodiment.

[0056] Figure 6 This is a schematic diagram illustrating another sharpened image comparison according to an exemplary embodiment.

[0057] Figure 7 This is a block diagram illustrating an image processing apparatus according to an exemplary embodiment.

[0058] Figure 8This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation

[0059] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0060] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0061] It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.

[0062] Figure 1 This is a flowchart illustrating an image processing method according to an exemplary embodiment, such as... Figure 1 As shown, this image processing method is used in a terminal; it is understood that the method can also be applied to a server, and further to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. In this exemplary embodiment, the method includes the following steps:

[0063] In step S110, a first image and a second image are extracted from the image to be processed; the image signal frequency of the first image is lower than that of the second image.

[0064] The image to be processed refers to the image that needs to be enhanced, specifically the image that needs to be sharpened, such as facial images and human images. These images can be captured by shooting devices such as mobile phones, cameras, and camcorders, or obtained from the network or local image library through the terminal.

[0065] Here, the first image refers to the image with a relatively low frequency of image signal in the image to be processed, specifically the low-frequency components of the image to be processed, such as areas in the image to be processed where brightness or grayscale values ​​change slowly. In practical scenarios, the first image refers to a smooth area in the image to be processed.

[0066] The second image refers to the image with a relatively high frequency of image signal in the image to be processed, specifically the high-frequency components of the image to be processed, such as areas in the image to be processed where brightness or grayscale values ​​change drastically. In practical scenarios, the second image refers to the edges (contours), background noise, and details of the image to be processed.

[0067] Specifically, in response to an image processing request, the terminal acquires the image to be processed; according to a preset image extraction instruction, it extracts an image with a relatively low image signal frequency and an image with a relatively high image signal frequency from the image to be processed; the image with a relatively low image signal frequency is identified as the first image, and the image with a relatively high image signal frequency is identified as the second image.

[0068] For example, on the terminal interface displaying the captured face image, the user clicks the "Sharpen" button, triggering an image processing request; according to the image processing request, the terminal extracts the high-frequency components and low-frequency components of the face image from the face image, which are used as the first image and the second image respectively.

[0069] In step S120, a third image is extracted from the second image; the third image is an image in the second image whose image signal frequency satisfies a preset image signal frequency.

[0070] The third image refers to the image with a relatively low frequency of image signal within the second image, specifically the low-frequency components of the second image, such as its edges (contours) and details. It should be noted that the image with a relatively high frequency of image signal within the second image refers to the high-frequency components of the second image, specifically the background noise.

[0071] The image signal frequency meeting the preset image signal frequency means that the image signal frequency is less than the preset image signal frequency, specifically, the image signal frequency is relatively low.

[0072] Specifically, the terminal extracts an image whose image signal frequency meets the preset image signal frequency from the second image according to the preset image extraction instruction, and uses it as the third image.

[0073] For example, the terminal performs edge-preserving filtering on the second image according to the edge-preserving filtering instruction, and obtains an image with a relatively low image signal frequency in the second image, which is then used as the third image.

[0074] In step S130, the third image is added to the first image to obtain the target image corresponding to the image to be processed; the image quality of the target image is higher than that of the image to be processed.

[0075] The target image refers to the sharpened image corresponding to the image to be processed. The image quality of the sharpened image is higher than that of the image to be processed.

[0076] Specifically, the terminal enhances the third image to obtain an enhanced third image, and then superimposes the enhanced third image onto the first image to obtain a processed image, which serves as the target image corresponding to the image to be processed. In this way, not only can a more natural sharpened image be obtained, but background noise in the image to be processed can also be suppressed.

[0077] For example, the terminal enhances the third image and adds the pixel values ​​of the enhanced third image to the pixel values ​​of the first image to obtain the target image corresponding to the image to be processed.

[0078] In the above image processing method, a first image and a second image are extracted from the image to be processed; the image signal frequency of the first image is lower than that of the second image; then a third image is extracted from the second image; the third image is an image in the second image whose image signal frequency meets a preset image signal frequency; finally, the third image is added to the first image to obtain the target image corresponding to the image to be processed; the image quality of the target image is higher than that of the image to be processed. Thus, after obtaining the first and second images, instead of directly superimposing the second image (with a higher image signal frequency) onto the first image (with a lower image signal frequency), the method extracts the third image (with a lower image signal frequency) from the second image and then superimposes it onto the first image. This helps suppress background noise with higher image signal frequencies in the second image, avoiding the amplification of such noise and the resulting poor image quality, thereby improving the image quality of the processed image.

[0079] In one exemplary embodiment, such as Figure 2 As shown, in step S130, the third image is added to the first image to obtain the target image corresponding to the image to be processed. This can be achieved through the following steps:

[0080] In step S210, the third image is weighted to obtain the processed third image.

[0081] In step S220, the processed third image is added to the first image to obtain the processed first image, which serves as the target image corresponding to the image to be processed.

[0082] The weighting process applied to the third image is for the purpose of enhancing the third image.

[0083] Specifically, the terminal obtains the weight corresponding to the third image, performs weighted processing on the third image based on the weight, and obtains a processed third image; the processed third image is then superimposed on the first image to obtain a processed first image; the processed first image is then determined as the target image corresponding to the image to be processed. For example, the terminal adds the pixel values ​​of the processed third image to the pixel values ​​of the first image to obtain the processed image, which is then used as the target image corresponding to the image to be processed.

[0084] For example, the terminal can use the following formula to obtain the target image corresponding to the image to be processed:

[0085] I' = B × HL + L;

[0086] Where L refers to the first image, HL refers to the third image extracted from the second image, B refers to the weight corresponding to the third image, for example, B=1; I' refers to the target image corresponding to the image to be processed.

[0087] The technical solution provided in this disclosure only enhances the third image, which has a relatively low image signal frequency in the second image, and adds it to the first image, without enhancing the background noise, which has a relatively high image signal frequency in the second image, and adding it to the first image. This helps to suppress background noise, avoids the defect of amplifying background noise, which would result in poor image quality after processing, and thus improves the image quality of the processed image.

[0088] In an exemplary embodiment, before adding the third image to the first image to obtain the target image corresponding to the image to be processed, step S130 further includes: extracting a fourth image from the second image; the image signal frequency of the fourth image is higher than the image signal frequency of the third image; extracting a fifth image from the fourth image; the fifth image is an image in the fourth image whose image signal frequency satisfies a preset image signal frequency.

[0089] The fourth image refers to the image with a relatively high frequency of image signal in the second image, specifically the high-frequency components of the second image, such as the background noise of the second image.

[0090] The fifth image refers to the image whose signal frequency meets the preset signal frequency in the fourth image. Specifically, it refers to the image with a relatively low signal frequency in the fourth image, i.e., the low-frequency components of the fourth image, such as the edges (contours) and details. It should be noted that although the fourth image refers to background noise, it may contain low-frequency components, such as the edges (contours) and details with relatively low signal frequencies. Therefore, the edges (contours) and details with relatively low signal frequencies can be further extracted from the fourth image, resulting in the fifth image.

[0091] Specifically, the terminal extracts an image whose image signal frequency does not meet the preset image signal frequency from the second image according to the preset image extraction instruction, and uses it as the fourth image; and extracts an image whose image signal frequency meets the preset image signal frequency from the fourth image according to the preset image extraction instruction, and uses it as the fifth image.

[0092] For example, the terminal filters the second image to obtain an image with a relatively high image signal frequency, which is then used as the fourth image; the terminal filters the fourth image to obtain an image with a relatively low image signal frequency, which is then used as the fifth image.

[0093] Further, step S130 above, which involves adding the third image to the first image to obtain the target image corresponding to the image to be processed, specifically includes: adding the third image and the fifth image to the first image to obtain the target image corresponding to the image to be processed.

[0094] Specifically, the terminal performs enhancement processing on the third and fifth images to obtain enhanced third and fifth images, and then superimposes the enhanced third and fifth images onto the first image to obtain the processed image, which serves as the target image corresponding to the image to be processed.

[0095] For example, the terminal enhances the third and fifth images, and adds the pixel values ​​of the enhanced third and fifth images to the pixel values ​​of the first image to obtain the target image corresponding to the image to be processed.

[0096] The technical solution provided in this disclosure extracts a fourth image (background noise) with a relatively high image signal frequency from the second image, then extracts a fifth image with a relatively low image signal frequency from the fourth image, and finally enhances the third and fifth images and adds them to the first image. By comprehensively considering the third and fifth images, the loss of image edges (contours) and details during noise suppression is avoided, further improving the image effect of the processed image.

[0097] In one exemplary embodiment, such as Figure 3 As shown, the third and fifth images are added to the first image to obtain the target image corresponding to the image to be processed. This can be achieved through the following steps:

[0098] In step S310, the third image and the fifth image are weighted respectively to obtain the processed third image and the processed fifth image.

[0099] In step S320, the processed third image and the processed fifth image are added to the first image to obtain the processed first image, which serves as the target image corresponding to the image to be processed.

[0100] The weighted processing of the fifth image is for the purpose of enhancing the fifth image.

[0101] Specifically, the terminal obtains the weights corresponding to the third image and the fifth image, and performs weighted processing on the third and fifth images based on these weights to obtain processed third and fifth images. The processed third and fifth images are then superimposed on the first image to obtain a processed first image. This processed first image is then identified as the target image corresponding to the image to be processed. For example, the terminal adds the pixel values ​​of the processed third image, the processed fifth image, and the first image to obtain the target image corresponding to the image to be processed.

[0102] For example, the terminal can use the following formula to obtain the target image corresponding to the image to be processed:

[0103] I' = A × HHL + B × HL + L;

[0104] Where L refers to the first image, HL refers to the third image extracted from the second image, B refers to the weight corresponding to the third image, for example, B=1; HHL refers to the fifth image extracted from the fourth image, A refers to the weight corresponding to the fifth image, for example, A=1.5; I' refers to the target image corresponding to the image to be processed.

[0105] It should be noted that the weight B corresponding to the third image and the weight A corresponding to the fifth image can be adjusted according to the actual situation, such as adjusting according to the target sharpness.

[0106] The technical solution provided in this disclosure adds the weighted third and fifth images to the first image to obtain the target image corresponding to the image to be processed. It comprehensively considers the low-frequency components in the second image (i.e., the third image) with a relatively high image signal frequency, as well as the low-frequency components in the fourth image (i.e., the fifth image) with a relatively high image signal frequency, while ignoring the high-frequency components (i.e., background noise) in the second image with a relatively high image signal frequency. This is beneficial for suppressing background noise and results in a higher image quality after processing.

[0107] In an exemplary embodiment, step S120 above, extracting the third image from the second image, specifically includes: filtering the second image to obtain an image in the second image whose image signal frequency satisfies a preset image signal frequency, which is then used as the third image.

[0108] Specifically, the terminal performs edge-preserving filtering on the second image according to the edge-preserving filtering instructions, obtaining an image with a relatively low frequency of image signal from the second image, which is then used as the third image. The edge-preserving filtering instructions refer to GuidedFilter, Bilateral Filter, WLS, etc.

[0109] For example, the terminal can use the following formula to obtain the low-frequency component of the second image, which is the third image.

[0110] HL = WH(H);

[0111] Here, H refers to the second image, WH refers to the edge-preserving filtering algorithm, and HL refers to the third image.

[0112] Furthermore, the fourth image is extracted from the second image, specifically by subtracting the pixel values ​​of the third image from the pixel values ​​of the second image to obtain the fourth image.

[0113] Specifically, the terminal subtracts the pixel values ​​of the second image from the pixel values ​​of the third image to obtain the processed image; the processed image is then designated as the fourth image.

[0114] For example, the terminal can use the following formula to obtain the high-frequency components of the second image, i.e., the fourth image.

[0115] HH = H - HL;

[0116] Here, HH refers to the fourth image.

[0117] The technical solution provided in this disclosure improves the extraction accuracy of the third image by performing edge-preserving filtering on the second image, which facilitates the accurate extraction of the third image from the second image due to its relatively low image signal frequency. Simultaneously, subtracting the pixel values ​​of the accurately extracted third image from the pixel values ​​of the second image to obtain the fourth image further enhances the accuracy of its determination.

[0118] In an exemplary embodiment, extracting a fifth image from a fourth image specifically includes: filtering the fourth image to obtain an image in which the image signal frequency satisfies a preset image signal frequency, and using this image as the fifth image.

[0119] Specifically, the terminal performs edge-preserving filtering on the fourth image according to the edge-preserving filtering instruction, and obtains the image with a relatively low image signal frequency in the fourth image, which is then used as the fifth image.

[0120] For example, the terminal can use the following formula to obtain the low-frequency component of the fourth image, which is the fifth image.

[0121] HHL = WHH(HH);

[0122] Here, HH refers to the fourth image, WHH refers to the edge-preserving filtering algorithm, and HHL refers to the fifth image.

[0123] The technical solution provided in this disclosure, by filtering the fourth image, obtains a fifth image with a relatively low image signal frequency in the fourth image. This is beneficial for subsequently enhancing the third and fifth images and adding them to the first image to obtain the target image corresponding to the image to be processed. By comprehensively considering the third and fifth images, the loss of image edges (contours) and details during noise suppression is avoided, thereby improving the image effect of the processed image.

[0124] In an exemplary embodiment, step S110, extracting a first image and a second image from the image to be processed, specifically includes: performing filtering processing on the image to be processed to obtain an image in the image to be processed whose image signal frequency meets a preset image signal frequency, as the first image; and subtracting the pixel values ​​of the image to be processed from the pixel values ​​of the first image to obtain the second image.

[0125] Specifically, the terminal performs filtering on the image to be processed according to the edge-preserving filtering instruction to obtain an image with a relatively low image signal frequency in the image to be processed, which is used as the first image; it obtains the pixel values ​​of the image to be processed and the pixel values ​​of the first image, and subtracts the pixel values ​​of the image to be processed from the pixel values ​​of the first image to obtain the processed image; the processed image is determined as the second image, that is, the image with a relatively high image signal frequency in the image to be processed.

[0126] For example, the terminal can use the following formula to obtain the low-frequency component (i.e., the first image) and high-frequency component (i.e., the second image) of the image to be processed.

[0127] L = WI(I);

[0128] H = I – L;

[0129] Where I refers to the image to be processed, WI refers to the edge-preserving filtering algorithm, L refers to the first image, and H refers to the second image.

[0130] The technical solution provided in this disclosure involves filtering the image to be processed to obtain a first image with a relatively low image signal frequency; and subtracting the pixel values ​​of the first image from the pixel values ​​of the image to be processed to obtain a second image with a relatively high image signal frequency, which helps to improve the accuracy of determining the first and second images.

[0131] Figure 4 This is a flowchart illustrating another image processing method according to an exemplary embodiment, such as... Figure 4As shown, this image processing method is used in a terminal and includes the following steps:

[0132] In step S410, the image to be processed is filtered to obtain an image whose image signal frequency meets the preset image signal frequency, which is used as the first image.

[0133] In step S420, the pixel values ​​of the image to be processed are subtracted from the pixel values ​​of the first image to obtain the second image.

[0134] In step S430, the second image is filtered to obtain an image whose image signal frequency meets the preset image signal frequency, which is then used as the third image.

[0135] In step S440, the pixel values ​​of the second image are subtracted from the pixel values ​​of the third image to obtain the fourth image.

[0136] In step S450, the fourth image is filtered to obtain an image whose image signal frequency meets the preset image signal frequency, which is then used as the fifth image.

[0137] In step S460, the third image and the fifth image are weighted respectively to obtain the processed third image and the processed fifth image.

[0138] In step S470, the processed third image and the processed fifth image are added to the first image to obtain the processed first image, which serves as the target image corresponding to the image to be processed.

[0139] It should be noted that the specific limitations of the above steps can be found in the specific limitations of an image processing method described above, and will not be repeated here.

[0140] In the above image processing method, after obtaining the first image and the second image, the second image with a higher image signal frequency is not directly superimposed on the first image with a lower image signal frequency. Instead, a third image with a lower image signal frequency and a fourth image with a higher image signal frequency are extracted from the second image, and a fifth image with a lower image signal frequency is extracted from the fourth image. Finally, the third image and the fifth image are superimposed on the first image. This helps to suppress the background noise with a higher image signal frequency in the second image and avoids the defect of amplifying the background noise with a higher image signal frequency in the second image, which would result in a poor image effect after processing. This improves the image effect of the processed image.

[0141] To more clearly illustrate the image processing method provided by the embodiments of this disclosure, a specific embodiment is described below. In an exemplary embodiment, this disclosure identifies the essential difference between noise and edges based on their gradient characteristics. Noise is characterized by large gradient changes in surrounding pixels, with the gradients from the pixel center outwards being roughly similar. Edges, on the other hand, exhibit gradient abrupt changes, with the maximum gradient occurring along the edge's normal direction and gradually decreasing away from the normal. Since general filtering cannot distinguish between noise and edges, treating them uniformly leads to the final sharpening process amplifying both noise and edges simultaneously. Based on this distinction, this disclosure proposes a high-order frequency band filtering strategy based on edge-preserving filtering to suppress the amplification of background noise during sharpening.

[0142] The algorithm consists of two parts. First, the image I is filtered using the edge-preserving filtering algorithm WI to obtain the low-frequency component L of image I. Then, the high-frequency component H is:

[0143] L = WI(I);

[0144] H = IL;

[0145] Then, the high-frequency component H is filtered again using the edge-preserving filtering algorithm WH to obtain the low-frequency component HL in the high-frequency component H. The corresponding high-frequency component HH is then:

[0146] HL = WH(H);

[0147] HH = H - HL;

[0148] Next, the high-frequency component HH is filtered again using the edge-preserving filtering algorithm WHH to obtain the low-frequency component HHL within the high-frequency component HH:

[0149] HHL = WHH(HH);

[0150] HHL=WHH(H-HL)=WHH(I-WI(I)-WH(I-WI(I)));

[0151] After obtaining HHL, the low-frequency component HL in the high-frequency component HH and the low-frequency component HHL in the high-frequency component HH can be superimposed on the low-frequency component L of image I for enhancement, as shown in the following expression:

[0152] I' = A × HHL + B × HL + L;

[0153] In the above equation, A and B control the superposition weights of HHL and HL, respectively. This parameter is user-controlled and can be adjusted automatically according to the target sharpening level. The equation reveals that after obtaining the high-frequency component H of the image, this disclosure does not directly superimpose it onto the low-frequency component. Instead, it performs higher-level frequency decoupling to obtain high-frequency information HH and high-frequency low-frequency information HL. In subsequent superposition processes, only the high-frequency low-frequency information HL is used. By filtering out the high-frequency components in the high-frequency information of the image, background noise can be filtered out, thus suppressing background noise sharpening.

[0154] For example, regarding Figure 5 The left side shows the original image of the pattern, and the right side shows the sharpened image processed using the image processing method disclosed herein. A comparison reveals that the edges and textures of the pattern in the sharpened image on the right are clearer, the sharpening effect is more natural, and by suppressing background noise during sharpening, no trace of noise amplification is visible in the pattern of the sharpened image on the right. Regarding... Figure 6 The image on the left is a photograph of a cat, and the image on the right is a sharpened image processed using the image processing method disclosed herein. A comparison shows that the cat's edges and textures in the sharpened image on the right are clearer, and the sharpening effect is more natural. Furthermore, by suppressing background noise during sharpening, no trace of noise amplification is visible in the cat's image on the right. Of course, the image processing method provided by this disclosure can also sharpen images of people or other types of images, which will not be listed here.

[0155] The edge-preserving filtering algorithm used in this disclosure is a Guided Filter, which involves two parameters, r and eps, representing the filtering radius and smoothing parameter, respectively. In this disclosure, WI, WH, and WHH all use the same set of filtering parameters: r = 13, eps = 0.001. If the user seeks a more balanced sharpening effect, it is recommended to choose A = 1.5 and B = 1.0. If the user requires a higher degree of sharpening, the values ​​of A and B can be increased. However, it is not recommended to excessively increase their values ​​to avoid exceeding the image's own pixel value of 255, which could result in white edges.

[0156] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0157] It is understood that the same / similar parts between the various embodiments of the methods described above in this specification can be referred to each other. Each embodiment focuses on the differences from other embodiments, and relevant parts can be referred to the description of other method embodiments.

[0158] Based on the same inventive concept, this disclosure also provides an image processing apparatus for implementing the image processing method described above.

[0159] Figure 7 This is a block diagram illustrating an image processing apparatus according to an exemplary embodiment. (Refer to...) Figure 7 The device includes a first extraction unit 710, a second extraction unit 720, and an image addition unit 730.

[0160] The first extraction unit 710 is configured to extract a first image and a second image from the image to be processed; the image signal frequency of the first image is lower than the image signal frequency of the second image.

[0161] The second extraction unit 720 is configured to extract a third image from the second image; the third image is an image in the second image whose image signal frequency satisfies a preset image signal frequency.

[0162] The image adding unit 730 is configured to add a third image to a first image to obtain a target image corresponding to the image to be processed; the image quality of the target image is higher than that of the image to be processed.

[0163] In one exemplary embodiment, the image adding unit 730 is further configured to perform weighted processing on the third image to obtain a processed third image; and to add the processed third image to the first image to obtain a processed first image, which serves as the target image corresponding to the image to be processed.

[0164] In one exemplary embodiment, the image processing apparatus further includes a third extraction unit configured to perform the following operations: extracting a fourth image from a second image; wherein the image signal frequency of the fourth image is higher than the image signal frequency of the third image; extracting a fifth image from the fourth image; wherein the fifth image is an image in the fourth image whose image signal frequency satisfies a preset image signal frequency.

[0165] The image adding unit 730 is also configured to add the third image and the fifth image to the first image to obtain the target image corresponding to the image to be processed.

[0166] In an exemplary embodiment, the image adding unit 730 is further configured to perform weighted processing on the third image and the fifth image respectively to obtain the processed third image and the processed fifth image; and to add the processed third image and the processed fifth image to the first image to obtain the processed first image, which serves as the target image corresponding to the image to be processed.

[0167] In an exemplary embodiment, the second extraction unit 720 is further configured to perform filtering processing on the second image to obtain an image in the second image whose image signal frequency satisfies a preset image signal frequency, and use it as a third image;

[0168] The third extraction unit 730 is also configured to subtract the pixel values ​​of the second image from the pixel values ​​of the third image to obtain the fourth image.

[0169] In an exemplary embodiment, the third extraction unit 730 is further configured to perform filtering processing on the fourth image to obtain an image in the fourth image whose image signal frequency satisfies a preset image signal frequency, which is then used as the fifth image.

[0170] In an exemplary embodiment, the first extraction unit 710 is further configured to perform filtering processing on the image to be processed to obtain an image in the image to be processed whose image signal frequency satisfies a preset image signal frequency, as a first image; and to subtract the pixel value of the image to be processed from the pixel value of the first image to obtain a second image.

[0171] 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.

[0172] Each module in the aforementioned image processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0173] Figure 8This is a block diagram illustrating an electronic device 800 for performing an image processing method according to an exemplary embodiment. For example, the electronic device 800 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0174] Reference Figure 8 The electronic device 800 may include one or more of the following components: processing component 802, memory 804, power supply component 806, multimedia component 808, audio component 810, input / output (I / O) interface 812, sensor component 814, and communication component 816.

[0175] Processing component 802 typically controls the overall operation of electronic device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.

[0176] Memory 804 is configured to store various types of data to support the operation of electronic device 800. Examples of such data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, etc. Memory 804 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, optical disk, or graphene storage.

[0177] Power supply component 806 provides power to various components of electronic device 800. Power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800.

[0178] Multimedia component 808 includes a screen that provides an output interface between the electronic device 800 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 808 includes a front-facing camera and / or a rear-facing camera. When the electronic device 800 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.

[0179] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when electronic device 800 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 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.

[0180] I / O interface 812 provides an interface between processing component 802 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.

[0181] Sensor assembly 814 includes one or more sensors for providing state assessments of various aspects of electronic device 800. For example, sensor assembly 814 can detect the on / off state of electronic device 800, the relative positioning of components such as the display and keypad of electronic device 800, changes in position of electronic device 800 or its components, the presence or absence of user contact with electronic device 800, orientation or acceleration / deceleration of device 800, and temperature changes of electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0182] Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices. Electronic device 800 can access wireless networks based on communication standards, such as WiFi, carrier networks (such as 2G, 3G, 4G, or 5G), or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 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.

[0183] In an exemplary embodiment, the electronic device 800 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.

[0184] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, which can be executed by a processor 820 of an electronic device 800 to perform the above-described method. For example, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0185] In an exemplary embodiment, a computer program product is also provided, the computer program product including instructions that can be executed by a processor 820 of an electronic device 800 to perform the above-described method.

[0186] It should be noted that the above-mentioned apparatus, electronic equipment, computer-readable storage medium, computer program product, etc., may also include other implementation methods according to the description of the method embodiments. For specific implementation methods, please refer to the description of the relevant method embodiments, which will not be elaborated here.

[0187] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure 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 this disclosure are indicated by the claims.

[0188] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. An image processing method, characterized in that, include: A first image and a second image are extracted from the image to be processed; the image signal frequency of the first image is lower than the image signal frequency of the second image. Extract a third image from the second image; the third image is an image in the second image whose image signal frequency is less than a preset image signal frequency; The third image is added to the first image to obtain the target image corresponding to the image to be processed; the image quality of the target image is higher than that of the image to be processed; the target image is obtained by adding the third image and the fifth image to the first image, wherein the fifth image is an image whose image signal frequency extracted from the fourth image is less than the preset image signal frequency, and the fourth image is an image whose image signal frequency extracted from the second image is greater than or equal to the preset image signal frequency.

2. The method according to claim 1, characterized in that, The step of adding the third image to the first image to obtain the target image corresponding to the image to be processed includes: The third image is weighted to obtain the processed third image; The processed third image is added to the first image to obtain the processed first image, which serves as the target image corresponding to the image to be processed.

3. The method according to claim 1, characterized in that, The target image corresponding to the image to be processed is obtained in the following way: The third image and the fifth image are weighted separately to obtain the processed third image and the processed fifth image; The processed third image and the processed fifth image are added to the first image to obtain the processed first image, which serves as the target image corresponding to the image to be processed.

4. The method according to claim 1, characterized in that, Extracting the third image from the second image includes: The second image is filtered to obtain an image whose image signal frequency satisfies the preset image signal frequency, which is then used as the third image. The fourth image is obtained in the following manner: The fourth image is obtained by subtracting the pixel values ​​of the second image from the pixel values ​​of the third image.

5. The method according to claim 1, characterized in that, The fifth image is obtained in the following manner: The fourth image is filtered to obtain an image whose image signal frequency satisfies the preset image signal frequency, which is then used as the fifth image.

6. The method according to any one of claims 1 to 5, characterized in that, The step of extracting the first image and the second image from the image to be processed includes: The image to be processed is filtered to obtain an image in which the image signal frequency satisfies the preset image signal frequency, which is used as the first image; The second image is obtained by subtracting the pixel values ​​of the image to be processed from the pixel values ​​of the first image.

7. An image processing apparatus, characterized in that, include: The first extraction unit is configured to extract a first image and a second image from the image to be processed; the image signal frequency of the first image is lower than the image signal frequency of the second image. The second extraction unit is configured to extract a third image from the second image; the third image is an image in the second image whose image signal frequency is less than a preset image signal frequency. An image adding unit is configured to add the third image to the first image to obtain a target image corresponding to the image to be processed; the image quality of the target image is higher than that of the image to be processed; the target image is obtained by adding the third image and the fifth image to the first image, wherein the fifth image is an image whose image signal frequency extracted from the fourth image is less than the preset image signal frequency, and the fourth image is an image whose image signal frequency extracted from the second image is greater than or equal to the preset image signal frequency.

8. The apparatus according to claim 7, characterized in that, The image adding unit is further configured to perform weighted processing on the third image to obtain a processed third image; and to add the processed third image to the first image to obtain a processed first image, which serves as the target image corresponding to the image to be processed.

9. The apparatus according to claim 7, characterized in that, The image adding unit is further configured to perform weighted processing on the third image and the fifth image respectively to obtain a processed third image and a processed fifth image; and to add the processed third image and the processed fifth image to the first image to obtain a processed first image, which serves as the target image corresponding to the image to be processed.

10. The apparatus according to claim 7, characterized in that, The second extraction unit is further configured to perform filtering processing on the second image to obtain an image in the second image whose image signal frequency satisfies the preset image signal frequency, as the third image; The apparatus further includes a third extraction unit configured to subtract the pixel values ​​of the second image from the pixel values ​​of the third image to obtain the fourth image.

11. The apparatus according to claim 7, characterized in that, The device further includes a third extraction unit configured to perform filtering processing on the fourth image to obtain an image in the fourth image whose image signal frequency satisfies the preset image signal frequency, which is then used as the fifth image.

12. The apparatus according to any one of claims 7 to 11, characterized in that, The first extraction unit is further configured to perform filtering processing on the image to be processed to obtain an image in the image to be processed whose image signal frequency satisfies the preset image signal frequency, as a first image; and to subtract the pixel value of the image to be processed from the pixel value of the first image to obtain the second image.

13. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the image processing method as described in any one of claims 1 to 6.

14. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the image processing method as described in any one of claims 1 to 6.

15. A computer program product, the computer program product comprising instructions, characterized in that, When the instructions are executed by the processor of the electronic device, the electronic device is able to perform the image processing method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Image de-noising processing method, device and terminal

    CN103345726A