Image processing method, medium and electronic device

Contrast, clarity and edge enhancement processing of macro-shot images through portable mobile devices solves the problem of poor video quality in macro shooting and achieves higher image clarity and applicability.

CN113808038BActive Publication Date: 2024-09-17FUZHOU ROCKCHIP SEMICON
View PDF 13 Cites 0 Cited by

Patent Information

Application Number
CN202111051444.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-08
Publication Date
2024-09-17
Estimated Expiration
2041-09-08

AI Technical Summary

Technical Problem

The quality of high-magnification digital zoom videos shot at macro range in the existing technology is poor and suffers from problems such as defocus, dispersion, blur, over-darkness, over-brightness and noise, resulting in the inability to accurately distinguish small targets such as animal and plant cells.

Method used

Portable mobile devices are used to acquire target images through low-resolution sensors for contrast enhancement, sharpness enhancement and edge enhancement processing, including image block processing, local histogram analysis, mapping function acquisition, contrast limiting, brightness channel filtering and Techniques such as color channel peaking and merging.

Benefits of technology

Significantly improves the clarity of the image, taking into account contrast, sharpness and edge factors, it is suitable for target images in various scenes and contents, avoiding the limitations of single-factor enhancement solutions and achieving better clarity improvement effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113808038B
    Figure CN113808038B
Patent Text Reader

Abstract

The present invention provides an image processing method, a medium and an electronic device, wherein the image processing method comprises: acquiring a target image; performing contrast enhancement processing on the target image according to scene information of the target image; performing clarity enhancement processing on the target image according to local content information of the target image; and performing edge enhancement processing on the target image according to local content information of the target image. The image processing method can effectively improve the clarity of the target image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and in particular to an image processing method, a medium and an electronic device. Background Art

[0002] Large digital zoom videos are usually obtained by capturing tiny targets at a macro distance using acquisition equipment. In this process, the acquisition equipment used is mostly low-power platforms and low-resolution sensors. The tiny targets that need to be captured include animal and plant cells, hair, etc. At present, high-magnification digital zoom videos captured at a macro distance are mainly completed by high-magnification macro optical zoom lenses. Due to the cost of optical lenses, there will be problems such as out-of-focus and dispersion during the macro shooting process, which will result in poor quality of the high-magnification digital videos finally obtained, and thus it is impossible to accurately and clearly see tiny targets such as animal and plant cells and hair.

[0003] In addition, big data zoom videos are composed of multiple frames of images with a large magnification factor, which results in the images collected after digital zoom magnification being usually blurry, and the effective scene content range of the images is small, which makes the image contrast weaker. At the same time, differences in shooting conditions such as lighting and humidity in the shooting scene will also cause the final image to be too dark, too bright, blurry, noisy, and many other problems. In extreme cases, it may even make it impossible to distinguish useful information from the image. Therefore, how to improve the clarity of digital zoom video images has become one of the technical problems that technicians in related fields need to solve urgently. Summary of the invention

[0004] In view of the above-mentioned shortcomings of the prior art, an object of the present invention is to provide an image processing method, a medium and an electronic device for solving the above-mentioned related problems existing in the prior art.

[0005] To achieve the above-mentioned purpose and other related purposes, the first aspect of the present invention provides an image processing method, which includes: using a portable mobile device to acquire a target image through a low-resolution sensor; performing contrast enhancement processing on the target image according to scene information of the target image; performing clarity enhancement processing on the target image according to local content information of the target image; and performing edge enhancement processing on the target image according to the local content information of the target image.

[0006] In an embodiment of the first aspect, a method for implementing contrast enhancement processing on the target image according to the scene information of the target image includes: dividing the target image into multiple blocks; performing contrast enhancement on each block according to the scene information of each block; obtaining a local histogram of each block; obtaining a mapping function corresponding to each block; obtaining a mapping function corresponding to the target image according to the mapping function corresponding to each block; and processing the target image according to the mapping function corresponding to the target image to achieve contrast enhancement of each block.

[0007] In an embodiment of the first aspect, the implementation method of obtaining the mapping function corresponding to the target image according to the mapping functions corresponding to each of the blocks includes: obtaining the mapping values ​​corresponding to multiple pixel points in the target image according to the mapping functions corresponding to the blocks to which the pixel points belong and the adjacent blocks; obtaining the mapping function corresponding to the target image according to the mapping values ​​corresponding to multiple pixel points in the target image.

