Image denoising method and device, storage medium, and terminal device

By performing face detection and skin tone detection on the image, distinguishing the skin area and non-skin areas, and adopting denoising treatment of different intensities, the problem that the special denoising needs of face areas in the prior art is solved, and the image quality is improved.

CN114596226BActive Publication Date: 2025-03-18SPREADTRUM COMMUNICATION (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The prior art cannot meet the special denoising needs of the face area when denoising images containing faces, especially in denoising the skin area.

Method used

By acquiring the pending image and face detection results, the face area in the image is determined, and the skin color detection is performed on the area to determine the skin area. Then, the skin area is subjected to the first denoising treatment and the non-skin area is subjected to the second denoising treatment. The two denoising treatments have different intensity.

Benefits of technology

Differentiated denoising of skin areas and non-skin areas in the image is realized, which meets the special denoising needs of face areas, especially skin areas, and improves image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114596226B_ABST
    Figure CN114596226B_ABST
Patent Text Reader

Abstract

The present invention discloses an image denoising method and apparatus, a storage medium, and a terminal device, wherein the image denoising method comprises: obtaining an image to be processed and a face detection result, wherein the face detection result is used to indicate a face area; performing skin color detection on the face area in the image to be processed to determine a skin area; performing a first denoising on the skin area in the image to be processed, and performing a second denoising on the non-skin area in the image to be processed except the skin area, wherein the denoising intensity of the first denoising is different from the denoising intensity of the second denoising; and outputting the processed image to be processed. The above technical solution can be used to adopt different denoising strategies for the skin area and the non-skin area in the image to be processed to meet different denoising requirements for the skin area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and more specifically, to an image denoising method and device, a storage medium, and a terminal device. Background Art

[0002] Image is an important source of information. Image processing can help people understand the connotation of information. However, in the process of image acquisition and transmission, various noise interferences often disturb the observable information of the image. Noise appears in the form of useless information, which will degrade the image and hinder people from understanding the information in the picture, especially in images containing faces. In order to suppress noise and improve image quality, it is necessary to perform noise reduction on the image.

[0003] In the prior art, when performing denoising on an image, a denoising strategy is usually adopted for the entire image.

[0004] However, when performing denoising on an image containing a face, the prior art adopts a denoising strategy for the entire image, which cannot meet the special denoising requirements of the face area in certain scenes. Summary of the invention

[0005] The technical problem solved by the present invention is how to meet different denoising requirements for skin areas.

[0006] To solve the above technical problems, an embodiment of the present invention provides an image denoising method, which includes: obtaining an image to be processed and a face detection result, wherein the face detection result is used to indicate a face area; performing skin color detection on the face area in the image to be processed to determine a skin area; performing a first denoising on the skin area in the image to be processed, and performing a second denoising on a non-skin area in the image to be processed except the skin area, the denoising intensity of the first denoising is different from the denoising intensity of the second denoising; and outputting the processed image to be processed.

[0007] Optionally, the face detection result is a result of face detection performed on the image to be processed, or the face detection result is a result of face detection performed on an image a preset number of frames before the image to be processed, where the preset number of frames is the number of frames spent on face detection.

[0008] Optionally, the face detection result is the coordinate position of the face area, and after acquiring the image to be processed and the face detection result, the method further includes: determining the face area in the image to be processed according to the coordinate position of the face area.

[0009] Optionally, before the image to be processed after the output processing, it also includes: performing a first edge enhancement on the skin area in the image to be processed, and performing a second edge enhancement on the non-skin area in the image to be processed except the skin area, and the enhancement degree of the first edge enhancement is different from the enhancement degree of the second edge enhancement.

[0010] Optionally, the image to be processed and the face detection result are stored in a storage device, and obtaining the image to be processed and the face detection result includes: obtaining the image to be processed and the face detection result from the storage device.

[0011] Optionally, the image format of the image to be processed is in RAW format, and the face detection result is obtained by using a face detection algorithm. Before obtaining the image to be processed and the face detection result, the step also includes: when the face detection algorithm does not support RAW format detection, obtaining the image to be processed; processing the image to be processed into YUV format and storing it, so that the face detection algorithm can perform face detection using the image to be processed in YUV format.

[0012] Optionally, the image to be processed is collected in a photographing mode, and obtaining the image to be processed and the face detection result includes: obtaining the image to be processed and its corresponding face detection result.

[0013] Optionally, the image to be processed is collected in a preview mode or a recording mode, and obtaining the image to be processed and the face detection result includes: obtaining a current frame image as the image to be processed; and obtaining the face detection result of an image a preset number of frames before the image to be processed.

[0014] Optionally, the skin area is a pixel area, the pixel area includes a plurality of pixels, the skin area is stored in a storage device, and the first denoising of the skin area in the image to be processed includes: acquiring the pixel area of ​​the skin area from the storage device; and performing the first denoising on the pixel area.

[0015] An embodiment of the present invention also discloses an image denoising device, which includes: an acquisition module, used to acquire an image to be processed and a face detection result, wherein the face detection result is used to indicate a face area; a skin color detection module, used to perform skin color detection on the face area in the image to be processed to determine the skin area; a denoising module, used to perform a first denoising on the skin area in the image to be processed, and to perform a second denoising on the non-skin area in the image to be processed except the skin area, the denoising intensity of the first denoising is different from the denoising intensity of the second denoising; and an output module, used to output the processed image to be processed.

[0016] An embodiment of the present invention further discloses a terminal device, including a memory and a processor, wherein the memory stores a computer program executable on the processor, and when the computer program is executed by the processor, the steps of any one of the above-mentioned image denoising methods are executed.

[0017] The embodiment of the present invention further discloses a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the above-mentioned image denoising methods are executed.

[0018] Compared with the prior art, the technical solution of the embodiment of the present invention has the following beneficial effects:

[0019] The present invention proposes an image denoising method, which obtains an image to be processed and a face detection result to determine a face area in the image to be processed, and then performs skin color detection on the face area in the image to be processed to determine a skin area in the face area in the image to be processed. A first denoising is performed on the skin area in the image to be processed, and a second denoising is performed on the non-skin area other than the skin area in the image to be processed. After distinguishing the skin area, different denoising strategies can be adopted for the skin area and the non-skin area in the image to be processed, and the denoising intensity of the skin area can be independently adjusted to meet the special denoising requirements of the face area in certain scenes.

[0020] Furthermore, by judging whether the face detection algorithm supports detecting RAW format images, corresponding processing strategies are adopted for different face detection algorithms. When the face detection algorithm does not support detecting RAW format, the image to be processed is obtained, and the image to be processed is processed into YUV format and then stored in a storage device, so that the face detection algorithm can use the image to be processed in YUV format for face detection. Various face detection algorithms can be adapted to the image denoising method, thereby increasing the compatibility of the method.

[0021] Furthermore, by storing the skin area obtained after skin color detection in a storage device, when performing the first denoising on the skin area in the image to be processed, the pixel area of ​​the skin area is directly obtained from the storage device, and the first denoising is performed on the pixel area. When performing multiple denoising on the skin area, there is no need to perform multiple skin color detections on the pixels, and the pixel area can be directly used for denoising, thereby improving the efficiency of the first denoising. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 is an overall flow chart of an image denoising method provided by an embodiment of the present invention;

[0023] Figure 2 It is a specific implementation flow chart of an image denoising method when a face detection algorithm supports RAW format detection in a photographing mode provided by an embodiment of the present invention;

[0024] Figure 3 is a specific implementation flow chart of an image denoising method when a face detection algorithm does not support RAW format detection in a photographing mode provided by an embodiment of the present invention;

[0025] Figure 4 It is a specific flow chart of an image denoising method when a face detection algorithm supports RAW format detection in a preview mode or a video recording mode provided by an embodiment of the present invention;

[0026] Figure 5 It is a specific implementation flow chart of an image denoising method provided by an embodiment of the present invention when a face detection algorithm in a preview mode or a video recording mode does not support RAW format detection;

[0027] Figure 6 It is a structural schematic diagram of an image denoising device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0028] As described in the background technology, various noise interferences often disrupt the observable information of the image during the acquisition and transmission process, causing image degradation and hindering people from understanding the information in the image. In the prior art, when denoising an image, a denoising strategy is usually adopted for the entire image. However, when denoising an image containing a face, a separate denoising strategy is not adopted for the face area in the image, which cannot meet the special denoising requirements of the face area in certain scenarios.

