Image processing method and electronic device

By extracting and adjusting the noise template in the frequency region on the mobile phone, it simulates the imaging effect of a SLR camera, solves the problem of low image quality taken by mobile phones, improves the details and layering of the image, and is close to the texture of a SLR camera.

CN117132477BActive Publication Date: 2024-09-24HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310215261.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-24
Publication Date
2024-09-24
Estimated Expiration
2043-02-24

AI Technical Summary

Technical Problem

The quality of images taken by mobile phones is lower than that of SLR cameras, especially in terms of details and layering, and it is difficult to achieve the quality of SLR cameras.

Method used

By extracting the frequency region in the image to be processed, adjusting the noise template of the preset SLR camera, and integrating the noise characteristics of different frequencies to simulate the imaging effect of the SLR camera and improve the detail and layering of the image.

Benefits of technology

It has improved the quality of images captured by mobile phones, bringing them close to the level of SLR cameras, enhanced the natural transition and three-dimensionality of images, and improved user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117132477B
    Figure CN117132477B
Patent Text Reader

Abstract

The present application provides an image processing method and an electronic device, and relates to the field of image processing technology. After shooting an image, the electronic device can perform noise reduction processing on the image to be processed to obtain a noise-reduced image. In order to avoid smearing and other problems in the noise-reduced image due to image noise reduction, the mobile phone can determine the high-frequency area, the medium-frequency area and the low-frequency area in the noise-reduced image. Afterwards, the mobile phone can superimpose the high-frequency noise template of the SLR camera on the high-frequency area, superimpose the medium-frequency noise template of the SLR camera on the medium-frequency area, and superimpose the low-frequency noise template of the SLR camera on the low-frequency area, so as to achieve the fusion of noise templates of different frequencies of the SLR camera. Afterwards, the mobile phone can fuse the superimposed high-frequency area, the superimposed medium-frequency area and the superimposed low-frequency area to obtain a target image with the noise characteristics of the SLR camera, thereby achieving a successful simulation of the imaging effect of the SLR camera and improving the user's perception.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image processing method and electronic equipment. Background Art

[0002] With the development of electronic devices (such as mobile phones), the shooting function of mobile phones has also developed rapidly, and more and more users like to use mobile phones to take photos or videos. However, since the performance of mobile phone cameras is lower than that of SLR cameras, the quality of images taken by mobile phones (such as photos and images in videos) is lower than that of images taken by SLR cameras. For example, the texture of images taken by mobile phones (details and layers of the image) is lower than that of images taken by SLR cameras.

[0003] Therefore, how to improve the quality of images taken by mobile phones so that the texture of images taken by mobile phones is similar to that of SLR cameras has become an urgent problem to be solved. Summary of the invention

[0004] In view of this, the present application provides an image processing method and an electronic device to improve the quality of captured images.

[0005] In a first aspect, the present application provides an image processing method. After an electronic device captures an image to be processed, the electronic device can extract a first frequency region in the image to be processed; the first frequency region includes a high-frequency region and / or a non-high-frequency region; the non-high-frequency region includes a low-frequency region and / or a medium-frequency region.

[0006] The electronic device determines, based on image information of the image to be processed, an adjustment weight corresponding to a pixel point in the image to be processed, wherein the adjustment weight corresponding to the pixel point indicates a noise degree superimposed on the pixel point; the image information includes the sensitivity of the image to be processed, the pixel value of the pixel point in the image to be processed, and information of a target area of ​​the image to be processed;

[0007] For each first frequency region, the electronic device superimposes a target frequency noise template based on pixel values ​​of pixel points in the first frequency region to obtain the superimposed first frequency region.

[0008] The target frequency noise template is obtained by adjusting the first frequency noise template of the preset SLR camera using the adjustment weights corresponding to the pixels in the first frequency region; the frequency corresponding to the first frequency noise template is the same as the frequency corresponding to the first frequency region. For example, if the first frequency region is a high frequency region, the frequency corresponding to the first frequency region is high frequency, and accordingly, the first frequency noise template is a high frequency noise template.

[0009] The electronic device fuses the superimposed first frequency regions to obtain a target image.

[0010] Exemplarily, the target area information indicates the pixel points included in the target area in the image to be processed. The pixel values ​​of the pixel points may be grayscale values.

[0011] In the present application, after the electronic device captures and obtains an image (i.e., an image to be processed), it determines the frequency region in the image to be processed that needs to improve the image quality, and obtains a first frequency region. The first frequency region may include a high-frequency region and a non-high-frequency region. And in order to improve the fusion effect, the electronic device can use the specific image situation of the image to be processed to adjust the first frequency noise template of the preset SLR camera to obtain the adjusted first frequency noise template of the preset SLR camera that is more suitable for the image to be processed. Afterwards, the electronic device superimposes the first frequency region with the adjusted first frequency noise template of the preset SLR camera, so that the electronic device can use the superimposed first frequency region to obtain the target image, so that the first frequency region in the image to be processed is fused with the noise template of the corresponding frequency of the SLR camera, and the noise template of the SLR camera is fused in frequency division, thereby realizing the simulation of the noise characteristics of different frequencies of the SLR camera, that is, realizing the simulation of the imaging effect of the SLR camera, so that the image taken by the electronic device has a texture similar to that of the SLR camera. Moreover, the electronic device does not fuse the noise templates of different frequencies of the SLR camera, but uses the adjusted SLR camera noise template that is more suitable for the image to be processed for fusion, so the fusion effect is better, so that the transition between different areas of the target image is more natural, the layering is stronger, and the three-dimensional sense is stronger, thereby effectively improving the image quality and improving the user's viewing experience.

[0012] In a possible design, the adjustment weight corresponding to the pixel point in the above-mentioned image to be processed is determined based on at least one coefficient of the target gain value adjustment coefficient, the brightness adjustment coefficient corresponding to the pixel point, and the texture adjustment coefficient corresponding to the pixel point;

[0013] Among them, the above-mentioned target gain value adjustment coefficient can be a gain value adjustment coefficient corresponding to the first preset sensitivity range to which the sensitivity of the image to be processed belongs. In the present application, the higher the sensitivity of the image to be processed, the darker the shooting environment of the image to be processed, the more blurred the details of the image to be processed obtained by shooting, and the heavier the degree of smearing. In order to improve the image quality, the greater the noise to be superimposed on the image to be processed, the greater the gain value adjustment coefficient accordingly. The lower the sensitivity of the image to be processed, the brighter the shooting environment of the image to be processed, the clearer the details of the image to be processed, the lighter the degree of smearing, the smaller the noise superimposed on the image to be processed, and the smaller the gain value adjustment coefficient accordingly.

[0014] The brightness adjustment coefficient corresponding to the above-mentioned pixel point can be determined based on the pixel value of the pixel point. In the present application, from the user's perspective, the user hopes that the content presented in the highlight area of ​​the image to be processed is smooth and has no graininess. For the dark area of ​​the image to be processed, since the brightness of the dark area itself is relatively low, if a relatively large noise is superimposed, the graininess of the content in the dark area may be heavier, which may make the content in the dark area more messy and the user's perception is poor. Therefore, the highlight area and the dark area of ​​the image to be processed require less noise to be superimposed, and the remaining area of ​​the image to be processed requires more noise to be superimposed, that is, the brightness adjustment coefficient corresponding to the pixels in the highlight area and the dark area is smaller, and the brightness adjustment coefficient corresponding to the pixels in the remaining area is larger. Among them, the specific brightness of the pixel point can be reflected by the grayscale value of the pixel point. The larger the grayscale value, the brighter the pixel point.

[0015] The texture adjustment coefficient corresponding to the above-mentioned pixel point can be determined based on the information of the target area. In the present application, the electronic device can determine the degree of noise required to be superimposed on each part (i.e., the size of the noise that needs to be superimposed) according to the content presented by the image to be processed, that is, determine the texture adjustment coefficient. For the area (i.e., the target area) in the image to be processed that includes a large amount of information, in order to highlight the image details, enhance the image edges, and enhance the information in the semantic area, the target area needs to have a larger degree of superimposed noise, so that the distinction between the superimposed area and other areas of the image is more obvious, making the image more layered and textured.

[0016] Exemplarily, the target region may include at least one of a texture region, a semantic region, a high-frequency region, and a medium-frequency region.

[0017] In a possible design, the determination process of the above-mentioned target gain value adjustment coefficient may include: the electronic device may search for the first preset sensitivity range to which the sensitivity of the image to be processed belongs from all the first preset sensitivity ranges, and use the first preset sensitivity range to which the sensitivity of the image to be processed belongs as the first target sensitivity range. Afterwards, the electronic device may use the preset gain value adjustment coefficient corresponding to the first target sensitivity range as the target gain value adjustment coefficient corresponding to the image to be processed, that is, obtain the target gain value adjustment coefficient corresponding to the pixel point in the image to be processed, thereby achieving the determination of the target gain value adjustment coefficient corresponding to the pixel point, so that the electronic device can determine the size of the SLR camera noise that needs to be superimposed on the pixel point by the target gain value adjustment coefficient corresponding to the pixel point, thereby achieving better fusion of the SLR camera noise.

[0018] In a possible design, the process of determining the brightness adjustment coefficient corresponding to the above pixel point may include:

[0019] Electronic devices can use Formula 1:

[0020]

[0021] Calculate the brightness adjustment coefficient corresponding to the pixel.

[0022] Among them, light_map represents the brightness adjustment coefficient corresponding to the pixel point; gray_img represents the pixel value of the pixel point; A represents a preset pixel value, which is smaller than the maximum pixel value that the pixel point can reach and larger than the minimum pixel value that the pixel point can reach.

[0023] In the present application, when the pixel value of a pixel is A, the value of the brightness adjustment coefficient corresponding to the pixel is the largest. Generally speaking, since the noise required to be superimposed in the highlight and dark areas of the image is small, the brightness adjustment coefficient is small, and the noise required to be superimposed in the remaining areas is large, the brightness adjustment coefficient is large. Therefore, the pixel value indicated by A is generally not too large or too small, such as A can be 128.

[0024] Exemplarily, the brightness adjustment coefficient needs to be between 0 and 1. Therefore, when the light_map corresponding to the pixel is less than 0, the electronic device can update the light_map corresponding to the pixel to 0. When the light_map corresponding to the pixel is greater than 1, the mobile phone can update the light_map corresponding to the pixel to 1.

[0025] Alternatively, in order to improve the efficiency of determining the light_map corresponding to the pixel, the mobile phone can directly limit the light_map corresponding to the pixel to be between 0 and 1 through the clip function. Specifically, for each pixel in the image to be processed, the mobile phone can use the following formula 4 to determine the brightness adjustment coefficient corresponding to the pixel.

[0026]

[0027] Among them, the np.clip function is used to limit Between 0 and 1, when When it is less than 0, light_map is 0. When greater than 1, light_map is 1.

[0028] In a possible design, the texture adjustment coefficient corresponding to the above pixel point can be determined based on the target area, or determined on the basis of the target area in combination with the sensitivity of the image to be processed.

[0029] In an example, the texture adjustment coefficient corresponding to the pixel point can be determined based on the target area. When the pixel point is in the target area of ​​the image to be processed, the electronic device can use the first preset texture adjustment coefficient as the texture adjustment coefficient corresponding to the pixel point.

[0030] When the pixel point is in a non-target area in the image to be processed, the electronic device can use the second preset texture adjustment coefficient as the texture adjustment coefficient corresponding to the pixel point. The non-target area is an area other than the target area in the image to be processed.

