Image processing method and processing device, electronic device and readable storage medium

By performing image pyramid processing and blurring on the original image, determining the mask area to be brightened and performing targeted brightening treatment, the problem that existing skin grinding algorithms are difficult to uniformize the brightness of the defects while maintaining the three-dimensional structure of the face, and achieving efficient skin grinding effect.

CN114529474BActive Publication Date: 2025-03-18VIVO MOBILE COMM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing skin grinding algorithms are difficult to even the brightness of the underlying defects while maintaining the three-dimensional face structure, resulting in poor skin grinding effect.

Method used

By performing image pyramid processing on the original image, the image to be processed is determined and blurred. Based on the pictures before and after the processing, the mask area to be brightened is determined, and the curve used to brighten the mask area is determined based on the histogram distribution of the original image to be processed, and a targeted brightening process is performed.

Benefits of technology

It realizes that while maintaining the three-dimensional face structure, the brightness of the defective parts is uniformized, and the skin-wearing effect is improved. Without the use of AI algorithms, the equipment performance occupies and overhead are small.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114529474B_ABST
    Figure CN114529474B_ABST
Patent Text Reader

Abstract

The present application discloses an image processing method and processing device, an electronic device and a readable storage medium. The image processing method includes: obtaining an original image; establishing an image pyramid corresponding to the original image; determining the low-frequency image of the image pyramid as the image to be processed; performing fuzzy processing on the image to be processed to obtain a first image; generating a second image based on the image to be processed and the first image; determining a corresponding first curve based on the histogram distribution of the image to be processed, wherein the first curve is used to increase or decrease the brightness value of the first target area in the second image; processing the second image based on the first curve; and outputting the processed second image when the processed second image meets a preset condition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of image processing technology, and specifically relates to an image processing method and processing device, an electronic device and a readable storage medium. Background Art

[0002] In the relevant technology, algorithmic skin smoothing is the basic effect in beautification. The existing traditional skin smoothing algorithms generally use frequency division filtering. The frequency division filtering algorithm is difficult to be compatible with the uniform brightness of the underlying defects while maintaining the three-dimensional structure of the face, resulting in poor skin smoothing effect. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide an image processing method and processing device, an electronic device and a readable storage medium, which can solve the problem of poor skin resurfacing effect.

[0004] In a first aspect, an embodiment of the present application provides an image processing method, comprising:

[0005] Get the original image;

[0006] Establish an image pyramid corresponding to the original image;

[0007] The low-frequency image of the image pyramid is determined as the image to be processed;

[0008] Performing fuzzy processing on the image to be processed to obtain a first image;

[0009] Generate a second image according to the image to be processed and the first image;

[0010] Determine a corresponding first curve according to the histogram distribution of the image to be processed, wherein the first curve is used to increase or decrease the brightness value of the first target area in the second image;

[0011] processing the second image based on the first curve;

[0012] When the processed second image meets a preset condition, the processed second image is output.

[0013] In a second aspect, an embodiment of the present application provides an image processing device, including:

[0014] An acquisition module, used for acquiring the original image;

[0015] Establishing a module for establishing an image pyramid corresponding to the original image;

[0016] A determination module, used for determining the low-frequency image of the image pyramid as the image to be processed;

[0017] A processing module, used for performing fuzzy processing on the image to be processed to obtain a first image;

[0018] A generating module, used for generating a second image according to the image to be processed and the first image;

[0019] The determination module is further used to determine a corresponding first curve according to the histogram distribution of the image to be processed, wherein the first curve is used to increase or decrease the brightness value of the first target area in the second image;

[0020] The processing module is further used to process the second image based on the first curve;

[0021] The output module is used to output the processed second image when the processed second image meets a preset condition.

[0022] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, wherein the memory stores programs or instructions that can be executed on the processor, and when the programs or instructions are executed by the processor, the steps of the method of the first aspect are implemented.

[0023] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method of the first aspect are implemented.

[0024] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the steps of the method of the first aspect.

[0025] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.

[0026] The embodiment of the present application determines the image to be processed based on the image pyramid of the original image, and further performs Blur processing on the image to be processed, determines the mask area to be brightened based on the pictures before and after the processing, and determines the first area for brightening the mask area based on the uniformity of the histogram distribution of the original image to be processed, and performs brightening processing on the mask area to be brightened based on the first curve, so that dark areas in the face image, such as spots, scars and other areas, can be effectively brightened. The processing will not brighten the face, so it will not damage the three-dimensional structure of the face, and there is no need to use AI algorithm, and the occupancy and overhead of equipment performance are relatively small. It achieves the uniformity of the brightness of the defective part while maintaining the three-dimensional structure of the face, thereby improving the skin refining effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1A flow chart of an image processing method according to an embodiment of the present application is shown;

[0028] Figure 2 A schematic diagram of an algorithm of an image processing method according to an embodiment of the present application is shown;

[0029] Figure 3 A structural block diagram of an image processing device according to an embodiment of the present application is shown;

[0030] Figure 4 A structural block diagram of an electronic device according to an embodiment of the present application is shown;

[0031] Figure 5 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application. DETAILED DESCRIPTION

[0032] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0033] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0034] The image processing method and processing device, electronic device and readable storage medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.

[0035] In some embodiments of the present application, an image processing method is provided. Figure 1 A flow chart of an image processing method according to an embodiment of the present application is shown. Figure 1 As shown, the method includes:

[0036] Step 102, obtaining an original image;