[0029] In an embodiment of the present invention, the face region in the image to be processed is determined by obtaining the image to be processed and the face detection result, and then the skin color detection is performed on the face region in the image to be processed to determine the skin region of the face region in the image to be processed. The skin region in the image to be processed is subjected to a first denoising, and the non-skin region other than the skin region in the image to be processed is subjected to a second denoising. After the skin region is distinguished, different denoising strategies can be adopted for the skin region and the non-skin region in the image to be processed, and the denoising intensity of the skin region can be independently adjusted to meet the special denoising requirements of the skin region.

[0030] Furthermore, by judging whether the face detection algorithm supports detecting RAW format images, corresponding processing strategies are adopted for different face detection algorithms. When the face detection algorithm does not support detecting RAW format, the image to be processed is obtained, and the image to be processed is processed into YUV format and then stored in a storage device, so that the face detection algorithm can use the image to be processed in YUV format for face detection. Various face detection algorithms can be adapted to the image denoising method, thereby increasing the compatibility of the method.

[0031] Furthermore, by storing the skin area obtained after skin color detection in a storage device, when performing the first denoising on the skin area in the image to be processed, the pixel area of ​​the skin area is directly obtained from the storage device, and the first denoising is performed on the pixel area. When performing multiple denoising on the skin area, there is no need to perform multiple skin color detections on the pixels, and the pixel area can be directly used for denoising, thereby improving the efficiency of the first denoising.

