Image enhancement method, electronic device and computer readable storage medium

By extracting and fusing high-frequency components of the image, the problem of image enhancement in existing technologies not conforming to human visual characteristics is solved, resulting in significant enhancement of image details and improved visual effects.

CN114782260BActive Publication Date: 2025-10-21ZHEJIANG DAHUA TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing image enhancement methods fail to fully conform to human visual characteristics, resulting in insufficient salience of image details.

Method used

By extracting the first high-frequency component and the second high-frequency component of the image respectively, the first high-frequency component is independent of the local features of the pixel, while the second high-frequency component is related to the local features of the pixel. Based on the directionality of the pixel, a fused high-frequency component is obtained. Finally, this component is superimposed on the image information value to enhance the image.

Benefits of technology

The enhanced image is more in line with human visual characteristics, can better represent different details, and improve the saliency of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114782260B_ABST
    Figure CN114782260B_ABST
Patent Text Reader

Abstract

The application discloses an image enhancement method, an electronic device and a computer readable storage medium. The image enhancement method comprises the following steps: acquiring an image to be processed; performing first high-frequency component extraction on image information of the image to be processed to obtain a first high-frequency component of each pixel point, wherein the first high-frequency component extraction is irrelevant to directionality of local features at the pixel point; performing second high-frequency component extraction on the image information to obtain a second high-frequency component of each pixel point, wherein the second high-frequency component extraction is relevant to the directionality of the local features at the pixel point; respectively based on the directionality of each pixel point, fusing the first high-frequency component and the second high-frequency component of the pixel point to obtain a fused high-frequency component of each pixel point; and superimposing the fused high-frequency component of each pixel point on an image information value of each pixel point in the image information. The image enhancement method can make the enhanced image more consistent with human visual characteristics.
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 enhancement method, an electronic device, and a computer-readable storage medium. Background Art

[0002] For various reasons, images captured by various image sensors often lack the saliency of objects and details, making them difficult for the human eye to observe and discern. Detail enhancement methods process the original image signal and modify the pixel values ​​of areas such as target details, thereby enhancing the saliency of details to better reflect human visual characteristics.

[0003] In the existing technology, after enhancing the details in the image, the image still needs to be further improved in terms of conforming to human visual characteristics. Summary of the Invention

[0004] The present application provides an image enhancement method, an electronic device, and a computer-readable storage medium, which can make the enhanced image more consistent with human visual characteristics.

[0005] A first aspect of an embodiment of the present application provides an image enhancement method, which includes: acquiring an image to be processed; performing a first high-frequency component extraction on the image information of the image to be processed to obtain a first high-frequency component for each pixel, wherein the extraction of the first high-frequency component is independent of the directionality of the local features at the pixel; performing a second high-frequency component extraction on the image information to obtain a second high-frequency component for each pixel, wherein the extraction of the second high-frequency component is related to the directionality of the local features at the pixel; fusing the first high-frequency component and the second high-frequency component of each pixel based on the directionality of each pixel to obtain a fused high-frequency component of each pixel; and superimposing the fused high-frequency component of each pixel on the image information value of each pixel in the image information.

[0006] A second aspect of an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a communication circuit. The processor is coupled to the memory and the communication circuit respectively. Program data is stored in the memory. The processor implements the steps in the above method by executing the program data in the memory.

[0007] A third aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program can be executed by a processor to implement the steps in the above method.

[0008] The beneficial effect is: the present application extracts the first high-frequency component and the second high-frequency component of the image information of the image to be processed, respectively, wherein the extraction of the first high-frequency component is independent of the directionality of the local features at the pixel point, and the extraction of the second high-frequency component is related to the directionality of the local features at the pixel point, and then the first high-frequency component and the second high-frequency component of the pixel point are fused based on the directionality of each pixel point, so that different processing can be adopted for the details of different features during the fusion process, so that the final enhanced image is more in line with human visual characteristics. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without inventive efforts. Among them:

[0010] Figure 1 This is a flow chart of an embodiment of the image enhancement method of the present application;

[0011] Figure 2 yes Figure 1 Flow diagram of step S120;

[0012] Figure 3 yes Figure 1 Flow chart of step S130;