[0037] Step 104, establishing an image pyramid corresponding to the original image;

[0038] Step 106, determining the low-frequency image of the image pyramid as the image to be processed;

[0039] Step 108, performing fuzzy processing on the image to be processed to obtain a first image;

[0040] Step 110, generating a second image according to the image to be processed and the first image;

[0041] Step 112, determining a corresponding first curve according to the histogram distribution of the image to be processed;

[0042] In step 112, the first curve is used to increase or decrease the brightness value of the first target area in the second image;

[0043] Step 114, processing the second image based on the first curve;

[0044] Step 116: if the processed second image meets a preset condition, output the processed second image.

[0045] In the embodiment of the present application, the original image, that is, the input algorithm image, is specifically an image selected by the user that needs to be beautified. Since the resolution and image size of the original image are large, after receiving the original image, first, an image pyramid corresponding to the original image is established.

[0046] The image pyramid is a collection of images with gradually decreasing resolutions. The higher the level of an image, the smaller the image size and the lower the resolution. Reducing the size and resolution of the original image according to the image pyramid can effectively reduce the cost of the skin resurfacing algorithm on device performance and improve skin resurfacing efficiency.

[0047] Specifically, the fourth layer image from the top of the image pyramid can be selected as the image to be processed, which is beneficial to reducing the performance overhead of the skin resurfacing algorithm while retaining details.

[0048] The image to be processed is specifically a face image. After receiving the image to be processed, first, the image to be processed is blurred. Specifically, the image to be processed can be blurred by performing a Blur process on the image to be processed. The processing area of ​​the Blur process can be one quarter of the area of ​​the face part in the image to be processed. After the Blur process is performed, a blurred first image corresponding to the image to be processed is obtained. Based on the first image and the image to be processed before the blur process, a second image is obtained, and the second image is the mask area to be brightened.

[0049] Furthermore, based on the histogram distribution of the image to be processed, specifically based on the uniformity of the histogram distribution of the image to be processed, combined with a preset empirical mapping relationship, a corresponding first curve is determined, and the first curve is specifically used to adjust the brightness of the first target area in the second image, that is, the mask area to be brightened.

[0050] The first curve can be used to brighten or darken the brightness value of the second image. Taking the brightening process as an example, the second image, that is, the mask area in the image to be processed, is subjected to LUT (Look-Up-Table) mapping operation through the first curve, so as to brighten the dark areas (dirty areas, such as spots, scars, etc.) in the face. After processing, it is determined whether the processed second image meets the preset conditions. If so, the second image is output as the mask area after skin smoothing, and finally a beautified face photo is obtained.

[0051] The embodiment of the present application performs Blur processing on the image to be processed, determines the mask area to be brightened based on the pictures before and after the processing, and determines the first area for brightening the mask area based on the uniformity of the histogram distribution of the original image to be processed, and performs brightening processing on the mask area to be brightened based on the first curve, so that dark areas in the face image, such as spots, scars and other areas, can be effectively brightened. This processing will not brighten the face, so it will not damage the three-dimensional structure of the face, and there is no need to use AI algorithm, the occupancy and overhead of equipment performance are relatively small, and the brightness of the defective part is uniform while maintaining the three-dimensional structure of the face, thereby improving the skin refining effect.

[0052] In some embodiments of the present application, the image to be processed includes N first pixels, the first image includes N second pixels, the N first pixels correspond to the N second pixels one by one, and N is a positive integer;

[0053] Generating a second image according to the image to be processed and the first image, comprising:

[0054] Determine a first brightness value set according to the image to be processed, where the first brightness value set includes brightness values ​​of N first pixels;

[0055] Determine a second brightness value set according to the first image, where the second brightness value set includes brightness values ​​of N second pixels;

[0056] A second image is generated according to the first set of brightness values ​​and the second set of brightness values.

[0057] In the embodiment of the present application, when determining the second image, that is, the mask area to be brightened, the mask area to be brightened can be determined based on the brightness difference between the original image to be processed and the first image.

[0058] Specifically, the first image is obtained by Blur processing the image to be processed, so the pixels in the first image and the second image are one-to-one corresponding. The pixels in the image to be processed are recorded as first pixels, and the pixels in the first image are recorded as second pixels.

[0059] Since the Blur process can produce high contrast in the image, that is, it can make bright pixels brighter and dark pixels darker in the image. The brightness value of the image refers to the set of brightness values ​​of the pixels in the image. Therefore, the brightness value of the original image to be processed is the set of N first brightness values ​​corresponding to N first pixels. Similarly, the brightness value of the first image is the set of N second brightness values ​​corresponding to N second pixels.

[0060] Through the first brightness value set and the second brightness value set, a dark area in the image to be processed, that is, a mask area that needs to be brightened, that is, the second image mentioned above, can be obtained.

[0061] The present application determines the mask area to be brightened, that is, the dirty part in the face image, according to the image brightness before and after Blur processing, and performs targeted brightening processing on this part. It can brighten and even out the brightness of the underlying defects while ensuring the overall three-dimensional structure of the face image, thereby effectively improving the skin smoothing effect.

[0062] In some embodiments of the present application, generating a second image according to the first brightness value set and the second brightness value set includes:

[0063] Determine a first difference value set according to a difference between the first brightness value set and the second brightness value set;

[0064] According to M difference values ​​whose brightness values ​​are less than zero in the first difference value set, determine the corresponding M first target pixels, where M is a positive integer less than N;