[0032] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0033] Figure 1 It is an overall flow chart of an image denoising method provided by an embodiment of the present invention.

[0034] In a specific implementation, the image denoising method described in the following steps 101 to 104 can be used in a terminal device. The above steps can be specifically performed by the terminal device, or by a chip with a data processing function in the terminal device, such as an image signal processor (ISP), or by a chip module of a chip with a data processing function in the terminal device, such as an application processor of a mobile terminal.

[0035] Specifically, Figure 1 As shown, the image denoising method may include the following steps:

[0036] In step 101, an image to be processed and a face detection result are obtained.

[0037] In step 102, skin color detection is performed on the face area in the image to be processed to determine the skin area.

[0038] In step 103, a first denoising is performed on the skin area in the image to be processed, and a second denoising is performed on the non-skin area in the image to be processed except the skin area.

[0039] In step 104, the processed image to be processed is output.

[0040] In a non-limiting embodiment, a face detection algorithm is used to perform face detection on an image to be processed or an image that is a preset number of frames away from the image to be processed to obtain a face detection result. The face detection result is the coordinate position of the face area, which is used to indicate the face area. The face detection algorithm can be deployed in a central processing unit (CPU) or a neural-network processing unit (NPU).

[0041] In a specific embodiment, the face detection algorithm can be a face detection model constructed using a neural network, and the face detection model is trained in the following manner: obtaining training samples, the training samples including multiple images and their face areas; and using the training samples to train the face detection model.

[0042] In a specific implementation, the image to be processed can be acquired by a camera device, and the camera device stores the acquired image to be processed in a storage device. For example, the camera device can be a camera device of a mobile device, or a camera device of a monitoring device. The camera device can specifically be a sensor. The face detection algorithm processes the image to be processed in the storage device to obtain a face detection result, and then stores the face detection result in the storage device. Specifically, the storage device can be set locally in the terminal device; or, the storage device can also be an external storage device and communicate with the terminal device.

[0043] In a non-limiting embodiment, according to the coordinate position of the face area in the face detection result, the pixels indicated by the coordinate position are determined in the image to be processed, and the area formed by connecting the pixels is used as the face area.