[0013] Figure 4 yes Figure 3 Flow diagram of step S133;

[0014] Figure 5 yes Figure 1 Flow chart of step S140;

[0015] Figure 6 yes Figure 5 Flow chart of step S141;

[0016] Figure 7 This is a flow chart of an embodiment of the image enhancement method of the present application;

[0017] Figure 8 This is a schematic structural diagram of an embodiment of the electronic device of the present application;

[0018] Figure 9 This is a schematic structural diagram of another embodiment of the electronic device of the present application;

[0019] Figure 10 It is a structural diagram of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0020] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments of this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0021] See Figure 1 , Figure 1 : is a flow chart of an embodiment of an image enhancement method of the present application, the method comprising:

[0022] S110: Acquire an image to be processed.

[0023] S120: Extracting a first high-frequency component from the image information of the image to be processed to obtain a first high-frequency component of each pixel, wherein the extraction of the first high-frequency component is independent of the directionality of the local feature at the pixel.

[0024] In this embodiment, the image information of the image to be processed is brightness information, that is, the brightness channel of the image to be processed is used as the input of step S120. If the format of the image to be processed is a format without an independent brightness channel, the format of the image to be processed is converted to a format with an independent brightness channel, and then the brightness channel is used as the input of step S120. For example, if the format of the image to be processed is RGB, the format of the image to be processed is converted to YUV.

[0025] That is, the first high-frequency component is extracted based on the brightness values ​​of the pixels of the image to be processed.

[0026] It should be noted that, in other implementations, the image information of the image to be processed in step S120 may also be other information such as color information, which is not limited here.

[0027] The brightness information of the image to be processed can be understood as a matrix composed of the brightness information values ​​of all pixels in the image to be processed.

[0028] The directionality of the local features at the pixel points is related to the positions of the pixel points. Specifically, the directionality of the local features at the pixel points at the edge positions is stronger than the directionality of the local features at the pixel points at the texture or flat areas.

[0029] The process of extracting the first high-frequency component in step S120 is irrelevant to the strength of the directionality of the local feature at the pixel point. That is, the process of extracting the first high-frequency component does not consider the directionality factor of the local feature at the pixel point.

[0030] See Figure 2 In this embodiment, step S120 of obtaining the first high-frequency component of each pixel includes:

[0031] S121: Using an isotropic filter to filter image information of the image to be processed, to obtain a first filtering value for each pixel.

[0032] Specifically, isotropic filtering differs from anisotropic filtering. Isotropic filtering treats all directions of the processed image equally during the filtering process, while anisotropic filtering treats all directions of the processed image differently. The use of isotropic filtering in step S121 can simultaneously consider the weights corresponding to pixels in all directions, reduce noise, and make the high-frequency components of subsequently obtained textured or flat areas more natural.

[0033] The isotropic filter may be any type of isotropic filter, such as a Gaussian filter.

[0034] S122: Determine a first high-frequency component of each pixel based on the first filter value of each pixel.

[0035] In one application scenario, when the isotropic filter in step S121 is an isotropic low-pass filter, step S122 specifically includes: subtracting the image information value of each pixel point from the first filter value of each pixel point to obtain the first high-frequency component of each pixel point.

[0036] Specifically, for each pixel point, the difference between its image information value in the image information and the first filtered value of the object is obtained, and the obtained difference is the first high-frequency component of the pixel point.

[0037] In another application scenario, when the isotropic filter in step S121 is an isotropic high-pass filter, step S122 specifically includes: determining the first filter value of each pixel as the first high-frequency component of each pixel.

[0038] Different from the above application scenarios, there is no need to perform difference operations in this case, which can improve the efficiency of the algorithm.

[0039] The above describes the process of extracting the first high-frequency component.

[0040] S130: Extracting a second high-frequency component from the image information to obtain a second high-frequency component for each pixel, wherein the extraction of the second high-frequency component is related to the directionality of the local feature at the pixel.

[0041] Different from step S120, the process of extracting the second high-frequency component is related to the strength of the local feature direction at the pixel point, that is, the directionality factor of the pixel point is taken into consideration during the extraction process.

[0042] See Figure 3 In this embodiment, step S130 of obtaining the second high-frequency component of each pixel includes:

