WO2020140986A1 - Image denoising method and apparatus, storage medium and terminal - Google Patents

Image denoising method and apparatus, storage medium and terminal Download PDF

Info

Publication number
WO2020140986A1
WO2020140986A1 PCT/CN2020/070337 CN2020070337W WO2020140986A1 WO 2020140986 A1 WO2020140986 A1 WO 2020140986A1 CN 2020070337 W CN2020070337 W CN 2020070337W WO 2020140986 A1 WO2020140986 A1 WO 2020140986A1
Authority
WO
WIPO (PCT)
Prior art keywords
color
target
noise reduction
area
brightness
Prior art date
Application number
PCT/CN2020/070337
Other languages
French (fr)
Chinese (zh)
Inventor
张弓
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2020140986A1 publication Critical patent/WO2020140986A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • G06T5/70
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/71Circuitry for evaluating the brightness variation

Definitions

  • Embodiments of the present application relate to the technical field of terminals, and in particular, to an image noise reduction method, device, storage medium, and terminal.
  • Embodiments of the present application provide an image noise reduction method, device, storage medium, and terminal, which can optimize a noise reduction scheme in related technologies.
  • an embodiment of the present application provides an image noise reduction method, including:
  • an embodiment of the present application further provides an image noise reduction device, which includes:
  • the information determination module is used to determine the brightness information of the skin color area in the target image
  • a noise reduction intensity determination module configured to determine a target sub-region with a brightness lower than a preset brightness threshold in the skin-color region, and determine a target noise reduction intensity according to the brightness of the target sub-region and the brightness information;
  • the noise reduction processing module is configured to perform noise reduction processing on the target sub-region based on the target noise reduction intensity to obtain a target image after noise reduction processing.
  • embodiments of the present application also provide embodiments of the present application to provide a computer-readable storage medium on which a computer program is stored, which when executed by a processor implements image reduction as provided by any embodiment of the present application Noise method.
  • an embodiment of the present application provides a terminal, including a memory, a processor, and a computer program stored on the memory and executable by the processor.
  • the processor executes the computer program, it can be implemented as arbitrarily implemented in the present application.
  • Example provides image noise reduction method.
  • An embodiment of the present application provides an image noise reduction solution, by determining the brightness information of the skin color area in the target image; determining the target sub-area in the skin color area whose brightness is lower than the preset brightness threshold, according to the brightness and brightness information of the target sub-area Determine the target noise reduction intensity; perform noise reduction on the target sub-region based on the target noise reduction intensity to obtain the target image after noise reduction processing.
  • the target sub-region to be subjected to noise reduction processing is determined based on the brightness
  • the noise reduction intensity is determined according to the brightness of each pixel in the target sub-region and the brightness information of the skin color area
  • the corresponding pixels are determined based on the noise reduction intensity
  • FIG. 2 is a flowchart of another image noise reduction method provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of an image noise distribution provided by an embodiment of the present application.
  • FIG. 5 is a structural block diagram of an image noise reduction device according to an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a terminal according to an embodiment of the present application.
  • FIG. 7 is a structural block diagram of a smartphone provided by an embodiment of the present application.
  • the noise reduction scheme in the related art regards the human face as a whole, and uses a similar noise reduction intensity to perform overall noise reduction on the human face. Since the actual distribution of noise in the face image is not consistent, the overall noise reduction scheme will result in uneven distribution of noise in different areas, and the noise reduction effect is not ideal.
  • FIG. 1 is a flowchart of an image noise reduction method provided by an embodiment of the present application.
  • the method may be suitable for photographing scenes, including but not limited to shooting videos or photos.
  • the method may be performed by an image noise reduction device, which may be The software and/or hardware implementation can generally be integrated in the terminal. As shown in Figure 1, the method includes:
  • Step 110 Determine the brightness information of the skin color region in the target image.
  • the terminal in the embodiment of the present application may include mobile phones, tablet computers, notebook computers, computers, and other electronic devices that display images.
  • An operating system is integrated in the terminal in the embodiment of the present application, and the type of the operating system is not limited in the embodiment of the present application, for example, it may include an Android operating system, a Windows operating system, and an Apple (ios) operating system and many more.
  • the brightness information may be brightness related information of each pixel in the skin color area of the target image.
  • the brightness information may be the average brightness value of the skin area; the brightness information may be the brightness weighted value of the skin area; the brightness information may also be the maximum brightness of the skin area; and the brightness information may also be the minimum brightness of the skin area, etc. .
  • the target image may be an image obtained by shooting a target scene through a terminal with a shooting function, an image acquired from an album of the terminal, or an image acquired from an Internet platform, and so on.
  • the target image may be an image of RGB color mode, YUV color mode, HSV color mode, or Lab color mode.
  • color is usually described by three relatively independent attributes. The combined effect of three independent variables naturally forms a spatial coordinate. This is the color mode.
  • the color mode can be divided into a primary color mode and a color separation color mode.
  • the primary color mode includes but not limited to RGB color mode
  • the color separation mode includes but not limited to YUV color mode, Lab color mode and HSV color mode.
  • the color light separation color mode is a color mode for indicating the separation of color and brightness.
  • the Y component represents brightness
  • the U component represents color
  • the V component represents density, where the U component and V component together represent the color of the image.
  • the L component represents brightness
  • a and b jointly represent color.
  • the H component represents hue
  • the S component represents saturation
  • the V component represents lightness, where hue is the basic attribute of color
  • saturation refers to the purity of color
  • lightness is also brightness.
  • the brightness component and the color component can be extracted separately, and the image can be processed in any aspect of brightness and color. Exemplarily, when the brightness is processed, the color of the image will not be processed. The weight has no effect.
  • the brightness of each pixel in the skin color area is obtained, so that the mean value of the brightness mean_lux of the skin color area can be calculated.
  • the maximum brightness max_lux and the minimum brightness min_lux can be determined by comparing the brightness of each pixel in the skin color area.
  • Step 120 Determine a target sub-region whose brightness in the skin-color region is lower than a preset brightness threshold, and determine a target noise reduction intensity according to the brightness of the target sub-region and the brightness information.
  • each pixel in the skin color area of the target image in the color separation mode is obtained, the brightness of each pixel in the skin color area is compared with a preset brightness threshold, and a target whose brightness is lower than the preset brightness threshold is marked Pixel points, clustering the target pixel points into at least one target sub-region; according to the brightness of the target pixel point in each of the target sub-regions, the average brightness value of the skin color area, the maximum brightness value of the skin color area and the The minimum brightness value of the skin color area determines the target noise reduction intensity based on the brightness.
  • the preset brightness threshold is a threshold value used to filter the target sub-regions in the skin-color area that needs to be subjected to local noise reduction, including but not limited to the average brightness of the skin-color area and the brightness weighted value of the skin-color area (weighted weight Is the ratio of the number of pixels corresponding to each brightness to the total number of pixels contained in the skin color area), the target brightness value in the skin color area where the brightness is lower than the average brightness and the corresponding pixel is the most, or the brightness in the skin area is lower than the brightness weight Value and the corresponding target brightness value with the most pixels.
  • weighted weight the ratio of the number of pixels corresponding to each brightness to the total number of pixels contained in the skin color area
  • the brightness of each pixel in the skin color area is compared with the average brightness to determine the target sub-area with brightness lower than the average brightness. For the area composed of pixels whose brightness is higher than the average brightness value, no additional local noise reduction process is performed.
  • the brightness of each pixel in the skin color area is compared with the brightness weighted value to determine the target sub-area whose brightness is lower than the brightness weighted value. For the area composed of pixels whose brightness is higher than the brightness weighted value, no additional local noise reduction process is performed.
  • Step 130 Perform noise reduction processing on the target sub-region based on the target noise reduction intensity to obtain a target image after noise reduction processing.
  • any pixel in the target sub-region is adjusted according to the target noise reduction intensity, and the remaining pixel points in the target sub-region are separately adjusted according to the target noise reduction intensity, Therefore, the local noise reduction processing of the target image is realized, and the amount of face noise under undesirable light such as backlight, side light, direct light source, and dark light is effectively suppressed.
  • the image noise reduction method provided in the embodiment of the present application can make the face area present a natural and clear picture effect, avoid the appearance of the traditional face noise reduction scheme, regard the face as a whole, and perform overall noise reduction processing on the entire face area, The phenomenon of uneven noise in different areas of the processed image will affect the consistency of the photos.
  • the embodiments of the present application perform noise reduction processing on the face area on the basis of a single frame image, which has a high processing speed, which can avoid the multi-frame noise reduction scheme taking a long time and affecting the success rate and photo output of the photo.
  • the problem of film speed is a problem of film speed.
  • the target noise reduction is determined according to the brightness and brightness information of the target sub-region Intensity; based on the target noise reduction intensity, the target sub-region is subjected to noise reduction processing to obtain the noise-reduced target image.
  • the target sub-region to be subjected to noise reduction processing is determined based on the brightness
  • the noise reduction intensity is determined according to the brightness of each pixel in the target sub-region and the brightness information of the skin color area
  • the corresponding pixels are determined based on the noise reduction intensity
  • FIG. 2 is a flowchart of another image noise reduction method provided by an embodiment of the present application. The method includes:
  • Step 201 Acquire a target image in a color-separated color mode, perform face recognition on the target image, and determine face information contained in the target image.
  • a face frame can be used to identify the face area.
  • the target image in the color separation mode can be an image captured by the camera according to the shooting instruction, or it can be collected by the camera and displayed on the electronic device screen for the user before the shooting instruction is executed. Preview image information.
  • a setting algorithm may be used to convert the image to a color separation mode.
  • a method of generating an image in the YUV color mode includes: converting the raw data into an RGB color mode image based on the raw data acquired by the image sensor; The RGB color mode image described above generates the YUV color mode image.
  • the image acquisition device may be, for example, a camera, and the camera may include a charge-coupled device (CCD, Charge-coupled Device) image sensor or a complementary metal oxide semiconductor (CMOS, Complementary Metal, Oxide, Semiconductor) image sensor, based on the CCD image sensor or
  • CMOS complementary metal oxide semiconductor
  • the CMOS image sensor converts the captured light source signal into RAW raw data of a digital signal, converts the RGB raw color image data based on the RAW raw data, and further converts it into YUV color mode image data.
  • the JPG format image can be formed by the YUV color mode image.
  • the color in the RGB color mode image data formed by the conversion of RAW raw data is not the true color of the image, and the RGB color mode image data formed here cannot be processed in any way.
  • the YUV color mode image data The formed color is the true color of the image, and the image data of the YUV color mode can be processed.
  • RGB data is usually processed, and the raw data collected by the image sensor is converted into the following color mode during the processing process: RAW raw data-RGB color mode image-YUV color mode image Among them, the RGB color mode image is processed, and then the processed RGB color mode image is converted to the YUV color mode image, and the JPG format image can be output.
  • processing images in other color modes they need to be obtained by converting images in YUV color mode, and converting the processed images to images in YUV color mode to obtain images in JPG format.
  • Step 202 Determine the facial skin area of the target image according to the contour information in the human face information.
  • the facial skin area of the target image may be determined according to the contour information in the human face information.
  • the facial skin area on the human face is determined according to the position coordinates of the facial features.
  • face recognition technology and key points are used to identify the number, size, and pose of faces in the image, and also recognize the face Regions, facial features position, so as to segment the facial skin area in the facial image.
  • a face recognition technology may also be used to identify the position of the nose head, a face frame with a fixed length and width is taken based on the nose head coordinates, and a facial skin area is determined based on the area selected by the face frame.
  • Step 203 Obtain the brightness and color of each pixel in the facial skin area separately, and determine the investigation area from the target image according to the brightness and color.
  • the average brightness value of the face skin area is calculated according to the brightness of pixels included in the face skin area.
  • the color average value of the facial skin area is calculated according to the color of the pixels included in the facial skin area.
  • the similar target image area is expanded to obtain areas with similar brightness and color like facial skin, such as neck, ears, and shoulders.
  • the face frame as a reference, increase the area of the face frame according to a set ratio. Obtain the brightness and color of each new pixel in the new area of the face frame before and after the change. Determine the brightness deviation of the brightness of each newly added pixel from the above average brightness value, and the color deviation of the color of each newly added pixel from the above average color value. When the brightness deviation is less than the set brightness threshold and the color deviation is less than the set color threshold, it is determined that the newly added pixel belongs to the investigation area.
  • a new face frame can be obtained by extending 10% along the long and short sides of the face frame away from the centroid.
  • the extension of 5% along a certain direction may be determined according to the difference between the brightness of the pixel and the average brightness of the facial skin area and the difference between the color and the average color.
  • Step 204 a skin color area is formed by the investigation area and the facial skin area.
  • Step 205 Perform noise statistics on the target image, and determine the noise levels of the skin color area and the background area based on the statistical results.
  • the remaining area in the target image except the skin color area is recorded as the background area, including hair, clothes, and accessories.
  • Perform noise statistics on the target image and determine the noise levels of the skin color area and the background area based on the statistical results. For example, an image noise estimation algorithm is used to estimate the noise of the target image.
  • the target image is divided into blocks, based on the domain correlation (the difference between all pixels in an image block area and its neighbors is calculated by calculating the difference between the pixels in the image block to reflect the correlation between the pixels in the block, referred to as the block Intra-domain correlation, use the intra-block domain correlation to determine the smoothness of the image block) to filter the smooth image blocks; then use the SVD (K-SVD algorithm, K-singular value decomposition) for the filtered smooth image blocks (Algorithm) to perform noise estimation, and finally compare the noise estimation values of each smooth image block to determine the maximum noise estimation value and the minimum noise estimation value.
  • the domain correlation the difference between all pixels in an image block area and its neighbors is calculated by calculating the difference between the pixels in the image block to reflect the correlation between the pixels in the block, referred to as the block Intra-domain correlation, use the intra-block domain correlation to determine the smoothness of the image block
  • the SVD K-SVD algorithm, K-singular value decomposition
  • the noise interval formed by the maximum noise estimate value and the minimum noise estimate value is divided into N noise levels, and N is a positive integer, which is the system default value. The higher the noise level, the greater the noise.
  • a similar method is used to estimate the noise of the skin color area and the background area respectively to obtain the skin color noise value and the background noise value.
  • the skin color noise value and the background noise value are respectively matched with the noise level, and the noise levels of the skin color area and the background area are determined respectively. Based on the above noise estimation result, the overall noise reduction intensity of the overall noise reduction processing of the target image is determined, and the overall noise reduction processing of the target image is performed according to the overall noise reduction intensity.
  • FIG. 3 is a schematic diagram of an image noise distribution provided by an embodiment of the present application. As shown in FIG. 3, black areas indicate non-noise areas and gray areas indicate noise areas. As shown in FIG. 3, noise is concentrated on the hair edge 310 and eyebrows. Edge 320, facial contour 330 and neck shadow 340 and other areas.
  • the noise level of the skin area is higher than the noise level of the background area, that is, the noise of the skin area is greater than the noise of the background area
  • a local noise reduction event is triggered To perform additional noise reduction on the skin color area. If the noise of the skin color area is smaller than the noise of the background area, then the details of the face area are protected.
  • Step 206 Determine an overall noise reduction intensity for performing overall noise reduction processing on the target image according to the noise level, and perform overall noise reduction processing on the target image based on the overall noise reduction intensity.
  • facial features such as eyes, eyebrows, and mouth contain more image detail information, so it is not appropriate to reduce noise.
  • Step 207 Determine whether the noise level of the skin color area is higher than the noise level of the background area. If yes, perform step 208; otherwise, perform step 219.
  • Step 208 Trigger the local noise reduction event.
  • a local noise reduction event is triggered.
  • the local noise reduction event is used to instruct to perform the operation of determining the brightness information of the skin color region in the target image.
  • Step 209 It is detected that a local noise reduction event is triggered.
  • Step 210 Determine the average brightness value, the maximum brightness value, and the minimum brightness value of the skin color region in the target image.
  • Step 211 Compare the brightness of each pixel in the skin color area with the average brightness, mark target pixels whose brightness is lower than the average brightness, and cluster the target pixels into at least one target sub-area.
  • the brightness of each pixel in the skin color area is compared with the average brightness of the skin color area, the target pixel with brightness lower than the average brightness is marked, and the target pixel is clustered into at least one target sub-area .
  • a target pixel in each target sub-region is sequentially obtained, and the target noise reduction intensity based on the brightness is calculated according to the brightness in_lux of the target pixel, the average brightness of the skin area, the maximum brightness, and the minimum brightness.
  • the following formula can be used to calculate the target noise reduction intensity L_nr based on brightness:
  • max_lux represents the maximum brightness of the skin area
  • min_lux represents the minimum brightness of the skin area
  • mean_lux represents the average brightness of the skin area
  • in_lux represents the brightness of a target pixel in the target sub-region.
  • the corresponding target pixel may be subjected to noise reduction processing according to the brightness-based target noise reduction intensity.
  • the target noise reduction intensity corresponding to the target pixel in each target sub-region can be calculated in the above manner.
  • the target sub-region may be a region with low brightness such as a shadow on the neck or a contour of the face.
  • Step 212 Determine a target noise reduction intensity based on the brightness according to the brightness of the target pixel in each target sub-region, the average brightness, the maximum brightness, and the minimum brightness.
  • Step 213 Determine whether the number of faces in the target image is greater than 1, if yes, perform step 214, otherwise perform step 218.
  • Step 214 When the target image contains at least two human faces, obtain the color of the skin color area, and determine the first color mean, maximum color value, and minimum color value of the skin color area in the target image according to the color of the skin color area.
  • the color components of the pixels included in each face are respectively obtained, and the colors of the pixels in the skin color area are calculated based on the weighted summation.
  • the color C of each pixel can be expressed as:
  • (m,n) represents a pixel of the facial skin color area of each face, which belongs to the coordinate range (0,0) to (x,y), and is the set weight, which can be the system default value, U mn and V mn respectively represent the color component of each pixel in the facial skin color area of each face.
  • the first color mean, maximum color value and minimum color value of the skin color area in the target image are determined according to the color of each pixel in the facial skin color area of each face.
  • Step 215 Calculate the second color average of the skin color area corresponding to each face separately.
  • the color average value of the skin color area of each face is determined based on the color of each pixel in the facial skin color area of each face, and is recorded as the second color average.
  • Step 216 For the target skin color area where the second color average value is less than the first color average value, determine based on the color according to the color of the target skin color area, the first color average value, the maximum color value and the minimum color value Target noise reduction intensity.
  • the second color mean is compared with the first color mean to determine the target skin color area where the second color mean is less than the first color mean.
  • the following formula can be used to calculate the color-based target noise reduction intensity C_nr:
  • the color-based target noise reduction intensity can also be calculated according to the second color mean mean2_col, the first color mean mean1_col, the maximum color value max_col, and the minimum color value min_col of the skin color area corresponding to each face in the target skin color area .
  • the following formula can be used to calculate the color-based target noise reduction intensity C_nr:
  • Step 217 Determine a weighted operation result of the target noise reduction intensity based on brightness and the target noise reduction intensity based on color, and use the weighted operation result as the target noise reduction intensity.
  • Step 218 Perform noise reduction processing on the target sub-region based on the target noise reduction intensity to obtain a target image after noise reduction processing.
  • the target noise reduction intensity L_nr based on the brightness is used to perform noise reduction processing on the pixels in the target sub-region to obtain the noise-reduced target image.
  • the target noise reduction intensity Nr after the weighting operation is used to perform noise reduction processing on the pixels in the target sub-region to obtain the noise-reduced target image.
  • Step 219 Output the target image.
  • the color range of each face is counted separately to calculate the average face color of the entire target, the average face color of each face, and the color The maximum value and the minimum color value, thereby determining the color-based target noise reduction intensity based on the face color mean, color maximum and color minimum values; determining the weighted operation of the brightness-based target noise reduction intensity and the color-based target noise reduction intensity As a result, the weighted calculation result is used as the target noise reduction intensity.
  • the skin color region can be divided into different sub-regions according to the skin tone and skin brightness of each face, and different target noise reduction intensities can be determined for different sub-regions.
  • the area uses a larger target noise reduction intensity, and the lighter skin color, the brighter the area uses a smaller target noise reduction intensity, thereby effectively reducing the noise of dark skin areas, neck shadows, face contours and other dark light areas .
  • the method further includes: performing noise statistics on the noise-reduced target image, and determining the skin color region based on the statistical results Noise level; determine whether the noise level belongs to a preset noise interval; if it is, output the target image after noise reduction processing; otherwise, determine the mixing weight according to the noise level, based on the mixing weight on the target image and noise reduction processing The target image after the mixing process is processed, and the target image after the mixing process is output.
  • FIG. 4 is a flowchart of another image noise reduction method provided by the present application.
  • a noise reduction area is selected.
  • the original target image origin_pic is subjected to face detection, keypoints, edge markers, and skin color area selection to determine the skin color area of the face, as well as the investigation area including ears, shoulders, and necks that are similar to the skin color of the face.
  • the skin color area and the investigation area are marked as skin color areas, and the skin color area is the noise reduction area.
  • Perform noise estimation on the target image to determine the overall noise reduction intensity. Noise reduction is performed on the entire face based on the overall noise reduction intensity.
  • the target image NR_pic after noise reduction is obtained by performing local noise reduction on the skin color area based on the brightness of the skin and the color of the skin. Determine the noise level of the skin color region in NR_pic, and when the noise level does not belong to the preset noise interval, acquire the original target image origin_pic and the target image NR_pic after noise reduction processing.
  • the mixed weight blend_percent (0 ⁇ blend_percent ⁇ 100) is determined based on the noise level of the skin color region of NR_pic, and each pixel in the final output target image is a mixture value of origin_pic and NR_pic based on blend_percent (ie blend_percent*NR_pic+(1-blend_percent) *origin_pic).
  • the advantage of this design is that when the noise level after the local noise reduction process in the skin color area is not in the preset noise interval (it may be that the noise reduction transition has lost some details), the mixing is determined according to the noise level of the skin color area after the noise reduction process Weights, and based on the mixed weights, the original target image and the noise-reduced target image are mixed to dynamically adjust the noise distribution of the target image, so that the noise distribution in the final target image is more uniform, more natural and clear Target image.
  • the technical solutions of the embodiments of the present application may be added to the intermediate or final process of ISP (Image Signal Processing) to optimize the photo shooting effect.
  • the technical solutions of the embodiments of the present application can also be used in combination with a multi-frame noise reduction technology to achieve better noise reduction effect in random noise and dark noise reduction scenes.
  • FIG. 5 is a structural block diagram of an image noise reduction device provided by an embodiment of the present application.
  • the device can be implemented by software and/or hardware, and is generally integrated in a terminal, which can effectively suppress the backlight and side light by performing the image noise reduction method.
  • Face light under direct light, dark light and other unfavorable face noise presents a clearer and natural face image.
  • the device includes:
  • the information determination module 510 is used to determine the brightness information of the skin color area in the target image
  • the noise reduction intensity determination module 520 is configured to determine a target sub-region whose brightness is lower than a preset brightness threshold in the skin-color region, and determine a target noise reduction intensity according to the brightness of the target sub-region and the brightness information;
  • the noise reduction processing module 530 is configured to perform noise reduction processing on the target sub-region based on the target noise reduction intensity to obtain a target image after noise reduction processing.
  • An embodiment of the present application provides an image noise reduction device, which determines a target noise reduction intensity according to the brightness and brightness information of the target subregion by determining a target subregion in the skin color region whose brightness is lower than a preset brightness threshold; based on the target reduction
  • the noise intensity performs noise reduction processing on the target sub-region to obtain the target image after noise reduction processing.
  • the target sub-region to be subjected to noise reduction processing is determined based on the brightness
  • the noise reduction intensity is determined according to the brightness of each pixel in the target sub-region and the brightness information of the skin color area
  • the corresponding pixels are determined based on the noise reduction intensity
  • a skin tone area which is used for:
  • the target image Before determining the brightness information of the skin color region in the target image, obtain the target image in the color separation mode, perform face recognition on the target image, and determine the face information contained in the target image, where the face information Including the number of faces, and the outline information of the face, eyebrows, eyes, nose and mouth;
  • the skin area is composed of the investigation area and the facial skin area.
  • an event trigger module is also included.
  • the event trigger module is used to:
  • the skin color area is composed of the investigation area and the facial skin area, perform noise statistics on the target image, and determine the noise levels of the skin color area and the background area based on the statistical results;
  • a local noise reduction event is triggered, where the local noise reduction event is used to indicate the execution of the operation to determine the brightness information of the skin color area in the target image.
  • an overall noise reduction module is also included.
  • the overall noise reduction module is used for:
  • the overall noise reduction intensity of the overall noise reduction processing on the target image is determined according to the noise level, based on The overall noise reduction intensity performs overall noise reduction processing on the target image.
  • the noise reduction intensity determination module 520 is specifically used to:
  • the target noise reduction intensity based on brightness is determined according to the brightness of the target pixel in each target sub-region, the average brightness, the maximum brightness, and the minimum brightness.
  • a color information determination module which is used to:
  • the color of the skin color region is acquired, and the skin color region in the target image is determined according to the color
  • a color-based target drop is determined according to the color of the target skin color area, the first color average value, the maximum color value, and the minimum color value Noise strength.
  • the device further includes:
  • the weighting operation module is used to determine the target noise reduction intensity based on the brightness after determining the target noise reduction intensity based on the color according to the color of the target skin color area, the first color mean, the maximum color value and the minimum color value And the weighted calculation result of the target noise reduction intensity based on color, and using the weighted calculation result as the target noise reduction intensity.
  • an image mixing module is also included.
  • the image mixing module is used to:
  • a mixing weight is determined according to the noise level, and the target image and the noise-reduced target image are mixed based on the mixing weight, and the mixed-processed target image is output.
  • Embodiments of the present application also provide a storage medium containing computer-executable instructions, which when executed by a computer processor are used to perform an image noise reduction method, the method includes:
  • a local noise reduction event is detected and triggered
  • the brightness information includes the average brightness, the maximum brightness, and the minimum brightness
  • An embodiment of the present application provides an image noise reduction device, which determines a target noise reduction intensity according to the brightness and brightness information of the target subregion by determining a target subregion in the skin color region whose brightness is lower than a preset brightness threshold; based on the target reduction
  • the noise intensity performs noise reduction processing on the target sub-region to obtain the target image after noise reduction processing.
  • the target sub-region to be subjected to noise reduction processing is determined based on the brightness
  • the noise reduction intensity is determined according to the brightness of each pixel in the target sub-region and the brightness information of the skin color area
  • the corresponding pixels are determined based on the noise reduction intensity
  • Storage medium any kind of memory device or storage device of various types.
  • storage media is intended to include: installation media such as CD-ROM, floppy disk or tape devices; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc. ; Non-volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements.
  • the storage medium may also include other types of memory or a combination thereof.
  • the storage medium may be located in the first computer system in which the program is executed, or may be located in a different second computer system that is connected to the first computer system through a network such as the Internet.
  • the second computer system may provide program instructions to the first computer for execution.
  • storage medium may include two or more storage media that may reside in different locations (eg, in different computer systems connected through a network).
  • the storage medium may store program instructions executable by one or more processors (eg, embodied as a computer program).
  • a storage medium containing computer-executable instructions provided by the embodiments of the present application is not limited to the image noise reduction operation described above, but can also perform the image noise reduction provided by any embodiment of the present application Related operations in the method.
  • FIG. 6 is a schematic structural diagram of a terminal according to an embodiment of the present application.
  • the terminal includes a memory 610 and a processor 620.
  • the memory 610 is used to store a computer program; the processor 620 reads and executes the computer program stored in the memory 610.
  • the processor 620 implements the following steps when executing the computer program: determining the brightness information of the skin color area in the target image; determining the target sub-area in the skin color area whose brightness is lower than a preset brightness domain value, according to the target sub The brightness of the area and the brightness information determine a target noise reduction intensity; perform noise reduction processing on the target sub-region based on the target noise reduction intensity to obtain a target image after noise reduction processing.
  • the memory and processor listed in the above examples are all components of the terminal, and the terminal may also include other components.
  • a smart phone as an example to illustrate the possible structure of the above terminal.
  • the smart phone may include: a memory 701, a central processing unit (Central Processing Unit, CPU) 702 (also called a processor, hereinafter referred to as CPU), a peripheral interface 703, and an RF (Radio Frequency) circuit 705, audio circuit 706, speaker 711, touch screen 712, power management chip 708, input/output (I/O) subsystem 709, other input/control devices 710, and external ports 704, these components through one or more communication buses or The signal line 707 comes to communicate.
  • CPU Central Processing Unit
  • RF Radio Frequency
  • the illustrated smartphone 700 is only an example of a terminal, and the smartphone 700 may have more or fewer parts than shown in the figure, and two or more parts may be combined, or There can be different component configurations.
  • the various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
  • the smart phone integrated with the image noise reduction device provided in this embodiment will be described in detail below.
  • Memory 701 which can be accessed by CPU 702, peripheral interface 703, etc.
  • the memory 701 can include high-speed random access memory, and can also include non-volatile memory, such as one or more disk storage devices, flash memory devices , Or other volatile solid-state storage devices.
  • Peripheral interface 703, which can connect input and output peripherals of the device to CPU 702 and memory 701.
  • the I/O subsystem 709 which can connect input and output peripherals on the device, such as touch screen 712 and other input/control devices 710, to peripheral interface 703.
  • the I/O subsystem 709 may include a display controller 7091 and one or more input controllers 7092 for controlling other input/control devices 710.
  • one or more input controllers 7092 receive electrical signals from other input/control devices 710 or send electrical signals to other input/control devices 710, which may include physical buttons (press buttons, rocker buttons, etc.) ), dial pad, slide switch, joystick, click wheel.
  • the input controller 7092 can be connected to any of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
  • a touch screen 712 which is an input interface and an output interface between the user terminal and the user, and displays visual output to the user, and the visual output may include graphics, text, icons, video, and the like.
  • the display controller 7091 in the I/O subsystem 709 receives electrical signals from the touch screen 712 or sends electrical signals to the touch screen 712.
  • the touch screen 712 detects the contact on the touch screen, and the display controller 7091 converts the detected contact into interaction with the user interface object displayed on the touch screen 712, that is, realizes human-computer interaction, and the user interface object displayed on the touch screen 712 may be running Icons for games, icons connected to the corresponding network, etc.
  • the device may also include a light mouse, which is a touch-sensitive surface that does not display visual output, or an extension of the touch-sensitive surface formed by a touch screen.
  • the RF circuit 705 is mainly used to establish communication between the mobile phone and the wireless network (that is, the network side), and realize data reception and transmission between the mobile phone and the wireless network. For example, sending and receiving short messages, e-mail, etc. Specifically, the RF circuit 705 receives and transmits RF signals, which are also called electromagnetic signals. The RF circuit 705 converts electrical signals into electromagnetic signals or converts electromagnetic signals into electrical signals, and communicates with the communication network and other devices through the electromagnetic signals Communicate.
  • the RF circuit 705 may include known circuits for performing these functions, including but not limited to antenna systems, RF transceivers, one or more amplifiers, tuners, one or more oscillators, digital signal processors, CODEC ( COder-DECoder (codec) chipset, subscriber identity module (Subscriber Identity Module, SIM), etc.
  • CODEC COder-DECoder (codec) chipset
  • subscriber identity module Subscriber Identity Module, SIM
  • the audio circuit 706 is mainly used to receive audio data from the peripheral interface 703, convert the audio data into electrical signals, and send the electrical signals to the speaker 711.
  • the speaker 711 is used to restore the voice signal received by the mobile phone from the wireless network through the RF circuit 705 to a sound and play the sound to the user.
  • the power management chip 708 is used for power supply and power management for the hardware connected to the CPU 702, the I/O subsystem, and the peripheral interface.
  • the terminal provided in the embodiment of the present application may determine the target sub-region to be subjected to noise reduction processing based on the brightness, and determine the noise reduction intensity according to the brightness of each pixel in the target sub-region and the maximum and minimum brightness values of the skin-tone area, Based on the intensity of noise reduction, the corresponding pixels are subjected to noise reduction processing to achieve the local noise reduction effect on the skin color area based on brightness, so that the noise distribution of the skin color area is more uniform.
  • the image noise reduction device, storage medium, and terminal provided in the above embodiments can execute the image noise reduction method provided in any embodiment of the present application, and have corresponding function modules and beneficial effects for performing the method.
  • image noise reduction method provided in any embodiment of the present application.

Abstract

Disclosed are an image denoising method and apparatus, a storage medium and a terminal. The method comprises: determining brightness information of a skin color area in a target image; determining, in the skin color area, a target sub-area with the brightness lower than a pre-set brightness threshold value, and determining a target denoising intensity according to the brightness of the target sub-area and the brightness information; and performing, based on the target denoising intensity, denoising processing on the target sub-area to obtain a target image subjected to denoising processing. By using the technical solution, by means of determining, based on the brightness, a target sub-area to be subjected to denoising processing, determining the denoising intensity according to the brightness of each pixel point in the target sub-area and brightness information of a skin color area, and performing, based on the denoising intensity, denoising processing on a corresponding pixel point, the effect of locally denoising the skin color area based on the brightness is achieved, such that noises in the skin color area are distributed more uniformly.

Description

图像降噪方法、装置、存储介质及终端Image noise reduction method, device, storage medium and terminal 技术领域Technical field
本申请实施例涉及终端技术领域,尤其涉及一种图像降噪方法、装置、存储介质及终端。Embodiments of the present application relate to the technical field of terminals, and in particular, to an image noise reduction method, device, storage medium, and terminal.
背景技术Background technique
随着终端技术的快速发展,诸如手机、平板电脑等电子设备均具备了图像采集功能,用户对终端采集的图像的质量要求越来越高。With the rapid development of terminal technology, electronic devices such as mobile phones and tablet computers are equipped with image collection functions, and users have higher and higher requirements for the quality of the images collected by the terminal.
在实际使用过程中,用户通常会使用手机拍照。然而,在不同环境下,拍摄得到的人脸图像的噪点变化较大。例如,在逆光、侧光或者点光源下,拍摄得到的人脸图像的脖子阴影处及鼻翼等区域的噪点较多,进而影响照片的最终呈现效果。In actual use, users usually use their mobile phones to take pictures. However, under different environments, the noise of the face image obtained by the shooting changes greatly. For example, under backlighting, side light, or point light sources, the noise of the neck shadows and nostrils of the captured face images is more noisy, which affects the final rendering of the photos.
发明内容Summary of the invention
本申请实施例提供一种图像降噪方法、装置、存储介质及终端,可以优化相关技术中的降噪方案。Embodiments of the present application provide an image noise reduction method, device, storage medium, and terminal, which can optimize a noise reduction scheme in related technologies.
第一方面,本申请实施例提供了一种图像降噪方法,包括:In a first aspect, an embodiment of the present application provides an image noise reduction method, including:
确定目标图像中肤色区域的亮度信息;Determine the brightness information of the skin color area in the target image;
确定所述肤色区域中亮度低于预设亮度阈值的目标子区域,根据所述目标子区域的所述亮度和所述亮度信息确定目标降噪强度;Determining a target sub-area in the skin-color area whose brightness is lower than a preset brightness threshold, and determining a target noise reduction intensity according to the brightness of the target sub-area and the brightness information;
基于所述目标降噪强度对所述目标子区域进行降噪处理,得到降噪处理后的目标图像。Perform noise reduction processing on the target sub-region based on the target noise reduction intensity to obtain a target image after noise reduction processing.
第二方面,本申请实施例还提供了一种图像降噪装置,该装置包括:In a second aspect, an embodiment of the present application further provides an image noise reduction device, which includes:
信息确定模块,用于确定目标图像中肤色区域的亮度信息;The information determination module is used to determine the brightness information of the skin color area in the target image;
降噪强度确定模块,用于确定所述肤色区域中亮度低于预设亮度阈值的目标子区域,根据所述目标子区域的所述亮度和所述亮度信息确定目标降噪强度;A noise reduction intensity determination module, configured to determine a target sub-region with a brightness lower than a preset brightness threshold in the skin-color region, and determine a target noise reduction intensity according to the brightness of the target sub-region and the brightness information;
降噪处理模块,用于基于所述目标降噪强度对所述目标子区域进行降噪 处理,得到降噪处理后的目标图像。The noise reduction processing module is configured to perform noise reduction processing on the target sub-region based on the target noise reduction intensity to obtain a target image after noise reduction processing.
第三方面,本申请实施例还提供了本申请实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本申请任意实施例提供的图像降噪方法。In a third aspect, embodiments of the present application also provide embodiments of the present application to provide a computer-readable storage medium on which a computer program is stored, which when executed by a processor implements image reduction as provided by any embodiment of the present application Noise method.
第四方面,本申请实施例提供了一种终端,包括存储器,处理器及存储在存储器上并可在处理器运行的计算机程序,所述处理器执行所述计算机程序时实现如本申请任意实施例提供的图像降噪方法。According to a fourth aspect, an embodiment of the present application provides a terminal, including a memory, a processor, and a computer program stored on the memory and executable by the processor. When the processor executes the computer program, it can be implemented as arbitrarily implemented in the present application. Example provides image noise reduction method.
本申请实施例提供一种图像降噪方案,通过确定目标图像中肤色区域的亮度信息;确定该肤色区域中亮度低于预设亮度阈值的目标子区域,根据该目标子区域的亮度和亮度信息确定目标降噪强度;基于该目标降噪强度对该目标子区域进行降噪处理,得到降噪处理后的目标图像。通过采用上述技术方案,基于亮度确定待进行降噪处理的目标子区域,根据目标子区域内每个像素点的亮度与该肤色区域的亮度信息确定降噪强度,基于降噪强度对相应的像素点进行降噪处理,实现基于亮度对肤色区域进行局部降噪的效果,使得肤色区域的噪点分布更加均匀。An embodiment of the present application provides an image noise reduction solution, by determining the brightness information of the skin color area in the target image; determining the target sub-area in the skin color area whose brightness is lower than the preset brightness threshold, according to the brightness and brightness information of the target sub-area Determine the target noise reduction intensity; perform noise reduction on the target sub-region based on the target noise reduction intensity to obtain the target image after noise reduction processing. By adopting the above technical solution, the target sub-region to be subjected to noise reduction processing is determined based on the brightness, the noise reduction intensity is determined according to the brightness of each pixel in the target sub-region and the brightness information of the skin color area, and the corresponding pixels are determined based on the noise reduction intensity Perform noise reduction on the points to achieve the local noise reduction effect on the skin color area based on brightness, making the noise distribution of the skin area more uniform.
附图说明BRIEF DESCRIPTION
图1为本申请实施例提供的一种图像降噪方法的流程图;1 is a flowchart of an image noise reduction method provided by an embodiment of the present application;
图2为本申请实施例提供的另一种图像降噪方法的流程图;2 is a flowchart of another image noise reduction method provided by an embodiment of the present application;
图3为本申请实施例提供的一种图像噪声分布示意图;3 is a schematic diagram of an image noise distribution provided by an embodiment of the present application;
图4为本申请提供的又一种图像降噪方法的流程图;4 is a flowchart of another image noise reduction method provided by the present application;
图5为本申请实施例提供的一种图像降噪装置的结构框图;5 is a structural block diagram of an image noise reduction device according to an embodiment of the present application;
图6为本申请实施例提供的一种终端的结构示意图;6 is a schematic structural diagram of a terminal according to an embodiment of the present application;
图7为本申请实施例提供的一种智能手机的结构框图。7 is a structural block diagram of a smartphone provided by an embodiment of the present application.
具体实施方式detailed description
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非 全部结构。The present application will be further described in detail below with reference to the drawings and embodiments. It can be understood that the specific embodiments described here are only used for explaining the present application, rather than limiting the present application. In addition, it should be noted that, for ease of description, the drawings only show parts related to the present application but not all structures.
在更加详细地讨论示例性实施例之前应当提到的是,一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流程图将各步骤描述成顺序的处理,但是其中的许多步骤可以被并行地、并发地或者同时实施。此外,各步骤的顺序可以被重新安排。当其操作完成时所述处理可以被终止,但是还可以具有未包括在附图中的附加步骤。所述处理可以对应于方法、函数、规程、子例程、子程序等等。Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowchart describes the steps as sequential processing, many of the steps can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the steps can be rearranged. The processing may be terminated when its operation is completed, but may also have additional steps not included in the drawings. The processing may correspond to methods, functions, procedures, subroutines, subroutines, and so on.
相关技术中的降噪方案将人脸当成一个整体,采用相似的降噪强度对人脸进行整体降噪处理。由于人脸图像中的噪点的实际分布并不一致,采用整体降噪方案会导致不同区域的噪点分布不均匀现象,降噪效果并不理想。The noise reduction scheme in the related art regards the human face as a whole, and uses a similar noise reduction intensity to perform overall noise reduction on the human face. Since the actual distribution of noise in the face image is not consistent, the overall noise reduction scheme will result in uneven distribution of noise in different areas, and the noise reduction effect is not ideal.
图1为本申请实施例提供的一种图像降噪方法的流程图,该方法可以适用于拍照场景,包括但不限于拍摄视频或照片,该方法可以由图像降噪装置来执行,该装置可由软件和/或硬件实现,一般可集成在终端中。如图1所示,该方法包括:FIG. 1 is a flowchart of an image noise reduction method provided by an embodiment of the present application. The method may be suitable for photographing scenes, including but not limited to shooting videos or photos. The method may be performed by an image noise reduction device, which may be The software and/or hardware implementation can generally be integrated in the terminal. As shown in Figure 1, the method includes:
步骤110、确定目标图像中肤色区域的亮度信息。Step 110: Determine the brightness information of the skin color region in the target image.
需要说明的是,本申请实施例中的终端可包括手机、平板电脑、笔记本电脑、计算机等展示图像的电子设备。本申请实施例中的终端内集成有操作系统,本申请实施例中对操作系统的类型不做限定,例如可包括安卓(Android)操作系统、窗口(Windows)操作系统以及苹果(ios)操作系统等等。It should be noted that the terminal in the embodiment of the present application may include mobile phones, tablet computers, notebook computers, computers, and other electronic devices that display images. An operating system is integrated in the terminal in the embodiment of the present application, and the type of the operating system is not limited in the embodiment of the present application, for example, it may include an Android operating system, a Windows operating system, and an Apple (ios) operating system and many more.
需要说明的是,亮度信息可以是目标图像的肤色区域中的各个像素点的亮度相关信息。例如,亮度信息可以是肤色区域的亮度均值;亮度信息可以是肤色区域的亮度加权值;亮度信息还可以是肤色区域的亮度最大值;以及,亮度信息还可以是肤色区域的亮度最小值等等。It should be noted that the brightness information may be brightness related information of each pixel in the skin color area of the target image. For example, the brightness information may be the average brightness value of the skin area; the brightness information may be the brightness weighted value of the skin area; the brightness information may also be the maximum brightness of the skin area; and the brightness information may also be the minimum brightness of the skin area, etc. .
需要说明的是,目标图像可以是通过具有拍摄功能的终端拍摄目标场景得到的图像,还可以是由终端的相册中获取的图像,或者是由互联网平台获取的图像等等。目标图像可以是RGB颜色模式、YUV颜色模式、HSV颜色模式或Lab颜色模式的图像。其中,颜色通常用三个相对独立的属性来描述,三个独立变量综合作用,自然就构成一个空间坐标,这就是颜色模式。颜色模式可分为基色颜色模式和色亮分离颜色模式,其中,基色颜色模式包括但 不限于RGB颜色模式,色亮分离颜色模式包括但不限于YUV颜色模式、Lab颜色模式和HSV颜色模式,所述色亮分离颜色模式是用于指示颜色和亮度分离的颜色模式。在YUV颜色模式中,Y分量表征亮度,U分量表征色彩,V分量表征浓度,其中,U分量和V分量共同表示图像的色彩。在Lab颜色模式中,L分量表征亮度,a和b共同表示色彩。在HSV颜色模式中,H分量表征色相,S分量表征饱和度,V分量表征明度,其中,色相是色彩的基本属性,饱和度是指色彩的纯度,明度也就是亮度。在色亮分离颜色模式的图像中,可分别提取亮度分量和色彩分量,可对图像进行亮度和色彩中任一方面的处理,示例性的,对亮度进行处理过程中,不会对图像的色彩分量造成任何的影响。It should be noted that the target image may be an image obtained by shooting a target scene through a terminal with a shooting function, an image acquired from an album of the terminal, or an image acquired from an Internet platform, and so on. The target image may be an image of RGB color mode, YUV color mode, HSV color mode, or Lab color mode. Among them, color is usually described by three relatively independent attributes. The combined effect of three independent variables naturally forms a spatial coordinate. This is the color mode. The color mode can be divided into a primary color mode and a color separation color mode. Among them, the primary color mode includes but not limited to RGB color mode, and the color separation mode includes but not limited to YUV color mode, Lab color mode and HSV color mode. The color light separation color mode is a color mode for indicating the separation of color and brightness. In the YUV color model, the Y component represents brightness, the U component represents color, and the V component represents density, where the U component and V component together represent the color of the image. In the Lab color model, the L component represents brightness, and a and b jointly represent color. In the HSV color model, the H component represents hue, the S component represents saturation, and the V component represents lightness, where hue is the basic attribute of color, saturation refers to the purity of color, and lightness is also brightness. In an image with a color-separated color mode, the brightness component and the color component can be extracted separately, and the image can be processed in any aspect of brightness and color. Exemplarily, when the brightness is processed, the color of the image will not be processed. The weight has no effect.
本申请实施例中,获取肤色区域内各个像素点的亮度,从而,可以计算得到肤色区域的亮度均值mean_lux。通过比较肤色区域内各个像素点的亮度可以确定亮度最大值max_lux和亮度最小值min_lux。In the embodiment of the present application, the brightness of each pixel in the skin color area is obtained, so that the mean value of the brightness mean_lux of the skin color area can be calculated. The maximum brightness max_lux and the minimum brightness min_lux can be determined by comparing the brightness of each pixel in the skin color area.
步骤120、确定所述肤色区域中亮度低于预设亮度阈值的目标子区域,根据所述目标子区域的亮度和所述亮度信息确定目标降噪强度。Step 120: Determine a target sub-region whose brightness in the skin-color region is lower than a preset brightness threshold, and determine a target noise reduction intensity according to the brightness of the target sub-region and the brightness information.
示例性的,获取色亮分离颜色模式的目标图像中肤色区域内的各个像素点,将该肤色区域中各个像素点的亮度与预设亮度阈值进行比较,标记亮度低于预设亮度阈值的目标像素点,将该目标像素点聚类成至少一个目标子区域;根据每个所述目标子区域内目标像素点的亮度、所述肤色区域的亮度均值、所述肤色区域的亮度最大值和所述肤色区域的亮度最小值确定基于亮度的目标降噪强度。Exemplarily, each pixel in the skin color area of the target image in the color separation mode is obtained, the brightness of each pixel in the skin color area is compared with a preset brightness threshold, and a target whose brightness is lower than the preset brightness threshold is marked Pixel points, clustering the target pixel points into at least one target sub-region; according to the brightness of the target pixel point in each of the target sub-regions, the average brightness value of the skin color area, the maximum brightness value of the skin color area and the The minimum brightness value of the skin color area determines the target noise reduction intensity based on the brightness.
需要说明的是,预设亮度阈值是用于筛选肤色区域中需要进行局部降噪处理的目标子区域的门限值,包括但不限于肤色区域的亮度均值、肤色区域的亮度加权值(加权重为各个亮度对应的像素点的数量与肤色区域中包含的像素点总数的比值)、肤色区域中亮度低于亮度均值且对应的像素点最多的目标亮度值,或者肤色区域中亮度低于亮度加权值且对应的像素点最多的目标亮度值。It should be noted that the preset brightness threshold is a threshold value used to filter the target sub-regions in the skin-color area that needs to be subjected to local noise reduction, including but not limited to the average brightness of the skin-color area and the brightness weighted value of the skin-color area (weighted weight Is the ratio of the number of pixels corresponding to each brightness to the total number of pixels contained in the skin color area), the target brightness value in the skin color area where the brightness is lower than the average brightness and the corresponding pixel is the most, or the brightness in the skin area is lower than the brightness weight Value and the corresponding target brightness value with the most pixels.
例如,将肤色区域中各个像素点的亮度与亮度均值进行比较,确定亮度低于亮度均值的目标子区域。对于亮度高于亮度均值的像素点构成的区域不进行额外地局部降噪处理。For example, the brightness of each pixel in the skin color area is compared with the average brightness to determine the target sub-area with brightness lower than the average brightness. For the area composed of pixels whose brightness is higher than the average brightness value, no additional local noise reduction process is performed.
又如,将肤色区域中各个像素点的亮度与亮度加权值进行比较,确定亮度低于亮度加权值的目标子区域。对于亮度高于亮度加权值的像素点构成的区域不进行额外地局部降噪处理。In another example, the brightness of each pixel in the skin color area is compared with the brightness weighted value to determine the target sub-area whose brightness is lower than the brightness weighted value. For the area composed of pixels whose brightness is higher than the brightness weighted value, no additional local noise reduction process is performed.
步骤130、基于所述目标降噪强度对所述目标子区域进行降噪处理,得到降噪处理后的目标图像。Step 130: Perform noise reduction processing on the target sub-region based on the target noise reduction intensity to obtain a target image after noise reduction processing.
示例性的,以基于亮度的目标降噪强度为基准,根据目标降噪强度调整目标子区域内任一像素点,并以该目标降噪强度对目标子区域内其余各个像素点分别进行调整,从而实现对目标图像的局部降噪处理,有效抑制了逆光、侧光、点光源直射、以及暗光等不理想光线下人脸噪点的数量。本申请实施例提供的图像降噪方法可使人脸区域呈现自然、清晰的画面效果,避免出现传统人脸降噪方案将人脸视为一个整体,对整个人脸区域进行整体降噪处理,而导致处理后的图像中不同区域的噪点不均匀的现象,影响照片的一致性。另外,本申请实施例在单帧图像的基础上,对人脸区域进行降噪处理,具有较高的处理速度,可以避免多帧降噪方案用时较长而影响照片成片成功率和照片出片速度的问题。Exemplarily, based on the target noise reduction intensity based on brightness, any pixel in the target sub-region is adjusted according to the target noise reduction intensity, and the remaining pixel points in the target sub-region are separately adjusted according to the target noise reduction intensity, Therefore, the local noise reduction processing of the target image is realized, and the amount of face noise under undesirable light such as backlight, side light, direct light source, and dark light is effectively suppressed. The image noise reduction method provided in the embodiment of the present application can make the face area present a natural and clear picture effect, avoid the appearance of the traditional face noise reduction scheme, regard the face as a whole, and perform overall noise reduction processing on the entire face area, The phenomenon of uneven noise in different areas of the processed image will affect the consistency of the photos. In addition, the embodiments of the present application perform noise reduction processing on the face area on the basis of a single frame image, which has a high processing speed, which can avoid the multi-frame noise reduction scheme taking a long time and affecting the success rate and photo output of the photo. The problem of film speed.
本申请实施例的技术方案,通过确定目标图像中肤色区域的亮度信息;确定该肤色区域中亮度低于预设亮度阈值的目标子区域,根据该目标子区域的亮度和亮度信息确定目标降噪强度;基于该目标降噪强度对该目标子区域进行降噪处理,得到降噪处理后的目标图像。通过采用上述技术方案,基于亮度确定待进行降噪处理的目标子区域,根据目标子区域内每个像素点的亮度与该肤色区域的亮度信息确定降噪强度,基于降噪强度对相应的像素点进行降噪处理,实现基于亮度对肤色区域进行局部降噪的效果,使得肤色区域的噪点分布更加均匀。In the technical solution of the embodiment of the present application, by determining the brightness information of the skin color region in the target image; determining the target sub-region in the skin color region whose brightness is lower than the preset brightness threshold, the target noise reduction is determined according to the brightness and brightness information of the target sub-region Intensity; based on the target noise reduction intensity, the target sub-region is subjected to noise reduction processing to obtain the noise-reduced target image. By adopting the above technical solution, the target sub-region to be subjected to noise reduction processing is determined based on the brightness, the noise reduction intensity is determined according to the brightness of each pixel in the target sub-region and the brightness information of the skin color area, and the corresponding pixels are determined based on the noise reduction intensity Perform noise reduction on the points to achieve the local noise reduction effect on the skin color area based on brightness, making the noise distribution of the skin area more uniform.
图2为本申请实施例提供的另一种图像降噪方法的流程图,该方法包括:FIG. 2 is a flowchart of another image noise reduction method provided by an embodiment of the present application. The method includes:
步骤201、获取色亮分离颜色模式的目标图像,对所述目标图像进行人脸识别,确定所述目标图像包含的人脸信息。Step 201: Acquire a target image in a color-separated color mode, perform face recognition on the target image, and determine face information contained in the target image.
示例性的,对整幅目标图像进行人脸检测,标记脸部特征点,通过脸部特征点确定脸部的轮廓信息、眉毛的轮廓信息、眼睛的轮廓信息、鼻子的轮廓信息和嘴巴的轮廓信息。可选的,可以采用人脸框标识出人脸区域。Exemplarily, perform face detection on the entire target image, mark facial feature points, and determine facial contour information, eyebrow contour information, eye contour information, nose contour information, and mouth contour by using the facial feature points information. Optionally, a face frame can be used to identify the face area.
在本申请实施例中,该色亮分离颜色模式的目标图像可以是由摄像头根 据拍摄指令拍摄得到的图像,还可以是由摄像头在拍摄指令执行前,采集的呈现在电子设备屏幕上、供用户预览的图像信息。In the embodiment of the present application, the target image in the color separation mode can be an image captured by the camera according to the shooting instruction, or it can be collected by the camera and displayed on the electronic device screen for the user before the shooting instruction is executed. Preview image information.
需要说明的是,在获取的图像并非色亮分离颜色模式时,可以采用设定算法将该图像转换为色亮分离颜色模式。以手机为例,基于手机中的图像采集设备采集图像时,YUV颜色模式的图像的生成方法,包括:基于图像传感器获取的原始数据,将所述原始数据转换为RGB颜色模式的图像;根据所述RGB颜色模式的图像生成YUV颜色模式的图像。其中,图像采集设备例如可以是摄像头,摄像头中可包括电荷耦合器件(CCD,Charge-coupled Device)图像传感器或互补金属氧化物半导体(CMOS,Complementary Metal Oxide Semiconductor)图像传感器,基于上述CCD图像传感器或CMOS图像传感器将捕捉到的光源信号转化为数字信号的RAW原始数据,基于RAW原始数据转换为RGB颜色模式的图像数据,并进一步转换为YUV颜色模式的图像数据。在手机的图像采集设备中,JPG格式的图像可由YUV颜色模式的图像形成。It should be noted that, when the acquired image is not a color separation mode, a setting algorithm may be used to convert the image to a color separation mode. Taking a mobile phone as an example, when acquiring images based on an image acquisition device in a mobile phone, a method of generating an image in the YUV color mode includes: converting the raw data into an RGB color mode image based on the raw data acquired by the image sensor; The RGB color mode image described above generates the YUV color mode image. The image acquisition device may be, for example, a camera, and the camera may include a charge-coupled device (CCD, Charge-coupled Device) image sensor or a complementary metal oxide semiconductor (CMOS, Complementary Metal, Oxide, Semiconductor) image sensor, based on the CCD image sensor or The CMOS image sensor converts the captured light source signal into RAW raw data of a digital signal, converts the RGB raw color image data based on the RAW raw data, and further converts it into YUV color mode image data. In the image acquisition device of the mobile phone, the JPG format image can be formed by the YUV color mode image.
需要说明的是,由RAW原始数据转换形成的RGB颜色模式的图像数据中的色彩不是图像的真实色彩,无法对此处形成的RGB颜色模式的图像数据进行任何处理,YUV颜色模式的图像数据中形成的色彩为图像的真实色彩,可对该YUV颜色模式的图像数据进行处理。在常用的图像处理时,通常对RGB数据进行处理,其处理过程中对图像传感器采集的原始数据进行如下的颜色模式的转换:RAW原始数据——RGB颜色模式的图像——YUV颜色模式的图像,其中,对RGB颜色模式的图像进行处理,再将处理后的RGB颜色模式的图像转换为YUV颜色模式的图像,可输出得到JPG格式的图像。相应的,当对其他颜色模式的图像进行处理时,均需要经YUV颜色模式的图像进行转换后得到,并将处理后的图像转换为YUV颜色模式的图像后,得到JPG格式的图像。It should be noted that the color in the RGB color mode image data formed by the conversion of RAW raw data is not the true color of the image, and the RGB color mode image data formed here cannot be processed in any way. The YUV color mode image data The formed color is the true color of the image, and the image data of the YUV color mode can be processed. In common image processing, RGB data is usually processed, and the raw data collected by the image sensor is converted into the following color mode during the processing process: RAW raw data-RGB color mode image-YUV color mode image Among them, the RGB color mode image is processed, and then the processed RGB color mode image is converted to the YUV color mode image, and the JPG format image can be output. Correspondingly, when processing images in other color modes, they need to be obtained by converting images in YUV color mode, and converting the processed images to images in YUV color mode to obtain images in JPG format.
步骤202、根据所述人脸信息中的所述轮廓信息确定所述目标图像的脸部皮肤区域。Step 202: Determine the facial skin area of the target image according to the contour information in the human face information.
示例性的,可以根据所述人脸信息中的轮廓信息确定目标图像的脸部皮肤区域。诸如,根据五官的位置坐标确定人脸上的脸部皮肤区域。Exemplarily, the facial skin area of the target image may be determined according to the contour information in the human face information. For example, the facial skin area on the human face is determined according to the position coordinates of the facial features.
本申请实施例中,采用人脸识别技术及关键点(代表眉毛、眼睛、嘴巴 及脸部轮廓的特征点)标定方式识别出图像中人脸的数量、大小、姿态,以及还识别出脸部区域、五官位置,从而在脸部图像中分割出脸部皮肤区域。可选的,还可以采用人脸识别技术识别出鼻头的位置,基于鼻头坐标取固定长宽的人脸框,基于人脸框选中的区域确定脸部皮肤区域。In the embodiments of the present application, face recognition technology and key points (representing the characteristic points of eyebrows, eyes, mouth, and face contours) are used to identify the number, size, and pose of faces in the image, and also recognize the face Regions, facial features position, so as to segment the facial skin area in the facial image. Optionally, a face recognition technology may also be used to identify the position of the nose head, a face frame with a fixed length and width is taken based on the nose head coordinates, and a facial skin area is determined based on the area selected by the face frame.
步骤203、分别获取所述脸部皮肤区域内的每个像素点的亮度和色彩,根据所述亮度和色彩由所述目标图像中确定考察区域。Step 203: Obtain the brightness and color of each pixel in the facial skin area separately, and determine the investigation area from the target image according to the brightness and color.
示例性的,根据脸部皮肤区域包含的像素点的亮度计算该脸部皮肤区域的亮度均值。以及,根据脸部皮肤区域包含的像素点的色彩计算该脸部皮肤区域的色彩均值。以脸部皮肤区域为基准对相近目标图像区域进行扩展,得到脖子、耳朵、肩膀等与脸部皮肤具有相似亮度和色彩的区域。例如,分别计算脸部皮肤区域的邻域内的像素点的亮度与上述亮度均值的亮度偏差,以及脸部皮肤区域的邻域内的像素点的色彩与上述色彩均值的色彩偏差,若亮度偏差小于设定亮度阈值,且色彩偏差小于设定色彩阈值,则确定该像素点与脸部皮肤区域内的像素点比较相似。将与脸部皮肤区域内的像素点比较相似的像素点构成的区域标记为考察区域。Exemplarily, the average brightness value of the face skin area is calculated according to the brightness of pixels included in the face skin area. And, the color average value of the facial skin area is calculated according to the color of the pixels included in the facial skin area. Using the facial skin area as a reference, the similar target image area is expanded to obtain areas with similar brightness and color like facial skin, such as neck, ears, and shoulders. For example, calculate the brightness deviation between the brightness of the pixels in the neighborhood of the face skin area and the above average brightness, and the color deviation between the colors of the pixels in the neighborhood of the face skin area and the above average color, if the brightness deviation is less than the setting If the brightness threshold is set, and the color deviation is less than the set color threshold, it is determined that the pixel is similar to the pixel in the skin area of the face. An area composed of pixels similar to pixels in the skin area of the face is marked as the investigation area.
又如,以人脸框为基准,按照设定比例增加人脸框的面积。获取变化前后的人脸框新增区域的每个新增像素点的亮度和色彩。分别确定每个新增像素点的亮度与上述亮度均值的亮度偏差,以及每个新增像素点的色彩与上述色彩均值的色彩偏差。在该亮度偏差小于设定亮度阈值,且色彩偏差小于设定色彩阈值时,确定该新增像素点属于考察区域。As another example, using the face frame as a reference, increase the area of the face frame according to a set ratio. Obtain the brightness and color of each new pixel in the new area of the face frame before and after the change. Determine the brightness deviation of the brightness of each newly added pixel from the above average brightness value, and the color deviation of the color of each newly added pixel from the above average color value. When the brightness deviation is less than the set brightness threshold and the color deviation is less than the set color threshold, it is determined that the newly added pixel belongs to the investigation area.
需要说明的是,按照设定比例增加人脸框的方式有很多种,本申请实施例并不做具体限定。例如,可以沿人脸框的长边和短边向远离质心的方向各延伸10%得到新的人脸框。又如,可以根据像素点的亮度与脸部皮肤区域的平均亮度的差异以及颜色与平均颜色的差异确定沿某一方向延伸5%等等。It should be noted that there are many ways to increase the face frame according to the set ratio, and the embodiments of the present application are not specifically limited. For example, a new face frame can be obtained by extending 10% along the long and short sides of the face frame away from the centroid. For another example, the extension of 5% along a certain direction may be determined according to the difference between the brightness of the pixel and the average brightness of the facial skin area and the difference between the color and the average color.
步骤204、由所述考察区域和所述脸部皮肤区域构成肤色区域。 Step 204, a skin color area is formed by the investigation area and the facial skin area.
步骤205、对所述目标图像进行噪声统计,基于统计结果确定所述肤色区域和背景区域的噪声等级。Step 205: Perform noise statistics on the target image, and determine the noise levels of the skin color area and the background area based on the statistical results.
在确定肤色区域之后,将目标图像中除肤色区域之外的剩余区域记为背景区域,包括头发、衣服和饰品等。对所述目标图像进行噪声统计,基于统计结果确定所述肤色区域和背景区域的噪声等级。例如,采用图像噪声估计 算法对目标图像进行噪声估计。例如,对目标图像进行分块处理,基于领域相关度(通过计算图像中某个图像块区域内所有像素点与其相邻像素间的差异来反映该块内各像素间的相关程度,简称为块内领域相关度,用块内领域相关度对该图像块的平滑程度进行判别)进行平滑图像块的筛选;再对筛选出的平滑图像块利用SVD(即K-SVD算法,K-奇异值分解算法)进行噪声估计,最后对各平滑图像块的噪声估计值进行比较,确定最大噪声估计值和最小噪声估计值。将最大噪声估计值和最小噪声估计值构成的噪声区间分为N个噪声等级,N为正整数,为系统默认值。噪声等级越高,说明噪声越大。采用相似的方法,分别对肤色区域和背景区域进行噪声估计,得到肤色噪声值与背景噪声值。将肤色噪声值与背景噪声值分别与噪声等级进行匹配,分别确定肤色区域和背景区域的噪声等级。基于上述噪声估计结果确定对目标图像进行整体降噪处理的整体降噪强度,根据该整体降噪强度对目标图像进行整体降噪处理。After the skin color area is determined, the remaining area in the target image except the skin color area is recorded as the background area, including hair, clothes, and accessories. Perform noise statistics on the target image, and determine the noise levels of the skin color area and the background area based on the statistical results. For example, an image noise estimation algorithm is used to estimate the noise of the target image. For example, the target image is divided into blocks, based on the domain correlation (the difference between all pixels in an image block area and its neighbors is calculated by calculating the difference between the pixels in the image block to reflect the correlation between the pixels in the block, referred to as the block Intra-domain correlation, use the intra-block domain correlation to determine the smoothness of the image block) to filter the smooth image blocks; then use the SVD (K-SVD algorithm, K-singular value decomposition) for the filtered smooth image blocks (Algorithm) to perform noise estimation, and finally compare the noise estimation values of each smooth image block to determine the maximum noise estimation value and the minimum noise estimation value. The noise interval formed by the maximum noise estimate value and the minimum noise estimate value is divided into N noise levels, and N is a positive integer, which is the system default value. The higher the noise level, the greater the noise. A similar method is used to estimate the noise of the skin color area and the background area respectively to obtain the skin color noise value and the background noise value. The skin color noise value and the background noise value are respectively matched with the noise level, and the noise levels of the skin color area and the background area are determined respectively. Based on the above noise estimation result, the overall noise reduction intensity of the overall noise reduction processing of the target image is determined, and the overall noise reduction processing of the target image is performed according to the overall noise reduction intensity.
图3为本申请实施例提供的一种图像噪声分布示意图,如图3所示,黑色区域表示非噪声区域,灰色区域表示噪声区域,由图3所示,噪点集中分布在头发边缘310、眉眼边缘320、脸部轮廓330及脖子阴影340等区域。FIG. 3 is a schematic diagram of an image noise distribution provided by an embodiment of the present application. As shown in FIG. 3, black areas indicate non-noise areas and gray areas indicate noise areas. As shown in FIG. 3, noise is concentrated on the hair edge 310 and eyebrows. Edge 320, facial contour 330 and neck shadow 340 and other areas.
本申请实施例中,在确定肤色区域和背景区域的噪声等级后,若肤色区域的噪声等级高于背景区域的噪声等级,也就是说肤色区域的噪声大于背景区域的噪声,触发局部降噪事件,以对肤色区域进行额外降噪处理。若肤色区域的噪声小于背景区域的噪声,则对人脸区域进行细节保护。In the embodiment of the present application, after determining the noise levels of the skin area and the background area, if the noise level of the skin area is higher than the noise level of the background area, that is, the noise of the skin area is greater than the noise of the background area, a local noise reduction event is triggered To perform additional noise reduction on the skin color area. If the noise of the skin color area is smaller than the noise of the background area, then the details of the face area are protected.
步骤206、根据所述噪声等级确定对所述目标图像进行整体降噪处理的整体降噪强度,基于所述整体降噪强度对所述目标图像进行整体降噪处理。Step 206: Determine an overall noise reduction intensity for performing overall noise reduction processing on the target image according to the noise level, and perform overall noise reduction processing on the target image based on the overall noise reduction intensity.
需要说明的是,眼睛、眉毛和嘴巴等五官区域包含较多图像细节信息,不宜对其进行降噪处理。It should be noted that the facial features such as eyes, eyebrows, and mouth contain more image detail information, so it is not appropriate to reduce noise.
步骤207、判断所述肤色区域的噪声等级是否高于所述背景区域的噪声等级,若是,则执行步骤208,否则执行步骤219。Step 207: Determine whether the noise level of the skin color area is higher than the noise level of the background area. If yes, perform step 208; otherwise, perform step 219.
步骤208、触发局部降噪事件。Step 208: Trigger the local noise reduction event.
在目标图像的肤色区域的噪声等级高于背景区域的噪声等级时,触发局部降噪事件。其中,所述局部降噪事件用于指示确定目标图像中肤色区域的亮度信息的操作执行。When the noise level of the skin color area of the target image is higher than the noise level of the background area, a local noise reduction event is triggered. Wherein, the local noise reduction event is used to instruct to perform the operation of determining the brightness information of the skin color region in the target image.
步骤209、检测到局部降噪事件被触发。Step 209: It is detected that a local noise reduction event is triggered.
步骤210、确定目标图像中肤色区域的亮度均值、亮度最大值和亮度最小值。Step 210: Determine the average brightness value, the maximum brightness value, and the minimum brightness value of the skin color region in the target image.
步骤211、将所述肤色区域中各个像素点的亮度与所述亮度均值进行比较,标记亮度低于亮度均值的目标像素点,将所述目标像素点聚类成至少一个目标子区域。Step 211: Compare the brightness of each pixel in the skin color area with the average brightness, mark target pixels whose brightness is lower than the average brightness, and cluster the target pixels into at least one target sub-area.
本申请实施例中,将肤色区域内的各个像素点的亮度与该肤色区域的亮度均值进行比较,标记亮度低于亮度均值的目标像素点,将该目标像素点聚类成至少一个目标子区域。顺序获取各个目标子区域内的一个目标像素点,根据该目标像素点的亮度in_lux、肤色区域的亮度均值、亮度最大值和亮度最小值计算基于亮度的目标降噪强度。例如,可以采用如下公式计算基于亮度的目标降噪强度L_nr:In the embodiment of the present application, the brightness of each pixel in the skin color area is compared with the average brightness of the skin color area, the target pixel with brightness lower than the average brightness is marked, and the target pixel is clustered into at least one target sub-area . A target pixel in each target sub-region is sequentially obtained, and the target noise reduction intensity based on the brightness is calculated according to the brightness in_lux of the target pixel, the average brightness of the skin area, the maximum brightness, and the minimum brightness. For example, the following formula can be used to calculate the target noise reduction intensity L_nr based on brightness:
L_nr=(max_lux-min_lux)*(mean_lux-in_lux)/mean_lux      (1)L_nr=(max_lux-min_lux)*(mean_lux-in_lux)/mean_lux (1)
其中,max_lux表示肤色区域的亮度最大值,min_lux表示肤色区域的亮度最小值,mean_lux表示肤色区域的亮度均值,in_lux表示目标子区域内的一个目标像素点的亮度。Among them, max_lux represents the maximum brightness of the skin area, min_lux represents the minimum brightness of the skin area, mean_lux represents the average brightness of the skin area, and in_lux represents the brightness of a target pixel in the target sub-region.
需要说明的是,可以根据上述基于亮度的目标降噪强度对对应的目标像素点进行降噪处理。可以采用上述方式分别计算每个目标子区域内的目标像素点对应的目标降噪强度。It should be noted that the corresponding target pixel may be subjected to noise reduction processing according to the brightness-based target noise reduction intensity. The target noise reduction intensity corresponding to the target pixel in each target sub-region can be calculated in the above manner.
例如,目标子区域可以是脖子阴影处或者脸部轮廓处等亮度较低的区域。For example, the target sub-region may be a region with low brightness such as a shadow on the neck or a contour of the face.
步骤212、根据每个所述目标子区域内目标像素点的亮度、所述亮度均值、所述亮度最大值和所述亮度最小值确定基于亮度的目标降噪强度。Step 212: Determine a target noise reduction intensity based on the brightness according to the brightness of the target pixel in each target sub-region, the average brightness, the maximum brightness, and the minimum brightness.
步骤213、判断所述目标图像中的人脸数量是否大于1,若是,则执行步骤214,否则执行步骤218。Step 213: Determine whether the number of faces in the target image is greater than 1, if yes, perform step 214, otherwise perform step 218.
步骤214、在目标图像中包含至少两张人脸时,获取肤色区域的颜色,根据所述肤色区域的颜色确定所述目标图像中肤色区域的第一颜色均值、最大颜色值和最小颜色值。Step 214: When the target image contains at least two human faces, obtain the color of the skin color area, and determine the first color mean, maximum color value, and minimum color value of the skin color area in the target image according to the color of the skin color area.
示例性的,在目标图像中包含至少两张人脸时,分别获取每张人脸包含的像素点的颜色分量,基于加权求和的方式计算肤色区域中各个像素点的颜色。以YUV颜色模式为例,每个像素点的颜色C可以表示为:Exemplarily, when the target image contains at least two faces, the color components of the pixels included in each face are respectively obtained, and the colors of the pixels in the skin color area are calculated based on the weighted summation. Taking the YUV color mode as an example, the color C of each pixel can be expressed as:
Figure PCTCN2020070337-appb-000001
Figure PCTCN2020070337-appb-000001
其中,(m,n)表示每张人脸的脸部肤色区域的一个像素点,属于坐标范围(0,0)到(x,y),和是设定权重,可以是系统默认值,U mn和V mn分别表示每张人脸的脸部肤色区域中每个像素点的颜色分量。 Among them, (m,n) represents a pixel of the facial skin color area of each face, which belongs to the coordinate range (0,0) to (x,y), and is the set weight, which can be the system default value, U mn and V mn respectively represent the color component of each pixel in the facial skin color area of each face.
根据每张人脸的脸部肤色区域中每个像素点的颜色确定目标图像中肤色区域的第一颜色均值、最大颜色值和最小颜色值。The first color mean, maximum color value and minimum color value of the skin color area in the target image are determined according to the color of each pixel in the facial skin color area of each face.
步骤215、分别计算每张人脸对应的肤色区域的第二颜色均值。Step 215: Calculate the second color average of the skin color area corresponding to each face separately.
示例性的,基于每张人脸的脸部肤色区域中每个像素点的颜色确定每张人脸的肤色区域的颜色均值,记为第二颜色均值。Exemplarily, the color average value of the skin color area of each face is determined based on the color of each pixel in the facial skin color area of each face, and is recorded as the second color average.
步骤216、对于所述第二颜色均值小于所述第一颜色均值的目标肤色区域,根据所述目标肤色区域的颜色、所述第一颜色均值、所述最大颜色值和最小颜色值确定基于颜色的目标降噪强度。Step 216: For the target skin color area where the second color average value is less than the first color average value, determine based on the color according to the color of the target skin color area, the first color average value, the maximum color value and the minimum color value Target noise reduction intensity.
示例性的,比较第二颜色均值与第一颜色均值,确定第二颜色均值小于第一颜色均值的目标肤色区域。顺序获取目标肤色区域内的一个考察像素点,根据该考察像素点的颜色in_col、第一颜色均值mean1_col、最大颜色值max_col和最小颜色值min_col计算基于颜色的目标降噪强度。例如,可以采用如下公式计算基于颜色的目标降噪强度C_nr:Exemplarily, the second color mean is compared with the first color mean to determine the target skin color area where the second color mean is less than the first color mean. Obtain a survey pixel in the target skin color area in sequence, and calculate the color-based target noise reduction intensity according to the color in_col of the survey pixel, the first color mean mean1_col, the maximum color value max_col, and the minimum color value min_col. For example, the following formula can be used to calculate the color-based target noise reduction intensity C_nr:
C_nr=(max_col-min_col)*(mean1_col-in_col)/mean1_col      (3)C_nr=(max_col-min_col)*(mean1_col-in_col)/mean1_col (3)
可选的,还可以根据目标肤色区域内的每张人脸对应的肤色区域的第二颜色均值mean2_col、第一颜色均值mean1_col、最大颜色值max_col和最小颜色值min_col计算基于颜色的目标降噪强度。例如,可以采用如下公式计算基于颜色的目标降噪强度C_nr:Optionally, the color-based target noise reduction intensity can also be calculated according to the second color mean mean2_col, the first color mean mean1_col, the maximum color value max_col, and the minimum color value min_col of the skin color area corresponding to each face in the target skin color area . For example, the following formula can be used to calculate the color-based target noise reduction intensity C_nr:
C_nr=(max_col-min_col)*(mean1_col-mean2_col)/mean1_col       (4)C_nr=(max_col-min_col)*(mean1_col-mean2_col)/mean1_col (4)
步骤217、确定基于亮度的目标降噪强度和所述基于颜色的目标降噪强度的加权运算结果,将所述加权运算结果作为目标降噪强度。Step 217: Determine a weighted operation result of the target noise reduction intensity based on brightness and the target noise reduction intensity based on color, and use the weighted operation result as the target noise reduction intensity.
示例性的,采用设定加权系数,对基于亮度的目标降噪强度和基于颜色的目降噪强度进行加权运算,将加权运算结果作为目标降噪强度,即Nr=a*L_nr+b*C_nr,其中,a和b为加权系数,为系统默认值。Exemplarily, a set weighting coefficient is adopted to perform weighted operation on the target noise reduction intensity based on brightness and the color-based target noise reduction intensity, and use the weighted operation result as the target noise reduction intensity, that is, Nr=a*L_nr+b*C_nr , Where a and b are weighting coefficients, which are system default values.
步骤218、基于目标降噪强度对所述目标子区域进行降噪处理,得到降噪处理后的目标图像。Step 218: Perform noise reduction processing on the target sub-region based on the target noise reduction intensity to obtain a target image after noise reduction processing.
示例性的,目标图像中的人脸数量是1张时,采用基于亮度的目标降噪强度L_nr对目标子区域内像素点进行降噪处理,得到降噪处理后的目标图像。Exemplarily, when the number of faces in the target image is one, the target noise reduction intensity L_nr based on the brightness is used to perform noise reduction processing on the pixels in the target sub-region to obtain the noise-reduced target image.
若目标图像中的人脸数量至少为2张时,采用加权运算后的目标降噪强度Nr对目标子区域内像素点进行降噪处理,得到降噪处理后的目标图像。If the number of faces in the target image is at least 2, the target noise reduction intensity Nr after the weighting operation is used to perform noise reduction processing on the pixels in the target sub-region to obtain the noise-reduced target image.
步骤219、输出目标图像。Step 219: Output the target image.
本申请实施例的技术方案,在目标图像包含至少2张人脸时,分别统计每张人脸的颜色范围,计算整幅目标的人脸颜色均值、每张人脸的人脸颜色均值,颜色最大值和颜色最小值,从而,基于人脸颜色均值、颜色最大值和颜色最小值确定基于颜色的目标降噪强度;确定基于亮度的目标降噪强度和基于颜色的目标降噪强度的加权运算结果,将该加权运算结果作为目标降噪强度。采用上述技术方案,可以根据每张人脸的肤色深浅和肤色亮度将肤色区域划分为不同的子区域,为不同的子区域确定不同的目标降噪强度,实现对肤色较深、亮度较低的区域采用较大的目标降噪强度,对肤色较浅,亮度较高的区域采用较小的目标降噪强度,从而,有效的减少深肤色区域、脖子阴影、脸部轮廓等暗光区域的噪点。According to the technical solution of the embodiment of the present application, when the target image contains at least two faces, the color range of each face is counted separately to calculate the average face color of the entire target, the average face color of each face, and the color The maximum value and the minimum color value, thereby determining the color-based target noise reduction intensity based on the face color mean, color maximum and color minimum values; determining the weighted operation of the brightness-based target noise reduction intensity and the color-based target noise reduction intensity As a result, the weighted calculation result is used as the target noise reduction intensity. Using the above technical solution, the skin color region can be divided into different sub-regions according to the skin tone and skin brightness of each face, and different target noise reduction intensities can be determined for different sub-regions. The area uses a larger target noise reduction intensity, and the lighter skin color, the brighter the area uses a smaller target noise reduction intensity, thereby effectively reducing the noise of dark skin areas, neck shadows, face contours and other dark light areas .
在一些实施例中,在基于所述目标降噪强度对所述目标子区域进行降噪处理之后,还包括:对降噪处理后的目标图像进行噪声统计,基于统计结果确定所述肤色区域的噪声等级;判断所述噪声等级是否属于预设噪声区间;若是,则输出降噪处理后的目标图像;否则,根据所述噪声等级确定混合权重,基于所述混合权重对目标图像和降噪处理后的目标图像进行混合处理,输出混合处理后的目标图像。In some embodiments, after performing noise reduction processing on the target sub-region based on the target noise reduction intensity, the method further includes: performing noise statistics on the noise-reduced target image, and determining the skin color region based on the statistical results Noise level; determine whether the noise level belongs to a preset noise interval; if it is, output the target image after noise reduction processing; otherwise, determine the mixing weight according to the noise level, based on the mixing weight on the target image and noise reduction processing The target image after the mixing process is processed, and the target image after the mixing process is output.
图4为本申请提供的又一种图像降噪方法的流程图,在获取原始目标图像origin_pic后,选定降噪区域。例如,对原始目标图像origin_pic进行人脸检测、关键点、边缘标记以及肤色区域选择等操作,确定脸部肤色区域,以及确定包含耳朵、肩膀和脖子等与脸部肤色相近的考察区域,将脸部肤色区域和考察区域标记为肤色区域,该肤色区域即为降噪区域。对目标图像进行噪声估计,确定整体降噪强度。基于整体降噪强度对脸部整体进行降噪处理。在基 于皮肤的亮度和皮肤的颜色对肤色区域进行局部降噪处理得到降噪后的目标图像NR_pic。确定NR_pic中肤色区域的噪声等级,在该噪声等级不属于预设噪声区间时,获取原始目标图像origin_pic以及降噪处理后的目标图像NR_pic。基于NR_pic的肤色区域的噪声等级确定混合权重blend_percent(0≤blend_percent≤100),最终输出的目标图像中的每个像素点是origin_pic和NR_pic基于blend_percent的混合值(即blend_percent*NR_pic+(1-blend_percent)*origin_pic)。这样设计的好处在于,在肤色区域进行局部降噪处理后的噪声等级不在预设噪声区间时(可能是降噪过渡了丢失一些细节信息),根据降噪处理后的肤色区域的噪声等级确定混合权重,并基于该混合权重对原始的目标图像和降噪处理后的目标图像进行混合处理,以动态调整目标图像的噪点分布,使最终的目标图像中的噪点分布更加均匀,呈现更自然、清晰的目标图像。FIG. 4 is a flowchart of another image noise reduction method provided by the present application. After acquiring the original target image origin_pic, a noise reduction area is selected. For example, the original target image origin_pic is subjected to face detection, keypoints, edge markers, and skin color area selection to determine the skin color area of the face, as well as the investigation area including ears, shoulders, and necks that are similar to the skin color of the face. The skin color area and the investigation area are marked as skin color areas, and the skin color area is the noise reduction area. Perform noise estimation on the target image to determine the overall noise reduction intensity. Noise reduction is performed on the entire face based on the overall noise reduction intensity. The target image NR_pic after noise reduction is obtained by performing local noise reduction on the skin color area based on the brightness of the skin and the color of the skin. Determine the noise level of the skin color region in NR_pic, and when the noise level does not belong to the preset noise interval, acquire the original target image origin_pic and the target image NR_pic after noise reduction processing. The mixed weight blend_percent (0≤blend_percent≤100) is determined based on the noise level of the skin color region of NR_pic, and each pixel in the final output target image is a mixture value of origin_pic and NR_pic based on blend_percent (ie blend_percent*NR_pic+(1-blend_percent) *origin_pic). The advantage of this design is that when the noise level after the local noise reduction process in the skin color area is not in the preset noise interval (it may be that the noise reduction transition has lost some details), the mixing is determined according to the noise level of the skin color area after the noise reduction process Weights, and based on the mixed weights, the original target image and the noise-reduced target image are mixed to dynamically adjust the noise distribution of the target image, so that the noise distribution in the final target image is more uniform, more natural and clear Target image.
需要说明的是,可以将本申请实施例的技术方案加入至ISP(Image Signal Processing,图像信号处理)的中间流程或最后流程,以优化照片拍摄效果。可选的,还可以将本申请实施例的技术方案与多帧降噪技术结合使用,实现对随机噪点和暗处降噪场景下具有更好的降噪效果。It should be noted that the technical solutions of the embodiments of the present application may be added to the intermediate or final process of ISP (Image Signal Processing) to optimize the photo shooting effect. Optionally, the technical solutions of the embodiments of the present application can also be used in combination with a multi-frame noise reduction technology to achieve better noise reduction effect in random noise and dark noise reduction scenes.
图5为本申请实施例提供的一种图像降噪装置的结构框图,该装置可由软件和/或硬件实现,一般集成在终端中,可以通过执行图像降噪方法有效地抑制因为逆光、侧光、点光源直射、暗光等不理想光线下的人脸噪点,呈现更加清晰、自然的人脸图像。如图5所示,该装置包括:FIG. 5 is a structural block diagram of an image noise reduction device provided by an embodiment of the present application. The device can be implemented by software and/or hardware, and is generally integrated in a terminal, which can effectively suppress the backlight and side light by performing the image noise reduction method. , Face light under direct light, dark light and other unfavorable face noise, presents a clearer and natural face image. As shown in Figure 5, the device includes:
信息确定模块510,用于确定目标图像中肤色区域的亮度信息;The information determination module 510 is used to determine the brightness information of the skin color area in the target image;
降噪强度确定模块520,用于确定所述肤色区域中亮度低于预设亮度阈值的目标子区域,根据所述目标子区域的所述亮度和所述亮度信息确定目标降噪强度;The noise reduction intensity determination module 520 is configured to determine a target sub-region whose brightness is lower than a preset brightness threshold in the skin-color region, and determine a target noise reduction intensity according to the brightness of the target sub-region and the brightness information;
降噪处理模块530,用于基于所述目标降噪强度对所述目标子区域进行降噪处理,得到降噪处理后的目标图像。The noise reduction processing module 530 is configured to perform noise reduction processing on the target sub-region based on the target noise reduction intensity to obtain a target image after noise reduction processing.
本申请实施例提供一种图像降噪装置,通过确定该肤色区域中亮度低于预设亮度阈值的目标子区域,根据该目标子区域的亮度和亮度信息确定目标降噪强度;基于该目标降噪强度对该目标子区域进行降噪处理,得到降噪处理后的目标图像。通过采用上述技术方案,基于亮度确定待进行降噪处理的 目标子区域,根据目标子区域内每个像素点的亮度与该肤色区域的亮度信息确定降噪强度,基于降噪强度对相应的像素点进行降噪处理,实现基于亮度对肤色区域进行局部降噪的效果,使得肤色区域的噪点分布更加均匀。An embodiment of the present application provides an image noise reduction device, which determines a target noise reduction intensity according to the brightness and brightness information of the target subregion by determining a target subregion in the skin color region whose brightness is lower than a preset brightness threshold; based on the target reduction The noise intensity performs noise reduction processing on the target sub-region to obtain the target image after noise reduction processing. By adopting the above technical solution, the target sub-region to be subjected to noise reduction processing is determined based on the brightness, the noise reduction intensity is determined according to the brightness of each pixel in the target sub-region and the brightness information of the skin color area, and the corresponding pixels are determined based on the noise reduction intensity Perform noise reduction on the points to achieve the local noise reduction effect on the skin color area based on brightness, making the noise distribution of the skin area more uniform.
可选的,还包括肤色区域,该肤色区域用于:Optionally, it also includes a skin tone area, which is used for:
在确定目标图像中肤色区域的亮度信息之前,获取色亮分离颜色模式的目标图像,对所述目标图像进行人脸识别,确定所述目标图像包含的人脸信息,其中,所述人脸信息包括人脸数量,以及脸部、眉毛、眼睛、鼻子和嘴巴的轮廓信息;Before determining the brightness information of the skin color region in the target image, obtain the target image in the color separation mode, perform face recognition on the target image, and determine the face information contained in the target image, where the face information Including the number of faces, and the outline information of the face, eyebrows, eyes, nose and mouth;
根据所述人脸信息中的所述轮廓信息确定所述目标图像的脸部皮肤区域;Determine the facial skin area of the target image according to the contour information in the human face information;
分别获取所述脸部皮肤区域内的每个像素点的亮度和色彩,根据所述亮度和色彩由所述目标图像中确定考察区域,其中,所述考察区域内的像素点与所述脸部皮肤区域内的像素点在亮度和色彩上的偏差小于设定阈值;Obtain the brightness and color of each pixel in the face skin area separately, and determine the investigation area from the target image according to the brightness and color, wherein the pixels in the investigation area and the face The deviation of pixels in the skin area in brightness and color is less than the set threshold;
由所述考察区域和所述脸部皮肤区域构成肤色区域。The skin area is composed of the investigation area and the facial skin area.
可选的,还包括事件触发模块,该事件触发模块用于:Optionally, an event trigger module is also included. The event trigger module is used to:
在由所述考察区域和所述脸部皮肤区域构成肤色区域之后,对所述目标图像进行噪声统计,基于统计结果确定所述肤色区域和背景区域的噪声等级;After the skin color area is composed of the investigation area and the facial skin area, perform noise statistics on the target image, and determine the noise levels of the skin color area and the background area based on the statistical results;
在所述肤色区域的噪声等级高于所述背景区域的噪声等级时,触发局部降噪事件,其中,所述局部降噪事件用于指示确定目标图像中肤色区域的亮度信息的操作执行。When the noise level of the skin color area is higher than the noise level of the background area, a local noise reduction event is triggered, where the local noise reduction event is used to indicate the execution of the operation to determine the brightness information of the skin color area in the target image.
可选的,还包括整体降噪模块,该整体降噪模块用于:Optionally, an overall noise reduction module is also included. The overall noise reduction module is used for:
在对所述目标图像进行噪声统计,基于统计结果确定所述肤色区域和背景区域的噪声等级之后,根据所述噪声等级确定对所述目标图像进行整体降噪处理的整体降噪强度,基于所述整体降噪强度对所述目标图像进行整体降噪处理。After performing noise statistics on the target image and determining the noise levels of the skin-color area and the background area based on the statistical results, the overall noise reduction intensity of the overall noise reduction processing on the target image is determined according to the noise level, based on The overall noise reduction intensity performs overall noise reduction processing on the target image.
可选的,所述降噪强度确定模块520具体用于:Optionally, the noise reduction intensity determination module 520 is specifically used to:
将所述肤色区域中各个像素点的亮度与预设亮度域值进行比较,标记亮度低于预设亮度阈值的目标像素点,将所述目标像素点聚类成至少一个目标子区域;Compare the brightness of each pixel in the skin color area with a preset brightness threshold, mark target pixels whose brightness is lower than the preset brightness threshold, and cluster the target pixels into at least one target sub-region;
根据每个所述目标子区域内目标像素点的亮度、所述亮度均值、所述亮 度最大值和所述亮度最小值确定基于亮度的目标降噪强度。The target noise reduction intensity based on brightness is determined according to the brightness of the target pixel in each target sub-region, the average brightness, the maximum brightness, and the minimum brightness.
可选的,还包括色彩信息确定模块,该色彩信息确定模块用于:Optionally, it also includes a color information determination module, which is used to:
在基于所述目标降噪强度对所述目标子区域进行降噪处理之前,在目标图像中包含至少两张人脸时,获取肤色区域的色彩,根据所述色彩确定所述目标图像中肤色区域的第一色彩均值、最大色彩值和最小色彩值;Before performing noise reduction processing on the target sub-region based on the target noise reduction intensity, when the target image contains at least two human faces, the color of the skin color region is acquired, and the skin color region in the target image is determined according to the color The first color mean, maximum color value and minimum color value of
分别计算每张人脸对应的肤色区域的第二色彩均值;Calculate the second color average of the skin color area corresponding to each face separately;
对于所述第二色彩均值小于所述第一色彩均值的目标肤色区域,根据所述目标肤色区域的色彩、所述第一色彩均值、所述最大色彩值和最小色彩值确定基于色彩的目标降噪强度。For the target skin color area where the second color average value is less than the first color average value, a color-based target drop is determined according to the color of the target skin color area, the first color average value, the maximum color value, and the minimum color value Noise strength.
可选的,所述装置还包括:Optionally, the device further includes:
加权运算模块,用于在根据所述目标肤色区域的色彩、所述第一色彩均值、所述最大色彩值和最小色彩值确定基于色彩的目标降噪强度之后,确定基于亮度的目标降噪强度和所述基于色彩的目标降噪强度的加权运算结果,将所述加权运算结果作为目标降噪强度。The weighting operation module is used to determine the target noise reduction intensity based on the brightness after determining the target noise reduction intensity based on the color according to the color of the target skin color area, the first color mean, the maximum color value and the minimum color value And the weighted calculation result of the target noise reduction intensity based on color, and using the weighted calculation result as the target noise reduction intensity.
可选的,还包括图像混合模块,该图像混合模块用于:Optionally, an image mixing module is also included. The image mixing module is used to:
在基于所述目标降噪强度对所述目标子区域进行降噪处理之后,对降噪处理后的目标图像进行噪声统计,基于统计结果确定所述肤色区域的噪声等级;After performing noise reduction processing on the target sub-region based on the target noise reduction intensity, performing noise statistics on the noise-reduced target image, and determining the noise level of the skin color region based on the statistical results;
判断所述噪声等级是否属于预设噪声区间;Determine whether the noise level belongs to a preset noise interval;
若是,则输出降噪处理后的目标图像;If yes, output the target image after noise reduction processing;
否则,根据所述噪声等级确定混合权重,基于所述混合权重对目标图像和降噪处理后的目标图像进行混合处理,输出混合处理后的目标图像。Otherwise, a mixing weight is determined according to the noise level, and the target image and the noise-reduced target image are mixed based on the mixing weight, and the mixed-processed target image is output.
本申请实施例还提供一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行图像降噪方法,该方法包括:Embodiments of the present application also provide a storage medium containing computer-executable instructions, which when executed by a computer processor are used to perform an image noise reduction method, the method includes:
检测到局部降噪事件被触发;A local noise reduction event is detected and triggered;
确定目标图像中肤色区域的亮度信息,其中,所述亮度信息包括亮度均值、亮度最大值和亮度最小值;Determine the brightness information of the skin color region in the target image, where the brightness information includes the average brightness, the maximum brightness, and the minimum brightness;
确定所述肤色区域中亮度低于亮度均值的目标子区域,根据所述目标子区域的亮度和所述亮度信息确定目标降噪强度;Determining a target sub-region in the skin color region whose brightness is lower than the average brightness, and determining a target noise reduction intensity according to the brightness of the target sub-region and the brightness information;
基于所述目标降噪强度对所述目标子区域进行降噪处理,得到降噪处理 后的目标图像。Perform noise reduction processing on the target sub-region based on the target noise reduction intensity to obtain a target image after noise reduction processing.
本申请实施例提供一种图像降噪装置,通过确定该肤色区域中亮度低于预设亮度阈值的目标子区域,根据该目标子区域的亮度和亮度信息确定目标降噪强度;基于该目标降噪强度对该目标子区域进行降噪处理,得到降噪处理后的目标图像。通过采用上述技术方案,基于亮度确定待进行降噪处理的目标子区域,根据目标子区域内每个像素点的亮度与该肤色区域的亮度信息确定降噪强度,基于降噪强度对相应的像素点进行降噪处理,实现基于亮度对肤色区域进行局部降噪的效果,使得肤色区域的噪点分布更加均匀。An embodiment of the present application provides an image noise reduction device, which determines a target noise reduction intensity according to the brightness and brightness information of the target subregion by determining a target subregion in the skin color region whose brightness is lower than a preset brightness threshold; based on the target reduction The noise intensity performs noise reduction processing on the target sub-region to obtain the target image after noise reduction processing. By adopting the above technical solution, the target sub-region to be subjected to noise reduction processing is determined based on the brightness, the noise reduction intensity is determined according to the brightness of each pixel in the target sub-region and the brightness information of the skin color area, and the corresponding pixels are determined based on the noise reduction intensity Perform noise reduction on the points to achieve the local noise reduction effect on the skin color area based on brightness, making the noise distribution of the skin area more uniform.
存储介质——任何的各种类型的存储器设备或存储设备。术语“存储介质”旨在包括:安装介质,例如CD-ROM、软盘或磁带装置;计算机系统存储器或随机存取存储器,诸如DRAM、DDR RAM、SRAM、EDO RAM,兰巴斯(Rambus)RAM等;非易失性存储器,诸如闪存、磁介质(例如硬盘或光存储);寄存器或其它相似类型的存储器元件等。存储介质可以还包括其它类型的存储器或其组合。另外,存储介质可以位于程序在其中被执行的第一计算机系统中,或者可以位于不同的第二计算机系统中,第二计算机系统通过网络(诸如因特网)连接到第一计算机系统。第二计算机系统可以提供程序指令给第一计算机用于执行。术语“存储介质”可以包括可以驻留在不同位置中(例如在通过网络连接的不同计算机系统中)的两个或更多存储介质。存储介质可以存储可由一个或多个处理器执行的程序指令(例如具体实现为计算机程序)。Storage medium-any kind of memory device or storage device of various types. The term "storage media" is intended to include: installation media such as CD-ROM, floppy disk or tape devices; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc. ; Non-volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements. The storage medium may also include other types of memory or a combination thereof. In addition, the storage medium may be located in the first computer system in which the program is executed, or may be located in a different second computer system that is connected to the first computer system through a network such as the Internet. The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations (eg, in different computer systems connected through a network). The storage medium may store program instructions executable by one or more processors (eg, embodied as a computer program).
当然,本申请实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的图像降噪操作,还可以执行本申请任意实施例所提供的图像降噪方法中的相关操作。Of course, a storage medium containing computer-executable instructions provided by the embodiments of the present application is not limited to the image noise reduction operation described above, but can also perform the image noise reduction provided by any embodiment of the present application Related operations in the method.
本申请实施例提供了一种终端,该终端中可集成本申请实施例提供的图像降噪装置。图6为本申请实施例提供的一种终端的结构示意图。如图6所示,该终端包括存储器610及处理器620。所述存储器610,用于存储计算机程序;所述处理器620读取并执行所述存储器610中存储的计算机程序。所述处理器620在执行所述计算机程序时实现以下步骤:确定目标图像中肤色区域的亮度信息;确定所述肤色区域中亮度低于预设亮度域值的目标子区域,根据所述目标子区域的亮度和所述亮度信息确定目标降噪强度;基于所述目 标降噪强度对所述目标子区域进行降噪处理,得到降噪处理后的目标图像。An embodiment of the present application provides a terminal, and an image noise reduction device provided by an embodiment of the present application may be integrated in the terminal. 6 is a schematic structural diagram of a terminal according to an embodiment of the present application. As shown in FIG. 6, the terminal includes a memory 610 and a processor 620. The memory 610 is used to store a computer program; the processor 620 reads and executes the computer program stored in the memory 610. The processor 620 implements the following steps when executing the computer program: determining the brightness information of the skin color area in the target image; determining the target sub-area in the skin color area whose brightness is lower than a preset brightness domain value, according to the target sub The brightness of the area and the brightness information determine a target noise reduction intensity; perform noise reduction processing on the target sub-region based on the target noise reduction intensity to obtain a target image after noise reduction processing.
上述示例中列举的存储器及处理器均为终端的部分元器件,所述终端还可以包括其它元器件。以智能手机为例,说明上述终端可能的结构。图7为本申请实施例提供的一种智能手机的结构框图。如图7所示,该智能手机可以包括:存储器701、中央处理器(Central Processing Unit,CPU)702(又称处理器,以下简称CPU)、外设接口703、RF(Radio Frequency,射频)电路705、音频电路706、扬声器711、触摸屏712、电源管理芯片708、输入/输出(I/O)子系统709、其他输入/控制设备710以及外部端口704,这些部件通过一个或多个通信总线或信号线707来通信。The memory and processor listed in the above examples are all components of the terminal, and the terminal may also include other components. Take a smart phone as an example to illustrate the possible structure of the above terminal. 7 is a structural block diagram of a smartphone provided by an embodiment of the present application. As shown in FIG. 7, the smart phone may include: a memory 701, a central processing unit (Central Processing Unit, CPU) 702 (also called a processor, hereinafter referred to as CPU), a peripheral interface 703, and an RF (Radio Frequency) circuit 705, audio circuit 706, speaker 711, touch screen 712, power management chip 708, input/output (I/O) subsystem 709, other input/control devices 710, and external ports 704, these components through one or more communication buses or The signal line 707 comes to communicate.
应该理解的是,图示智能手机700仅仅是终端的一个范例,并且智能手机700可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。It should be understood that the illustrated smartphone 700 is only an example of a terminal, and the smartphone 700 may have more or fewer parts than shown in the figure, and two or more parts may be combined, or There can be different component configurations. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
下面就本实施例提供的集成有图像降噪装置的智能手机进行详细的描述。The smart phone integrated with the image noise reduction device provided in this embodiment will be described in detail below.
存储器701,所述存储器701可以被CPU702、外设接口703等访问,所述存储器701可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储器件、闪存器件、或其他易失性固态存储器件。 Memory 701, which can be accessed by CPU 702, peripheral interface 703, etc. The memory 701 can include high-speed random access memory, and can also include non-volatile memory, such as one or more disk storage devices, flash memory devices , Or other volatile solid-state storage devices.
外设接口703,所述外设接口703可以将设备的输入和输出外设连接到CPU702和存储器701。 Peripheral interface 703, which can connect input and output peripherals of the device to CPU 702 and memory 701.
I/O子系统709,所述I/O子系统709可以将设备上的输入输出外设,例如触摸屏712和其他输入/控制设备710,连接到外设接口703。I/O子系统709可以包括显示控制器7091和用于控制其他输入/控制设备710的一个或多个输入控制器7092。其中,一个或多个输入控制器7092从其他输入/控制设备710接收电信号或者向其他输入/控制设备710发送电信号,其他输入/控制设备710可以包括物理按钮(按压按钮、摇臂按钮等)、拨号盘、滑动开关、操纵杆、点击滚轮。值得说明的是,输入控制器7092可以与以下任一个连接:键盘、红外端口、USB接口以及诸如鼠标的指示设备。I/O subsystem 709, which can connect input and output peripherals on the device, such as touch screen 712 and other input/control devices 710, to peripheral interface 703. The I/O subsystem 709 may include a display controller 7091 and one or more input controllers 7092 for controlling other input/control devices 710. Among them, one or more input controllers 7092 receive electrical signals from other input/control devices 710 or send electrical signals to other input/control devices 710, which may include physical buttons (press buttons, rocker buttons, etc.) ), dial pad, slide switch, joystick, click wheel. It is worth noting that the input controller 7092 can be connected to any of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
触摸屏712,所述触摸屏712是用户终端与用户之间的输入接口和输出 接口,将可视输出显示给用户,可视输出可以包括图形、文本、图标、视频等。A touch screen 712, which is an input interface and an output interface between the user terminal and the user, and displays visual output to the user, and the visual output may include graphics, text, icons, video, and the like.
I/O子系统709中的显示控制器7091从触摸屏712接收电信号或者向触摸屏712发送电信号。触摸屏712检测触摸屏上的接触,显示控制器7091将检测到的接触转换为与显示在触摸屏712上的用户界面对象的交互,即实现人机交互,显示在触摸屏712上的用户界面对象可以是运行游戏的图标、联网到相应网络的图标等。值得说明的是,设备还可以包括光鼠,光鼠是不显示可视输出的触摸敏感表面,或者是由触摸屏形成的触摸敏感表面的延伸。The display controller 7091 in the I/O subsystem 709 receives electrical signals from the touch screen 712 or sends electrical signals to the touch screen 712. The touch screen 712 detects the contact on the touch screen, and the display controller 7091 converts the detected contact into interaction with the user interface object displayed on the touch screen 712, that is, realizes human-computer interaction, and the user interface object displayed on the touch screen 712 may be running Icons for games, icons connected to the corresponding network, etc. It is worth noting that the device may also include a light mouse, which is a touch-sensitive surface that does not display visual output, or an extension of the touch-sensitive surface formed by a touch screen.
RF电路705,主要用于建立手机与无线网络(即网络侧)的通信,实现手机与无线网络的数据接收和发送。例如收发短信息、电子邮件等。具体地,RF电路705接收并发送RF信号,RF信号也称为电磁信号,RF电路705将电信号转换为电磁信号或将电磁信号转换为电信号,并且通过该电磁信号与通信网络以及其他设备进行通信。RF电路705可以包括用于执行这些功能的已知电路,其包括但不限于天线系统、RF收发机、一个或多个放大器、调谐器、一个或多个振荡器、数字信号处理器、CODEC(COder-DECoder,编译码器)芯片组、用户标识模块(Subscriber Identity Module,SIM)等等。The RF circuit 705 is mainly used to establish communication between the mobile phone and the wireless network (that is, the network side), and realize data reception and transmission between the mobile phone and the wireless network. For example, sending and receiving short messages, e-mail, etc. Specifically, the RF circuit 705 receives and transmits RF signals, which are also called electromagnetic signals. The RF circuit 705 converts electrical signals into electromagnetic signals or converts electromagnetic signals into electrical signals, and communicates with the communication network and other devices through the electromagnetic signals Communicate. The RF circuit 705 may include known circuits for performing these functions, including but not limited to antenna systems, RF transceivers, one or more amplifiers, tuners, one or more oscillators, digital signal processors, CODEC ( COder-DECoder (codec) chipset, subscriber identity module (Subscriber Identity Module, SIM), etc.
音频电路706,主要用于从外设接口703接收音频数据,将该音频数据转换为电信号,并且将该电信号发送给扬声器711。The audio circuit 706 is mainly used to receive audio data from the peripheral interface 703, convert the audio data into electrical signals, and send the electrical signals to the speaker 711.
扬声器711,用于将手机通过RF电路705从无线网络接收的语音信号,还原为声音并向用户播放该声音。The speaker 711 is used to restore the voice signal received by the mobile phone from the wireless network through the RF circuit 705 to a sound and play the sound to the user.
电源管理芯片708,用于为CPU702、I/O子系统及外设接口所连接的硬件进行供电及电源管理。The power management chip 708 is used for power supply and power management for the hardware connected to the CPU 702, the I/O subsystem, and the peripheral interface.
本申请实施例提供的终端,可以基于亮度确定待进行降噪处理的目标子区域,根据目标子区域内每个像素点的亮度与该肤色区域的亮度最大值和亮度最小值确定降噪强度,基于降噪强度对相应的像素点进行降噪处理,实现基于亮度对肤色区域进行局部降噪的效果,使得肤色区域的噪点分布更加均匀。The terminal provided in the embodiment of the present application may determine the target sub-region to be subjected to noise reduction processing based on the brightness, and determine the noise reduction intensity according to the brightness of each pixel in the target sub-region and the maximum and minimum brightness values of the skin-tone area, Based on the intensity of noise reduction, the corresponding pixels are subjected to noise reduction processing to achieve the local noise reduction effect on the skin color area based on brightness, so that the noise distribution of the skin color area is more uniform.
上述实施例中提供的图像降噪装置、存储介质及终端可执行本申请任意实施例所提供的图像降噪方法,具备执行该方法相应的功能模块和有益效果。未在上述实施例中详尽描述的技术细节,可参见本申请任意实施例所提供的 图像降噪方法。The image noise reduction device, storage medium, and terminal provided in the above embodiments can execute the image noise reduction method provided in any embodiment of the present application, and have corresponding function modules and beneficial effects for performing the method. For technical details that are not described in detail in the above embodiments, please refer to the image noise reduction method provided in any embodiment of the present application.
注意,上述仅为本申请的较佳实施例及所运用技术原理。本领域技术人员会理解,本申请不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本申请的保护范围。因此,虽然通过以上实施例对本申请进行了较为详细的说明,但是本申请不仅仅限于以上实施例,在不脱离本申请构思的情况下,还可以包括更多其他等效实施例,而本申请的范围由所附的权利要求范围决定。Note that the above are only the preferred embodiments of the present application and the applied technical principles. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that those skilled in the art can make various obvious changes, readjustments and substitutions without departing from the scope of protection of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the concept of the present application. The scope is determined by the scope of the appended claims.

Claims (20)

  1. 一种图像降噪方法,其特征在于,包括:An image noise reduction method, characterized in that it includes:
    确定目标图像中肤色区域的亮度信息;Determine the brightness information of the skin color area in the target image;
    确定所述肤色区域中亮度低于预设亮度阈值的目标子区域,根据所述目标子区域的所述亮度和所述亮度信息确定目标降噪强度;Determining a target sub-area in the skin-color area whose brightness is lower than a preset brightness threshold, and determining a target noise reduction intensity according to the brightness of the target sub-area and the brightness information;
    基于所述目标降噪强度对所述目标子区域进行降噪处理,得到降噪处理后的目标图像。Perform noise reduction processing on the target sub-region based on the target noise reduction intensity to obtain a target image after noise reduction processing.
  2. 根据权利要求1所述的方法,其特征在于,在确定目标图像中肤色区域的亮度信息之前,还包括:The method of claim 1, before determining the brightness information of the skin color region in the target image, further comprising:
    获取色亮分离颜色模式的目标图像,对所述目标图像进行人脸识别,确定所述目标图像包含的人脸信息,其中,所述人脸信息包括人脸数量,以及脸部、眉毛、眼睛、鼻子和嘴巴的轮廓信息;Obtain a target image in a color-separated color mode, perform face recognition on the target image, and determine the face information contained in the target image, where the face information includes the number of faces, and faces, eyebrows, and eyes , Contour information of nose and mouth;
    根据所述轮廓信息确定所述目标图像的脸部皮肤区域;Determine the facial skin area of the target image according to the outline information;
    获取所述脸部皮肤区域内的每个像素点的亮度和色彩,根据所述亮度和色彩在所述目标图像中确定考察区域,其中,所述考察区域内的像素点与所述脸部皮肤区域内的像素点在亮度和色彩上的偏差小于设定阈值;Acquiring the brightness and color of each pixel in the facial skin area, and determining an investigation area in the target image according to the brightness and color, wherein the pixels in the investigation area and the facial skin The deviation of pixels in the area in brightness and color is less than the set threshold;
    所述考察区域和所述脸部皮肤区域构成肤色区域。The investigation area and the facial skin area constitute a skin color area.
  3. 根据权利要求2所述的方法,其特征在于,所述获取色亮分离颜色模式的目标图像,包括:The method according to claim 2, wherein the acquiring the target image of the color separation mode includes:
    判断所获取的目标图像是否为色亮分离颜色模式;Determine whether the acquired target image is the color separation mode of color and light;
    当所获取的目标图像不为色亮分离颜色模式时,对所述目标图像进行模式转换,生成色亮分离颜色模式的目标图像。When the acquired target image is not the color separation mode, the target image is subjected to mode conversion to generate the target image in the color separation mode.
  4. 根据权利要求2所述的方法,其特征在于,在由所述考察区域和所述脸部皮肤区域构成肤色区域之后,还包括:The method according to claim 2, characterized in that after the skin color area is formed by the investigation area and the facial skin area, the method further comprises:
    对所述目标图像进行噪声统计,基于统计结果确定所述肤色区域和目标图像中除肤色区域之外的剩余区域的噪声等级;Perform noise statistics on the target image, and determine the noise level of the skin area and the remaining areas of the target image except the skin area based on the statistical results;
    在所述肤色区域的噪声等级高于所述目标图像中除肤色区域之外的剩余区域的噪声等级时,触发局部降噪事件,其中,所述局部降噪事件用于指示 确定目标图像中肤色区域的亮度信息的操作执行。When the noise level of the skin color area is higher than the noise level of the remaining areas in the target image except the skin color area, a local noise reduction event is triggered, where the local noise reduction event is used to indicate the determination of the skin color in the target image The operation of the brightness information of the area is performed.
  5. 根据权利要求4所述的方法,其特征在于,在对所述目标图像进行噪声统计,基于统计结果确定所述肤色区域和目标图像中除肤色区域之外的剩余区域的噪声等级之后,还包括:The method according to claim 4, characterized in that after performing noise statistics on the target image and determining the noise level of the remaining area other than the skin color area in the skin color area and the target image based on the statistical result, further comprising :
    根据所述噪声等级确定对所述目标图像进行整体降噪处理的整体降噪强度,基于所述整体降噪强度对所述目标图像进行整体降噪处理。Determining an overall noise reduction intensity for performing overall noise reduction processing on the target image according to the noise level, and performing overall noise reduction processing on the target image based on the overall noise reduction intensity.
  6. 根据权利要求1所述的方法,其特征在于,确定所述肤色区域中亮度低于预设亮度阈值的目标子区域,根据所述目标子区域的所述亮度和所述亮度信息确定目标降噪强度,包括:The method according to claim 1, wherein a target sub-area of the skin-color area whose brightness is lower than a preset brightness threshold is determined, and a target noise reduction is determined according to the brightness of the target sub-area and the brightness information Strength, including:
    将所述肤色区域中各个像素点的亮度与预设亮度阈值进行比较,标记亮度低于预设亮度阈值的目标像素点,将所述目标像素点聚类成至少一个目标子区域;Comparing the brightness of each pixel in the skin color area with a preset brightness threshold, marking target pixels whose brightness is lower than the preset brightness threshold, and clustering the target pixels into at least one target sub-region;
    根据所述每个目标子区域内目标像素点的亮度、亮度均值、亮度最大值和亮度最小值确定基于亮度的目标降噪强度。The target noise reduction intensity based on the brightness is determined according to the brightness, average brightness value, maximum brightness value and minimum brightness value of the target pixel in each target sub-region.
  7. 根据权利要求6所述的方法,其特征在于,在基于所述目标降噪强度对所述目标子区域进行降噪处理之前,还包括:The method according to claim 6, wherein before performing noise reduction processing on the target sub-region based on the target noise reduction intensity, further comprising:
    在目标图像中包含至少两张人脸时,获取肤色区域的色彩,根据所述色彩确定所述目标图像中肤色区域的第一色彩均值、最大色彩值和最小色彩值;When the target image contains at least two human faces, obtain the color of the skin color area, and determine the first color mean, maximum color value, and minimum color value of the skin color area in the target image according to the color;
    分别计算每张人脸对应的肤色区域的第二色彩均值;Calculate the second color average of the skin color area corresponding to each face separately;
    对于所述第二色彩均值小于所述第一色彩均值的目标肤色区域,根据所述目标肤色区域的色彩、所述第一色彩均值、所述最大色彩值和最小色彩值确定基于色彩的目标降噪强度。For the target skin color area where the second color average value is less than the first color average value, a color-based target drop is determined according to the color of the target skin color area, the first color average value, the maximum color value, and the minimum color value Noise strength.
  8. 根据权利要求7所述的方法,其特征在于,在根据所述目标肤色区域的色彩、所述第一色彩均值、所述最大色彩值和最小色彩值确定基于色彩的目标降噪强度之后,还包括:The method according to claim 7, characterized in that after determining the color-based target noise reduction intensity according to the color of the target skin color region, the first color mean, the maximum color value and the minimum color value, include:
    确定基于亮度的目标降噪强度和所述基于色彩的目标降噪强度的加权运算结果,将所述加权运算结果作为目标降噪强度。A weighted operation result of the brightness-based target noise reduction intensity and the color-based target noise reduction intensity is determined, and the weighted calculation result is used as the target noise reduction intensity.
  9. 根据权利要求1至8中任一项所述的方法,其特征在于,在基于所述目标降噪强度对所述目标子区域进行降噪处理之后,还包括:The method according to any one of claims 1 to 8, wherein after performing noise reduction processing on the target sub-region based on the target noise reduction intensity, further comprising:
    对降噪处理后的目标图像进行噪声统计,基于统计结果确定所述肤色区 域的噪声等级;Perform noise statistics on the target image after noise reduction processing, and determine the noise level of the skin color region based on the statistical results;
    判断所述噪声等级是否属于预设噪声区间;Determine whether the noise level belongs to a preset noise interval;
    若是,则输出降噪处理后的目标图像;If yes, output the target image after noise reduction processing;
    否则,根据所述噪声等级确定混合权重,基于所述混合权重对目标图像和降噪处理后的目标图像进行混合处理,输出混合处理后的目标图像。Otherwise, a mixing weight is determined according to the noise level, and the target image and the noise-reduced target image are mixed based on the mixing weight, and the mixed-processed target image is output.
  10. 一种图像降噪装置,其特征在于,包括:An image noise reduction device, characterized in that it includes:
    信息确定模块,用于确定目标图像中肤色区域的亮度信息;The information determination module is used to determine the brightness information of the skin color area in the target image;
    降噪强度确定模块,用于确定所述肤色区域中亮度低于预设亮度阈值的目标子区域,根据所述目标子区域的所述亮度和所述亮度信息确定目标降噪强度;A noise reduction intensity determination module, configured to determine a target sub-region with a brightness lower than a preset brightness threshold in the skin-color region, and determine a target noise reduction intensity according to the brightness of the target sub-region and the brightness information;
    降噪处理模块,用于基于所述目标降噪强度对所述目标子区域进行降噪处理,得到降噪处理后的目标图像。The noise reduction processing module is configured to perform noise reduction processing on the target sub-region based on the target noise reduction intensity to obtain a target image after noise reduction processing.
  11. 根据权利要求10所述的装置,其特征在于,所述装置还包括:The device of claim 10, wherein the device further comprises:
    人脸信息确定模块,用于获取色亮分离颜色模式的目标图像,对所述目标图像进行人脸识别,确定所述目标图像包含的人脸信息,其中,所述人脸信息包括人脸数量,以及脸部、眉毛、眼睛、鼻子和嘴巴的轮廓信息;The face information determination module is used to obtain a target image with separated color and light color mode, perform face recognition on the target image, and determine the face information contained in the target image, wherein the face information includes the number of faces , And contour information for face, eyebrows, eyes, nose and mouth;
    脸部皮肤区域确定模块,用于根据所述轮廓信息确定所述目标图像的脸部皮肤区域;A facial skin area determining module, configured to determine the facial skin area of the target image according to the outline information;
    考察区域确定模块,用于获取所述脸部皮肤区域内的每个像素点的亮度和色彩,根据所述亮度和色彩在所述目标图像中确定考察区域,其中,所述考察区域内的像素点与所述脸部皮肤区域内的像素点在亮度和色彩上的偏差小于设定阈值;The investigation area determination module is used to obtain the brightness and color of each pixel in the facial skin area, and determine the investigation area in the target image according to the brightness and color, wherein the pixels in the investigation area The deviation of the pixels from the pixels in the facial skin area in brightness and color is less than the set threshold;
    肤色区域构成模块,用于所述考察区域和所述脸部皮肤区域构成肤色区域。The skin color area constituting module is used for the investigation area and the facial skin area to constitute a skin color area.
  12. 根据权利要求11所述的装置,其特征在于,所述人脸信息确定模块具体用于:The device according to claim 11, wherein the face information determination module is specifically configured to:
    判断所获取的目标图像是否为色亮分离颜色模式;Determine whether the acquired target image is the color separation mode of color and light;
    当所获取的目标图像不为色亮分离颜色模式时,对所述目标图像进行模式转换,生成色亮分离颜色模式的目标图像;When the acquired target image is not the color separation mode, the mode conversion is performed on the target image to generate the target image in the color separation mode.
    对所述目标图像进行人脸识别,确定所述目标图像包含的人脸信息,其 中,所述人脸信息包括人脸数量,以及脸部、眉毛、眼睛、鼻子和嘴巴的轮廓信息。Perform face recognition on the target image to determine the face information contained in the target image, where the face information includes the number of faces, and contour information of the face, eyebrows, eyes, nose, and mouth.
  13. 根据权利要求11所述的装置,其特征在于,所述装置还包括:The device according to claim 11, wherein the device further comprises:
    噪声等级确定模块,用于对所述目标图像进行噪声统计,基于统计结果确定所述肤色区域和目标图像中除肤色区域之外的剩余区域的噪声等级;A noise level determining module, configured to perform noise statistics on the target image, and determine the noise levels of the skin area and the remaining areas of the target image except the skin area based on the statistical results;
    局部降噪事件触发模块,用于在所述肤色区域的噪声等级高于所述目标图像中除肤色区域之外的剩余区域的噪声等级时,触发局部降噪事件,其中,所述局部降噪事件用于指示确定目标图像中肤色区域的亮度信息的操作执行。A local noise reduction event triggering module is used to trigger a local noise reduction event when the noise level of the skin color area is higher than the noise level of the remaining areas except the skin color area in the target image, wherein the local noise reduction The event is used to indicate the execution of the operation to determine the brightness information of the skin color region in the target image.
  14. 根据权利要求13所述的装置,其特征在于,所述局部降噪事件触发模块具体用于:The device according to claim 13, wherein the local noise reduction event triggering module is specifically configured to:
    根据所述噪声等级确定对所述目标图像进行整体降噪处理的整体降噪强度,基于所述整体降噪强度对所述目标图像进行整体降噪处理。Determining an overall noise reduction intensity for performing overall noise reduction processing on the target image according to the noise level, and performing overall noise reduction processing on the target image based on the overall noise reduction intensity.
  15. 根据权利要求10所述的装置,其特征在于,所述降噪强度确定模块具体用于:The device according to claim 10, wherein the noise reduction intensity determination module is specifically configured to:
    将所述肤色区域中各个像素点的亮度与预设亮度阈值进行比较,标记亮度低于预设亮度阈值的目标像素点,将所述目标像素点聚类成至少一个目标子区域;Comparing the brightness of each pixel in the skin color area with a preset brightness threshold, marking target pixels whose brightness is lower than the preset brightness threshold, and clustering the target pixels into at least one target sub-region;
    根据所述每个目标子区域内目标像素点的亮度、亮度均值、亮度最大值和亮度最小值确定基于亮度的目标降噪强度。The target noise reduction intensity based on the brightness is determined according to the brightness, average brightness value, maximum brightness value and minimum brightness value of the target pixel in each target sub-region.
  16. 根据权利要求15所述的装置,其特征在于,所述装置还包括:The device according to claim 15, wherein the device further comprises:
    色彩数据确定模块,用于在目标图像中包含至少两张人脸时,获取肤色区域的色彩,根据所述色彩确定所述目标图像中肤色区域的第一色彩均值、最大色彩值和最小色彩值;分别计算每张人脸对应的肤色区域的第二色彩均值;The color data determination module is used to obtain the color of the skin color area when the target image contains at least two human faces, and determine the first color mean, maximum color value and minimum color value of the skin color area in the target image according to the color ; Calculate the second color mean of the skin color area corresponding to each face separately;
    所述降噪强度确定模块具体用于:The noise reduction intensity determination module is specifically used for:
    对于所述第二色彩均值小于所述第一色彩均值的目标肤色区域,根据所述目标肤色区域的色彩、所述第一色彩均值、所述最大色彩值和最小色彩值确定基于色彩的目标降噪强度。For the target skin color area where the second color average value is less than the first color average value, a color-based target drop is determined according to the color of the target skin color area, the first color average value, the maximum color value, and the minimum color value Noise strength.
  17. 根据权利要求16所述的装置,其特征在于,所述降噪强度确定模块 具体用于:The apparatus according to claim 16, wherein the noise reduction intensity determination module is specifically configured to:
    确定基于亮度的目标降噪强度和所述基于色彩的目标降噪强度的加权运算结果,将所述加权运算结果作为目标降噪强度。A weighted operation result of the brightness-based target noise reduction intensity and the color-based target noise reduction intensity is determined, and the weighted calculation result is used as the target noise reduction intensity.
  18. 根据权利要求10-17所述的装置,其特征在于,所述装置还包括:The device according to claims 10-17, characterized in that the device further comprises:
    噪声等级判断模块,用于对降噪处理后的目标图像进行噪声统计,基于统计结果确定所述肤色区域的噪声等级,判断所述噪声等级是否属于预设噪声区间;The noise level judgment module is used to perform noise statistics on the target image after noise reduction processing, determine the noise level of the skin color area based on the statistical result, and determine whether the noise level belongs to a preset noise interval;
    目标图像输出模块,用于若噪声等级属于预设噪声区间,则输出降噪处理后的目标图像;若噪声等级不属于预设噪声区间,根据所述噪声等级确定混合权重,基于所述混合权重对目标图像和降噪处理后的目标图像进行混合处理,输出混合处理后的目标图像。The target image output module is used to output the target image after noise reduction processing if the noise level belongs to the preset noise interval; if the noise level does not belong to the preset noise interval, determine the mixing weight according to the noise level, based on the mixing weight The target image and the noise-reduced target image are mixed, and the mixed target image is output.
  19. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-9中任一所述的图像降噪方法。A computer-readable storage medium on which a computer program is stored, characterized in that when the program is executed by a processor, the image noise reduction method according to any one of claims 1-9 is implemented.
  20. 一种终端,其特征在于,包括存储器,处理器及存储在存储器上并可在处理器运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1-9中任一所述的图像降噪方法。A terminal, characterized in that it includes a memory, a processor, and a computer program stored on the memory and executable by the processor, and when the processor executes the computer program, any one of claims 1-9 is implemented Image noise reduction method.
PCT/CN2020/070337 2019-01-04 2020-01-03 Image denoising method and apparatus, storage medium and terminal WO2020140986A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910008658.X 2019-01-04
CN201910008658.XA CN109639982B (en) 2019-01-04 2019-01-04 Image noise reduction method and device, storage medium and terminal

Publications (1)

Publication Number Publication Date
WO2020140986A1 true WO2020140986A1 (en) 2020-07-09

Family

ID=66057927

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/070337 WO2020140986A1 (en) 2019-01-04 2020-01-03 Image denoising method and apparatus, storage medium and terminal

Country Status (2)

Country Link
CN (1) CN109639982B (en)
WO (1) WO2020140986A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111881789A (en) * 2020-07-14 2020-11-03 深圳数联天下智能科技有限公司 Skin color identification method and device, computing equipment and computer storage medium
CN111950390A (en) * 2020-07-22 2020-11-17 深圳数联天下智能科技有限公司 Skin sensitivity determination method and device, storage medium and equipment
CN112686800A (en) * 2020-12-29 2021-04-20 北京达佳互联信息技术有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN112861781A (en) * 2021-03-06 2021-05-28 同辉电子科技股份有限公司 Subpixel arrangement mode for intelligent illumination
CN113781330A (en) * 2021-08-23 2021-12-10 北京旷视科技有限公司 Image processing method, device and electronic system
CN114936981A (en) * 2022-06-10 2022-08-23 重庆尚优科技有限公司 Code registration system is swept in place based on cloud platform
CN116757966A (en) * 2023-08-17 2023-09-15 中科方寸知微(南京)科技有限公司 Image enhancement method and system based on multi-level curvature supervision

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109639982B (en) * 2019-01-04 2020-06-30 Oppo广东移动通信有限公司 Image noise reduction method and device, storage medium and terminal
CN110399802B (en) * 2019-06-28 2022-03-11 北京字节跳动网络技术有限公司 Method, apparatus, medium, and electronic device for processing eye brightness of face image
CN112417930B (en) * 2019-08-23 2023-10-13 深圳市优必选科技股份有限公司 Image processing method and robot
CN110689496B (en) * 2019-09-25 2022-10-14 北京迈格威科技有限公司 Method and device for determining noise reduction model, electronic equipment and computer storage medium
CN112785533B (en) * 2019-11-07 2023-06-16 RealMe重庆移动通信有限公司 Image fusion method, image fusion device, electronic equipment and storage medium
CN111274952B (en) * 2020-01-20 2021-02-05 新疆爱华盈通信息技术有限公司 Backlight face image processing method and face recognition method
CN111507358B (en) * 2020-04-01 2023-05-16 浙江大华技术股份有限公司 Face image processing method, device, equipment and medium
CN111507923B (en) * 2020-04-21 2023-09-12 浙江大华技术股份有限公司 Noise processing method, device, equipment and medium for video image
CN111476741B (en) * 2020-04-28 2024-02-02 北京金山云网络技术有限公司 Image denoising method, image denoising device, electronic equipment and computer readable medium
CN111928947B (en) * 2020-07-22 2021-08-31 广州朗国电子科技有限公司 Forehead temperature measuring method and device based on low-precision face thermometer and thermometer
CN111861942A (en) * 2020-07-31 2020-10-30 深圳市慧鲤科技有限公司 Noise reduction method and device, electronic equipment and storage medium
CN112562034B (en) * 2020-12-25 2022-07-01 咪咕文化科技有限公司 Image generation method and device, electronic equipment and storage medium
CN113610723B (en) * 2021-08-03 2022-09-13 展讯通信(上海)有限公司 Image processing method and related device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006018465A (en) * 2004-06-30 2006-01-19 Canon Inc Image processing method, image processing apparatus, computer program and storage medium
US20100026831A1 (en) * 2008-07-30 2010-02-04 Fotonation Ireland Limited Automatic face and skin beautification using face detection
US20120128376A1 (en) * 2010-11-23 2012-05-24 Han Henry Sun PMD-insensitive method of chromatic dispersion estimation for a coherent receiver
CN105447827A (en) * 2015-11-18 2016-03-30 广东欧珀移动通信有限公司 Image noise reduction method and system thereof
CN107424125A (en) * 2017-04-14 2017-12-01 深圳市金立通信设备有限公司 A kind of image weakening method and terminal
CN108230270A (en) * 2017-12-28 2018-06-29 努比亚技术有限公司 A kind of noise-reduction method, terminal and computer readable storage medium
CN108391111A (en) * 2018-02-27 2018-08-10 深圳Tcl新技术有限公司 Image definition adjusting method, display device and computer readable storage medium
CN109639982A (en) * 2019-01-04 2019-04-16 Oppo广东移动通信有限公司 A kind of image denoising method, device, storage medium and terminal

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4653059B2 (en) * 2006-11-10 2011-03-16 オリンパス株式会社 Imaging system, image processing program
CN103428409B (en) * 2012-05-15 2017-08-04 深圳中兴力维技术有限公司 A kind of vedio noise reduction processing method and processing device based on fixed scene
CN105005973B (en) * 2015-06-30 2018-04-03 广东欧珀移动通信有限公司 A kind of method and device of the quick denoising of image
CN106303157B (en) * 2016-08-31 2020-07-14 广州市百果园网络科技有限公司 Video noise reduction processing method and video noise reduction processing device
CN106600556A (en) * 2016-12-16 2017-04-26 合网络技术(北京)有限公司 Image processing method and apparatus
CN107808404A (en) * 2017-09-08 2018-03-16 广州视源电子科技股份有限公司 Image processing method, system, readable storage medium storing program for executing and dollying equipment
CN108989678B (en) * 2018-07-27 2021-03-23 维沃移动通信有限公司 Image processing method and mobile terminal

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006018465A (en) * 2004-06-30 2006-01-19 Canon Inc Image processing method, image processing apparatus, computer program and storage medium
US20100026831A1 (en) * 2008-07-30 2010-02-04 Fotonation Ireland Limited Automatic face and skin beautification using face detection
US20120128376A1 (en) * 2010-11-23 2012-05-24 Han Henry Sun PMD-insensitive method of chromatic dispersion estimation for a coherent receiver
CN105447827A (en) * 2015-11-18 2016-03-30 广东欧珀移动通信有限公司 Image noise reduction method and system thereof
CN107424125A (en) * 2017-04-14 2017-12-01 深圳市金立通信设备有限公司 A kind of image weakening method and terminal
CN108230270A (en) * 2017-12-28 2018-06-29 努比亚技术有限公司 A kind of noise-reduction method, terminal and computer readable storage medium
CN108391111A (en) * 2018-02-27 2018-08-10 深圳Tcl新技术有限公司 Image definition adjusting method, display device and computer readable storage medium
CN109639982A (en) * 2019-01-04 2019-04-16 Oppo广东移动通信有限公司 A kind of image denoising method, device, storage medium and terminal

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111881789A (en) * 2020-07-14 2020-11-03 深圳数联天下智能科技有限公司 Skin color identification method and device, computing equipment and computer storage medium
CN111950390A (en) * 2020-07-22 2020-11-17 深圳数联天下智能科技有限公司 Skin sensitivity determination method and device, storage medium and equipment
CN112686800A (en) * 2020-12-29 2021-04-20 北京达佳互联信息技术有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN112686800B (en) * 2020-12-29 2023-07-07 北京达佳互联信息技术有限公司 Image processing method, device, electronic equipment and storage medium
CN112861781A (en) * 2021-03-06 2021-05-28 同辉电子科技股份有限公司 Subpixel arrangement mode for intelligent illumination
CN113781330A (en) * 2021-08-23 2021-12-10 北京旷视科技有限公司 Image processing method, device and electronic system
CN114936981A (en) * 2022-06-10 2022-08-23 重庆尚优科技有限公司 Code registration system is swept in place based on cloud platform
CN114936981B (en) * 2022-06-10 2023-07-07 重庆尚优科技有限公司 Cloud platform-based place code scanning registration system
CN116757966A (en) * 2023-08-17 2023-09-15 中科方寸知微(南京)科技有限公司 Image enhancement method and system based on multi-level curvature supervision

Also Published As

Publication number Publication date
CN109639982B (en) 2020-06-30
CN109639982A (en) 2019-04-16

Similar Documents

Publication Publication Date Title
WO2020140986A1 (en) Image denoising method and apparatus, storage medium and terminal
CN109272459B (en) Image processing method, image processing device, storage medium and electronic equipment
US11443462B2 (en) Method and apparatus for generating cartoon face image, and computer storage medium
CN111418201B (en) Shooting method and equipment
CN109741280B (en) Image processing method, image processing device, storage medium and electronic equipment
CN109146814B (en) Image processing method, image processing device, storage medium and electronic equipment
JP7226851B2 (en) Image processing method, apparatus and device
CN109961453B (en) Image processing method, device and equipment
US9621741B2 (en) Techniques for context and performance adaptive processing in ultra low-power computer vision systems
CN109618098B (en) Portrait face adjusting method, device, storage medium and terminal
US11138695B2 (en) Method and device for video processing, electronic device, and storage medium
CN110100251B (en) Apparatus, method, and computer-readable storage medium for processing document
WO2021057277A1 (en) Photographing method in dark light and electronic device
WO2021036991A1 (en) High dynamic range video generation method and device
CN109714582B (en) White balance adjusting method, device, storage medium and terminal
CN112887582A (en) Image color processing method and device and related equipment
EP4156082A1 (en) Image transformation method and apparatus
WO2022121893A1 (en) Image processing method and apparatus, and computer device and storage medium
WO2022052862A1 (en) Image edge enhancement processing method and application thereof
CN109672829B (en) Image brightness adjusting method and device, storage medium and terminal
WO2022111269A1 (en) Method and device for enhancing video details, mobile terminal, and storage medium
CN113486714B (en) Image processing method and electronic equipment
CN112950499B (en) Image processing method, device, electronic equipment and storage medium
RU2794062C2 (en) Image processing device and method and equipment
RU2791810C2 (en) Method, equipment and device for image processing

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20736041

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20736041

Country of ref document: EP

Kind code of ref document: A1