[0044] In the specific implementation of step 102, a skin color detection algorithm is used to detect skin color in the face region, pixels of eyebrows, eyes, etc. in the face region are excluded, and only pixels where the skin is located in the face region are extracted to obtain the skin region in the face region. Specifically, a Cr, Cb range screening method based on a YCrCb color space or a skin detection method based on RGB can be used as a skin color detection algorithm.

[0045] It should be noted that the skin color detection algorithm may also be any other feasible algorithm. Please refer to the prior art for details, and this application does not impose any limitation on this.

[0046] In the specific implementation of step 103, the skin area in the processed image is subjected to a first denoising, and the non-skin area in the processed image other than the skin area is subjected to a second denoising, and the denoising intensity of the first denoising is different from the denoising intensity of the second denoising. For example, image denoising can be performed using a non-local means method (Non-Local Means), Gaussian filtering, median filtering, bilateral filtering or guided filtering. Specifically, when the non-local means method is used for image denoising, the denoising intensity can be controlled by adjusting a smoothing parameter. The smaller the smoothing parameter, the smaller the denoising degree, the more edge detail components are retained, but too many noise points will remain.

[0047] It should be noted that the denoising algorithm may also be any other implementable algorithm, and different denoising algorithms may use different denoising parameters. Please refer to the prior art for details, and this application does not impose any limitation on this.

[0048] In a specific embodiment, the second denoising is directly performed on the non-face area in the image to be processed. For the face area in the image to be processed, skin detection is performed pixel by pixel, and the skin area can be a single pixel. When the pixel belongs to the skin area, the first denoising is performed on the pixel; when the pixel does not belong to the skin area, the second denoising is performed on the pixel. Each time denoising is performed, skin color detection is required for the pixel. For example, if Gaussian filtering denoising and median filtering denoising are required for the image to be processed, skin color detection is performed on pixel 1. When pixel 1 is a skin area, Gaussian filtering denoising with a lower denoising intensity is performed on pixel 1. When pixel 1 is a non-skin area, Gaussian filtering denoising with a higher denoising intensity is performed on pixel 1. After the Gaussian filtering denoising of the face area is completed, skin color detection is performed on pixel 1 again. When pixel 1 is a skin area, median filtering denoising with a lower denoising intensity is performed on pixel 1. When pixel 1 is a non-skin area, median filtering denoising with a higher denoising intensity is performed on pixel 1. This method directly denoises the skin area without using a storage device to store the skin area.

[0049] In another specific embodiment, the second denoising is directly performed on the non-face area in the image to be processed. For the face area in the image to be processed, it is necessary to first perform skin detection to obtain the skin area. The skin area can be a pixel area, the pixel area includes multiple pixels, and the skin area is stored in a storage device. Then, the pixel area of ​​the skin area is obtained from the storage device, and the first denoising is performed on the pixel area, and the second denoising is performed on the non-skin area of ​​the face area. For example, if it is necessary to perform Gaussian filtering denoising and median filtering denoising on the image to be processed, the pixel area is obtained from the storage device, and Gaussian filtering denoising and median filtering denoising are performed on the pixel area. This method obtains the result of skin detection from the storage device, does not need to perform multiple skin color detections on the pixels, and can directly use the skin area for denoising.

[0050] In a non-limiting embodiment, a first edge enhancement is performed on the skin area in the processed image, and a second edge enhancement is performed on the non-skin area other than the skin area in the processed image, and the enhancement degree of the first edge enhancement is different from the enhancement degree of the second edge enhancement. Specifically, the enhancement degree of the edge enhancement can be adjusted by controlling the transformation coefficient of the edge enhancement, and the smaller the transformation coefficient, the weaker the enhancement degree of the edge enhancement.

[0051] It should be noted that the edge enhancement algorithms used in the first edge enhancement and the second edge enhancement may be edge enhancement algorithms based on the spatial domain, or any other implementable edge enhancement algorithms, which are not limited in the embodiment of the present invention.