[0031] In another example, the texture adjustment coefficient corresponding to the above pixel point can be determined based on the target area and in combination with the sensitivity of the image to be processed. When the pixel point is in the target area of ​​the image to be processed, the electronic device can search for the second preset sensitivity range to which the sensitivity of the image to be processed belongs from all second preset sensitivity ranges, and use the second preset sensitivity range to which the sensitivity of the image to be processed belongs as the second target sensitivity range.

[0032] Afterwards, the electronic device may use the preset texture adjustment coefficient corresponding to the second target sensitivity range as the texture adjustment coefficient corresponding to the pixel point.

[0033] When the pixel point is in a non-target area in the image to be processed, the electronic device can search for the third preset sensitivity range to which the sensitivity of the image to be processed belongs from all third preset sensitivity ranges, and use the third preset sensitivity range to which the sensitivity of the image to be processed belongs as the third target sensitivity range.

[0034] Afterwards, the electronic device may use the preset texture adjustment coefficient corresponding to the third target sensitivity range as the texture adjustment coefficient corresponding to the pixel point.

[0035] In a possible design, the adjustment weight corresponding to the above pixel point can be determined based on the target gain value adjustment coefficient, the brightness adjustment coefficient and the texture adjustment coefficient. Correspondingly, the adjustment weight corresponding to the pixel point is the product of the target gain value adjustment coefficient, the brightness adjustment coefficient corresponding to the pixel point and the texture adjustment coefficient corresponding to the pixel point.

[0036] Alternatively, the adjustment weight corresponding to the above pixel point may be determined based on the target gain value adjustment coefficient and the brightness adjustment coefficient. Accordingly, the adjustment weight corresponding to the pixel point is the product of the target gain value adjustment coefficient and the brightness adjustment coefficient corresponding to the pixel point.

[0037] Alternatively, the adjustment weight corresponding to the above pixel point may be determined based on the target gain value adjustment coefficient and the texture adjustment coefficient. Accordingly, the adjustment weight corresponding to the pixel point is the product of the target gain value adjustment coefficient and the texture adjustment coefficient corresponding to the pixel point.

[0038] Alternatively, the adjustment weight corresponding to the above pixel point may be determined based on the brightness adjustment coefficient and the texture adjustment coefficient. Accordingly, the adjustment weight corresponding to the pixel point is the product of the brightness adjustment coefficient corresponding to the pixel point and the texture adjustment coefficient corresponding to the pixel point.

[0039] Alternatively, the adjustment weight corresponding to the pixel point may be any one of a target gain value adjustment coefficient, a brightness adjustment coefficient corresponding to the pixel point, and a texture adjustment coefficient corresponding to the pixel point.

[0040] In a possible design, for each pixel point (or referred to as the fourth pixel point) in the first frequency region, the electronic device may first calculate the product between the noise value corresponding to the position of the fourth pixel point in the first frequency noise template of the preset SLR camera and the adjustment weight corresponding to the fourth pixel point, and obtain the adjusted noise value corresponding to the position of the fourth pixel point, that is, obtain the adjusted noise value corresponding to the fourth pixel point, and implement the adjustment of the first frequency noise template. Wherein, the position of the fourth pixel point represents the position of the fourth pixel point in the image to be processed.

[0041] Afterwards, the electronic device can calculate the pixel value of the fourth pixel and the adjusted noise value corresponding to the fourth pixel to obtain the superimposed pixel value of the fourth pixel, thereby obtaining the first frequency region superimposed with the first frequency noise template, that is, obtaining the superimposed first frequency region, and the superimposed first frequency region integrates the noise effect of the corresponding frequency of the SLR camera to realize the simulation of the SLR camera noise.

[0042] Exemplarily, when the electronic device fuses the first frequency region in the image to be processed with the first frequency noise template of the preset SLR camera, for each fourth pixel point in the first frequency image, the following formula 2 may be used for the fusion.

[0043] img_fusion=img_sub+T*noiseMap formula 2;

[0044] Wherein, the above-mentioned img_sub represents the pixel value of the fourth pixel in the first frequency region (such as the pixel value of the fourth pixel in the image to be processed). T represents the adjustment weight corresponding to the fourth pixel. noiseMap represents the noise value corresponding to the position of the fourth pixel in the first noise template (or is described as the noise value corresponding to the fourth pixel). The img_fusion represents the superimposed pixel value of the fourth pixel.

[0045] In a possible design, the electronic device may fuse the superimposed first frequency regions to obtain a target image, which may include:

[0046] When all the first frequency regions indicate a complete image, the mobile phone can fuse the superimposed first frequency regions to obtain a target image.

[0047] In the case where all first frequency regions indicate partial images, the mobile phone fuses the first frequency regions and non-first frequency regions to obtain a target image.

[0048] Exemplarily, the first frequency region includes a high frequency region, a low frequency region and the intermediate frequency region.

[0049] The electronic device can superimpose a target high-frequency noise template based on the pixel values ​​of each first pixel point in the high-frequency area to obtain a superimposed high-frequency area. The target high-frequency noise template is obtained by adjusting the high-frequency noise template of a preset SLR camera using the adjustment weights corresponding to each first pixel point in the high-frequency area, thereby realizing the fusion of the high-frequency noise of the SLR camera. The fusion is performed using the adjusted high-frequency noise template obtained based on the image characteristics of the image to be processed, thereby improving the fusion effect and making the image content more natural and the layering stronger.

[0050] The electronic device superimposes a target intermediate frequency noise template based on the pixel value of each second pixel point in the intermediate frequency area to obtain a superimposed intermediate frequency area; wherein the target intermediate frequency noise template is obtained by adjusting the intermediate frequency noise template of a preset single-lens reflex camera using the adjustment weights corresponding to each second pixel point in the intermediate frequency area, thereby realizing the fusion of the intermediate frequency noise of the single-lens reflex camera, and the fusion is performed using the adjusted intermediate frequency noise template obtained based on the image characteristics of the image to be processed, thereby improving the fusion effect.

[0051] The electronic device superimposes a target low-frequency noise template based on the pixel values ​​of each third pixel point in the low-frequency area to obtain a superimposed low-frequency area; wherein the target low-frequency noise template is obtained by adjusting a preset low-frequency noise template of a single-lens reflex camera using adjustment weights corresponding to each third pixel point in the low-frequency area, thereby realizing fusion of the low-frequency noise of the single-lens reflex camera, and fusion is performed using the adjusted low-frequency noise template obtained based on the image characteristics of the image to be processed, thereby improving the fusion effect.

[0052] In a possible design, in order to improve the image quality, the electronic device may first perform noise reduction on the image to be processed after capturing the image to be processed. Afterwards, the electronic device may use the noise-reduced image to fuse the noise templates of different frequencies of the SLR camera. That is, the electronic device may determine the first frequency region in the noise-reduced image.

[0053] In a possible design, the preset low-frequency noise template of the SLR camera is composed of low-frequency noise values. The low-frequency noise value can be calculated by the following formula 3:

[0054] noiseMap = noise – np.mean(noise) Formula 3

[0055] Among them, noise represents the pixel value of the pixel point in the gray card image corresponding to the preset high light intensity, np.mean(noise) represents the average value of the grayscale values ​​of all pixels in the gray card image corresponding to the preset high light intensity, and noiseMap represents the low-frequency noise value corresponding to the position of the pixel point in the gray card image corresponding to the preset high light intensity.

[0056] Similarly, the high-frequency noise template of the preset SLR camera is composed of high-frequency noise values. The high-frequency noise value is determined based on the grayscale card image corresponding to the preset low light intensity, and specifically, it can also be determined based on the above-mentioned formula three.

[0057] The preset intermediate frequency noise template of the SLR camera is composed of intermediate frequency noise values. The intermediate frequency noise value is determined based on the grayscale card image corresponding to the preset low and medium illumination intensities. Specifically, it can also be determined based on the above-mentioned formula 3. Based on this, the determination of noise templates of different frequencies of the SLR camera is realized.

[0058] In a second aspect, the present application provides an electronic device, comprising a display screen, a camera, a memory and one or more processors; the display screen, the camera, the memory and the processor are coupled; the camera is used to capture images, the display screen is used to display images generated by the processor and images captured by the camera, and the memory is used to store computer program codes, wherein the computer program codes comprise computer instructions; when the processor executes the computer instructions, the electronic device executes the method described above.

[0059] In a third aspect, the present application provides a computer-readable storage medium, comprising computer instructions, which, when executed on an electronic device, enables the electronic device to execute the method described above.

[0060] In a fourth aspect, the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute the method described above.

[0061] It can be understood that the beneficial effects that can be achieved by the electronic device described in the second aspect, the computer-readable storage medium described in the third aspect, and the computer program product described in the fourth aspect provided above can be referred to the beneficial effects in the first aspect and any possible design method thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1A A schematic diagram of a portrait provided in an embodiment of the present application;

[0063] Figure 1B A schematic diagram of an image before fusion provided in an embodiment of the present application;

[0064] Figure 2 A schematic diagram of a fused image provided in an embodiment of the present application;

[0065] Figure 3A A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0066] Figure 3B A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application Figure 2 ;

[0067] Figure 3C Schematic diagram 3 of the hardware structure of an electronic device provided in an embodiment of the present application;

[0068] Figure 4A Schematic diagram 1 of a grayscale card image provided in an embodiment of the present application;

[0069] Figure 4B A schematic diagram of a grayscale card image provided in an embodiment of the present application Figure 2 ;

[0070] Figure 4C Schematic diagram 3 of a grayscale card image provided in an embodiment of the present application;

[0071] Figure 5 A flowchart of an image processing method provided in an embodiment of the present application is shown in FIG1 ;

[0072] Figure 6 A schematic diagram of the relationship between a brightness adjustment coefficient and a pixel value provided in an embodiment of the present application;

[0073] Figure 7 A schematic diagram of an image processing method provided in an embodiment of the present application Figure 2 . DETAILED DESCRIPTION

[0074] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.

[0075] In order to better understand the solution of the present application, the terms involved in the embodiments of the present application are introduced below.

[0076] Texture: refers to the details and layers of the picture.

[0077] Grayscale value: refers to the color depth of a point in a black and white image, generally ranging from 0 to 255, with white being 255 and black being 0. Among them, a black and white image can also be called a grayscale image.

[0078] Grayscale card: refers to a gray card, which can be a card based on a certain grayscale color value. For example, the grayscale color value can be 128 degrees gray, 129 degrees gray, etc.

[0079] Noise: refers to the random, discrete, and isolated pixels that appear on the image due to factors such as imaging sensor noise, photo grain noise, and channel transmission errors during image transmission. Noise is usually visually distinct from its neighboring pixels, for example, white dots in a black area, black dots in a white area, etc.

[0080] Image frequency: It is an indicator of the intensity of the grayscale value changes in the image, and is the gradient of the grayscale in the plane space. The larger the gradient of the image, that is, the larger the grayscale value changes of the pixel point, the higher the frequency. In simple terms, the more chaotic the image, the higher the frequency, such as the edge. The softer the image, the lower the frequency, such as a large piece of sky.

[0081] Low-frequency area: refers to the area where the gray value of pixels in the image changes slowly. The information included in the low-frequency area can be called low-frequency information.

[0082] Intermediate frequency region: refers to the region where the gray value of pixels in the image changes rapidly. The information included in the intermediate frequency region can be called intermediate frequency information, which determines the basic structure of the image and forms the main edge structure of the image.

[0083] High-frequency area: refers to the area where the gray value of the pixel in the image changes quickly, which includes information in the image that needs to be clearly displayed in detail. The information included in the high-frequency area can be called high-frequency information. High-frequency information forms the edges and details of the image, which is a further enhancement of the image content based on the medium-frequency information.