[0043] S131: Perform filtering processing on the image information in at least two directions to obtain a second filtering value of each pixel in each direction.

[0044] In step S120, isotropic filtering is performed on the original features of the image to be processed, while in step S130, anisotropic filtering is performed on the original features of the image to be processed.

[0045] The at least two directions may include two directions, three directions, four directions or more directions, and the directions in the at least two directions may be various directions, such as a horizontal direction, a vertical direction or various directions deviating from the horizontal direction at different angles.

[0046] For the convenience of explanation, the following description is made in terms of at least two directions including a horizontal direction and a vertical direction.

[0047] In one application scenario, a one-dimensional Laplacian filter is used as a filter to filter the original features of the image to be processed in at least two directions. For example, when filtering in the horizontal direction, the one-dimensional Laplacian filter is in the form of [-1, 2, -1], and when filtering in the vertical direction, the one-dimensional Laplacian filter is in the form of the transpose of [-1, 2, -1].

[0048] S132: Determine a first sub-high frequency component of each pixel point in each direction based on the second filter value of each pixel point in each direction.

[0049] In an application scenario, when high-pass filtering is performed in step S131 , the second filtered value of the pixel point in a certain direction is directly determined as the first sub-high-frequency component of the pixel point in the direction.

[0050] In another application scenario, when step S131 performs low-pass filtering, the image information value of the pixel point in the image information is subtracted from the second filtered value of the pixel point in a certain direction to obtain the first sub-high-frequency component of the pixel point in the direction.

[0051] It's worth noting that this implementation utilizes directional filtering because edge features have distinct directional characteristics, and the corresponding high-frequency components are primarily present in specific directions. This allows for better representation of edge features during subsequent image enhancement. Directional filtering also makes the extracted edge features thinner and smoother in specific directions.

[0052] S133: Fusing the first sub-high-frequency components corresponding to each pixel point to obtain a second high-frequency component of each pixel point.

[0053] Specifically, for each pixel, all corresponding first high-frequency sub-components are fused to obtain the second high-frequency component corresponding to the pixel.

[0054] See Figure 4 In this embodiment, step S133 specifically includes:

[0055] S1331: Determine the gradient of each pixel in each direction respectively.

[0056] Specifically, the directions here are the directions in the above step S131.

[0057] For example, when the at least two directions include a horizontal direction and a vertical direction, the gradient of each pixel point in the horizontal direction and the gradient in the vertical direction are determined respectively.

[0058] In one application scenario, the Sobel operator is used to determine the gradient of each pixel in each direction. For example, the horizontal gradient operator is set to: Set the vertical gradient operator to: At this time, when calculating the gradient of a pixel point in a certain direction, the 8-neighborhood of the pixel point (that is, a 3*3 matrix) is convolved with the gradient operator in that direction, and then the absolute value of the convolution result is taken to obtain the gradient of the pixel point in that direction.

[0059] Among them, the process of determining the gradient of a pixel point in a certain direction belongs to the existing technology and is not introduced in detail in this application.

[0060] S1332: Adjust the first high-frequency sub-component of each pixel in each direction according to the gradient of each pixel in each direction, to obtain the second high-frequency sub-component of each pixel in each direction.

[0061] The first sub-high-frequency component of the pixel in a certain direction is adjusted according to the gradient of the pixel in the direction, and the intensity of the enhanced high-frequency component can be determined according to the directionality of the pixel in the direction.

[0062] In one application scenario, step S1332 specifically includes:

[0063] (a1) Determine the adjustment coefficient of each pixel point in each direction according to the gradient interval of each pixel point in each direction.

[0064] For example, the adjustment coefficient of the pixel in each direction is determined according to the following formula:

[0065] Wherein, grad is the gradient of the pixel in any direction (for example, the gradient in the horizontal direction or the gradient in the vertical direction), a1 and a2 are both gradient thresholds, and g is the adjustment coefficient of the pixel in the corresponding direction.

[0066] That is to say, if the gradient of the pixel point in the direction is in the first interval [0, a1), then the adjustment coefficient of the pixel point in this direction is determined to be the first coefficient g1; if the gradient of the pixel point in the direction is in the second interval [a1, a2), then the adjustment coefficient of the pixel point in this direction is determined to be the second coefficient g2; if the gradient of the pixel point in the direction is in the third interval [a2, +∞), then the adjustment coefficient of the pixel point in this direction is determined to be the third coefficient g3.