[0065] M first target pixels are removed from the image to be processed to obtain a second image.

[0066] In the embodiment of the present application, the first brightness value set is a set of brightness values ​​of N first pixels in the image to be processed. Similarly, the second brightness value set is a set of brightness values ​​of N second pixels in the first image. The brightness value of a pixel is a pixel value, and its range is [0, 255].

[0067] When calculating the first brightness value set and the second brightness value set, the brightness value of the corresponding first pixel is subtracted from the brightness value of the corresponding second pixel to obtain N difference values, and the set of these N difference values ​​is the above-mentioned first difference value set.

[0068] Since the first image is an image obtained after Blur processing based on the original image to be processed, among the N second pixels, the bright pixels become brighter, that is, the brightness value increases, and the dark pixels become darker, that is, the brightness value decreases. Therefore, in the first image, the brightness value of the "bright" pixels becomes higher, and the brightness value of the "dark" pixels becomes lower.

[0069] Therefore, when calculating the difference between the first brightness value set and the second brightness value set, since the brightness value of the "bright" pixel in the first image becomes larger, it will be greater than the brightness value of the corresponding pixel in the original image to be processed. That is to say, for the "bright" pixel, the difference will be less than zero.

[0070] Similarly, in the second image, the brightness value of the "dark" pixel becomes smaller, and thus will be smaller than the brightness value of the corresponding pixel in the original image to be processed, that is, for the "dark" pixel, the difference will be greater than zero.

[0071] Therefore, after obtaining the first difference set between the first brightness value set and the second brightness value set, determining the M differences whose brightness values ​​are less than zero is equivalent to obtaining M "bright" pixels in the image to be processed. These M bright pixels do not need to be brightened and are normal face pixels, while the remaining NM pixels are the "dirty" parts of the face image that need to be brightened.

[0072] In the image to be processed, after removing M bright pixels, only NM dark pixels that need to be brightened are obtained, that is, the second image is obtained. The dark pixels in the second image are brightened based on the first curve, which is equivalent to a "darkening" process, which can effectively remove the dirty parts in the face image, and at the same time will not adjust the normal pixels, thereby ensuring the three-dimensional structure of the face and improving the skin resurfacing effect.

[0073] In some embodiments of the present application, after processing the second image based on the first curve, the image processing method further includes:

[0074] When the processed second image does not meet a preset condition, determining a corresponding second curve according to the histogram distribution, wherein the second curve is used to increase or decrease the brightness value of the first target area, and the preset condition includes that the intensity value of the processed second image is less than a preset threshold value;

[0075] Performing blurring processing on the processed second image to obtain a third image;

[0076] Determining a third brightness value set according to the third image;

[0077] Determine a second difference value set according to a difference between the second brightness value set and the third brightness value set;

[0078] According to O difference values ​​whose brightness values ​​are greater than zero in the second difference value set, determine corresponding O second target pixels, where O is a positive integer less than N;

[0079] In the processed second image, O second target pixels are removed to obtain a fourth image;

[0080] processing a fourth image based on the second image;

[0081] The processed fourth image is updated as the image to be processed, and the step of blurring the image to be processed is performed again.

[0082] In the embodiment of the present application, the preset condition refers to the intensity value of the second image being less than the preset threshold value. The intensity value of the second image refers to the set of pixel values ​​of each pixel in the second image after being brightened by the first curve. If the pixel value of each pixel in the second image after being brightened by the first curve is less than the preset pixel value threshold value, that is, the above-mentioned preset threshold value.

[0083] It can be understood that the pixel value ranges from 0 to 255, and the preset threshold value ranges from 0 to 255, which can be freely set according to actual needs.

[0084] If the second image does not meet the preset conditions after being brightened by the first curve, a corresponding second curve is further determined based on the uniformity of the histogram distribution of the image to be processed and a preset empirical mapping relationship. The second curve is specifically used to reduce the brightness of the mask area to be brightened.

[0085] After obtaining the second curve, the second image is further subjected to a blur process, i.e., a Blur process, to obtain a processed third image, wherein the processing area of ​​the Blur process may be one-fourth of the area of ​​the face portion in the image to be processed. After the Blur process, a blurred third image corresponding to the image to be processed is obtained.

[0086] Further, similar to determining the brightness values ​​of the image to be processed and the first image, a third brightness value set of the second image and a fourth brightness value set of the third image are determined, wherein, compared with the second image, in the third image, the brightness values ​​of "bright" pixels become higher, while the brightness values ​​of "dark" pixels become lower.

[0087] Therefore, after calculating the difference between the third brightness value set and the fourth brightness value set to obtain the second difference value set, O difference values ​​whose brightness values ​​are greater than zero are determined, which is equivalent to obtaining M "dark" pixels in the image to be processed. These dark pixels need to be brightened, and they are the "dirty" parts of the face image that need to be brightened.

[0088] In the second image, the second target pixels corresponding to the O differences are removed, and the mask area that needs to be dimmed is obtained, that is, the fourth image. The fourth image is processed by the second curve through the LUT mapping operation again, so as to darken the mask area, which is equivalent to a "lightening" process.

[0089] The fourth image after the "lightening" process is used as the new image to be processed, and the process is repeated. Figure 1 In step 102, the grinding is determined to be complete until the second image obtained after the final processing meets the preset conditions.