[0084] For example, assuming that the image captured by the camera is a photo of a person, the low-frequency information may include the background information of the person, such as a pure blue sky and a smooth wall, and the high-frequency information may include the person (such as Figure 1A The mid-frequency information can include content with average texture density, such as green plants and buildings. For example, if the camera captures a scene such as Figure 1BIn the image shown, the low-frequency information in the image may include the first color part 11, the second color part 12 and the third color part 13 in the vase, etc., which have a slow gray value change frequency. The high-frequency information in the image may include the shadow part 14 of the leaves, etc., which have a fast gray value change frequency. The medium-frequency information in the image may include the leaves 15, etc., which have a general texture density, i.e., which have a fast gray value change frequency.

[0085] Of course, the high frequency information, medium frequency information and low frequency information listed above are only examples. The high frequency information, medium frequency information and low frequency information may also include other types of information, such as high frequency information including plush toys, etc. The low frequency information, medium frequency information and high frequency information in the image may be divided according to actual needs.

[0086] Low-frequency noise: The disturbance generated during the imaging process of the sensor that does not belong to the original image and has a small fluctuation with the original pixel value. This disturbance is volatile and has a small variance. It has a certain degree of subjectivity.

[0087] Intermediate frequency noise: It is a disturbance generated during the sensor imaging process that does not belong to the original image and has a large fluctuation with the original pixel value. This disturbance is volatile and has a large variance. It is between low frequency and high frequency and has a certain degree of subjectivity.

[0088] High-frequency noise: The disturbance generated during the sensor imaging process that does not belong to the original image and has a large fluctuation with the original pixel value. This disturbance is volatile and has a large variance. It has a certain degree of subjectivity.

[0089] Semantic segmentation: refers to automatically segmenting and identifying the content in an image (or describing it as a semantic object), which is to assign a semantic label to each pixel in the image. Exemplary semantic labels may include labels such as people, dogs, buses, bicycles, vases, fences, plants, sky, roads, buildings, mountains, etc. For example, as mentioned above Figure 1A After semantic segmentation, the person image in the person photo can be determined. The person image here can be a semantic region, and the person can be a semantic object. For example, as mentioned above Figure 1B After semantic segmentation, the image shown in the figure can determine the plant image, vase image and fence 17 image in the image. The plant image, vase image and fence image here can be semantic regions, and the plant, vase and fence are semantic objects.

[0090] Simply put, semantic segmentation refers to marking each pixel in the image and matching each pixel with the category it represents. Correspondingly, semantics can be understood as the type of pixel.

[0091] Due to the characteristics of the optical system of SLR cameras, the objects in the images taken by SLR cameras have a higher sense of hierarchy and texture, making the images more aesthetic. The performance of mobile phone cameras is lower than that of SLR cameras, and the noise on the images taken by mobile phones (i.e., RAW images) may not be aesthetically pleasing, reducing the user's perception. In some embodiments, after the mobile phone captures the image, in order to improve the image quality, the mobile phone can first use a preset noise reduction algorithm to perform noise reduction on the image. Among them, when the mobile phone performs noise reduction on the image, it mainly targets the noise on the image that is not beneficial to the user's perception, such as white dots in black areas and other pixels that are significantly different from adjacent pixels.

[0092] The RAW image refers to the original image captured by the camera in the mobile phone, that is, the image that has not been processed. Exemplarily, the RAW image can be the original data captured by the photosensitive element in the camera in the mobile phone.

[0093] However, due to some reasons, when the mobile phone performs strong noise reduction on the image, it is easy to cause smearing or pseudo-texture on the noise-reduced image. The noise-reduced image may have local blurring problems and poor image texture. For example, if the environment when the mobile phone takes the image is dark, the noise on the image taken by the mobile phone may be relatively large (or described as more noise), and the noise on the image is not aesthetic. When the mobile phone performs noise reduction on the image, the noise reduction strength may be large, and the image after noise reduction has poor layering and poor three-dimensional sense, as mentioned above Figure 1B The vase in the image shown is almost on the same plane as the wall, with a poor sense of layering.

[0094] It is understandable that mobile phones can use Gaussian denoising, non-local means (NL-Means), median filtering and other global denoising algorithms to denoise the image globally (i.e. as a whole). However, since the denoising is performed on the entire image, the denoising intensity in the local area of ​​the image may be relatively large, which may easily lead to smearing or pseudo-texture problems.

[0095] Therefore, in order to simulate the imaging effect of a SLR camera, the mobile phone can fuse the noise characteristics of different frequencies of the SLR camera with the image after taking the image (or the image to be processed) to obtain an image with the noise characteristics of different frequencies of the SLR camera, thereby simulating the noise characteristics of the SLR camera.

[0096] Specifically, the mobile phone can divide the image into a medium frequency area, a high frequency area and a low frequency area, and fuse the noise template of the SLR camera with the image by frequency, such as fusing the high frequency area with the high frequency noise template of the SLR camera, so that the high frequency area has the high frequency noise imaging effect of the SLR camera, fusing the low frequency area with the low frequency noise template of the SLR camera, so that the low frequency area has the low frequency noise effect of the SLR camera, and fusing the medium frequency area with the medium frequency noise template of the SLR camera, so that the medium frequency area has the medium frequency noise effect of the SLR camera. In addition, in order to make the noise template of the SLR camera more compatible with the image taken by the mobile phone, the mobile phone can first use the specific situation of the image to determine the adjustment weight corresponding to each pixel in the image, that is, determine the adjustment weight corresponding to the noise template of the SLR camera with different frequencies. The adjustment weight indicates the degree of noise size of the SLR camera that needs to be superimposed on the corresponding pixel.

[0097] Afterwards, the mobile phone can use the adjusted SLR camera noise templates of different frequencies obtained based on the adjusted weights to fuse with the corresponding frequency areas, thereby improving the image fusion effect. Afterwards, the mobile phone can obtain the target image based on the fused low-frequency area, high-frequency area, and medium-frequency area. The target image has the noise characteristics of the SLR camera and realizes the simulation of the imaging effect of the SLR camera. And because the mobile phone uses the adjusted SLR camera noise template, the content transition in the target image can be made more natural, the layering is stronger, and the details are more prominent, effectively improving the image quality.

[0098] For example, Figure 2 The image shown is an image that combines the noise templates of different frequencies of the SLR camera. Figure 1B The image shown, Figure 2 The edge 16 of the vase in the image shown is enhanced, which enhances the three-dimensional sense of the vase and thus enhances the layering sense of the image. Figure 1B The first color portion 11 in the vase in the image shown, Figure 2 The first color portion 11 of the vase in the image shown has more noise, which makes the image more aesthetic, similar to the imaging effect of a SLR camera.

[0099] It is understandable that the above Figure 1B and Figure 2 The effect of the image shown is only an example and the present application is not limited thereto.

[0100] Exemplarily, the electronic device in the embodiments of the present application may be a mobile phone, a tablet computer, a wearable device, a personal digital assistant (PDA), a vehicle terminal, an Internet of Things device, or other device with a shooting function. The embodiments of the present application do not impose any special restrictions on the specific form of the electronic device.

[0101] Figure 3A A schematic structural diagram of an electronic device 100 is shown.

[0102] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0103] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0104] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0105] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0106] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0107] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0108] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0109] The charging management module 140 is used to receive charging input from a charger. While the charging management module 140 is charging the battery 142 , it can also power the electronic device through the power management module 141 .

[0110] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.

[0111] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0112] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0113] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0114] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0115] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0116] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0117] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0118] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0119] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0120] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise and brightness of the image. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera 193.

[0121] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto a photosensitive element (or image sensor). The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0122] Exemplarily, the N cameras 193 may include: one or more front cameras and one or more rear cameras. For example, the electronic device 100 is a mobile phone. Figure 3B The illustrated mobile phone includes a front-facing camera, such as front-facing camera 30 .

[0123] Figure 3C The mobile phone shown includes three rear cameras, such as rear cameras 31, 32 and 33. Of course, the number of cameras in the mobile phone includes but is not limited to the number described in the above example.

[0124] Among them, the above-mentioned camera 193 may include one or more of the following cameras: a main camera, a telephoto camera, a wide-angle camera, an ultra-wide-angle camera, a macro camera, a fisheye camera, an infrared camera, a depth camera and a black and white camera.

[0125] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0126] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0127] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0128] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0129] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0130] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0131] The earphone interface 170D is used to connect a wired earphone and may be a USB interface 130 .

[0132] The above-mentioned sensor module 180 may include a pressure sensor 180, a gyroscope sensor 180, an air pressure sensor 180, a magnetic sensor 180, an acceleration sensor 180, a distance sensor 180, a proximity light sensor 180, a fingerprint sensor 180, a temperature sensor 180, a touch sensor 180, an ambient light sensor 180, a bone conduction sensor 180, etc.

[0133] Buttons 190 include a power button, a volume button, and the like.

[0134] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.

[0135] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0136] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by inserting or removing the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.

[0137] In order to simulate the imaging effect of a SLR camera, the present application proposes an image processing method, in which an electronic device uses noise templates of different frequencies of a SLR camera to process the image normally taken by the camera of the electronic device, and synthesizes an image with the imaging effect of a SLR camera. The following will take the electronic device as an example of a mobile phone, and divide the image processing provided by the embodiment of the present application into two embodiments for introduction, wherein the first embodiment is used to introduce the process of determining the noise templates of different frequencies of a SLR camera, and the second embodiment is used to introduce the process of using the noise templates of different frequencies of a SLR camera to convert the image taken by the camera of the mobile phone into an image with the imaging effect of the SLR camera.

[0138] Embodiment 1

[0139] An embodiment of the present application provides an image processing method. In this embodiment, in order to determine the imaging characteristics of a SLR camera, relevant personnel can use a SLR camera to shoot a gray card under different light intensities to obtain gray card images corresponding to different light intensities. Afterwards, the first device can use the gray card images corresponding to different light intensities to determine the noise templates of different frequencies of the SLR camera, thereby realizing the noise characteristics of the SLR camera, that is, the determination of the imaging characteristics. Among them, the frequency can include high frequency, medium frequency and low frequency. Correspondingly, the noise template can include a high-frequency noise template, a medium-frequency noise template and a low-frequency noise template.

[0140] Among them, the process of determining the above-mentioned low-frequency noise template can be introduced through the following part a, the process of determining the intermediate-frequency noise template can be introduced through the following part b, and the process of determining the high-frequency noise template can be introduced through the following part c.

[0141] a. Determine the low-frequency noise template.

[0142] First, in a high-light intensity shooting environment, that is, in a bright scene, the relevant personnel use a SLR camera to shoot a grayscale card to obtain a grayscale card image corresponding to the high light intensity (such as Figure 4A As shown). The grayscale value of the pixel in the grayscale card image corresponding to high light intensity changes less drastically. Therefore, the noise on the grayscale card image corresponding to high light intensity may be low-frequency noise. That is, the grayscale card image corresponding to high light intensity may be used to determine the low-frequency noise template of the SLR camera. The grayscale card image may include H1*W2 pixels. H1 represents the height of the grayscale card image, and W2 represents the width of the grayscale card image.

[0143] The high light intensity can be set according to actual needs, such as 500-1000 lux (Lx).

[0144] Afterwards, the first device may calculate the average grayscale value of all pixels on the grayscale card image corresponding to the high light intensity. For each pixel in the grayscale card image corresponding to the high light intensity, the first device calculates the difference between the pixel and the average value to obtain the noise value corresponding to the pixel, that is, the low-frequency noise value corresponding to the position of the pixel, that is, the pixel value (such as grayscale value) of the low-frequency noise.