[0052] In a specific embodiment, the second edge enhancement is directly performed on the non-face area in the image to be processed. For the face area in the image to be processed, skin detection is performed pixel by pixel. When the pixel belongs to the skin area, the first edge enhancement is performed on the pixel; when the pixel does not belong to the skin area, the second edge enhancement is performed on the pixel.

[0053] In another specific embodiment, the second edge enhancement is directly performed on the non-face area in the image to be processed. The skin detection is first performed on the face area in the image to be processed to obtain the skin area. The skin area can be a pixel area, the pixel area includes a plurality of pixels, and the skin area is stored in a storage device. Then the pixel area of ​​the skin area is obtained from the storage device, the first edge enhancement is performed on the pixel area, and the second edge enhancement is performed on the non-skin area of ​​the face area.

[0054] In a specific implementation of step 104, outputting the processed image to be processed may be outputting the image to be processed after denoising and edge enhancement to a display device. For example, the display device may be a display device of a mobile device or a display device of a monitoring device.

[0055] In another specific implementation of step 104, outputting the processed image to be processed may be outputting the image to be processed after denoising and edge enhancement to a storage device or an external device.

[0056] In the embodiment of the present invention, the face region in the image to be processed is determined according to the image to be processed and the face detection result. The skin region of the face region in the image to be processed can be determined by performing skin color detection on the face region. Different denoising strategies are adopted for the skin region in the image to be processed and the non-skin region outside the skin region, so that more details can be retained in the skin region. At the same time, different edge enhancement strategies are also adopted for the skin region and the non-skin region, so that the skin region looks more natural and meets different processing requirements of the skin region.

[0057] It should be pointed out that the serial numbers of the steps in this embodiment do not limit the execution order of the steps.

[0058] It is understandable that, in a specific implementation, the image denoising method can be implemented in the form of a software program, which runs in a processor integrated inside a chip or a chip module. The method can also be implemented in the form of software combined with hardware, which is not limited in this application.

[0059] Figure 2 It is a specific implementation flow chart of an image denoising method when a face detection algorithm supports RAW format detection in a photographing mode provided by an embodiment of the present invention.

[0060] Specifically, Figure 2 As shown, the image denoising method when the face detection algorithm supports RAW format detection in the photographing mode may include steps 201 to 205. In this embodiment, the face detection algorithm may be a face detection model.

[0061] In a specific implementation, in the photo mode, only the current frame image needs to be denoised and edge enhanced, and there is sufficient time to process the image after it is captured.

[0062] In the specific implementation of step 201, a sensor stores the collected image to be processed in a storage device. Specifically, the sensor may be an image sensor.

[0063] In the specific implementation of step 202, the face detection model obtains the image to be processed in the storage device and performs face detection on the image to be processed.

[0064] In the specific implementation of step 203, the face detection model stores the face detection result of the image to be processed in a storage device.

[0065] In the specific implementation of step 204, the image signal processor obtains the image to be processed and the face detection result thereof in the storage device, and processes the image to be processed.

[0066] In the specific implementation of step 205, the image signal processor outputs the processed image to be processed.

[0067] Regarding the specific implementation of step 204 and step 205, please refer to the aforementioned embodiment, which will not be described again here.

[0068] Figure 3 It is a specific implementation flow chart of an image denoising method provided by an embodiment of the present invention when a face detection algorithm in a photographing mode does not support RAW format detection.

[0069] Specifically, Figure 3As shown, in the photographing mode, when the face detection algorithm does not support RAW format detection, the image denoising method may include the following steps:

[0070] In the specific implementation of step 301, the sensor sends the collected RAW format image to be processed to the image signal processor and stores it in the storage device.

[0071] In the specific implementation of step 302, the image signal processor converts the acquired image to be processed into a format, converts the image to be processed in RAW format into an image to be processed in YUV format, and stores the image to be processed in YUV format in a storage device.

[0072] In the specific implementation of step 303, the face detection algorithm obtains the to-be-processed image in the YUV format from the storage device, and performs face detection on the to-be-processed image in the YUV format to obtain a face detection result.