[0090] The embodiments of the present application can effectively brighten dark areas in facial images, such as spots, scars and the like. The processing will not brighten the face, and therefore will not damage the three-dimensional structure of the face. There is no need to utilize AI algorithms, and the occupancy and overhead of device performance are relatively small. The brightness of defective parts can be evened out while maintaining the three-dimensional facial structure, thereby improving the skin refining effect.

[0091] In some embodiments of the present application, before processing the second image based on the first curve or processing the second image based on the second curve, the method further includes:

[0092] Obtaining a preset mask, where the preset mask is used to keep the brightness value of the second target area of ​​the second image unchanged;

[0093] The second target area is processed by a preset mask.

[0094] In an embodiment of the present application, when the second image is brightened based on the first curve, or the second image is darkened based on the second image, a preset mask is obtained, and the preset mask is a facial feature protection mask, which is used to protect the facial features of the face, thereby avoiding misjudging the facial features of the face as being dirty and brightening the face, and can retain the details of the facial features.

[0095] Specifically, after processing the second target area of ​​the second image, that is, the facial features area, through a preset mask, the brightness value in the facial features area will not be affected by the first curve and the second curve under the protection of the preset mask. Therefore, the facial features will not be affected by the skin smoothing algorithm, and the details of the facial features can be accurately restored to ensure the skin smoothing effect.

[0096] In some embodiments of the present application, after outputting the processed second image, the method further includes: processing the original image through the second image to obtain a processed target image.

[0097] In the embodiment of the present application, after the second image is output as the mask area after skin smoothing, the mask area is processed with the original image, that is, the initial face image, so as to brighten the dark areas in the face image, such as spots, scars and other areas, and obtain the face image after skin smoothing and beauty. This process will not brighten the face, so it will not damage the three-dimensional structure of the face, and there is no need to use AI algorithms, the occupancy and cost of equipment performance are small, and the brightness of the defective part is uniformed while maintaining the three-dimensional structure of the face, thereby improving the skin smoothing effect. Figure 2 An algorithm diagram of an image processing method according to an embodiment of the present application is shown, as shown in FIG. Figure 2 As shown, the algorithm includes:

[0098] After the original image is obtained, the image to be processed is obtained through the image pyramid, and the first curve and the second curve are obtained based on the histogram experience.

[0099] The image to be processed is blurred to obtain a first image, and a high-contrast second image is obtained according to the image to be processed and the first image after the blur processing. The target area in the second image is protected by a preset mask and processed based on the first curve to obtain a brightened second image.

[0100] It is determined whether the second image meets the preset condition. If so, the second image is output. If not, the second image is blurred to obtain a third image with high contrast, and a fourth image with high contrast is obtained based on the second image and the third image. The target area in the fourth image is protected by a preset mask and processed based on the second curve to obtain a darkened fourth image.

[0101] The darkened fourth image is used as a new image to be processed, and the algorithm processing steps such as blur processing are performed again until the generated second image meets the preset conditions.

[0102] In some embodiments of the present application, an image processing device is provided. Figure 3 FIG. 4 shows a structural block diagram of an image processing device according to an embodiment of the present application. Figure 3 As shown, the image processing device 300 includes:

[0103] An acquisition module 302 is used to acquire an original image;

[0104] A building module 304 is used to build an image pyramid corresponding to the original image;

[0105] A determination module 306 is used to determine the low-frequency image of the image pyramid as an image to be processed;

[0106] A processing module 308, configured to perform fuzzy processing on the image to be processed to obtain a first image;

[0107] A generating module 310, configured to generate a second image according to the image to be processed and the first image;

[0108] A determination module 306, configured to determine a corresponding first curve according to the histogram distribution of the image to be processed, wherein the first curve is used to increase or decrease the brightness value of the target area in the second image;

[0109] The processing module 308 is further configured to process the second image based on the first curve;

[0110] The output module 312 is used to output the processed second image when the processed second image meets a preset condition.

[0111] In the embodiment of the present application, the original image, that is, the input algorithm image, is specifically an image selected by the user that needs to be beautified. Since the resolution and image size of the original image are large, after receiving the original image, first, an image pyramid corresponding to the original image is established.

[0112] The image pyramid is a collection of images with gradually decreasing resolutions. The higher the level of an image, the smaller the image size and the lower the resolution. Reducing the size and resolution of the original image according to the image pyramid can effectively reduce the cost of the skin resurfacing algorithm on device performance and improve skin resurfacing efficiency.

[0113] Specifically, the fourth layer image from the top of the image pyramid can be selected as the image to be processed, which is beneficial to reducing the performance overhead of the skin resurfacing algorithm while retaining details.

[0114] The image to be processed is specifically a face image. After receiving the image to be processed, first, the image to be processed is blurred. Specifically, the image to be processed can be blurred by performing a Blur process on the image to be processed. The processing area of ​​the Blur process can be one quarter of the area of ​​the face part in the image to be processed. After the Blur process is performed, a blurred first image corresponding to the image to be processed is obtained. Based on the first image and the image to be processed before the blur process, a second image is obtained, and the second image is the mask area to be brightened.

[0115] Furthermore, based on the histogram distribution of the image to be processed, specifically based on the uniformity of the histogram distribution of the image to be processed, combined with a preset empirical mapping relationship, a corresponding first curve is determined, and the first curve is specifically used to adjust the brightness of the first target area in the second image, that is, the mask area to be brightened.