[0145] Exemplarily, the first device may use the following formula 3 to calculate the noise value corresponding to the pixel point in the grayscale card image corresponding to the high light intensity:

[0146] noiseMap=noise–np.mean(noise) Formula 3.

[0147] Among them, noiseMap represents the noise value corresponding to the pixel (that is, the pixel value of low-frequency noise, that is, the low-frequency noise value), noise represents the grayscale value of the pixel, np.mean() represents the average value calculation function, and np.mean(noise) represents the average grayscale value of all pixels on the grayscale card image corresponding to high light intensity.

[0148] Afterwards, the first device can obtain the low-frequency noise template of the SLR camera based on the pixel value of the low-frequency noise corresponding to each pixel point in the gray card image corresponding to the high light intensity. That is, the low-frequency noise template of the SLR camera is composed of the pixel values ​​of each low-frequency noise. The low-frequency noise template represents the gray value fluctuation of the low-frequency noise of the SLR camera, that is, reflects the low-frequency noise characteristics of the SLR camera.

[0149] It should be noted that when a SLR camera shoots a grayscale card in a shooting environment with high light intensity, the distance between the SLR camera and the grayscale card (or the first distance) can be set according to actual needs, and this application does not set it.

[0150] The above introduces the process of determining the low-frequency noise template of the SLR camera. The following will continue to introduce the process of determining the medium-frequency noise template of the SLR camera.

[0151] b. Determine the intermediate frequency noise template.

[0152] First, in a shooting environment with medium light intensity, the relevant personnel used a SLR camera to shoot a grayscale card to obtain a grayscale card image corresponding to the medium light intensity (such as Figure 4B As shown). The grayscale values ​​of pixels in the grayscale card image corresponding to medium light intensity vary drastically. Therefore, the noise on the grayscale card image corresponding to medium light intensity may be medium frequency noise. That is, the grayscale card image corresponding to medium light intensity may be used to determine the medium frequency noise template of the SLR camera.

[0153] The above-mentioned medium light intensity can be set according to actual needs, such as a medium light intensity of 200-500 lux. The grayscale card image corresponding to the medium light intensity can also include H1*W1 pixels, which is the same as the number of pixels included in the grayscale card image corresponding to the high light intensity. Of course, the number of pixels included in the grayscale card image corresponding to the medium light intensity can also be different from that of the grayscale card image corresponding to the high light intensity, and this application does not limit it.

[0154] Afterwards, the first device may calculate the average grayscale value of all pixels on the grayscale card image corresponding to the medium light intensity. For each pixel in the grayscale card image corresponding to the medium light intensity, the first device calculates the difference between the pixel and the average value to obtain the noise value corresponding to the pixel, that is, the intermediate frequency noise value corresponding to the position of the pixel, that is, the pixel value (such as grayscale value) of the intermediate frequency noise.

[0155] The calculation formula for the noise value corresponding to each pixel in the grayscale card image corresponding to the medium light intensity can refer to the above formula three.

[0156] Afterwards, the first device can obtain the intermediate frequency noise template of the SLR camera based on the pixel value of the intermediate frequency noise corresponding to each pixel point in the gray card image corresponding to the medium light intensity. That is, the intermediate frequency noise template of the SLR camera is composed of the pixel values ​​of each intermediate frequency noise. The intermediate frequency noise template represents the gray value fluctuation of the intermediate frequency noise of the SLR camera, that is, reflects the intermediate frequency noise characteristics of the SLR camera.

[0157] It should be noted that when the SLR camera shoots the grayscale card in a shooting environment with medium light intensity, the distance between the SLR camera and the grayscale card (or the second distance) can be set according to actual needs. The second distance can be the same as or different from the first distance, and this application does not set it.

[0158] The above introduces the process of determining the intermediate frequency noise template of the SLR camera. The following will continue to introduce the process of determining the high frequency noise template of the SLR camera.

[0159] c. Determine the high-frequency noise template.

[0160] First, in a low-light intensity shooting environment, that is, in a low-brightness scene, the relevant personnel use a SLR camera to shoot a grayscale card to obtain a grayscale card image corresponding to the low-light intensity (such as Figure 4C As shown). The grayscale values ​​of pixels in the grayscale card image corresponding to low light intensity vary greatly, so the noise on the grayscale card image corresponding to low light intensity may be high-frequency noise, that is, the grayscale card image corresponding to low light intensity may be used to determine the high-frequency noise template of the SLR camera.

[0161] Among them, the above-mentioned low light intensity can be set according to actual needs, such as the low light intensity is 50-100 lux. The gray card image corresponding to the low light intensity can also include H1*W1 pixels, which is the same number of pixels as the gray card image corresponding to the above-mentioned high light intensity. Of course, the number of pixels included in the gray card image corresponding to the low light intensity can also be different from the gray card image corresponding to the high light intensity. Similarly, the number of pixels included in the gray card image corresponding to the low light intensity can also be the same as or different from the gray card image corresponding to the above-mentioned medium light intensity, and the present application does not limit it.

[0162] Afterwards, the first device may calculate the average grayscale value of all pixels on the grayscale card image corresponding to the low light intensity. For each pixel in the grayscale card image corresponding to the low light intensity, the first device calculates the difference between the pixel and the average value to obtain the noise value corresponding to the pixel, that is, the high-frequency noise value corresponding to the position of the pixel, that is, the pixel value (such as grayscale value) of the high-frequency noise.

[0163] The calculation formula for the noise value corresponding to each pixel in the grayscale card image corresponding to the low light intensity can refer to the above formula three.

[0164] Afterwards, the first device can obtain the high-frequency noise template of the SLR camera based on the pixel value of the high-frequency noise corresponding to each pixel point in the gray card image corresponding to the low light intensity. That is, the high-frequency noise template of the SLR camera is composed of the pixel values ​​of each high-frequency noise. The high-frequency noise template represents the gray value fluctuation of the high-frequency noise of the SLR camera, that is, reflects the high-frequency noise characteristics of the SLR camera. In other words, the high-frequency noise template of the SLR camera can reflect the imaging effect of the high-frequency noise of the SLR camera.

[0165] In some embodiments, the relevant personnel can select a SLR camera according to the imaging effects of images of different frequencies of the SLR camera that the mobile phone needs to simulate. For example, if the relevant personnel want the images taken by the mobile phone to simulate the imaging effects of the SLR camera of brand A, the noise templates of different frequencies of the SLR camera of brand A can be determined.

[0166] It should be noted that when the SLR camera shoots the grayscale card in a low light intensity shooting environment, the distance between the SLR camera and the grayscale card (or referred to as the third distance) can be set according to actual needs. The third distance can be the same as or different from the first distance. Similarly, the third distance can be the same as or different from the second distance, and this application does not set it.

[0167] The above describes the process of determining the noise templates of the three frequencies of high frequency, medium frequency and high frequency. In practical applications, the first device may also only determine the low-frequency noise template, the medium-frequency noise template or the high-frequency noise template, that is, the SLR camera only needs to shoot the gray card under high light intensity, shoot the gray card under medium light intensity, or shoot the gray card under low light intensity, that is, the SLR camera only needs to collect the gray card image corresponding to high light intensity, the gray card image corresponding to medium light intensity, or the gray card image corresponding to low light intensity.

[0168] Of course, the first device can also determine the noise templates of two frequencies among the low-frequency noise template, the medium-frequency noise template and the high-frequency noise template. For example, the first device can determine the low-frequency noise template and the high-frequency noise module, that is, the SLR camera can collect gray card images corresponding to high light intensity and gray card images corresponding to low light intensity. For another example, the first device can determine the high-frequency noise template and the medium-frequency noise module, that is, the SLR camera can collect gray card images corresponding to low light intensity and gray card images corresponding to medium light intensity. For another example, the first device can determine the low-frequency noise template and the medium-frequency noise module, that is, the SLR camera can collect gray card images corresponding to high light intensity and gray card images corresponding to medium light intensity.

[0169] It can be seen that relevant personnel can use a SLR camera to collect at least one of the grayscale card images corresponding to high light intensity, the grayscale card images corresponding to medium light intensity, and the grayscale card images corresponding to low light intensity according to needs. Correspondingly, the first device can determine at least one of the high-frequency noise template, the medium-frequency noise template, and the low-frequency noise template.

[0170] It is understandable that images with different frequencies present different effects. Figure 4A The grayscale card image corresponding to the high light intensity shown (equivalent to the low-frequency noise of a SLR camera) has the lowest degree of graininess and a relatively small overall variance. Figure 4B The grayscale card image corresponding to the medium light intensity shown (equivalent to the intermediate frequency noise of the SLR camera) has a high degree of graininess and a large variance in the volume pixel values. Figure 4C The grayscale card image corresponding to the low light intensity shown (equivalent to the high-frequency noise of a SLR camera) has the highest degree of graininess and the largest variance in overall pixel values.

[0171] In this embodiment, the process of obtaining the noise template of the SLR camera (such as the high-frequency noise template, the medium-frequency noise template, and the low-frequency noise template) can be performed before the target mobile phone leaves the factory. After the first device obtains the noise template of the SLR camera, it can be stored in the target mobile phone (such as the memory of the target mobile phone).

[0172] Embodiment 2

[0173] The present application provides an image processing method. In this embodiment, after a mobile phone (such as the target mobile phone in the first embodiment) captures an image with a mobile phone camera, a noise template of a corresponding frequency is superimposed on different frequency regions of the image to transform the image into an image with the noise characteristics of a single-lens reflex camera, thereby simulating the imaging characteristics of a single-lens reflex camera. Specifically, Figure 5 As shown, the picture display method provided in the embodiment of the present application may include S501-S507.

[0174] S501: In response to a first operation of a user on a shooting interface of a mobile phone, the mobile phone shoots an image to be processed.

[0175] Exemplarily, in one case, the first operation can trigger the mobile phone to take a photo, and the image to be processed is an image taken by the mobile phone in the camera mode. In another case, the first operation can trigger the mobile phone to take a video, and the image to be processed is an image taken by the mobile phone in the video mode. Specifically, the image taken in the video mode can be an image in the video file obtained after the video shooting is completed. The image taken in the video mode can also be an image captured by the mobile phone camera during the video shooting process, so that the preview image displayed by the mobile phone is an image with the noise characteristics of a SLR camera, so that the image in the video file obtained after the video shooting is completed has the imaging effect of a SLR camera.

[0176] In some embodiments, the first operation may be a user clicking a related control on a shooting interface displayed by the mobile phone. For example, the first operation may be a user clicking a photo control on the shooting interface. For another example, the first operation may be a user clicking a video control on the shooting interface.

[0177] The above-mentioned first operation may also be a preset gesture (such as an S-shaped gesture, a √-shaped gesture, etc.) input by the user in the shooting interface. The preset mobile phone may include a first gesture and / or a second gesture. The first gesture may trigger the mobile phone to take a photo, and the second gesture may trigger the mobile phone to take a video. Among them, the first gesture and the second gesture may be different. When the user inputs the first gesture on the shooting interface displayed on the mobile phone, the first gesture is the first operation, which triggers the mobile phone to take a photo. When the user inputs the second gesture on the shooting interface displayed on the mobile phone, the mobile phone is the first operation, which triggers the mobile phone to take a video.

[0178] The above-mentioned preset gestures can be preset in the mobile phone. Moreover, the mobile phone can prompt the user with the preset gestures and the functions triggered by the preset gestures on the shooting interface (i.e., the first gesture can trigger the mobile phone to take a photo; the second gesture can trigger the mobile phone to take a video), so that the user can input the corresponding gestures on the shooting interface of the mobile phone according to the needs.

[0179] S502: The mobile phone determines a high-frequency region, a medium-frequency region, and a low-frequency region in the image to be processed.