[0067] For example, the first coefficient g1, the second coefficient g2, and the third coefficient g3 are set to 0.6, 1, and 0.8, respectively.

[0068] It should be noted that while a three-stage adjustment method is used above, this application is not limited thereto. In other embodiments, a two-stage, four-stage, or even more-stage adjustment method may be used. Furthermore, the magnitude relationship of the adjustment coefficients corresponding to the various gradient intervals is not limited. For example, the first coefficient g1, the second coefficient g2, and the third coefficient g3 may increase in sequence.

[0069] At the same time, this application does not limit the specific values ​​of a1 and a2. For example, a1 and a2 are 5 and 20 respectively.

[0070] It can be understood that the above method of setting the adjustment coefficient in a segmented manner can flexibly configure the adjustment coefficients corresponding to different gradient regions.

[0071] In other implementations, instead of adopting the piecewise adjustment method, other functional forms, such as a linear function, may be adopted so that the adjustment coefficient of each direction of the pixel point is related to the gradient in the corresponding direction.

[0072] (b1) Multiplying the adjustment coefficient of each pixel in each direction by the first high-frequency component of each pixel in the corresponding direction to obtain the second sub-high-frequency component of each pixel in each direction.

[0073] That is, if the first high-frequency sub-component of a pixel in a certain direction is hp and the adjustment coefficient in that direction is g, the second high-frequency sub-component hp′ of the pixel in that direction is equal to the product of g and hp.

[0074] S1333: Fusing the second high-frequency sub-components corresponding to each pixel point to obtain the second high-frequency component of each pixel point.

[0075] The explanation is still based on at least two directions including the horizontal direction and the vertical direction: assuming that the second sub-high-frequency component of the pixel point in the horizontal direction is hp1, and the second sub-high-frequency component in the vertical direction is hp2, then the second high-frequency component corresponding to the pixel point is equal to the sum of hp1 and hp2.

[0076] The above describes the process of determining the first high-frequency component and the second high-frequency component corresponding to the pixel point. The following describes the process of fusing the first high-frequency component and the second high-frequency component.

[0077] S140: Based on the directionality of each pixel, fuse the first high-frequency component and the second high-frequency component of each pixel to obtain a fused high-frequency component of each pixel.

[0078] Based on the directionality of the pixel points, the detail features corresponding to the pixel points can be determined.

[0079] Based on the directionality of the pixel points, the first high-frequency component and the second high-frequency component of the pixel points are fused, so that different features can be processed differently, making the final enhanced image more consistent with human visual characteristics.

[0080] See Figure 5 In this embodiment, step S140 includes:

[0081] S141: Determine a direction factor for each pixel, where the direction factor is related to the directionality of the local feature at the pixel.

[0082] The size of the direction factor of a pixel is related to the strength of the directionality of the local feature at the pixel. For example, the larger the direction factor of a pixel, the stronger the directionality of the local feature at the pixel.

[0083] In one application scenario, combined with Figure 6 , step S141 specifically includes:

[0084] S1411: Determine the gradient of each pixel in at least two directions respectively.

[0085] Among them, the at least two directions here may be the same as or different from the at least two directions in the above-mentioned step S130. For example, when the at least two directions in step S130 include the horizontal direction and the vertical direction, the at least two directions in step S1411 also include the horizontal direction and the vertical direction. For another example, when the at least two directions in step S130 include the horizontal direction and the vertical direction, the at least two directions in step S1411 include any two directions perpendicular to each other.

[0086] S1412: Determine a direction factor for each pixel based on the gradient of each pixel in each direction.

[0087] The direction factor of the pixel point may be calculated directly or indirectly based on the difference in gradients of the pixel point in various directions.

[0088] For example, when the at least two directions include two directions, the gradients of the pixel point in the two directions are subtracted, and then the absolute value of the subtraction result is taken, and finally the absolute value is used as the direction factor of the pixel point.

[0089] The present application does not impose any specific restrictions on the process of determining the directional factor of a pixel point, as long as the directional factor of the pixel point can represent the directional characteristics of the pixel point.