[0116] The first curve can be used to brighten or darken the brightness value of the second image. Taking the brightening process as an example, the second image, that is, the mask area in the image to be processed, is subjected to LUT (Look-Up-Table) mapping operation through the first curve, so as to brighten the dark areas (dirty areas, such as spots, scars, etc.) in the face. After processing, it is determined whether the processed second image meets the preset conditions. If so, the second image is output as the mask area after skin smoothing, and finally a beautified face photo is obtained.

[0117] Figure 2 An algorithm diagram of an image processing method according to an embodiment of the present application is shown, as shown in FIG. Figure 2 As shown, the algorithm includes:

[0118] After the original image is obtained, the image to be processed is obtained through the image pyramid, and the first curve and the second curve are obtained based on the histogram experience.

[0119] The image to be processed is blurred to obtain a first image, and a high-contrast second image is obtained according to the image to be processed and the first image after the blur processing. The target area in the second image is protected by a preset mask and processed based on the first curve to obtain a brightened second image.

[0120] It is determined whether the second image meets the preset condition. If so, the second image is output. If not, the second image is blurred to obtain a third image with high contrast, and a fourth image with high contrast is obtained based on the second image and the third image. The target area in the fourth image is protected by a preset mask and processed based on the second curve to obtain a darkened fourth image.

[0121] The darkened fourth image is used as a new image to be processed, and the algorithm processing steps such as blur processing are performed again until the generated second image meets the preset conditions.

[0122] The embodiment of the present application performs Blur processing on the image to be processed, determines the mask area to be brightened based on the pictures before and after the processing, and determines the first area for brightening the mask area based on the uniformity of the histogram distribution of the original image to be processed, and performs brightening processing on the mask area to be brightened based on the first curve, so that dark areas in the face image, such as spots, scars and other areas, can be effectively brightened. This processing will not brighten the face, so it will not damage the three-dimensional structure of the face, and there is no need to use AI algorithm, the occupancy and overhead of equipment performance are relatively small, and the brightness of the defective part is uniform while maintaining the three-dimensional structure of the face, thereby improving the skin refining effect.

[0123] In some embodiments of the present application, the image to be processed includes N first pixels, the first image includes N second pixels, the N first pixels correspond to the N second pixels one by one, and N is a positive integer;

[0124] The determination module is further used to determine a first brightness value set according to the image to be processed, the first brightness value set including brightness values ​​of N first pixels; and determine a second brightness value set according to the first image, the second brightness value set including brightness values ​​of N second pixels;

[0125] The generating module is further used to generate a second image according to the first brightness value set and the second brightness value set.

[0126] In the embodiment of the present application, when determining the second image, that is, the mask area to be brightened, the mask area to be brightened can be determined based on the brightness difference between the original image to be processed and the first image.

[0127] Specifically, the first image is obtained by Blur processing the image to be processed, so the pixels in the first image and the second image are one-to-one corresponding. The pixels in the image to be processed are recorded as first pixels, and the pixels in the first image are recorded as second pixels.

[0128] Since the Blur process can produce high contrast in the image, that is, it can make bright pixels brighter and dark pixels darker in the image. The brightness value of the image refers to the set of brightness values ​​of the pixels in the image. Therefore, the brightness value of the original image to be processed is the set of N first brightness values ​​corresponding to N first pixels. Similarly, the brightness value of the first image is the set of N second brightness values ​​corresponding to N second pixels.

[0129] Through the first brightness value set and the second brightness value set, a dark area in the image to be processed, that is, a mask area that needs to be brightened, that is, the second image mentioned above, can be obtained.

[0130] The present application determines the mask area to be brightened, that is, the dirty part in the face image, according to the image brightness before and after Blur processing, and performs targeted brightening processing on this part. It can brighten and even out the brightness of the underlying defects while ensuring the overall three-dimensional structure of the face image, thereby effectively improving the skin smoothing effect.

[0131] In some embodiments of the present application, the determination module is further used to determine the first difference set based on the difference between the first brightness value set and the second brightness value set; determine the corresponding M first target pixels based on the M differences in the first difference set whose brightness values ​​are less than zero, where M is a positive integer less than N; and the processing module is further used to remove the M first target pixels in the image to be processed to obtain the second image.

[0132] In the embodiment of the present application, the first brightness value set is a set of brightness values ​​of N first pixels in the image to be processed. Similarly, the second brightness value set is a set of brightness values ​​of N second pixels in the first image. The brightness value of a pixel is a pixel value, and its range is [0, 255].

[0133] When calculating the first brightness value set and the second brightness value set, the brightness value of the corresponding first pixel is subtracted from the brightness value of the corresponding second pixel to obtain N difference values, and the set of these N difference values ​​is the above-mentioned first difference value set.

[0134] Since the first image is an image obtained after Blur processing based on the original image to be processed, among the N second pixels, the bright pixels become brighter, that is, the brightness value increases, and the dark pixels become darker, that is, the brightness value decreases. Therefore, in the first image, the brightness value of the "bright" pixels becomes higher, and the brightness value of the "dark" pixels becomes lower.

[0135] Therefore, when calculating the difference between the first brightness value set and the second brightness value set, since the brightness value of the "bright" pixel in the first image becomes larger, it will be greater than the brightness value of the corresponding pixel in the original image to be processed. That is to say, for the "bright" pixel, the difference will be less than zero.

[0136] Similarly, in the second image, the brightness value of the "dark" pixel becomes smaller, and thus will be smaller than the brightness value of the corresponding pixel in the original image to be processed, that is, for the "dark" pixel, the difference will be greater than zero.