[0180] For example, the mobile phone can decompose the image into a high-frequency region, a medium-frequency region and a low-frequency region. The high-frequency region refers to the high-frequency image part in the image to be processed, that is, the region where the gray value of the pixel changes rapidly, and the content included in the high-frequency region can be called high-frequency information.

[0181] The intermediate frequency region represents the intermediate frequency image portion in the image to be processed, that is, the region where the gray value of the pixel point changes rapidly. The content included in the intermediate frequency region can be called intermediate frequency information.

[0182] The low-frequency region refers to the low-frequency image portion in the image to be processed, that is, the region where the gray value of the pixel changes slowly. The content included in the low-frequency region can be called low-frequency information.

[0183] In some embodiments, after the mobile phone determines the high-frequency region, the medium-frequency region, and the low-frequency region in the image to be processed, the high-frequency image, the medium-frequency image, and the low-frequency image corresponding to the image to be processed can be determined. The pixel value of the pixel point in the area other than the high-frequency region in the high-frequency image is a first preset value, and the difference between the first preset value and 0 is within a first preset range, that is, the first preset value is 0 or other values ​​close to 0.

[0184] The pixel value of the pixel point in the area other than the intermediate frequency area in the intermediate frequency image is a second preset value, and the difference between the second preset value and 0 is within a second preset range, that is, the second preset value is 0 or other values ​​close to 0.

[0185] The pixel value of the pixel point in the area other than the low-frequency area in the low-frequency image is a third preset value, and the difference between the third preset value and 0 is within a third preset range, that is, the third preset value is 0 or other values ​​close to 0.

[0186] It should be understood that the sizes of the high-frequency image, the medium-frequency image and the low-frequency image are the same as the image to be processed, that is, the number of pixels included is the same. If the size of the image to be processed is H2*W2, the size of the high-frequency image, the medium-frequency image and the low-frequency image may also be H2*W2.

[0187] In some embodiments, in order to improve the image quality, after obtaining the image to be processed, the mobile phone can first use a preset noise reduction algorithm to perform noise reduction processing on the image to be processed to obtain the image to be processed after noise reduction. Afterwards, the mobile phone can perform other processing on the image to be processed after noise reduction, such as superimposing a preset SLR camera noise template (such as a preset SLR camera high-frequency noise template, medium-frequency noise template, and low-frequency noise template).

[0188] The preset noise reduction algorithms may include non-local average algorithm, three-dimensional block matching filtering (block-matching and 3D filtering, BM3D), four-dimensional block matching filtering (block-matching and 4D filtering, BM4D) and other image noise reduction algorithms.

[0189] S503: The mobile phone determines the adjustment weight corresponding to each pixel point in the image to be processed by using the image information of the image to be processed.

[0190] Exemplarily, the image information of the image to be processed may include the sensitivity (ISO) of the image to be processed, the pixel values ​​of the pixels in the image to be processed, and the information of the target area of ​​the image to be processed. The target area may include at least one of a texture area, a semantic area, a high-frequency area, and a medium-frequency area. If the target area includes a semantic area, the mobile phone may perform semantic segmentation on the image to be processed to obtain the semantic area in the image to be processed.

[0191] Exemplarily, the sensitivity of the above-mentioned image to be processed can be used to determine the target gain value adjustment coefficient. The higher the ISO of the image, the darker the shooting environment of the image, the more blurred the details of the image, the heavier the smearing degree, and in order to improve the image quality, the greater the noise to be superimposed on the image, and accordingly, the greater the gain value adjustment coefficient. The lower the ISO of the image, the brighter the shooting environment of the image, the clearer the details of the image, the lighter the smearing degree, the smaller the noise superimposed on the image, and accordingly, the smaller the gain value adjustment coefficient.

[0192] Therefore, the mobile phone can use the sensitivity of the image to be processed to determine the brightness of the shooting environment of the image to be processed, so as to obtain the target gain value adjustment coefficient corresponding to the image to be processed, that is, the target gain value adjustment coefficient represents the degree of noise superposition adapted to the shooting environment of the image to be processed. Specifically, the mobile phone can search the first preset sensitivity range to which the sensitivity of the image to be processed belongs from all first preset sensitivity ranges, and use the first preset sensitivity range to which the sensitivity of the image to be processed belongs as the first target sensitivity range. Afterwards, the mobile phone can use the preset gain value adjustment coefficient corresponding to the first target sensitivity range as the target gain value adjustment coefficient corresponding to the image to be processed.

[0193] Wherein, each first preset sensitivity range has a corresponding preset gain value adjustment coefficient. For example, the above-mentioned first preset sensitivity range may include [0, 600), [600, 2000), [2000, 5000) and [5000, +∞). The preset gain value adjustment coefficient corresponding to [0, 600) is 0.2, the preset gain value adjustment coefficient corresponding to [600, 2000) is 0.3, the preset gain value adjustment coefficient corresponding to [2000, 5000) is 0.35, and the preset gain value adjustment coefficient corresponding to [5000, +∞) is 0.4. Assuming that the sensitivity of the image to be processed is 800, the first target sensitivity range to which it belongs is [600, 2000), then the target gain value adjustment coefficient corresponding to the image to be processed is the gain value adjustment coefficient corresponding to [600, 2000) (i.e., 0.3).

[0194] It should be understood that the darker the shooting environment, the greater the noise on the image (i.e., RAW image) taken by the mobile phone. The mobile phone has a greater noise reduction strength when performing noise reduction processing on the image, which may make the details on the noise-reduced image blurry and smear. Therefore, the mobile phone needs to superimpose a larger noise to highlight the details of the image. Among them, the shooting environment of the image can be reflected by the sensitivity of the image. The higher the ISO of the image, the darker the environment was when the mobile phone took the image.

[0195] Exemplarily, the pixel values ​​of the pixels in the above-mentioned image to be processed can be used to determine the brightness adjustment coefficient corresponding to each pixel. Generally speaking, the brightness of an image may be uneven, and there may be highlight areas, dark areas, general brightness areas, etc. Therefore, the mobile phone can determine the noise size (or describe the amount of noise) required to be superimposed on each pixel in the image to be processed based on the specific brightness of each pixel in the image to be processed. From the user's perspective, the user hopes that the content presented in the highlight area of ​​the image is smooth and has no graininess. For the dark area of ​​the image, since the brightness of the dark area itself is relatively low, if a relatively large noise is superimposed, the graininess of the content in the dark area may be heavier, which may make the content in the dark area more messy and the user's perception is poor. Therefore, the highlight area and the dark area of ​​the image need to superimpose less noise, and the remaining area of ​​the image needs to superimpose more noise, that is, the brightness adjustment coefficient corresponding to the pixels in the highlight area and the dark area is smaller, and the brightness adjustment coefficient corresponding to the pixels in the remaining area is larger. Among them, the specific brightness of the pixel can be reflected by the pixel value (such as gray value) of the pixel, and the larger the gray value, the brighter the pixel. Exemplarily, for each pixel in the image to be processed, the mobile phone may use the following formula 1 to determine the brightness adjustment coefficient corresponding to the pixel.

[0196]

[0197] Among them, light_map represents the brightness adjustment coefficient corresponding to the pixel. gray_img represents the pixel value of the pixel. A represents a preset pixel value, which is less than the maximum pixel value that the pixel can reach and greater than the minimum pixel value that the pixel can reach. For example, if the maximum pixel value that the pixel can reach is 255 and the minimum pixel value is 0, then A can be any value between 0 and 255. When the pixel value of a pixel is A, the value of the brightness adjustment coefficient corresponding to the pixel is the largest. Generally speaking, since the highlight area and dark area of ​​the image need to superimpose less noise, the brightness adjustment coefficient is smaller, and the remaining area needs to superimpose more noise, the brightness adjustment coefficient is larger. Therefore, the pixel value indicated by A is generally not too large or too small. For example, A can be 128.

[0198] In some embodiments, the brightness adjustment coefficient needs to be between 0 and 1. Therefore, if there is an error in calculating the brightness adjustment coefficient of a pixel point, the mobile phone can adjust it. Exemplarily, for each pixel point in the above-mentioned image to be processed, if the light_map corresponding to the pixel point is less than 0, the mobile phone can update the light_map corresponding to the pixel point to 0. If the light_map corresponding to the pixel point is greater than 1, the mobile phone can update the light_map corresponding to the pixel point to 1.

[0199] Alternatively, in order to improve the efficiency of determining the light_map corresponding to the pixel, the mobile phone can directly limit the light_map corresponding to the pixel to be between 0 and 1 through the clip function. Specifically, for each pixel in the image to be processed, the mobile phone can use the following formula 4 to determine the brightness adjustment coefficient corresponding to the pixel.

[0200] Among them, the np.clip function is used to limit Between 0 and 1, when When it is between 0 and 1, the light_map is when When it is less than 0, light_map is 0. When greater than 1, light_map is 1.

[0201] It should be understood that there is a “∩” type relationship between the pixel value and the brightness adjustment coefficient. Assume that A is 128. Figure 6 As shown, when the pixel value of the pixel is equal to 128, the noise that needs to be superimposed on the pixel is the largest. When the pixel value of the pixel is greater than 128, the higher the pixel value, the brighter the pixel itself. From the user's perspective, the user does not want the area where the pixel is located (i.e., the highlighted area) to have noise. Therefore, the smaller the noise that needs to be superimposed on the pixel, the smaller the brightness adjustment coefficient corresponding to the pixel. When the pixel value of the pixel is less than 128, the smaller the pixel value, the darker the pixel itself. From the user's perspective, the user does not want the area where the pixel is located (i.e., the dark area) to have noise. Therefore, in order to avoid cluttered content, the smaller the noise that needs to be superimposed on the pixel, the smaller the brightness adjustment coefficient corresponding to the pixel.

[0202] Exemplarily, in general, an image includes a flat area and a non-flat area, the flat area includes less information, the non-flat area includes a larger amount of information, and includes more details and texture features. Therefore, the mobile phone can also determine the degree of noise required to be superimposed on each part (i.e., the size of the noise required to be superimposed) according to the content presented by the image, that is, determine the texture adjustment coefficient. For the area in the image that includes a large amount of information, in order to highlight the image details, enhance the image edge, and enhance the information in the semantic area, the superimposed noise level of the area with a large amount of information needs to be larger, so that the distinction between the superimposed area and other areas of the image is more obvious, so that the image has a more layered sense, so that the image has the texture of the image taken by a SLR camera. Correspondingly, the mobile phone can extract the target area in the image to be processed. Afterwards, the mobile phone can use the first preset texture adjustment coefficient as the texture adjustment coefficient corresponding to the target area, that is, the texture adjustment coefficient corresponding to each pixel point in the target area is the first preset texture adjustment coefficient. Among them, the target area in the image to be processed represents the area with a large amount of information in the image to be processed, that is, the non-flat area.

[0203] Furthermore, the mobile phone can use the second preset texture adjustment coefficient as the texture adjustment coefficient corresponding to the non-target area in the image to be processed, that is, the texture adjustment coefficient corresponding to each pixel in the non-target area is the second preset texture adjustment coefficient. The non-target area represents the area other than the target area in the image to be processed. The second preset texture adjustment coefficient is smaller than the first preset texture adjustment coefficient.

[0204] In some embodiments, when determining the texture adjustment coefficient corresponding to the target area in the image to be processed, the mobile phone may also combine the sensitivity of the image to be processed. The lower the sensitivity of the image to be processed, the brighter the shooting environment of the image to be processed, the clearer the details of the image to be processed, the lighter the smearing degree, the smaller the noise required to be superimposed, and accordingly, the smaller the texture adjustment coefficient. The higher the sensitivity of the image to be processed, the darker the shooting environment of the image to be processed, the blurrier the details of the image to be processed, the heavier the smearing degree, the greater the noise required to be superimposed, and accordingly, the greater the texture adjustment coefficient.