[0008] In an embodiment of the first aspect, before obtaining the mapping function corresponding to each of the blocks, the image processing method further includes: performing contrast limiting processing on each of the blocks according to a contrast threshold.

[0009] In an embodiment of the first aspect, a method for implementing contrast enhancement on each of the blocks includes: obtaining a content flatness of each of the blocks based on scene information of each of the blocks; obtaining a contrast enhancement coefficient of each of the blocks based on the content flatness; and performing contrast enhancement on each of the blocks based on the contrast enhancement coefficient.

[0010] In an embodiment of the first aspect, a method for implementing clarity enhancement processing on the target image according to local content information of the target image includes: obtaining first edge information of the target image, where the first edge information is used to reflect the main structure of the target image; obtaining second edge information of the target image, where the second edge information is used to reflect the details of the target image; and fusing the first edge information, the second edge information, and the target image according to the local content information of the target image.

[0011] In an embodiment of the first aspect, a method for implementing edge enhancement processing on the target image according to local content information of the target image includes: filtering and denoising the brightness channel of the target image, and fusing the denoised image with the brightness channel of the target image to obtain an intermediate image; filtering the color channels of the intermediate image and the target image, and peaking and merging the filtering results of the two with the color channels of the intermediate image and the target image.

[0012] In an embodiment of the first aspect, the method for filtering the brightness channel of the target image includes: performing low-pass filtering and band-pass filtering on the brightness channel of the target image, and fusing the results of the low-pass filtering and the band-pass filtering; and / or the method for denoising the brightness channel of the target image includes: performing kernelization denoising on the brightness channel of the target image.

[0013] In an embodiment of the first aspect, a method for filtering the color channels of the intermediate image and the target image, and peaking and merging the filtering results of the two with the color channels of the intermediate image and the target image includes: performing bandpass filtering and high-pass filtering on the intermediate image and superimposing the filtering results on the intermediate image; performing bandpass filtering and high-pass filtering on the color channels of the target image and superimposing the filtering results on the color channels of the target image; performing maximum and minimum value filtering on the color channels of the intermediate image and the target image, and fusing the filtering results of the two.

[0014] A second aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the image processing method described in any one of the first aspects of the present invention.

[0015] The third aspect of the present invention provides an electronic device, comprising: a memory on which a computer program is stored; and a processor, communicatively connected to the memory, for implementing the image processing method described in any one of the first aspects of the present invention when calling the computer program.

[0016] As described above, the image processing method described in one or more embodiments of the present invention has the following beneficial effects:

[0017] The image processing method improves the clarity of the target image by performing contrast enhancement processing, clarity enhancement processing and edge enhancement processing on the target image. In this process, the three factors of contrast, clarity and edge are comprehensively considered. Compared with the clarity enhancement scheme in the related art that only considers a single factor, the image processing method can achieve better clarity enhancement effect.

[0018] In addition, the image processing method can perform contrast enhancement processing on the target image according to the scene information of the target image, and perform clarity enhancement and edge enhancement processing on the target image according to the local content information of the target image. Therefore, the image processing method can adaptively process the target image according to the image content. Therefore, the target image processing method can be applied to target images of various scenes and contents and has good applicability. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1Shown is a flow chart of an image processing method according to a specific embodiment of the present invention.

[0020] Figure 2A FIG. 4 is a detailed flow chart of step S12 of the image processing method of the present invention in a specific embodiment.

[0021] Figure 2B FIG. 4 is a detailed flow chart of step S122 of the image processing method of the present invention in a specific embodiment.

[0022] Figure 2C FIG. 4 is a detailed flow chart of step S125 of the image processing method of the present invention in a specific embodiment.

[0023] Figure 3 FIG. 4 is a detailed flow chart of step S12 of the image processing method of the present invention in a specific embodiment.

[0024] Figure 4 FIG. 4 is a detailed flow chart of step S13 of the image processing method of the present invention in a specific embodiment.

[0025] Figure 5A FIG. 4 is a detailed flow chart of step S14 of the image processing method of the present invention in a specific embodiment.