[0073] In the specific implementation of step 304, the face detection algorithm stores the face detection result of the image to be processed in the YUV format in a storage device.

[0074] In the specific implementation of step 305, the image signal processor obtains the image to be processed in the storage device and the face detection result of the face detection algorithm on the image to be processed in YUV format, and processes the image to be processed.

[0075] In the specific implementation of step 306, the image signal processor outputs the processed image to be processed.

[0076] Regarding the specific implementation of step 304 and step 305, please refer to the aforementioned embodiment, which will not be described again here.

[0077] In an embodiment of the present invention, when the face detection algorithm does not support the detection of the RAW format, the image to be processed in the RAW format is converted into the image to be processed in the YUV format, so that the face detection algorithm can perform face detection on the image to be processed. A processing flow is set for the face detection algorithm that does not support the detection of the RAW format image, and the adaptability of the image denoising method is further improved, thereby increasing the compatibility of the method.

[0078] Figure 4 It is a specific flow chart of an image denoising method provided by an embodiment of the present invention when a face detection algorithm supports RAW format detection in a preview mode or a video recording mode.

[0079] Specifically, Figure 4 As shown, in the preview mode or the video recording mode, the image denoising method when the face detection algorithm supports RAW format detection may include the following steps:

[0080] In a specific implementation, the multiple frames of images output to the display device in the preview mode or the recording mode are played in the form of a video, so the preview mode and the recording mode can also be called the online multi-frame mode. In the online multi-frame mode, the image to be processed needs to be processed in real time, and face detection takes a certain amount of time, resulting in a time delay in the image processing.

[0081] In the specific implementation of step 401, the sensor stores each frame of the collected image to be processed in a storage device.

[0082] In the specific implementation of step 402, the face detection algorithm obtains each frame of the image to be processed in the storage device, and performs face detection on each frame of the image to be processed.

[0083] In the specific implementation of step 403, the face detection algorithm stores the face detection result of each frame of the image to be processed in a storage device.

[0084] In the specific implementation of step 404, the image signal processor obtains the face detection results of the current frame image to be processed and the images to be processed a preset number of frames before the current frame image to be processed from the storage device, and processes the current frame image to be processed.

[0085] In a specific implementation, the time spent on face detection can be obtained by pre-testing, and the number of frames spent in the time spent on face detection is used as the preset number of frames. The face detection algorithm performs face detection on each frame image, and stores the face detection result of each frame image in a storage device. For example, the time spent on face detection is a total of 5 frames of images, and the current frame image is the 7th frame image, and the 7th frame image is used as the image to be processed. At this time, the face detection result of the 2nd frame image is obtained, and the face detection result includes the coordinate position of the face area of ​​the 2nd frame image. The face area is determined in the 7th frame image according to the coordinate position of the face area of ​​the 2nd frame image.

[0086] In the specific implementation of step 405, the image signal processor outputs the processed current frame image to be processed.

[0087] Regarding the specific implementation of step 404 and step 405, please refer to the aforementioned embodiment, which will not be described again here.

[0088] In an embodiment of the present invention, the face area of ​​the current frame image is determined based on the face detection results of the current frame image and an image at a preset number of frames away from the current frame image, thereby avoiding the delay problem caused by further face detection on the current frame image, solving the impact of the time delay caused by face detection on the user experience, and improving the user's perceptual experience.

[0089] Figure 5It is a specific implementation flow chart of image denoising when the face detection algorithm does not support RAW format detection in a preview mode or a video recording mode provided by an embodiment of the present invention.

[0090] Specifically, Figure 5 As shown, the image denoising method when the face detection algorithm does not support RAW format detection in the preview mode or the video recording mode may include the following steps:

[0091] In the specific implementation of step 501, the sensor sends each frame of the collected RAW format image to be processed to the image signal processor and stores it in the storage device.

[0092] In the specific implementation of step 502, the image signal processor converts the format of each frame of the acquired image to be processed, converts the image to be processed in RAW format into the image to be processed in YUV format, and stores the image to be processed in YUV format in the storage device.