[0205] Therefore, for the target area in the image to be processed, the mobile phone can search the second preset sensitivity range to which the sensitivity of the image to be processed belongs from all the second preset sensitivity ranges, and use the second preset sensitivity range to which the sensitivity of the image to be processed belongs as the second target sensitivity range. Afterwards, the mobile phone can use the preset texture adjustment coefficient corresponding to the second target sensitivity range as the texture adjustment coefficient corresponding to the target area in the image to be processed, that is, the texture adjustment coefficient corresponding to each pixel in the target area in the image to be processed is the preset texture adjustment coefficient corresponding to the second target sensitivity range.

[0206] Each second preset sensitivity range has a corresponding preset texture adjustment coefficient. The larger the value included in the second preset sensitivity range is, the larger the preset texture adjustment coefficient corresponding to the second preset sensitivity range is.

[0207] Similarly, for the non-target area in the image to be processed, the mobile phone can search the third preset sensitivity range to which the sensitivity of the image to be processed belongs from all third preset sensitivity ranges, and use the third preset sensitivity range to which the sensitivity of the image to be processed belongs as the third target sensitivity range. Afterwards, the mobile phone can use the preset texture adjustment coefficient corresponding to the third target sensitivity range as the texture adjustment coefficient corresponding to the non-target area in the image to be processed, that is, the texture adjustment coefficient corresponding to each pixel in the non-target area in the image to be processed is the preset texture adjustment coefficient corresponding to the third target sensitivity range.

[0208] Each third preset sensitivity range has a corresponding preset texture adjustment coefficient. The larger the value included in the third preset sensitivity range, the larger the preset texture adjustment coefficient corresponding to the third preset sensitivity range.

[0209] In the present application, since the texture adjustment coefficients corresponding to the target area and the non-target area of ​​the image to be processed are different, the superimposed noise levels are different (i.e., the superimposed noise sizes are different), so that the distinction between the target area and the non-target area after the superimposed noise is more obvious, making the image more layered and textured. Therefore, the texture adjustment coefficient corresponding to the target area is greater than the texture adjustment coefficient corresponding to the non-target area.

[0210] In some embodiments, the adjustment weight corresponding to each pixel point in the above-mentioned image to be processed can be determined based on at least one coefficient among a target gain value adjustment coefficient, a brightness adjustment coefficient and a texture adjustment coefficient.

[0211] Taking the image information of the above-mentioned image to be processed including the sensitivity of the image to be processed as an example, the adjustment weights corresponding to each pixel point in the above-mentioned image to be processed can be determined based on the target gain value adjustment coefficient, that is, the adjustment weights corresponding to each pixel point are all the target gain value adjustment coefficient.

[0212] Taking the image information of the above-mentioned image to be processed including the pixel values ​​of the pixel points in the image to be processed as an example, the adjustment weight corresponding to each pixel point in the above-mentioned image to be processed can be determined based on the brightness adjustment coefficient, that is, the adjustment weight corresponding to each pixel point is the brightness adjustment coefficient corresponding to the corresponding pixel point.

[0213] Taking the example that the image information of the above-mentioned image to be processed includes the information of the target area of ​​the image to be processed, the adjustment weights corresponding to each pixel point in the above-mentioned image to be processed can be determined based on the texture adjustment coefficient, that is, the adjustment weights corresponding to each pixel point in the target area are the texture adjustment coefficient corresponding to the target area (that is, the above-mentioned first preset texture adjustment coefficient); the adjustment weights corresponding to each pixel point in the non-target area are the texture adjustment coefficient corresponding to the non-target area (that is, the above-mentioned second preset texture adjustment coefficient).

[0214] Taking the above-mentioned image information to be processed as an example, which includes the sensitivity of the image to be processed and the pixel values ​​of the pixels in the image to be processed, the adjustment weight corresponding to each pixel in the above-mentioned image to be processed can be determined based on the target gain value adjustment coefficient and the brightness adjustment coefficient. Specifically, for each pixel in the image to be processed, the product between the brightness adjustment coefficient corresponding to the pixel and the target gain value adjustment coefficient is calculated to obtain the adjustment weight corresponding to the pixel.

[0215] Taking the above-mentioned image information to be processed including the sensitivity of the image to be processed and the information of the target area as an example, the adjustment weight corresponding to each pixel point in the above-mentioned image to be processed can be determined based on the target gain value adjustment coefficient and the texture adjustment coefficient. Specifically, for each pixel point in the image to be processed, the product between the texture adjustment coefficient corresponding to the pixel point and the target gain value adjustment coefficient is calculated to obtain the adjustment weight corresponding to the pixel point. Among them, when the pixel point is located in the target area, the texture adjustment coefficient corresponding to the pixel point can be the texture adjustment coefficient corresponding to the target area; when the pixel point is located in the non-target area, the texture adjustment coefficient corresponding to the pixel point can be the texture adjustment coefficient corresponding to the non-target area.

[0216] Taking the above-mentioned image information to be processed as an example, the image information includes the pixel values ​​of the pixels in the image to be processed and the information of the target area, the adjustment weight corresponding to each pixel in the image to be processed can be determined based on the brightness adjustment coefficient and the texture adjustment coefficient. Specifically, for each pixel in the image to be processed, the product between the texture adjustment coefficient corresponding to the pixel and the brightness adjustment coefficient corresponding to the pixel is calculated to obtain the adjustment weight corresponding to the pixel.

[0217] Taking the image information of the above-mentioned image to be processed including the sensitivity of the image to be processed, the pixel values ​​of the pixels in the image to be processed and the information of the target area as an example, the adjustment weight corresponding to each pixel in the above-mentioned image to be processed can be determined based on the target gain value adjustment coefficient, the brightness adjustment coefficient and the texture adjustment coefficient. Specifically, for each pixel in the image to be processed, the product of the texture adjustment coefficient corresponding to the pixel, the brightness adjustment coefficient corresponding to the pixel and the target gain value adjustment coefficient is calculated to obtain the adjustment weight corresponding to the pixel.

[0218] In the implementation of this application, the coefficient used for the adjustment weight corresponding to the pixel points in the image to be processed can be determined according to actual needs. For example, in order to improve the efficiency of image processing, the mobile phone can directly determine the adjustment weight using one of the target gain value adjustment coefficient, the brightness adjustment coefficient and the texture adjustment coefficient. For another example, in order to make the noise template of the SLR camera more compatible with the image to be processed and achieve the optimal image fusion effect, the mobile phone can determine the adjustment weight using the three coefficients of the target gain value adjustment coefficient, the brightness adjustment coefficient and the texture adjustment coefficient. For another example, in order to ensure high image processing efficiency and better image fusion effect, the mobile phone can determine the adjustment weight using two of the target gain value adjustment coefficient, the brightness adjustment coefficient and the texture adjustment coefficient. Of course, in actual applications, the coefficient used for the adjustment weight corresponding to the pixel points in the image to be processed can be determined according to other needs, and this application does not limit it.

[0219] S504: The mobile phone superimposes the target high-frequency noise template based on the pixel values ​​of each first pixel point in the high-frequency area to obtain a superimposed high-frequency area, wherein the target high-frequency noise template is obtained by adjusting the high-frequency noise template of the preset SLR camera using the adjustment weights corresponding to each first pixel point in the high-frequency area.

[0220] The preset high-frequency noise template of the SLR camera may be a high-frequency noise template of the SLR camera obtained by implementing a method described above.

[0221] In the embodiment of the present application, considering that the scene of the image captured by the mobile phone may be different from the shooting scene of the noise template of the above-mentioned SLR camera, such as the shooting content and the light intensity of the shooting environment are different, after the mobile phone captures the image to be processed, it may not directly fuse the image to be processed with the noise template of the SLR camera, but adjust the noise template of the SLR camera based on the specific image situation of the image to be processed to obtain the adjusted noise template of the SLR camera, and the adjusted noise template of the SLR camera is more suitable for the image to be processed. Afterwards, the mobile phone can fuse the adjusted noise template of the SLR camera on the basis of the image to be processed to simulate the imaging effect of the SLR camera.

[0222] Exemplarily, for each first pixel in the high-frequency region, the mobile phone can first calculate the product between the high-frequency noise value corresponding to the position of the first pixel in the high-frequency noise template of the preset SLR camera and the adjustment weight corresponding to the first pixel, and obtain the adjusted high-frequency noise value corresponding to the position of the first pixel, that is, obtain the adjusted high-frequency noise value corresponding to the first pixel. The position of the first pixel indicates the position of the first pixel in the image to be processed. If a first pixel in the high-frequency region is the first pixel in the image to be processed, the position of the first pixel is the first pixel.

[0223] Afterwards, the mobile phone can calculate the pixel value of the first pixel and the adjusted high-frequency noise value corresponding to the first pixel, and obtain the fused pixel value of the first pixel, that is, the pixel value fused with the adjusted high-frequency noise value, thereby obtaining a superimposed high-frequency area. The superimposed high-frequency area fuses the high-frequency noise effect of the SLR camera, thereby realizing the simulation of the high-frequency noise of the SLR camera.

[0224] Specifically, when the mobile phone fuses the high-frequency area in the image to be processed with the high-frequency noise template of the preset SLR camera, the following formula 2 can be used for fusion for each first pixel point in the high-frequency image.

[0225] img_fusion=img_sub+T*noiseMap formula 2;

[0226] Wherein, the above img_sub represents the pixel value of the first pixel in the high-frequency area. T represents the adjustment weight corresponding to the first pixel. noiseMap represents the high-frequency noise value corresponding to the position of the first pixel (or described as the high-frequency noise value corresponding to the first pixel). The img_fusion represents the pixel value of the first pixel after fusion (i.e., superposition).

[0227] For example, the high-frequency area in the image to be processed includes pixel a. Pixel a is the first pixel in the image to be processed, and the adjustment weight corresponding to pixel a is the adjustment weight T1 corresponding to the first pixel in the image to be processed, and the high-frequency noise value corresponding to the position of pixel a is the high-frequency noise value noiseMap1 corresponding to the first pixel in the high-frequency noise template of the preset SLR camera. Accordingly, the fused pixel value of pixel a = pixel value of pixel a + T1*noiseMap1.

[0228] In some embodiments, the above T can be determined based on the target gain value adjustment coefficient, the brightness adjustment coefficient and the texture adjustment coefficient. Accordingly, the above formula 2 can actually be: img_fusion = img_sub + gain * light_map * texture_map * noiseMap. Wherein, the gain represents the gain value adjustment coefficient, the light_map represents the brightness adjustment coefficient corresponding to the first pixel point, and the texture_map represents the texture adjustment coefficient corresponding to the first pixel point.

[0229] It should be understood that the brightness adjustment coefficient corresponding to the first pixel is the brightness adjustment coefficient corresponding to the pixel in the image to be processed at the same position as the first pixel. For example, the brightness adjustment coefficient corresponding to the first pixel in the high-frequency image is the brightness adjustment coefficient corresponding to the first pixel in the image to be processed. Similarly, the texture adjustment coefficient corresponding to the first pixel is the texture adjustment coefficient corresponding to the pixel in the image to be processed at the same position as the first pixel. For example, the texture adjustment coefficient corresponding to the first pixel in the high-frequency image is the texture adjustment coefficient corresponding to the first pixel in the image to be processed.

[0230] The above-mentioned pixel position representation method is only an example, and the pixel position can also be a coordinate value, which is not limited in the present application.