[0137] Therefore, after obtaining the first difference set between the first brightness value set and the second brightness value set, determining the M differences whose brightness values ​​are less than zero is equivalent to obtaining M "bright" pixels in the image to be processed. These M bright pixels do not need to be brightened and are normal face pixels, while the remaining NM pixels are the "dirty" parts of the face image that need to be brightened.

[0138] In the image to be processed, after removing M bright pixels, only NM dark pixels that need to be brightened are obtained, that is, the second image is obtained. The dark pixels in the second image are brightened based on the first curve, which is equivalent to a "darkening" process, which can effectively remove the dirty parts in the face image, and at the same time will not adjust the normal pixels, thereby ensuring the three-dimensional structure of the face and improving the skin resurfacing effect.

[0139] In some embodiments of the present application, the determination module is further used to determine a corresponding second curve according to the histogram distribution when the processed second image does not meet a preset condition, wherein the second curve is used to increase or decrease the brightness value of the first target area, and the preset condition includes that the intensity value of the processed second image is less than a preset threshold value;

[0140] The processing module is further used to perform blurring processing on the processed second image to obtain a third image;

[0141] The determination module is further used to determine a third brightness value set according to the second image; determine a fourth brightness value set according to the third image; determine a second difference value set according to the difference between the third brightness value set and the fourth brightness value set; and determine corresponding O second target pixels according to O differences in the second difference value set whose brightness values ​​are greater than zero, where O is a positive integer less than N;

[0142] The processing module is also used to remove O second target pixels in the processed second image to obtain a fourth image; process the fourth image based on the second image; update the processed fourth image to the image to be processed, and again execute the step of blurring the image to be processed.

[0143] In the embodiment of the present application, the preset condition refers to the intensity value of the second image being less than the preset threshold value. The intensity value of the second image refers to the set of pixel values ​​of each pixel in the second image after being brightened by the first curve. If the pixel value of each pixel in the second image after being brightened by the first curve is less than the preset pixel value threshold value, that is, the above-mentioned preset threshold value.

[0144] It can be understood that the pixel value ranges from 0 to 255, and the preset threshold value ranges from 0 to 255, which can be freely set according to actual needs.

[0145] If the second image does not meet the preset conditions after being brightened by the first curve, a corresponding second curve is further determined based on the uniformity of the histogram distribution of the image to be processed and a preset empirical mapping relationship. The second curve is specifically used to reduce the brightness of the mask area to be brightened.

[0146] After obtaining the second curve, the second image is further subjected to a blur process, i.e., a Blur process, to obtain a processed third image, wherein the processing area of ​​the Blur process may be one-fourth of the area of ​​the face portion in the image to be processed. After the Blur process, a blurred third image corresponding to the image to be processed is obtained.

[0147] Further, similar to determining the brightness values ​​of the image to be processed and the first image, a third brightness value set of the second image and a fourth brightness value set of the third image are determined, wherein, compared with the second image, in the third image, the brightness values ​​of "bright" pixels become higher, while the brightness values ​​of "dark" pixels become lower.

[0148] Therefore, after calculating the difference between the third brightness value set and the fourth brightness value set to obtain the second difference value set, O difference values ​​whose brightness values ​​are greater than zero are determined, which is equivalent to obtaining M "dark" pixels in the image to be processed. These dark pixels need to be brightened, and they are the "dirty" parts of the face image that need to be brightened.

[0149] In the second image, the second target pixels corresponding to the O differences are removed, and the mask area that needs to be dimmed is obtained, that is, the fourth image. The fourth image is processed by the second curve through the LUT mapping operation again, so as to darken the mask area, which is equivalent to a "lightening" process.

[0150] The fourth image after the "lightening" process is used as a new image to be processed, and the grinding is determined to be completed after the second image obtained after the final processing meets the preset conditions.

[0151] The embodiments of the present application can effectively brighten dark areas in facial images, such as spots, scars and the like. The processing will not brighten the face, and therefore will not damage the three-dimensional structure of the face. There is no need to utilize AI algorithms, and the occupancy and overhead of device performance are relatively small. The brightness of defective parts can be evened out while maintaining the three-dimensional facial structure, thereby improving the skin refining effect.

[0152] In some embodiments of the present application, the image processing device further includes:

[0153] The acquisition module is further used to acquire a preset mask, where the preset mask is used to keep the brightness value of the second target area of ​​the second image unchanged;

[0154] The processing module is further used to process the second target area through a preset mask.

[0155] In an embodiment of the present application, when the second image is brightened based on the first curve, or the second image is darkened based on the second image, a preset mask is obtained, and the preset mask is a facial feature protection mask, which is used to protect the facial features of the face, thereby avoiding misjudging the facial features of the face as being dirty and brightening the face, and can retain the details of the facial features.

[0156] Specifically, after processing the target area of ​​the second image, that is, the facial features area, through a preset mask, the brightness value in the facial features area will not be affected by the first curve and the second curve under the protection of the preset mask. Therefore, the facial features will not be affected by the skin smoothing algorithm, and the details of the facial features can be accurately restored to ensure the skin smoothing effect.

[0157] In some embodiments of the present application, the processing module is also used to process the original image through the second image to obtain a processed target image. In an embodiment of the present application, after outputting the second image as the mask area after skin smoothing, the mask area is processed with the original image, that is, the initial face image, so as to brighten the dark areas in the face image, such as spots, scars and other areas, and obtain the face image after skin smoothing and beautification. This process will not brighten the face, so it will not damage the three-dimensional structure of the face, and there is no need to use AI algorithms, and the occupancy and overhead of equipment performance are relatively small. It achieves the uniformity of the brightness of the defective part while maintaining the three-dimensional structure of the face, thereby improving the skin smoothing effect.