[0090] S142: Determine a first proportional value and a second proportional value corresponding to each pixel based on the direction factor of each pixel, wherein the sum of the first proportional value and the second proportional value corresponding to each pixel is one.

[0091] S143: Sum the product of the first high-frequency component and the first proportional value and the product of the second high-frequency component and the second proportional value of each pixel to obtain a fused high-frequency component of each pixel.

[0092] Specifically, the fused high-frequency component HP of the pixel is determined according to the following formula:

[0093] HP=r×HP1+(1-r)×HP2, where r is the first proportional value corresponding to the pixel, HP1 is the first high-frequency component of the pixel, and HP2 is the second high-frequency component of the pixel.

[0094] In an application scenario, when the direction factor of a pixel point is positively correlated with the directionality of the local feature at the pixel point, the first proportional value r corresponding to the pixel point is determined according to the following formula:

[0095] Wherein, D is the direction factor of the pixel point, b1 and b2 are the first threshold and the second threshold respectively, which can be set according to the specific situation and are not limited here.

[0096] When the direction factor is greater than or equal to a first threshold and less than a second threshold, the first ratio value is negatively correlated with the direction factor.

[0097] It should be noted that, in other implementations, the first ratio value may not be determined in a segmented manner, for example, directly according to the formula A first scale value is determined.

[0098] Alternatively, in other implementations, the first ratio value may be determined using a two-stage method, a four-stage method, etc. In summary, the present application does not impose any specific restrictions on the process of determining the first ratio value.

[0099] Among them, the fusion ratio of the first high-frequency component and the second high-frequency component is determined according to the direction factor of the pixel point. Compared with other indicators, the detailed features of the pixel point can be determined more accurately.

[0100] The above describes the process of fusing the first high-frequency component and the second high-frequency component of a pixel.

[0101] In this embodiment, before the first high frequency component and the second high frequency component of the pixel are fused, the first high frequency component and the second high frequency component can be enhanced respectively (eg Figure 7 As shown), subsequent steps are performed based on the enhanced first high-frequency component and the second high-frequency component, that is, the enhanced first high-frequency component and the enhanced second high-frequency component are fused to obtain a fused high-frequency component.

[0102] Among them, the process of enhancing the first high-frequency component can be: multiplying the first high-frequency component with the first gain coefficient k1; the process of enhancing the second high-frequency component can be: multiplying the second high-frequency component with the second gain coefficient k2, among which the values ​​of the first gain coefficient k1 and the second gain coefficient k2 can be set according to the specific situation and are not limited here.

[0103] The enhancement process may be performed on both the first high-frequency component and the second high-frequency component, or may be performed on only one of the first high-frequency component and the second high-frequency component.

[0104] S150: Superimposing the fused high-frequency components of each pixel on the image information value of each pixel in the image information.

[0105] After obtaining the fused high-frequency component of each pixel, the fused high-frequency component of the pixel can be directly superimposed on the image information value of the pixel.

[0106] Alternatively, the image information of the image to be processed may be transformed to obtain transformation features, and then the fused high-frequency components of each pixel may be superimposed on the image information value of each pixel in the transformation features.

[0107] The transformation processing may be any processing including, for example, image filtering, and this application does not impose any limitation thereto.

[0108] After executing step S150, the result is converted into the required format according to actual needs. For example, when the image information in step S120 is brightness information, if the image to be processed is a single-channel brightness image, the result obtained in step S150 is directly output. However, if the image to be processed is not a single-channel brightness image but includes a color channel, the result obtained in step S150 is merged with the color channel and then converted into the required format for output.

[0109] In order to better understand the solution of this application, the above solution is further introduced below with reference to examples:

[0110] First, an image to be processed is obtained, and the following steps are performed based on the brightness channel of the image to be processed. It can be understood that the following steps are performed based on the brightness matrix I, which is composed of the brightness values ​​of each pixel point;

[0111] Step 1: Perform low-pass filtering on the brightness matrix I to obtain the matrix I1, and then perform a subtraction between the matrix I and the matrix I1 to obtain the matrix HP_text, where the matrix HP_text is composed of the first high-frequency components of each pixel.