[0231] In some embodiments, the mobile phone can also use the high-frequency image to fuse the high-frequency noise template of the SLR camera. For each pixel in the high-frequency image corresponding to the image to be processed, when the pixel value of the pixel is a first preset value (such as 0 or a value close to 0), it indicates that the pixel does not belong to the high-frequency area, and there is no need to superimpose the high-frequency noise template. The mobile phone can directly use 0 as the fused pixel value of the pixel.

[0232] When the pixel value of the pixel point is not the first preset value, it indicates that the pixel point belongs to the high-frequency area, and the pixel point needs to be superimposed with a high-frequency noise template. The mobile phone can determine the fused pixel value of the pixel point according to the above process of determining the fused pixel value of the first pixel point, thereby realizing the fusion of the high-frequency area in the image to be processed and the high-frequency noise template of the SLR camera.

[0233] S505. The mobile phone superimposes the target intermediate frequency noise template based on the pixel values ​​of each second pixel point in the intermediate frequency area to obtain a superimposed intermediate frequency area. The target intermediate frequency noise template is obtained by adjusting the intermediate frequency noise template of the preset SLR camera using the adjustment weights corresponding to each second pixel point in the intermediate frequency area.

[0234] Exemplarily, for each second pixel in the intermediate frequency region, the mobile phone can first calculate the product between the intermediate frequency noise value corresponding to the position of the second pixel in the intermediate frequency noise template of the preset SLR camera and the adjustment weight corresponding to the second pixel, and obtain the adjusted intermediate frequency noise value corresponding to the position of the second pixel, that is, obtain the adjusted intermediate frequency noise value corresponding to the second pixel. Wherein, the position of the second pixel represents the position of the second pixel in the image to be processed. If a second pixel in the intermediate frequency region is the third pixel in the image to be processed, then the position of the second pixel is the third pixel.

[0235] Afterwards, the mobile phone can calculate the pixel value of the second pixel and the adjusted intermediate frequency noise value corresponding to the second pixel to obtain the fused pixel value of the second pixel, that is, the pixel value fused with the adjusted intermediate frequency noise value, thereby obtaining a superimposed intermediate frequency area. The superimposed intermediate frequency area fuses the intermediate frequency noise effect of the SLR camera to simulate the imaging effect of the intermediate frequency noise of the SLR camera.

[0236] When the mobile phone fuses the intermediate frequency region in the image to be processed with the intermediate frequency noise template of the preset SLR camera, the above-mentioned formula 2 can be used to fuse each second pixel point in the intermediate frequency region.

[0237] In some embodiments, the mobile phone can also use the intermediate frequency image to fuse the intermediate frequency noise template of the SLR camera. For each pixel in the intermediate frequency image corresponding to the image to be processed, when the pixel value of the pixel is a second preset value (such as 0 or a value close to 0), it indicates that the pixel does not belong to the intermediate frequency area, and there is no need to superimpose the intermediate frequency noise template. The mobile phone can directly use 0 as the fused pixel value of the pixel.

[0238] When the pixel value of the pixel point is not the second preset value, it indicates that the pixel point belongs to the intermediate frequency area, and the intermediate frequency noise template needs to be superimposed on the pixel point. The mobile phone can determine the fused pixel value of the pixel point according to the above process of determining the fused pixel value of the second pixel point, thereby realizing the fusion of the intermediate frequency area in the image to be processed and the intermediate frequency noise template of the SLR camera.

[0239] S506: The mobile phone superimposes the target low-frequency noise template based on the pixel values ​​of each third pixel point in the low-frequency area to obtain a superimposed low-frequency area, wherein the target low-frequency noise template is obtained by adjusting the preset low-frequency noise template of the SLR camera using the adjustment weights corresponding to each third pixel point in the low-frequency area.

[0240] Exemplarily, for each third pixel in the low-frequency region, the mobile phone can first calculate the product between the low-frequency noise value corresponding to the position of the third pixel in the low-frequency noise template of the preset SLR camera and the adjustment weight corresponding to the third pixel, and obtain the adjusted low-frequency noise value corresponding to the position of the third pixel, that is, obtain the adjusted low-frequency noise value corresponding to the third pixel. The position of the third pixel indicates the position of the third pixel in the image to be processed. If a third pixel in the low-frequency region is the fifth pixel in the image to be processed, the position of the third pixel is the fifth pixel.

[0241] Afterwards, the mobile phone can calculate the pixel value of the third pixel and the adjusted low-frequency noise value corresponding to the third pixel, and obtain the fused pixel value of the third pixel, that is, the pixel value fused with the adjusted low-frequency noise value, thereby obtaining a superimposed low-frequency area, and the superimposed low-frequency area fuses the low-frequency noise effect of the SLR camera, thereby simulating the imaging effect of the low-frequency noise of the SLR camera.

[0242] When the mobile phone fuses the low-frequency area in the image to be processed with the low-frequency noise template of the preset SLR camera, the above-mentioned formula 2 can be used to fuse each third pixel point in the low-frequency area.

[0243] In some embodiments, the mobile phone can also use the above low-frequency image to fuse the low-frequency noise template of the SLR camera. For each pixel in the low-frequency image corresponding to the image to be processed, when the pixel value of the pixel is the third preset value, it indicates that the pixel does not belong to the low-frequency area, and there is no need to superimpose the low-frequency noise template. The mobile phone can directly use 0 as the fused pixel value of the pixel.

[0244] When the pixel value of the pixel point is not the third preset value, it indicates that the pixel point belongs to the low-frequency area, and the pixel point needs to be superimposed with a low-frequency noise template. The mobile phone can determine the fused pixel value of the pixel point according to the above process of determining the fused pixel value of the third pixel point, thereby realizing the fusion of the low-frequency area in the image to be processed and the low-frequency noise template of the SLR camera.

[0245] In some embodiments, the size of the preset SLR camera noise template (such as the high-frequency noise template, medium-frequency noise template, and low-frequency noise template of the preset SLR camera) and the image to be processed may be the same or different. In the case where the size of the preset SLR camera noise template is the same as that of the image to be processed, the mobile phone may use the SLR camera noise template for fusion. In the case where the size of the preset SLR camera noise template is smaller than the size of the image to be processed, the mobile phone may upsample the preset SLR camera noise template to obtain a preset SLR camera noise template of the same size as the image to be processed.

[0246] When the size of the preset SLR camera noise template is larger than the size of the image to be processed, the mobile phone can downsample or crop the preset SLR camera noise template to obtain a preset SLR camera noise template of the same size as the image to be processed.

[0247] S507: The mobile phone fuses the superimposed high-frequency region, the superimposed medium-frequency region, and the superimposed low-frequency region to obtain a target image.

[0248] Exemplarily, after obtaining the superimposed high-frequency region, the superimposed medium-frequency region, and the superimposed low-frequency region, the mobile phone can splice them to obtain a complete image, i.e., a target image, in which the high-frequency region of the target image incorporates the high-frequency noise effect of the adjusted SLR camera, the medium-frequency region of the target image incorporates the medium-frequency noise characteristics of the adjusted SLR camera, and the low-frequency region of the target image incorporates the low-frequency noise characteristics of the adjusted SLR camera. This is equivalent to adding a high-frequency noise mask image of the SLR camera to the high-frequency region of the image to be processed, adding a medium-frequency noise mask image of the SLR camera to the medium-frequency region of the image to be processed, and adding a low-frequency noise mask image of the SLR camera to the low-frequency region of the image to be processed, thereby realizing the simulation of the noise characteristics of different frequencies of the SLR camera, that is, realizing the simulation of the imaging effect of the SLR camera, so that the image taken by the mobile phone has a texture similar to that of the SLR camera. Moreover, the mobile phone does not fuse the noise templates of different frequencies of the SLR camera, but uses the adjusted SLR camera noise template that is more suitable for the image to be processed for fusion, so the fusion effect is better, making the transition between different areas of the target image more natural, with stronger sense of layering and three-dimensionality, thereby effectively improving the image quality and enhancing the user's viewing experience.

[0249] It should be understood that when a pixel point in the target image belongs to a high-frequency region, the pixel value of the pixel point is the fused pixel value of the first pixel point corresponding to the position of the pixel point. The position of the pixel point represents the position of the pixel point on the target image, that is, the position on the image to be processed.

[0250] When a pixel point in the target image belongs to the intermediate frequency region, the pixel value of the pixel point is the fused pixel value of the second pixel point corresponding to the position of the pixel point.

[0251] When a pixel point in the target image belongs to a low-frequency region, the pixel value of the pixel point is a fused pixel value of a third pixel point corresponding to the position of the pixel point.

[0252] In some embodiments, Figure 7As shown, after shooting the image to be processed, the mobile phone can use a preset noise reduction algorithm to perform noise reduction on the image to be processed to obtain a noise-reduced image. In order to avoid problems such as smearing and poor layering in the noise-reduced image due to image noise reduction, the mobile phone can divide the noise-reduced image to obtain a high-frequency area, a medium-frequency area and a low-frequency area in the noise-reduced image. Afterwards, the mobile phone can superimpose the high-frequency noise template of the SLR camera on the high-frequency area, superimpose the medium-frequency noise template of the SLR camera on the medium-frequency area, and superimpose the low-frequency noise template of the SLR camera on the low-frequency area, so as to achieve the superposition (i.e. fusion) of noise templates of different frequencies of the SLR camera, so that the high-frequency area in the image to be processed has the high-frequency noise characteristics of the SLR camera, the medium-frequency area has the medium-frequency noise characteristics of the SLR camera, and the low-frequency area has the low-frequency noise characteristics of the SLR camera, so as to ensure the fusion effect of the image. Afterwards, the mobile phone can fuse the superimposed high-frequency area, the superimposed medium-frequency area and the superimposed low-frequency area to obtain a target image with the noise characteristics of a SLR camera, thereby successfully simulating the imaging effect of a SLR camera, improving the image quality of images taken by the mobile phone, and thus improving the user's viewing experience.

[0253] In this embodiment, optionally, in order to improve the image fusion effect, the mobile phone can determine the adjustment weights corresponding to each pixel in the denoised image based on the image information of the image to be processed or the image information of the denoised image taken by the mobile phone. Afterwards, the mobile phone can use the adjustment weights corresponding to each pixel to adjust the high-frequency noise template, the intermediate-frequency noise template and the low-frequency noise template of the SLR camera, so that the adjusted high-frequency noise template, the intermediate-frequency noise template and the low-frequency noise template of the SLR camera are more suitable for the image. Afterwards, the mobile phone can superimpose the high-frequency noise template of the SLR camera after the high-frequency area, superimpose the intermediate-frequency noise template of the SLR camera after the intermediate-frequency area, and superimpose the low-frequency noise template of the SLR camera after the low-frequency area. Afterwards, the mobile phone can fuse the superimposed high-frequency area, the superimposed intermediate-frequency area and the superimposed low-frequency area to obtain a target image with the noise characteristics of the SLR camera, realize the simulation of the imaging effect of the SLR camera, and make the image content transition more natural, with a stronger sense of hierarchy, to ensure image quality.

[0254] Among them, the mobile phone determines the adjustment weights corresponding to each pixel in the denoised image based on the image information of the image to be processed, which can refer to the process in which the mobile phone uses the image information of the image to be processed to determine the adjustment weights corresponding to each pixel in the image to be processed. Alternatively, the mobile phone determines the adjustment weights corresponding to each pixel in the denoised image based on the image information of the denoised image, which can refer to the process in which the mobile phone uses the image information of the image to be processed to determine the adjustment weights corresponding to each pixel in the image to be processed, which will not be repeated here.