[0093] In the specific implementation of step 503, the face detection algorithm obtains each frame of the to-be-processed image in the YUV format from the storage device, and performs face detection on each frame of the to-be-processed image in the YUV format to obtain a face detection result.

[0094] In the specific implementation of step 504, the face detection algorithm stores the face detection result of each frame of the to-be-processed image in the YUV format in a storage device.

[0095] In the specific implementation of step 505, the image signal processor obtains the face detection results of the current frame to be processed image and the images to be processed a preset number of frames before the current frame to be processed image from the storage device, and processes the current frame to be processed image.

[0096] In the specific implementation of step 506, the image signal processor outputs the processed current frame image to be processed.

[0097] Regarding the specific implementation of step 505 and step 506, please refer to the aforementioned embodiment, which will not be described again here.

[0098] like Figure 6 As shown, the embodiment of the present invention also discloses an image denoising device. The image denoising device 60 includes:

[0099] The acquisition module 601 is used to acquire the image to be processed and the face detection result, wherein the face detection result is used to indicate the face area.

[0100] The skin color detection module 602 is used to perform skin color detection on the face area in the image to be processed to determine the skin area.

[0101] The denoising module 603 is used to perform a first denoising on the skin area in the image to be processed, and to perform a second denoising on the non-skin area in the image to be processed except the skin area, and the denoising intensity of the first denoising is different from the denoising intensity of the second denoising.

[0102] The output module 604 is used to output the processed image to be processed.

[0103] In a specific implementation, the above-mentioned image denoising device may correspond to a chip with an image denoising function in a terminal device, such as a SOC (System-On-a-Chip), a baseband chip, etc.; or correspond to a chip module with an image denoising function in a terminal device; or correspond to a chip module with a data processing function chip, or correspond to a terminal device.

[0104] For more information about the working principle and working method of the image denoising device 60, please refer to Figures 1 to 5 The relevant description in will not be repeated here.

[0105] Regarding the various modules / units included in the various devices and products described in the above embodiments, they can be software modules / units, or hardware modules / units, or they can be partially software modules / units and partially hardware modules / units. For example, for various devices and products applied to or integrated in a chip, the various modules / units included therein can all be implemented in the form of hardware such as circuits, or at least some of the modules / units can be implemented in the form of software programs, which run on a processor integrated inside the chip, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuits; for various devices and products applied to or integrated in a chip module, the various modules / units included therein can all be implemented in the form of hardware such as circuits, and different modules / units can be located in the same component (such as a chip, circuit module, etc.) or different components of the chip module, or at least some of the modules / units can be implemented in the form of hardware such as circuits. The element can be implemented in the form of a software program, which runs on a processor integrated inside the chip module, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuits; for various devices and products applied to or integrated in the terminal, the various modules / units contained therein can be implemented in the form of hardware such as circuits, and different modules / units can be located in the same component (for example, chip, circuit module, etc.) or in different components in the terminal, or, at least some modules / units can be implemented in the form of a software program, which runs on a processor integrated inside the terminal, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuits.

[0106] The embodiment of the present invention also discloses a storage medium, which is a computer-readable storage medium and stores a computer program. When the computer program is run, it can execute Figures 1 to 5 The steps of the method shown in . The storage medium may include ROM, RAM, magnetic disk or optical disk, etc. The storage medium may also include non-volatile memory (non-volatile) or non-transitory memory, etc.

[0107] The embodiment of the present invention further discloses a terminal device, which may include a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and the processor can execute the computer program when running the computer program. Figures 1 to 5 The steps of the method shown in .

[0108] The "plurality" appearing in the embodiments of the present application refers to two or more.

[0109] The first, second, etc. descriptions appearing in the embodiments of the present application are only used for illustration and distinction of the description objects. There is no order, nor do they indicate any special limitation on the number of devices in the embodiments of the present application, and cannot constitute any limitation on the embodiments of the present application.

[0110] It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0111] It should also be understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM) and direct rambus RAM (DR RAM).