[0112] Step 2: Enhance the first high-frequency components of each pixel point. The enhanced first high-frequency components of all pixel points constitute the matrix HP_text′, and the calculation formula is HP_text′=k1×HP_text. It can be understood that at this time, the same gain coefficient is used to enhance the first high-frequency components of all pixel points at the same time, that is, the enhancement intensity of the first high-frequency components is the same, but in other instances, the enhancement intensity of the first high-frequency components of different pixel points may also be different.

[0113] Step 3: Perform directional high-pass filtering on the brightness matrix I to obtain the first sub-high-frequency component of each pixel in each direction. Taking two directions as an example, a matrix I2 composed of the first sub-high-frequency components of each pixel in the horizontal direction and a matrix I3 composed of the first sub-high-frequency components of each pixel in the vertical direction are obtained.

[0114] Step 4: Calculate the gradient of each pixel in the horizontal and vertical directions.

[0115] Step 5: For each pixel, adjust the corresponding first high-frequency sub-component based on the gradient in the corresponding direction to obtain the corresponding second high-frequency sub-component, and then merge all the second high-frequency sub-components corresponding to the pixel to obtain the second high-frequency component corresponding to the pixel. The second high-frequency components corresponding to all pixels constitute the matrix HP_edge. The calculation formula of the matrix HP_edge is:

[0116] HP_edge=G1.*I2+G2.*I3, which means dot-multiplying matrix G1 by matrix I2, dot-multiplying matrix G2 by matrix I3, and then adding the two dot-product matrices together.

[0117] Among them, G1 is composed of the adjustment coefficients of all pixels in the horizontal direction, and G2 is composed of the adjustment coefficients of all pixels in the vertical direction. The elements g in G1 and G2 are ij The calculation formula is:

[0118] Among them, grad ij is the horizontal or vertical gradient of the pixel in the i-th row and j-th column in the image to be processed.

[0119] Step 6: Enhance the second high-frequency components of each pixel point. The enhanced second high-frequency components of all pixel points form a matrix HP_edge′, and the calculation formula is HP_edge′=k2×HP_edge.

[0120] Step 7: Calculate the directional factor of each pixel: Subtract the horizontal gradient from the vertical gradient of the pixel and take the absolute value to obtain the directional factor D of the pixel in the i-th row and j-th column of the image to be processed. ij .

[0121] Step 8: Determine the mixing ratio r based on the direction factor of the pixel point ij :

[0122]

[0123] Then, the first high-frequency component and the second high-frequency component corresponding to the pixel are fused according to the following formula to obtain the fused high-frequency component HP corresponding to the pixel: ij :

[0124] HP ij =r ij ×HP_text′ ij +(1-r ij )×HP_edge′ ij , where HP_text′ ijis the value of the pixel in the i-th row and j-th column of the image to be processed in the matrix HP_text′, HP_edge′ ij is the value of the pixel at row i and column j in the image to be processed in the matrix HP_edge′.

[0125] Step 9: Superimpose and fuse the high-frequency components on the image information of each pixel:

[0126] I′=I+HP, where HP is the fused high-frequency component HP corresponding to all pixels ij The matrix formed.

[0127] Before superposition, the brightness matrix I may be subjected to transformations such as filtering.

[0128] Among them, if the image to be processed is a single-channel brightness image, the result obtained in step 9 is output. If the image to be processed is not a single-channel brightness image but includes a color channel, the output result of step 9 is merged with the color channel and converted into the required format for output.

[0129] See Figure 7 , Figure 7 2 is a schematic diagram of the structure of an embodiment of an electronic device of the present application. The electronic device 200 includes a processor 210, a memory 220, and a communication circuit 230. The processor 210 is coupled to the memory 220 and the communication circuit 230, respectively. The memory 220 stores program data. The processor 210 executes the program data in the memory 220 to implement the steps of any of the above-mentioned embodiments. The detailed steps can be found in the above-mentioned embodiments and will not be repeated here.

[0130] The electronic device 200 may be any device with image processing capabilities, such as a computer or a mobile phone, and is not limited here.

[0131] See Figure 8 , Figure 8 The electronic device 300 includes an acquisition module 310 , a first extraction module 320 , a second extraction module 330 , a fusion module 340 and an overlay module 350 .