[0158] The image processing device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0159] The image processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0160] The image processing device provided in the embodiment of the present application can implement each process implemented in the above method embodiment, and will not be described again here to avoid repetition.

[0161] Optionally, an embodiment of the present application further provides an electronic device, Figure 4 A structural block diagram of an electronic device according to an embodiment of the present application is shown. Figure 4 As shown, the electronic device 400 includes a processor 402, a memory 404, and a program or instruction stored in the memory 404 and executable on the processor 402. When the program or instruction is executed by the processor 402, each process of the above-mentioned method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0162] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0163] Figure 5 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0164] The electronic device 500 includes but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, and a processor 510.

[0165] Those skilled in the art will appreciate that the electronic device 500 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 510 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 5 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0166] The processor 510 is used to obtain the original image;

[0167] An image pyramid corresponding to the original image is established; a low-frequency image of the image pyramid is determined as an image to be processed;

[0168] Performing fuzzy processing on the image to be processed to obtain a first image;

[0169] Generate a second image according to the image to be processed and the first image;

[0170] Determine a corresponding first curve according to the histogram distribution of the image to be processed, wherein the first curve is used to increase or decrease the brightness value of the first target area in the second image;

[0171] processing the second image based on the first curve;

[0172] When the processed second image meets a preset condition, the processed second image is output.

[0173] The embodiment of the present application performs Blur processing on the image to be processed, determines the mask area to be brightened based on the pictures before and after the processing, and determines the first area for brightening the mask area based on the uniformity of the histogram distribution of the original image to be processed, and performs brightening processing on the mask area to be brightened based on the first curve, so that dark areas in the face image, such as spots, scars and other areas, can be effectively brightened. This processing will not brighten the face, so it will not damage the three-dimensional structure of the face, and there is no need to use AI algorithm, the occupancy and overhead of equipment performance are relatively small, and the brightness of the defective part is uniform while maintaining the three-dimensional structure of the face, thereby improving the skin refining effect.

[0174] Optionally, the image to be processed includes N first pixels, the first image includes N second pixels, the N first pixels correspond to the N second pixels one by one, and N is a positive integer;

[0175] The processor 510 is further configured to determine a first brightness value set according to the image to be processed, where the first brightness value set includes brightness values ​​of N first pixels;

[0176] Determine a second brightness value set according to the first image, where the second brightness value set includes brightness values ​​of N second pixels;

[0177] A second image is generated according to the first set of brightness values ​​and the second set of brightness values.

[0178] The application determines the mask area to be brightened, that is, the dirty part in the face image, based on the image brightness before and after Blur processing, and performs targeted brightening processing on this part. It can brighten and even out the brightness of the underlying defects while ensuring the overall three-dimensional structure of the face image, effectively improving the skin smoothing effect.

[0179] Optionally, the processor 510 is further configured to determine a first difference value set according to a difference between the first brightness value set and the second brightness value set;

[0180] According to M difference values ​​whose brightness values ​​are less than zero in the first difference value set, determine the corresponding M first target pixels, where M is a positive integer less than N;

[0181] M first target pixels are removed from the image to be processed to obtain a second image.

[0182] The embodiment of the present application can effectively remove dirty parts in the face image without adjusting normal pixels, thereby ensuring the three-dimensional structure of the face and improving the skin refining effect.

[0183] Optionally, the processor 510 is further configured to determine a corresponding second curve according to the histogram distribution when the processed second image does not meet a preset condition, wherein the second curve is used to increase or decrease the brightness value of the first target area, and the preset condition includes that the intensity value of the processed second image is less than a preset threshold value;

[0184] Performing blurring processing on the processed second image to obtain a third image;

[0185] Determining a third set of brightness values ​​according to the second image;

[0186] Determining a fourth brightness value set according to the third image;

[0187] Determine a second difference value set according to a difference between the third brightness value set and the fourth brightness value set;

[0188] According to O difference values ​​whose brightness values ​​are greater than zero in the second difference value set, determine corresponding O second target pixels, where O is a positive integer less than N;

[0189] In the processed second image, O second target pixels are removed to obtain a fourth image;

[0190] processing the fourth image based on the second curve;

[0191] The processed fourth image is updated as the image to be processed, and the step of blurring the image to be processed is performed again.

[0192] The embodiments of the present application can effectively brighten dark areas in facial images, such as spots, scars and the like. The processing will not brighten the face, and therefore will not damage the three-dimensional structure of the face. There is no need to utilize AI algorithms, and the occupancy and overhead of device performance are relatively small. The brightness of defective parts can be evened out while maintaining the three-dimensional facial structure, thereby improving the skin refining effect.

[0193] Optionally, the processor 510 is further configured to obtain a preset mask, where the preset mask is used to keep the brightness value of the second target area of ​​the second image unchanged;

[0194] The second target area is processed by a preset mask.

[0195] The embodiment of the present application processes the target area of ​​the second image, that is, the facial features area, through a preset mask. The brightness value in the facial features area will not be affected by the first curve and the second curve under the protection of the preset mask. Therefore, the facial features will not be affected by the skin smoothing algorithm, and the details of the facial features can be accurately restored to ensure the skin smoothing effect.