[0255] The above describes a process in which, after shooting an image to be processed, the mobile phone divides the image to be processed into three frequency regions, and for each frequency region, superimposes a noise template of the corresponding frequency of a preset SLR camera, such as superimposing the high-frequency noise template of the preset SLR camera on the high-frequency region of the image to be processed, superimposing the medium-frequency noise template of the preset SLR camera on the medium-frequency region of the image to be processed, and superimposing the low-frequency noise template of the preset SLR camera on the low-frequency region of the image to be processed.

[0256] Of course, the mobile phone can also determine a partial frequency region in the image to be processed, and then the mobile phone can superimpose a noise template of a corresponding frequency of a preset SLR camera on the partial frequency region.

[0257] In one example, the mobile phone can superimpose two frequency regions with a noise template of a corresponding frequency of a preset SLR camera. For example, the mobile phone can determine the high-frequency region and the medium-frequency region in the image to be processed. The mobile phone can use information based on the image to be processed to determine the adjustment weights corresponding to each pixel in the high-frequency region and the medium-frequency region. The mobile phone superimposes the target high-frequency noise template based on the pixel value of each first pixel in the high-frequency region to obtain a superimposed high-frequency region. The mobile phone superimposes the target medium-frequency noise template based on the pixel value of each first pixel in the medium-frequency region to obtain a superimposed medium-frequency region. Afterwards, the mobile phone can fuse the superimposed high-frequency region, the superimposed medium-frequency region, and the region other than the high-frequency region and the medium-frequency region in the image to be processed to obtain a target image.

[0258] In another example, the mobile phone can superimpose a noise template of a corresponding frequency of a preset SLR camera on a frequency region. For example, the mobile phone can determine the high-frequency region in the image to be processed. The mobile phone can use information based on the image to be processed to determine the adjustment weights corresponding to each pixel in the high-frequency region. The mobile phone superimposes the target high-frequency noise template based on the pixel values ​​of each first pixel in the high-frequency region to obtain the superimposed high-frequency region. Afterwards, the mobile phone can fuse the superimposed high-frequency region with the region other than the high-frequency region in the image to be processed to obtain the target image.

[0259] In some embodiments, the mobile phone can also divide the image to be processed taken by the mobile phone into two frequency regions, that is, the image to be processed is composed of two frequency regions. For example, the mobile phone can divide the image to be processed into a high-frequency region and a low-frequency region, and a pixel in the image to be processed belongs to either the high-frequency region or the low-frequency region. Correspondingly, the noise template of the preset SLR camera can also include a high-frequency noise template of the preset SLR camera and a low-frequency noise template of the preset SLR camera. The mobile phone can superimpose the high-frequency noise template of the preset SLR camera on the high-frequency region, and superimpose the low-frequency noise template of the preset SLR camera on the low-frequency region. Afterwards, the mobile phone can fuse the superimposed high-frequency noise template and low-frequency noise template to obtain the target image.

[0260] It can be seen that in actual applications, the mobile phone can divide the image according to actual needs to obtain regions of different frequencies. And the mobile phone can superimpose the noise template of all or part of the frequencies of the preset SLR camera. In other words, after the mobile phone shoots the image to be processed, it can determine the first frequency region in the image to be processed. Among them, the first frequency region includes a high-frequency region and / or a non-high-frequency region, and the non-high-frequency region may include a medium-frequency region and / or a low-frequency region.

[0261] The mobile phone can determine the adjustment weights corresponding to each pixel in the first frequency region based on the image information of the image to be processed. Afterwards, for each first frequency region, the mobile phone can superimpose the target frequency noise template based on the pixel values ​​of each pixel in the first frequency region to obtain the superimposed first frequency region. The target frequency noise template is obtained by adjusting the first frequency noise template of the preset SLR camera using the adjustment weights corresponding to each pixel in the first frequency region, and the frequency corresponding to the first frequency noise template is the same as the frequency corresponding to the first frequency region. If the first frequency region is a high-frequency region, the first frequency noise template is a high-frequency noise template.

[0262] Afterwards, when all the first frequency regions indicate a complete image, the mobile phone can fuse the superimposed first frequency regions to obtain a target image.

[0263] In the case where all first frequency regions indicate partial images, the mobile phone fuses the first frequency regions and non-first frequency regions to obtain a target image.

[0264] In some embodiments, the present application provides a computer-readable storage medium, including computer instructions, which, when executed on an electronic device, enable the electronic device to perform the image processing method as described above.

[0265] In some embodiments, the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute the image processing method as described above.

[0266] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

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

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

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

[0270] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0271] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. An image processing method, characterized in that: include: The electronic device determines a first frequency region in the image to be processed; the first frequency region includes a high frequency region and / or a non-high frequency region; the non-high frequency region includes a low frequency region and / or a medium frequency region; The electronic device determines, based on image information of the image to be processed, an adjustment weight corresponding to a pixel in the image to be processed, wherein the adjustment weight corresponding to the pixel represents a noise degree superimposed on the pixel; the image information includes the sensitivity of the image to be processed, the pixel value of the pixel in the image to be processed, and information of a target area of ​​the image to be processed; The adjustment weight corresponding to the pixel point in the to-be-processed image is determined based on at least one of a target gain value adjustment coefficient, a brightness adjustment coefficient corresponding to the pixel point, and a texture adjustment coefficient corresponding to the pixel point; The target gain value adjustment coefficient is a gain value adjustment coefficient corresponding to a first preset sensitivity range to which the sensitivity of the image to be processed belongs; the brightness adjustment coefficient corresponding to the pixel point is determined based on the pixel value of the pixel point; the texture adjustment coefficient corresponding to the pixel point is determined based on information of the target area; the target area includes at least one of a texture area, a semantic area, a high-frequency area, and a medium-frequency area; The texture adjustment coefficient corresponding to the pixel point is a preset texture adjustment coefficient corresponding to the area where the pixel point is located; or, the texture adjustment coefficient corresponding to the pixel point is a preset texture adjustment coefficient corresponding to a preset sensitivity range corresponding to the area where the pixel point is located to which the sensitivity belongs; the area where the pixel point is located is a target area or a non-target area; for each first frequency area, the electronic device superimposes a target frequency noise template based on the pixel value of the pixel point in the first frequency area to obtain the superimposed first frequency area, and the target frequency noise template is obtained by adjusting the first frequency noise template of a preset SLR camera using the adjustment weight corresponding to the pixel point in the first frequency area; the first frequency noise template has the same frequency as that corresponding to the first frequency area; The electronic device fuses the superimposed first frequency regions to obtain a target image.

2. The method according to claim 1, characterized in that The brightness adjustment coefficient corresponding to the pixel point is calculated by the electronic device using the following formula 1: Among them, light_map represents the brightness adjustment coefficient corresponding to the pixel point; gray_img represents the pixel value of the pixel point; A represents the preset pixel value.

3. The method according to claim 1, characterized in that The texture adjustment coefficient corresponding to the pixel point is a preset texture adjustment coefficient corresponding to the area where the pixel point is located, including: when the pixel point is in the target area, the texture adjustment coefficient corresponding to the pixel point is a first preset texture adjustment coefficient; When the pixel point is in a non-target area, the texture adjustment coefficient corresponding to the pixel point is a second preset texture adjustment coefficient; the non-target area is an area in the image to be processed other than the target area; wherein the second preset texture adjustment coefficient is smaller than the first preset texture adjustment coefficient.

4. The method according to claim 1, characterized in that The texture adjustment coefficient corresponding to the pixel point is a preset texture adjustment coefficient corresponding to a preset sensitivity range corresponding to the area where the sensitivity is located, including: when the pixel point is in the target area, the texture adjustment coefficient corresponding to the pixel point is a preset texture adjustment coefficient corresponding to a second preset sensitivity range to which the sensitivity belongs; In a case where the pixel point is in a non-target area, the texture adjustment coefficient corresponding to the pixel point is a preset texture adjustment coefficient corresponding to a third preset sensitivity range to which the sensitivity belongs.

5. The method according to any one of claims 1 to 4, characterized in that The adjustment weight corresponding to the pixel point is the product of the target gain value adjustment coefficient, the brightness adjustment coefficient corresponding to the pixel point, and the texture adjustment coefficient corresponding to the pixel point.

6. The method according to any one of claims 1 to 4, characterized in that The electronic device superimposes a target frequency noise template based on pixel values ​​of pixel points in the first frequency region to obtain the superimposed first frequency region, including: For each pixel point in the first frequency region, the electronic device uses formula 2 img_fusion=img_sub+T*noiseMap formula 2; Calculate the pixel values ​​of the superimposed pixels; Wherein, img_fusion represents the pixel value after superposition of the pixel point; img_sub represents the pixel value of the pixel point, T represents the adjustment weight corresponding to the pixel point, noiseMap represents the noise value corresponding to the position of the pixel point in the first frequency noise template; the position of the pixel point represents the position of the pixel point on the image to be processed; The pixel value of the pixel point in the first frequency region after the superposition is the pixel value of the pixel point after the superposition.

7. The method according to any one of claims 1 to 4, characterized in that The first frequency region includes the high frequency region and the non-high frequency region, and the non-high frequency region includes the low frequency region and the medium frequency region; For each first frequency region, the electronic device superimposes a target frequency noise template based on pixel values ​​of pixels in the first frequency region to obtain the superimposed first frequency region, including: The electronic device superimposes a target high-frequency noise template based on the pixel values ​​of each first pixel point in the high-frequency area to obtain a superimposed high-frequency area; wherein the target high-frequency noise template is obtained by adjusting a high-frequency noise template of a preset SLR camera using adjustment weights corresponding to each first pixel point in the high-frequency area; The electronic device superimposes a target intermediate frequency noise template based on the pixel values ​​of each second pixel point in the intermediate frequency area to obtain a superimposed intermediate frequency area; wherein the target intermediate frequency noise template is obtained by adjusting the intermediate frequency noise template of a preset SLR camera using the adjustment weights corresponding to each second pixel point in the intermediate frequency area; The electronic device superimposes a target low-frequency noise template based on the pixel values ​​of each third pixel point in the low-frequency area to obtain a superimposed low-frequency area; wherein the target low-frequency noise template is obtained by adjusting a low-frequency noise template of a preset SLR camera using adjustment weights corresponding to each third pixel point in the low-frequency area.

8. The method according to claim 7, characterized in that The preset low-frequency noise template of the SLR camera includes a plurality of low-frequency noise values; the low-frequency noise value is determined by the following formula 3: noiseMap = noise – np.mean(noise) Formula 3 Among them, noise represents the pixel value of the pixel point in the gray card image corresponding to the preset high light intensity, np.mean(noise) represents the average value of the grayscale values ​​of all pixels in the gray card image corresponding to the preset high light intensity, and noiseMap represents the low-frequency noise value corresponding to the position of the pixel point in the gray card image corresponding to the preset high light intensity.

9. The method according to any one of claims 1 to 4, characterized in that The electronic device determines a first frequency region in an image to be processed, including: The electronic device performs noise reduction processing on the image to be processed; The electronic device determines a first frequency region in the noise-reduced image.

10. An electronic device, characterized in that: The electronic device includes a display screen, a camera, a memory and one or more processors; the display screen, the camera, the memory and the processor are coupled; the camera is used to capture images, the display screen is used to display images generated by the processor and images captured by the camera, and the memory is used to store computer program codes, and the computer program codes include computer instructions; when the processor executes the computer instructions, the electronic device executes the image processing method as described in any one of claims 1 to 9.

11. A computer-readable storage medium, characterized in that: The method comprises computer instructions, which, when executed on an electronic device, enable the electronic device to execute the image processing method according to any one of claims 1 to 9.