[0132] The acquisition module 310 is used to acquire an image to be processed.

[0133] The first extraction module 320 is connected to the acquisition module 310 and is used to extract the first high-frequency component of the image information to be processed to obtain the first high-frequency component of each pixel. The extraction of the first high-frequency component is independent of the directionality of the local feature at the pixel.

[0134] The second extraction module 330 is connected to the acquisition module 310 and is used to extract the second high-frequency component of the image information to obtain the second high-frequency component of each pixel, wherein the second high-frequency component extraction is related to the directionality of the local feature at the pixel.

[0135] The fusion module 340 is connected to the first extraction module 320 and the second extraction module 330, and is used to fuse the first high-frequency component and the second high-frequency component of each pixel based on the directionality of each pixel to obtain a fused high-frequency component of each pixel.

[0136] The superposition module 350 is connected to the fusion module 340 and is configured to superimpose the fused high-frequency components of each pixel on the image information value of each pixel in the image information.

[0137] The electronic device 300 may be any device with image processing capabilities, such as a computer or a mobile phone, and is not limited here.

[0138] The electronic device 300 executes the method steps in any of the above embodiments when working. The detailed method steps can be found in the above embodiments and will not be repeated here.

[0139] See Figure 9 , Figure 9 The computer-readable storage medium 400 stores a computer program 410, which can be executed by a processor to implement the steps of any of the above methods.

[0140] Among them, the computer-readable storage medium 400 can specifically be a device that can store the computer program 410, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or it can also be a server that stores the computer program 410. The server can send the stored computer program 410 to other devices for execution, or it can also run the stored computer program 410 itself.

[0141] The above description is only an implementation method of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the description and drawings of this application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. An image enhancement method, characterized in that: The method comprises: Get the image to be processed; Performing a first high-frequency component extraction on image information of the image to be processed to obtain a first high-frequency component of each pixel, wherein the extraction of the first high-frequency component is independent of the directionality of the local feature at the pixel; Performing a second high-frequency component extraction on the image information to obtain a second high-frequency component of each pixel, wherein the second high-frequency component extraction is related to the directionality of the local feature at the pixel; Based on the directionality of each pixel, the first high-frequency component and the second high-frequency component of each pixel are fused to obtain a fused high-frequency component of each pixel; Superimposing the fused high-frequency component of each pixel on the image information value of each pixel in the image information; Among them, the step of fusing the first high-frequency component and the second high-frequency component of each pixel point based on the directionality of each pixel point to obtain the fused high-frequency component of each pixel point includes: determining the directional factor of each pixel point, wherein the directional factor is related to the directionality of the local feature at the pixel point, and the directional factor is determined based on the gradient of the pixel point in each direction; determining the first proportional value and the second proportional value corresponding to each pixel point based on the directional factor of each pixel point, and the sum of the first proportional value and the second proportional value corresponding to each pixel point is one; summing the product of the first high-frequency component and the first proportional value and the product of the second high-frequency component and the second proportional value of each pixel point to obtain the fused high-frequency component of each pixel point.

2. The method according to claim 1, characterized in that The step of extracting the first high-frequency component from the image information of the image to be processed to obtain the first high-frequency component of each pixel includes: Using an isotropic filter to filter the image information of the image to be processed to obtain a first filtered value for each pixel; The first high-frequency component of each pixel is determined based on the first filter value of each pixel.

3. The method according to claim 2, characterized in that The isotropic filter is an isotropic low-pass filter, and the step of determining the first high-frequency component of each pixel point based on the first filter value of each pixel point includes: Subtracting the image information value of each pixel from the first filter value of each pixel to obtain the first high-frequency component of each pixel; Alternatively, the isotropic filter is an isotropic high-pass filter, and the step of determining the first high-frequency component of each pixel based on the first filter value of each pixel includes: The first filter value of each pixel is determined as the first high-frequency component of each pixel.

4. The method according to claim 1, wherein The step of extracting the second high-frequency component from the image information to obtain the second high-frequency component of each pixel includes: Performing filtering processing on the image information in at least two directions to obtain a second filtering value of each pixel in each direction; determining a first sub-high-frequency component of each pixel point in each direction based on the second filtering value of each pixel point in each direction; The first sub-high-frequency components corresponding to each of the pixels are respectively fused to obtain the second high-frequency components of each of the pixels.