[0196] Optionally, the processor 510 is further configured to process the original image using the second image to obtain a processed target image.

[0197] After the embodiment of the present application outputs the second image as the mask area after skin smoothing, the mask area is processed with the original image, that is, the initial face image, so as to brighten the dark areas in the face image, such as spots, scars and other areas, and obtain the face image after skin smoothing and beautification. This process will not brighten the face, so it will not damage the three-dimensional structure of the face, and there is no need to use AI algorithms, the occupancy and cost of equipment performance are relatively small, and the brightness of the defective part is uniformed while maintaining the three-dimensional structure of the face, thereby improving the skin smoothing effect.

[0198] It should be understood that in the embodiment of the present application, the input unit 504 may include a graphics processor (GPU) 5041 and a microphone 5042, and the graphics processor 5041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 506 may include a display panel 5061, and the display panel 5061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 507 includes a touch panel 5071 and at least one of other input devices 5072. The touch panel 5071 is also called a touch screen. The touch panel 5071 may include two parts: a touch detection device and a touch controller. Other input devices 5072 may include, but are not limited to, a physical keyboard, function keys (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0199] The memory 509 can be used to store software programs and various data. The memory 509 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 509 may include a volatile memory or a non-volatile memory, or the memory 509 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 509 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0200] The processor 510 may include one or more processing units; optionally, the processor 510 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 510.

[0201] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0202] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0203] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0204] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0205] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned image processing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0206] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0207] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0208] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. An image processing method, characterized in that: include: Get the original image; Establishing an image pyramid corresponding to the original image; Determine the low-frequency image of the image pyramid as the image to be processed; Performing fuzzy processing on the image to be processed to obtain a first image; Generate a second image according to the image to be processed and the first image; Determining a corresponding first curve according to the histogram distribution of the image to be processed, wherein the first curve is used to increase or decrease the brightness value of a first target area in the second image; processing the second image based on the first curve; When the processed second image meets a preset condition, outputting the processed second image; The image to be processed includes N first pixels, the first image includes N second pixels, the N first pixels correspond to the N second pixels one by one, and N is a positive integer; The step of generating a second image according to the image to be processed and the first image includes: Determine a first brightness value set according to the image to be processed, where the first brightness value set includes brightness values ​​of the N first pixels; Determine, according to the first image, a second brightness value set, where the second brightness value set includes brightness values ​​of the N second pixels; The second image is generated according to the first brightness value set and the second brightness value set.

2. The image processing method according to claim 1, characterized in that: The step of generating the second image according to the first brightness value set and the second brightness value set includes: Determine a first difference value set according to a difference between the first brightness value set and the second brightness value set; Determine M first target pixels corresponding to M differences whose brightness values ​​are less than zero in the first difference value set, where M is a positive integer less than N; The M first target pixels are removed from the image to be processed to obtain the second image.

3. The image processing method according to claim 2, characterized in that: After processing the second image based on the first curve, the image processing method further includes: In the case where the processed second image does not meet a preset condition, determining a corresponding second curve according to the histogram distribution, wherein the second curve is used to increase or decrease the brightness value of the first target area, and the preset condition includes that the intensity value of the processed second image is less than a preset threshold; Performing blurring processing on the processed second image to obtain a third image; determining a third set of brightness values ​​according to the second image; Determining a fourth brightness value set according to the third image; Determine a second difference value set according to a difference between the third brightness value set and the fourth brightness value set; Determine corresponding O second target pixels according to O difference values ​​whose brightness values ​​are greater than zero in the second difference value set, where O is a positive integer less than N; In the processed second image, removing the O second target pixels to obtain a fourth image; processing the fourth image based on the second curve; The processed fourth image is updated as the image to be processed, and the step of blurring the image to be processed is performed again.

4. The image processing method according to claim 3, characterized in that: Before processing the second image based on the first curve or processing the second image based on the second curve, the method further includes: Acquire a preset mask, where the preset mask is used to keep the brightness value of the second target area of ​​the second image unchanged; The second target area is processed by the preset mask.

5. The image processing method according to any one of claims 1 to 4, characterized in that: After outputting the processed second image, the method further includes: The original image is processed by using the second image to obtain a processed target image.

6. An image processing device, characterized in that: include: An acquisition module, used for acquiring the original image; A building module, used for building an image pyramid corresponding to the original image; A determination module, used for determining the low-frequency image of the image pyramid as an image to be processed; A processing module, used for performing fuzzy processing on the image to be processed to obtain a first image; A generating module, used for generating a second image according to the image to be processed and the first image; The determination module is further used to determine a corresponding first curve according to the histogram distribution of the image to be processed, wherein the first curve is used to increase or decrease the brightness value of the first target area in the second image; The processing module is further used to process the second image based on the first curve; an output module, configured to output the processed second image if the processed second image meets a preset condition; The image to be processed includes N first pixels, the first image includes N second pixels, the N first pixels correspond to the N second pixels one by one, and N is a positive integer; The determination module is further configured to determine a first brightness value set according to the image to be processed, the first brightness value set including brightness values ​​of the N first pixels; and determine a second brightness value set according to the first image, the second brightness value set including brightness values ​​of the N second pixels; The generating module is further configured to generate the second image according to the first brightness value set and the second brightness value set.

7. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method according to any one of claims 1 to 5 are implemented.

8. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Image visual effect enhancement method based on high and low frequency separation

    CN110232670A

  • Optimization method and device of to-be-processed image, storage medium and electronic equipment

    CN113409204A