[0026] Figure 5B FIG. 4 is a detailed flowchart of step S142 of the image processing method of the present invention in a specific embodiment.

[0027] Fig. 6A Shown is a flow chart of an image processing method according to a specific embodiment of the present invention.

[0028] Figure 6B Shown is an example of an image obtained in the related art.

[0029] Figure 6C Shown is an example of an image obtained by using the image processing method described in this embodiment.

[0030] Figure 7 Shown is a schematic structural diagram of the electronic device of the present invention in a specific embodiment.

[0031] Component number description

[0032] 700 Electronic equipment

[0033] 710 Memory

[0034] 720 processor

[0035] 730 Display

[0036] Steps S11 to S14

[0037] Steps S121 to S126

[0038] Steps S1221 to S1223

[0039] Steps S1251~S1252

[0040] Steps S31 to S33

[0041] Steps S131 to S133

[0042] Steps S141 to S142

[0043] Steps S1421 to S1423

[0044] Steps S601 to S613 DETAILED DESCRIPTION

[0045] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0046] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention. The illustrations only show the components related to the present invention rather than the number, shape and size of the components in actual implementation. The type, quantity and proportion of each component in actual implementation may be changed at will, and the component layout type may also be more complicated. In addition, in this article, relational terms such as "first", "second", etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0047] See also Figure 1 In one embodiment of the present invention, an image processing method is provided, the image processing method comprising:

[0048] S11, using a portable mobile device to obtain a target image through a low-resolution sensor, wherein the target image is, for example, a digital zoom video frame image. The resolution of the sensor can be determined according to actual user needs. For example, if the clarity of the target image obtained by the sensor cannot meet the user's needs, the sensor can be considered to be a low-resolution sensor.

[0049] S12, performing contrast enhancement processing on the target image according to scene information of the target image, wherein the scene information of the target image is, for example, environmental brightness, indoor and outdoor, whether it contains special targets (such as faces), etc., and this information can be obtained by preprocessing the target image.

[0050] S13, performing definition enhancement processing on the target image according to local content information of the target image, wherein the local content information is, for example, local contrast information, edge information, neighborhood related information, etc., which can be obtained by preprocessing the target image.

[0051] S14, edge enhancement processing is performed on the target image according to the local content information of the target image. The edge refers to the intersection of the image area and another attribute area in the target image, which is the place where the regional attributes suddenly change and where the image information is relatively concentrated. Edge enhancement processing of the target image can effectively improve the image details. When the target image is a frame image in a digital zoom video, edge enhancement processing of the target image can obtain the image details lost due to magnification, so that the processed video has a better visual effect.

[0052] Preferably, the above steps S12, S13 and S14 are performed sequentially, that is, the target image is first subjected to contrast enhancement processing to obtain a first image, the first image is then subjected to clarity enhancement processing to obtain a second image, and the second image is then subjected to edge enhancement processing to obtain a third image. This method can avoid problems such as excessive unevenness in certain strong edge areas, weakened enhanced edge information in flat areas, stronger enhanced edge information in texture areas, and poor overall clarity consistency. It should be noted that the above steps S12, S13 and S14 are performed sequentially, which is only a preferred implementation of the image processing method of the present invention. In addition, the user can also adjust the execution order of the above steps S12, S13 and S14 according to actual needs, and the present invention does not limit this.

[0053] According to the above description, the present embodiment provides an image processing method, which improves the clarity of the image by performing contrast enhancement processing, clarity enhancement processing and edge enhancement processing on the target image. In this process, the three factors of contrast, clarity and edge are comprehensively considered. Compared with the clarity enhancement scheme in the related art that only considers a single factor (for example, only considers contrast, clarity or edge), the image processing method described in the present embodiment can achieve better clarity enhancement effect.

[0054] In addition, the image processing method described in this embodiment can perform contrast enhancement processing on the target image according to the scene information of the target image, and perform clarity enhancement and edge enhancement processing on the target image according to the local content information of the target image. Therefore, the image processing method can adaptively process the target image according to the image content. Therefore, the target image processing method can be applied to target images of various contents in various scenes and has good applicability.

[0055] See also Figure 2A In one embodiment of the present invention, a method for implementing contrast enhancement processing on the target image according to the scene information of the target image includes:

[0056] S121, dividing the target image into a plurality of blocks, wherein the division may be a real division, for example, dividing the target image into a plurality of blocks by using image segmentation technology; or, the division may be a virtual division, for example, not segmenting the target image but only dividing the target image into a plurality of regions, each region corresponding to a block.

[0057] Optionally, step S121 may divide the target image according to the resolution so that the size of each block is within a preset range, thereby ensuring that the effect of local contrast enhancement is moderate. Specifically, when the resolution of the target image is relatively large, the number of blocks obtained after dividing the target image in step S121 is relatively large, and when the resolution of the target image is relatively low, the number of blocks obtained after dividing the target image in step S122 is relatively small.

[0058] S122, obtaining a local histogram of each of the blocks, wherein the local histogram of the block is used to represent the brightness distribution in the block, and the number of pixels of each brightness value in the block is plotted.

[0059] S123, obtaining a mapping function corresponding to each of the blocks. The mapping function corresponding to the blocks can be represented by a mapping curve corresponding to the blocks (for example, a cumulative histogram curve). The mapping function corresponding to each block is a local mapping function.

[0060] S124, obtaining a mapping function corresponding to the target image according to the mapping functions corresponding to the blocks, wherein the mapping function corresponding to the target image can be represented by a mapping curve corresponding to the target image.

[0061] S125, processing the target image according to the mapping function corresponding to the target image to achieve contrast enhancement of each of the blocks, thereby obtaining the target image after contrast enhancement processing. For example, each pixel in the target image may be processed using the mapping function corresponding to the target image, and the processed pixels may be merged together to obtain the target image after contrast enhancement processing.

[0062] Optionally, see Figure 2B In this embodiment, a method for implementing contrast enhancement on the blocks includes:

[0063] S1251, obtaining the content flatness of each block according to the scene information of each block, wherein the content flatness can be described by content flatness, and the content flatness can also be obtained according to the complexity of the scene content of the block. Generally, the simpler the scene content of the block, the lower its content flatness, and vice versa, the higher its content flatness.

[0064] S1252, obtaining a contrast enhancement coefficient for each of the blocks according to the flatness of the content, wherein the flatness of the content is positively correlated with the contrast enhancement coefficient. For example, when the scene content of the block is relatively flat, the contrast enhancement coefficient can be configured to a smaller value so that the contrast of the block will not be excessively enhanced and affect the final effect; when the scene content of the block is relatively complex, the contrast enhancement coefficient can be configured to a larger value so as to enhance the contrast of the block.

[0065] S1253: Perform contrast enhancement on each of the blocks according to the contrast enhancement coefficient obtained in step S1252.

[0066] Optionally, see Figure 2C A method for obtaining the mapping function corresponding to the target image according to the mapping functions corresponding to each of the blocks includes:

[0067] S1241, obtaining mapping values ​​corresponding to multiple pixels in the target image according to the mapping functions corresponding to the blocks to which the pixels belong and the adjacent blocks. For any pixel a in the target image, the block to which the pixel a belongs refers to the block A containing the pixel a, the adjacent blocks of the pixel a refer to the adjacent blocks of the block A, and the number of adjacent blocks of the pixel a may be one or more. Specifically, the first mapping value of the pixel a can be obtained by processing the pixel a using the mapping function corresponding to the block A to which the pixel a belongs, and one or more second mapping values ​​of the pixel a can be obtained by processing the pixel a using the mapping function corresponding to the adjacent blocks of the pixel a. The mapping value corresponding to the pixel a can be obtained by merging the first mapping value and the second mapping value. For example, the first mapping value and each of the second mapping values ​​can be merged in a weighted fusion manner to obtain the mapping value corresponding to the pixel a.

[0068] Optionally, step S1241 may obtain a mapping value corresponding to each pixel point in the target image.

[0069] S1242, acquiring a mapping function corresponding to the target image according to mapping values ​​corresponding to a plurality of pixel points in the target image. For example, fitting may be performed according to mapping values ​​corresponding to a plurality of pixel points in the target image to obtain a mapping function corresponding to the target image.

[0070] Optionally, in this embodiment, before obtaining the mapping function corresponding to each of the blocks, the image processing method also includes: performing contrast limiting processing on each of the blocks according to a contrast threshold value, so as to make the local histogram of each of the blocks smoother, thereby overcoming the problem of over-amplification of noise.