[0112] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0113] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0114] In the several embodiments provided in the present application, it should be understood that the disclosed methods, devices and systems can be implemented in other ways. For example, the device embodiments described above are merely schematic; for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation; for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0115] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0116] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0117] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.

[0118] Although the present invention is disclosed as above, the present invention is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the scope defined by the claims.

Claims

1. An image denoising method, characterized in that: include: Acquire an image to be processed and a face detection result, wherein the face detection result is used to indicate a face area; Performing skin color detection on the face area in the image to be processed to determine the skin area; Performing a first denoising on the skin area in the image to be processed, and performing a second denoising on the non-skin area in the image to be processed except the skin area, wherein the denoising intensity of the first denoising is different from the denoising intensity of the second denoising; Output the processed image to be processed, wherein in preview mode or video recording mode, the face detection result is the result of face detection on an image that is a preset number of frames before the image to be processed, and the preset number of frames is the number of frames spent on face detection.

2. The image denoising method according to claim 1, characterized in that: The face detection result is the coordinate position of the face area, and after obtaining the image to be processed and the face detection result, the following step is further included: The face region is determined in the image to be processed according to the coordinate position of the face region.

3. The image denoising method according to claim 1, characterized in that: Before outputting the processed image to be processed, the method further includes: A first edge enhancement is performed on the skin area in the image to be processed, and a second edge enhancement is performed on the non-skin area in the image to be processed except the skin area, wherein the enhancement degree of the first edge enhancement is different from the enhancement degree of the second edge enhancement.

4. The image denoising method according to claim 1, characterized in that: The image to be processed and the face detection result are stored in a storage device, and obtaining the image to be processed and the face detection result includes: The image to be processed and the face detection result are obtained from the storage device.

5. The image denoising method according to claim 1, characterized in that: The image format of the image to be processed is in RAW format, and the face detection result is obtained by using a face detection algorithm. Before obtaining the image to be processed and the face detection result, the following step is further included: When the face detection algorithm does not support RAW format detection, obtaining the image to be processed; The image to be processed is processed into a YUV format and stored, so that the face detection algorithm can use the image to be processed in the YUV format to perform face detection.

6. The image denoising method according to claim 1, characterized in that: The image to be processed is collected in a photographing mode, and obtaining the image to be processed and the face detection result includes: Get the image to be processed and its corresponding face detection result.

7. The image denoising method according to claim 1, characterized in that: The image to be processed is collected in a preview mode or a video recording mode, and obtaining the image to be processed and the face detection result includes: Acquire the current frame image as the image to be processed; Obtain a face detection result of an image that is a preset number of frames before the image to be processed.

8. The image denoising method according to claim 1, characterized in that: The skin area is a pixel area, the pixel area includes a plurality of pixels, the skin area is stored in a storage device, and the first denoising of the skin area in the image to be processed includes: Acquire a pixel area of ​​the skin area from the storage device; A first denoising operation is performed on the pixel area.

9. An image denoising device, characterized in that: include: An acquisition module, used to acquire an image to be processed and a face detection result, wherein the face detection result is used to indicate a face area; A skin color detection module, used for performing skin color detection on the face area in the image to be processed to determine the skin area; a denoising module, configured to perform a first denoising on the skin area in the image to be processed, and to perform a second denoising on the non-skin area in the image to be processed except the skin area, wherein the denoising intensity of the first denoising is different from the denoising intensity of the second denoising; An output module is used to output the processed image to be processed, wherein in the preview mode or the recording mode, the face detection result is the result of face detection on an image that is a preset number of frames before the image to be processed, and the preset number of frames is the number of frames spent on face detection.

10. A terminal device, comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor runs the computer program, the processor performs the steps of the image denoising method according to any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the image denoising method according to any one of claims 1 to 8 are executed.

Citation Information

Patent Citations

  • Image processing method, device and equipment and storage medium

    CN111723803A

  • A method of processing an image, a method of processing a video image, a noise reduction system and a display system

    WO2012128376A1