5. The method according to claim 4, characterized in that The step of fusing the first sub-high-frequency components corresponding to each pixel to obtain the second high-frequency component of each pixel includes: Determine the gradient of each pixel point in each direction respectively; Adjusting the first high-frequency sub-component of each pixel in each direction according to the gradient of each pixel in each direction to obtain a second high-frequency sub-component of each pixel in each direction; The second high-frequency sub-component corresponding to each pixel point is fused to obtain the second high-frequency component of each pixel point.

6. The method according to claim 5, characterized in that The step of adjusting the first high-frequency sub-component of each pixel in each direction according to the gradient of each pixel in each direction to obtain the second high-frequency sub-component of each pixel in each direction includes: determining an adjustment coefficient for each pixel point in each direction according to a gradient interval in which the gradient of each pixel point in each direction lies; The adjustment coefficient of each pixel point in each direction is multiplied by the first sub-high-frequency component of each pixel point in the corresponding direction to obtain the second sub-high-frequency component of each pixel point in each direction.

7. The method according to claim 6, characterized in that The step of determining the adjustment coefficient of each pixel point in each direction according to the gradient interval of each pixel point in each direction includes: In response to the gradient interval in which the gradient of the pixel point in the direction is located being a first interval, determining the adjustment coefficient of the pixel point in the direction to be a first coefficient; In response to the gradient interval in which the gradient of the pixel point in the direction is located being a second interval, determining the adjustment coefficient of the pixel point in the direction to be a second coefficient; In response to the gradient interval of the pixel point in the direction being a third interval, the adjustment coefficient of the pixel point in the direction is determined to be a third coefficient.

8. The method according to claim 1, characterized in that The directional factor is positively correlated with the directionality of the local feature at the pixel point. The step of determining the first proportional value corresponding to the pixel point based on the directional factor of the pixel point includes: In response to the direction factor of the pixel being less than a first threshold, determining the first scale value corresponding to the pixel to be one; In response to the directional factor of the pixel being greater than or equal to the first threshold and less than a second threshold, determining that the first proportional value corresponding to the pixel is negatively correlated with the directional factor and is between zero and one; In response to the direction factor of the pixel being greater than or equal to the second threshold, the first proportional value corresponding to the pixel is determined to be zero.

9. The method according to claim 1, characterized in that The step of determining the direction factor of each pixel point comprises: Determining the gradient of each pixel in at least two directions respectively; The direction factor of each pixel point is determined based on the gradient of each pixel point in each direction.

10. The method according to claim 9, characterized in that The step of determining the directional factor of each pixel point based on the gradient of each pixel point in each direction includes: The direction factor of each pixel point is determined based on the difference of the gradient in each direction corresponding to each pixel point.

11. The method according to claim 1, wherein Before fusing the first high-frequency component and the second high-frequency component of each pixel based on the directionality of each pixel, the method further includes: performing enhancement processing on each of the first high-frequency components respectively, so as to perform subsequent steps based on the enhanced first high-frequency components; And / or, each of the second high-frequency components is enhanced respectively, so as to perform subsequent steps based on the enhanced second high-frequency components.

12. The method according to claim 1, characterized in that The image information is brightness information.

13. The method according to claim 1, wherein The step of superimposing the fused high-frequency components of each pixel on the image information value of each pixel in the image information comprises: Performing transformation processing on the image information to obtain transformation features; The fused high-frequency components of each pixel are superimposed on the transformation value of each pixel in the transformation feature.

14. An electronic device, characterized in that: The electronic device includes a processor, a memory and a communication circuit, the processor is coupled to the memory and the communication circuit respectively, the memory stores program data, and the processor implements the steps in the method according to any one of claims 1 to 13 by executing the program data in the memory.

15. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and the computer program can be executed by a processor to implement the steps in the method according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • Gradient value and direction based image sharpening method and device

    CN105894459A

  • Image enhancement method and system

    CN110796612A

  • Image enhancement method and device and computer readable storage medium

    CN111145114A