[0071] According to the above description, the image processing method described in this embodiment can be configured to perform adaptive image division on the target image according to the image resolution and scene content, calculate the local histogram and obtain the local histogram after limiting by limiting, and generate the mapping curve of the whole image by merging. This method can retain local detail information and effectively suppress noise amplification, and can limit the local contrast to prevent the problem of local over-enhancement.

[0072] See also Figure 3 In one embodiment of the present invention, a method for implementing contrast enhancement processing on the target image according to the scene information of the target image includes:

[0073] S31, acquiring the content flatness of the target image according to the scene information of the target image.

[0074] S32, acquiring a contrast enhancement coefficient of the target image according to the flatness of the content, wherein the flatter the content of the target image is, the smaller the contrast enhancement coefficient is, and vice versa, the larger the contrast enhancement coefficient is.

[0075] S33: performing contrast enhancement on the target image according to the contrast enhancement coefficient of the target image.

[0076] See also Figure 4 In one embodiment of the present invention, a method for implementing definition enhancement processing on the target image according to the local content information of the target image includes:

[0077] S131, obtaining first edge information of the target image, where the first edge information is used to reflect the main structure of the target image. Compared with the second edge information, the first edge information can be regarded as strong edge information.

[0078] Optionally, step S131 may utilize a Laplace filter to process a strong edge region in the target image to obtain the first edge information, wherein the strong edge region refers to a region with a larger gradient in the target image.

[0079] Preferably, before obtaining the first edge information of the target image, step S131 may also use a smoothing filter to process the strong edge region in the target image to remove fine noise in the image, thereby obtaining cleaner first edge information.

[0080] S132: Acquire second edge information of the target image, where the second edge information is used to reflect details of the target image. Compared with the first edge information, the second edge information can be regarded as weak edge information.

[0081] Optionally, step S132 may use a local edge-preserving filter to process a weak edge region in the target image to obtain the second edge information, wherein the weak edge region refers to a region with a smaller gradient in the target image. For example, a guided filter may be used to obtain the second edge information, and in this case, the target image after the guided filtering and the target image before the guided filtering may be differentially processed to obtain the second edge information.

[0082] S133, fusing the first edge information, the second edge information, and the target image according to the local content information of the target image. Specifically, the corresponding configuration in the fusion can be determined according to the local content information of the target image, and the first edge information, the second edge information, and the target image are fused according to the configuration. The configuration determined according to the local content information of the target image includes: determining whether the edge needs to be enhanced and the degree of enhancement, etc. Specifically, a threshold value can be used to perform kernel processing on the edge, and edges greater than the threshold value are enhanced, while edges less than the threshold value are not enhanced. In addition, the local content extracted by the filter also needs to be enhanced.

[0083] Preferably, the implementation method of step S133 includes: obtaining a gradient map of the target image, and fusing the first edge information, the second edge information, and the target image according to the local content information of the target image and the gradient map. Specifically, a corresponding configuration in the fusion can be determined according to the gradient map of the target image and the local content information, and the first edge information, the second edge information, and the target image can be fused according to the configuration.

[0084] According to the above description, in this embodiment, the image processing method can be configured to achieve the purpose of sharpening the image, improving the image clarity and retaining the image details by integrating a content-adaptive local edge-preserving filter group. Among them, the Laplacian filter and the smoothing filter can be used together to extract the strong edge information for the strong edge area of ​​the image, and the local edge-preserving filter can be used to extract the weak edge information of the image, and finally the strong edge information, the weak edge information and the target image are fused based on the local content information and the gradient map of the target image.

[0085] See also Figure 5A In one embodiment of the present invention, a method for implementing edge enhancement processing on the target image according to local content information of the target image includes:

[0086] S141, filtering and denoising the brightness channel of the target image, and fusing the image after denoising with the brightness channel of the target image to obtain an intermediate image, where the brightness channel may be the Y channel of the target image. Specifically, the intermediate image may be obtained by superimposing the image after denoising with the brightness channel of the target image.

[0087] Optionally, the method for implementing filtering the brightness channel of the target image in step S141 includes: performing low-pass filtering and band-pass filtering on the brightness channel of the target image, and fusing the results of the low-pass filtering and the band-pass filtering. The method for fusing the results of the low-pass filtering and the band-pass filtering may be weighted fusion, and the weight value of the weighted fusion may be obtained based on the local content information of the target image, and the local content information includes information such as local brightness, local gradient, and local contrast.

[0088] Optionally, the implementation method of performing noise reduction on the brightness channel of the target image in step S141 includes: performing coring noise reduction on the brightness channel of the target image to attenuate certain abrupt information, such as the abrupt information generated by the misalignment of small signals in some high-frequency bands after being enhanced, and / or generated by the erroneous enhancement of certain pixels with inconsistent grayscales. An implementation method of the coring noise reduction may be: Wherein, x is the result obtained after filtering the brightness channel of the target image, and th is the preset threshold. The above-mentioned kernelization denoising can attenuate small-amplitude high-frequency information without losing the contour, and these small-amplitude high-frequency information are usually noise, so kernelization denoising can effectively reduce the noise in the image.

[0089] S142, filtering the color channels of the intermediate image and the target image, and peaking-merging the filtering results of the two with the color channels of the intermediate image and the target image. The color channel may be a UV channel of the target image, and the peaking-merging refers to an operation of performing additional gain enhancement on the target frequency band (usually high frequency) to be enhanced in each image and then superimposing the enhanced frequency band.

[0090] Optionally, see Figure 5B , filtering the color channels of the intermediate image and the target image, and peaking and merging the filtering results of the two with the color channels of the intermediate image and the target image, including:

[0091] S1421, bandpass filtering and high-pass filtering are performed on the intermediate image and the filtering results are superimposed on the intermediate image. Specifically, after bandpass filtering and high-pass filtering are performed on the intermediate image, an edge signal corresponding to the intermediate image can be obtained by fusion, and then the edge signal corresponding to the intermediate image is superimposed on the intermediate image to achieve edge enhancement of the intermediate image.

[0092] S1422, bandpass filtering and high-pass filtering are performed on the color channels of the target image and the filtering results are superimposed on the color channels of the target image. Specifically, after bandpass filtering and high-pass filtering are performed on the color channels of the target image, the edge-marking signals corresponding to the color channels of the target image can be fused, and then the edge-marking signals corresponding to the color channels of the target image are superimposed on the color channels of the target image to achieve edge enhancement of the color channels of the target image.

[0093] S1423, perform maximum and minimum filtering on the color channels of the intermediate image and the target image, and merge the filtering results of the two. In steps S1421 and S1422, when edge enhancement is performed on the image (the color channels of the intermediate image and the target image), peaks may be generated, that is, over-enhancement occurs. In order to eliminate the influence of the peaks, step S1423 can process the image by maximum and minimum filtering, thereby reducing the influence of the above-mentioned over-enhancement.

[0094] In addition, in step S1423, the maximum and minimum filtering results of the intermediate image and the maximum and minimum filtering results of the color channels of the target image may be weightedly fused, and the weight values ​​used in the weighted fusion may be obtained, for example, based on the local content information of the target image.

[0095] According to the above description, the image processing method in this embodiment performs edge enhancement processing on the target image according to the local content information of the target image, that is, the local content information will calculate the high-frequency intensity in different directions and the high-frequency intensity in different frequency bands, and the high-frequency intensity in the vertical and horizontal directions and the different frequency bands can be appropriately enhanced based on the local content information. In addition, this embodiment can be configured to ensure that the low-frequency signal of the target image is significantly enhanced while the high-frequency signal does not flicker or have uneven transitions through brightness peaking, digital brightness and chroma transient enhancement (DLTI and DCTI) processing of local content adaptive edge enhancement, so that the target image looks brighter and colorful, so as to achieve better visual effects.

[0096] In one embodiment of the present invention, the target image is a frame image in a digital zoom video, see Fig. 6A , the image processing method in this embodiment includes:

[0097] S601, acquiring a target image.

[0098] S602: Divide the target image based on the resolution and scene content of the target image to obtain a plurality of blocks.

[0099] S603, obtaining a local histogram of each of the blocks, and performing contrast limiting processing on each of the blocks based on a contrast threshold.

[0100] S604, obtaining a mapping curve corresponding to each of the blocks, and obtaining a mapping curve corresponding to the entire target image according to the mapping curve corresponding to each of the blocks.

[0101] S605: Process the target image using the mapping curve corresponding to the entire target image to obtain a first output image.

[0102] S606: Process the first output image using a Laplacian filter and a smoothing filter to obtain strong edge information of the first output image.

[0103] S607: Process the first output image using a guided filter, and perform difference processing between the image after guided filtering and the first output image to obtain weak edge information of the first output image.

[0104] S608: Obtain a gradient map of the first output image, and fuse the strong edge information, the weak edge information, and the first output image according to the gradient map and local content information of the first output image to obtain a second output image.

[0105] S609: Perform low-pass filtering and band-pass filtering on the brightness channel of the second output image, and perform kernelization noise reduction after weighted fusion of the results of the low-pass filtering and the band-pass filtering.

[0106] S610: Fusing the result of the kernelization noise reduction with the brightness channel of the second output image to obtain an intermediate image.

[0107] S611, performing low-pass filtering and band-pass filtering on the intermediate image, and fusing the results of the low-pass filtering and the band-pass filtering and superimposing them on the intermediate image.

[0108] S612, performing low-pass filtering and band-pass filtering on the color channel of the target image, and fusing the images after the low-pass filtering and the band-pass filtering and superimposing them on the color channel of the target image.

[0109] S613, performing maximum and minimum filtering on the images superimposed in steps S611 and S612 respectively, and weightedly fusing the maximum and minimum filtering results of the two with the color channel of the target image and the intermediate image to obtain a final output image.

[0110] According to the above description, the image processing method described in this embodiment enhances the contrast of the target image and improves the dynamic range through improved limited contrast adaptive histogram equalization, and can effectively suppress noise amplification and over-enhancement. In addition, the image processing method uses a content-adaptive local edge-preserving filter to enhance the sharpness of the edge area of ​​the main structure of the target image, improves the details of the weak edge area of ​​the video image, and can be adaptively adjusted according to different magnification ratio coefficients, so that the enlarged digital zoom video image can still retain detail information and suppress noise, and adaptively adjust the degree of sharpening to avoid edge distortion caused by over-enhancement. Furthermore, the image processing method improves the weak edge detail information of the brightness channel and color channel in the target image through adaptive edge enhancement, ensuring that the low-frequency signal is significantly enhanced while the high-frequency signal does not flicker or have uneven transitions, so that the target image looks brighter, more colorful, and has better visual effects. For example, please refer to Figure 6B and Figure 6C , respectively showing pictures obtained in the related art and pictures obtained by the image processing method described in this embodiment. By comparison, it can be seen that the pictures obtained by the image processing method described in this embodiment have better clarity.

[0111] Furthermore, the image processing method can be applied not only to fixed electronic devices such as PCs, but also to various mobile platforms and smart devices, and can achieve real-time video enhancement based on mobile platforms.

[0112] Based on the above description of the image processing method, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement Figure 1 or Fig. 6A The image processing method shown.

[0113] Based on the above description of the image processing method, the present invention also provides an electronic device. Specifically, please refer to Figure 7 The electronic device 700 includes a memory 710 and a processor 720, wherein the memory 710 stores a computer program, and the processor 720 is connected to the memory 710 for implementing Figure 1 or Fig. 6A The image processing method shown.

[0114] Optionally, the electronic device 700 may further include a display 730, wherein the display 730 is communicatively connected with the memory 710 and the processor 720, and is used to display a GUI interaction interface related to the image processing method.

[0115] The protection scope of the image processing method described in the present invention is not limited to the execution order of the steps listed in this embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present invention are included in the protection scope of the present invention.

[0116] In summary, the image processing method described in one or more embodiments of the present invention improves the clarity of the image by performing contrast enhancement processing, clarity enhancement processing and edge enhancement processing on the target image. In this process, the three factors of contrast, clarity and edge are comprehensively considered. Compared with the clarity enhancement scheme in the related art that only considers a single factor, the image processing method can achieve better clarity enhancement effect.

[0117] In addition, the image processing method can perform contrast enhancement processing on the target image according to the scene information of the target image, and perform clarity enhancement and edge enhancement processing on the target image according to the local content information of the target image. Therefore, the image processing method can adaptively process the target image according to the image content. Therefore, the target image processing method can be applied to target images of various contents in various scenes and has good applicability.

[0118] Therefore, the present invention effectively overcomes various shortcomings in the prior art and has high industrial utilization value.

[0119] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. An image processing method, characterized in that: The image processing method comprises: Acquire a target image, wherein the target image is a large digital zoom video frame image; Acquiring the content flatness of the target image according to the scene content complexity of the target image, wherein the higher the scene content complexity of the target image is, the lower the content flatness is, and the lower the scene content complexity of the target image is, the higher the content flatness is; Performing contrast enhancement processing on the target image according to the flatness of the content; Performing definition enhancement processing on the target image according to local content information of the target image, wherein the local content information includes local brightness information, local gradient information and local contrast information; The target image is subjected to edge enhancement processing according to the local content information of the target image, including: filtering and denoising the brightness channel of the target image, and fusing the image after denoising with the brightness channel of the target image to obtain an intermediate image; filtering the color channels of the intermediate image and the target image, and peaking and merging the filtering results of the two with the color channels of the intermediate image and the target image.

2. The image processing method according to claim 1, characterized in that: The method for implementing contrast enhancement processing on the target image according to the content flatness comprises: Dividing the target image into a plurality of blocks; Obtaining a local histogram of each of the blocks; Obtaining a mapping function corresponding to each of the blocks; Acquire the mapping function corresponding to the target image according to the mapping functions corresponding to the blocks; The target image is processed according to the mapping function corresponding to the target image to achieve contrast enhancement of each of the blocks.

3. The image processing method according to claim 2, characterized in that: The method for implementing contrast enhancement on each of the blocks includes: Acquire the content flatness of each of the blocks according to the scene content complexity of each of the blocks; Acquire a contrast enhancement coefficient of each of the blocks according to the flatness of the content; Contrast enhancement is performed on each of the blocks according to the contrast enhancement coefficient.

4. The image processing method according to claim 2, characterized in that: The method for obtaining the mapping function corresponding to the target image according to the mapping functions corresponding to each of the blocks includes: Obtain mapping values ​​corresponding to a plurality of pixel points in the target image according to a mapping function corresponding to the block to which the pixel point belongs and an adjacent block; A mapping function corresponding to the target image is obtained according to mapping values ​​corresponding to a plurality of pixel points in the target image.

5. The image processing method according to claim 2, characterized in that: Before obtaining the mapping function corresponding to each of the blocks, the image processing method further includes: performing contrast limiting processing on each of the blocks according to a contrast threshold.

6. The image processing method according to any one of claims 1 to 5, characterized in that: The method for implementing definition enhancement processing on the target image according to the local content information of the target image includes: Acquire first edge information of the target image, where the first edge information is used to reflect the main structure of the target image; Acquire second edge information of the target image, where the second edge information is used to reflect details of the target image; The first edge information, the second edge information, and the target image are fused according to local content information of the target image.

7. The image processing method according to claim 6, characterized in that: The method for filtering the brightness channel of the target image includes: performing low-pass filtering and band-pass filtering on the brightness channel of the target image, and fusing the results of the low-pass filtering and the band-pass filtering; and / or The method for implementing noise reduction on the brightness channel of the target image includes: performing coring noise reduction on the brightness channel of the target image.

8. The image processing method according to claim 6, characterized in that: The method for filtering the color channels of the intermediate image and the target image and peaking and merging the filtering results of the intermediate image and the color channels of the target image comprises: Performing band-pass filtering and high-pass filtering on the intermediate image and superimposing the filtering results on the intermediate image; Performing bandpass filtering and high-pass filtering on the color channel of the target image and superimposing the filtering results on the color channel of the target image; Maximum and minimum value filtering is performed on the color channels of the intermediate image and the target image, and the filtering results of the two are fused.

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

10. An electronic device, characterized in that: The electronic device comprises: a memory having a computer program stored thereon; A processor is communicatively connected to the memory and is used to implement the image processing method according to any one of claims 1 to 8 when calling the computer program.

Citation Information

Patent Citations

  • Method and apparatus for enhancing image

    CN101510302A

  • Image enhancement method and system

    CN102214357A

  • Quick and effective image enhancing method

    CN102722871A

  • Medical image enhancement processing method

    CN103606135A

  • Photosensitive sensor-based auxiliary image adjustment method and device

    CN104581056A