Image enhancement method, device, computer equipment, and storage medium

By extracting the brightness of color images and calculating the brightness enhancement value, the problem of low image clarity based on the interpolation method is solved, and the resolution of high-definition video is improved and the clarity of the image is maintained.

CN116258644BActive Publication Date: 2024-10-29GLENFLY TECH CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202310065902.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-13
Publication Date
2024-10-29
Estimated Expiration
2043-01-13

AI Technical Summary

Technical Problem

The image upsampling method based on interpolation in the prior art results in low image resolution and cannot meet the video resolution improvement requirements of high-definition display devices.

Method used

By extracting the brightness of the color image to be processed, calculating the brightness enhancement value, and adding it to the three RGB channels, the brightness of the image is enhanced to ensure that the image maintains high definition after upsampling.

Benefits of technology

It effectively improves the clarity of the image, reduces the amount of calculation, and avoids color cast problems during the texture extraction process, ensuring the final display effect of the video.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116258644B_ABST
    Figure CN116258644B_ABST
Patent Text Reader

Abstract

The present application relates to an image enhancement method, device, computer equipment, storage medium and computer program product. The method comprises: obtaining a color image to be processed; performing brightness extraction on the color image to be processed to obtain an initial brightness map; performing calculation based on the initial brightness map to obtain a brightness enhancement value; and obtaining a brightness enhanced image according to the brightness enhancement value and the color image to be processed. The method can improve the image clarity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image technology, and in particular to an image enhancement method, apparatus, computer equipment, storage medium and computer program product. Background Art

[0002] With the popularity of high-definition display devices, the resolution of user display devices has generally increased to 2K or even higher. However, most video resolutions are still 1080p, and the video images need to be upsampled to the resolution of the display. Therefore, the quality of image upsampling will directly affect the final display effect of the video.

[0003] In the related art, upsampling algorithms can be divided into interpolation-based, reconstruction-based and learning-based methods, among which the interpolation-based method has the lowest cost and the widest range, but the image clarity after upsampling based on interpolation is low. Summary of the invention

[0004] Based on this, it is necessary to provide an image enhancement method, device, computer equipment, computer-readable storage medium and computer program product that can improve image clarity in response to the above technical problems.

[0005] In a first aspect, the present application provides an image enhancement method. The method comprises:

[0006] Obtaining a color image to be processed;

[0007] Performing brightness extraction on the color image to be processed to obtain an initial brightness map;

[0008] Performing calculation based on the initial brightness map to obtain a brightness enhancement value;

[0009] A brightness enhanced image is obtained according to the brightness enhancement value and the color image to be processed.

[0010] In one embodiment, the step of performing brightness extraction on the color image to be processed to obtain an initial brightness map includes:

[0011] Get pixel extraction coefficient;

[0012] The initial brightness map is obtained according to the pixel extraction coefficient and the color image to be processed.

[0013] In one embodiment, the calculating based on the initial brightness map to obtain the brightness enhancement value includes:

[0014] Perform filtering based on the initial brightness map and the filter coefficient to obtain a target brightness map;

[0015] The brightness enhancement value is obtained according to the target brightness map and the initial brightness map.

[0016] In one embodiment, obtaining the brightness enhancement value according to the target brightness map and the initial brightness map includes:

[0017] Subtracting the target brightness map from the initial brightness map to obtain a difference map;

[0018] The brightness enhancement value is obtained according to the difference map and the sharpening coefficient.

[0019] In one embodiment, filtering based on the initial brightness map and the filter coefficient to obtain the target brightness map includes:

[0020] According to the filtering coefficient, each pixel in the initial brightness image is filtered in different directions to obtain a filtering pixel value corresponding to each pixel;

[0021] The target brightness map is obtained by combining the brightness values ​​of each pixel and the filtered pixel value.

[0022] In one embodiment, the calculation method of the filter coefficient includes:

[0023] Performing transformation according to the initial brightness map to obtain a guided output map;

[0024] Obtaining an objective function according to the guided output graph and the initial brightness value;

[0025] The objective function is solved to obtain the filter coefficient.

[0026] In one embodiment, obtaining a brightness enhanced image according to the brightness enhancement value and the color image to be processed includes:

[0027] Amplifying the color image to be processed to obtain an amplified image;

[0028] Each pixel in the enlarged image is added to the brightness enhancement value to obtain the brightness enhanced image.

[0029] In a second aspect, the present application also provides an image enhancement device. The device comprises:

[0030] An acquisition module, used for acquiring a color image to be processed;

[0031] An extraction module, used for performing brightness extraction on the color image to be processed to obtain an initial brightness map;

[0032] A calculation module, used for performing calculation based on the initial brightness map to obtain a brightness enhancement value;

[0033] The enhancement module is used to obtain a brightness enhanced image according to the brightness enhancement value and the color image to be processed.

[0034] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method in any one of the above embodiments are implemented.

[0035] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method in any one of the above embodiments are implemented.

[0036] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the method in any one of the above embodiments are implemented.

[0037] The above-mentioned image enhancement method, device, computer equipment, storage medium and computer program product, firstly, because the server will extract the brightness of the color image to be processed and obtain an initial brightness map of a single channel, it can not only reduce the amount of calculation but also avoid the color cast problem in the subsequent texture extraction; secondly, the calculated brightness enhancement value is added to the RGB three channels, which can keep the image at a high clarity. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 A diagram showing an application environment of an image enhancement method in an embodiment;

[0039] Figure 2 is a schematic diagram of filters in different directions in one embodiment;

[0040] Figure 3(a) is the brightness enhanced image with the smallest absolute difference;

[0041] Figure 3(b) is the brightness enhanced image with the largest absolute difference;

[0042] FIG4( a ) is a schematic diagram of a brightness enhanced image in one embodiment;

[0043] FIG4( b ) is a schematic diagram of a brightness enhanced image in another embodiment;

[0044] Figure 5 is a structural block diagram of an image enhancement device in one embodiment;

[0045] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0047] In one embodiment, Figure 1 As shown, an image enhancement method is provided, comprising the following steps:

[0048] S102, obtaining a color image to be processed.

[0049] Among them, a color image refers to an image with various colors obtained by superimposing the three color channels of red, green and blue, such as an RGB image.

[0050] S104, performing brightness extraction on the color image to be processed to obtain an initial brightness map.

[0051] Optionally, the brightness of the three channels of the color image to be processed can be extracted respectively to obtain the brightness value corresponding to each pixel, and then obtain an initial brightness map. The initial brightness map refers to the image obtained after the brightness of the color image to be processed is extracted, which is used to characterize the brightness of the image.

[0052] Optionally, the three channels may be extracted with a certain pixel extraction coefficient. For example, 20% of each of the three channels may be extracted and then added to obtain the corresponding brightness value. For example, assuming that the current pixel point is represented as (250, 251, 252), the brightness value is: 0.2*250+0.2*251+252*0.2=150.6. In other embodiments, the pixel extraction coefficients corresponding to each channel of the color image to be processed may be different.

[0053] Alternatively, brightness extraction can be performed using a server built-in conversion function, such as the rgb2gray function.

[0054] S106, performing calculation based on the initial brightness map to obtain a brightness enhancement value.

[0055] Optionally, the server may calculate the initial brightness map to obtain a target brightness map, and then obtain the brightness enhancement value corresponding to each pixel according to the difference between the target brightness map and the initial brightness map. The target brightness map refers to an image that retains the required texture content after performing linear transformation, filtering, and other operations on the initial brightness map.

[0056] Optionally, the server may filter the initial brightness map through different filters to obtain a target brightness map retaining texture content. For example, the server may filter the initial brightness map through a side window filter, or may filter the initial brightness map through a side window filter and a guide filter to obtain a target brightness map.

[0057] Optionally, the server may subtract the target brightness map from the initial brightness map to obtain a brightness enhancement value. For example, if the target brightness value of a pixel in the target brightness map is a and the initial brightness value of the pixel in the initial brightness map is b, then the brightness enhancement value of the pixel is ab.

[0058] S108, obtaining a brightness enhanced image according to the brightness enhancement value and the color image to be processed.

[0059] Specifically, after obtaining the brightness enhancement value, the server adds the brightness enhancement value to the three channels corresponding to each pixel to obtain a brightness enhanced image. For example, assuming that opY is the brightness enhancement value, then

[0060] R+=opY; G+=opY; B+=opY Formula (1)

[0061] The brightness enhanced image can be obtained by formula (1).

[0062] In the above image enhancement method, firstly, since the server will perform brightness extraction on the color image to be processed and obtain an initial brightness map of a single channel, it can not only reduce the amount of calculation but also avoid color cast problems in subsequent texture extraction; secondly, adding the calculated brightness enhancement value to the RGB three channels can keep the image at a high clarity.

[0063] In one embodiment, performing brightness extraction on the color image to be processed to obtain an initial brightness map includes: obtaining pixel extraction coefficients; and obtaining the initial brightness map according to the pixel extraction coefficients and the color image to be processed.

[0064] The pixel extraction coefficient refers to a pre-set coefficient for extracting the brightness of a pixel point, which can be a specific value or a set. When the extraction coefficients for each channel are the same, the pixel extraction coefficient can be a specific value, such as 0.2126; when the ratios for each channel are different, it can be a set, such as {a, b, c}, where a, b, c represent the extraction coefficients for the three channels of R, G, and B, respectively.

[0065] Optionally, the server obtains a pixel extraction coefficient, and performs brightness extraction on each pixel in the color image to be processed according to the pixel extraction coefficient, obtains a brightness value corresponding to each pixel, and further obtains an initial brightness map.

[0066] Optionally, the server may obtain corresponding pixel extraction coefficients according to the color gamut type of the display device and the video.

[0067] For example, when the color gamut type of the display device and the video is ITU BT.709, the pixel extraction coefficient is {0.2126, 0.7152, 0.0722}, and the initial brightness value Y can be calculated according to formula (2). The specific calculation process is as follows:

[0068] Y=0.2126*R+0.7152*G+0.0722*B Formula (2)

[0069] For example, when the color gamut type of the display device and the video is ITU BT.601, the pixel extraction coefficient is {0.299, 0.587, 0.144}. At this time, the corresponding coefficients of R, G and B in formula (2) are modified to 0.299, 0.587 and 0.144 respectively, and then the initial brightness value Y is calculated when the color gamut type of the display device and the video is ITU BT.601.

[0070] In the above embodiment, the brightness value corresponding to the color image to be processed can be accurately calculated through the pixel extraction coefficient, and thus the initial brightness map of the color image to be processed can be accurately represented.

[0071] In one embodiment, calculating based on the initial brightness map to obtain the brightness enhancement value includes: filtering based on the initial brightness map and a filter coefficient to obtain a target brightness map; and obtaining the brightness enhancement value according to the target brightness map and the initial brightness map.

[0072] The filter coefficient is a value calculated in advance and used to guide the filter to perform linear transformation. The specific calculation process can refer to the following embodiment of calculating the filter coefficient.

[0073] Optionally, the server may first perform a linear transformation on each pixel in the initial brightness map according to the filter coefficient and then filter the image using a filter, for example, a side window filter, a mean filter, etc., to obtain a target brightness map.

[0074] Optionally, obtaining the brightness enhancement value according to the target brightness map and the initial brightness map includes: subtracting the target brightness map and the initial brightness map to obtain a difference map; and obtaining the brightness enhancement value according to the difference map and a sharpening coefficient.

[0075] For example, the brightness enhancement value corresponding to each pixel can be calculated according to formula (3), and the specific calculation process is as follows:

[0076] opY=(Iq)·λ Formula (3)

[0077] Where I is the guide map, which is the same as the initial brightness map; q is the target brightness map, Iq represents the difference map, and λ is the sharpening coefficient. The sharpening coefficient can control the global sharpening degree.

[0078] In the above embodiment, the brightness enhancement value corresponding to each pixel can be calculated by formula (3), and the intensity of global sharpening can be controlled by the sharpening coefficient.

[0079] In one embodiment, filtering is performed based on the initial brightness map and the filter coefficient to obtain a target brightness map, including: filtering each pixel in the initial brightness map in different directions according to the filter coefficient to obtain a filtered pixel value corresponding to each pixel; combining the brightness value of each pixel and the filtered pixel value to obtain the target brightness map.

[0080] Optionally, the server may first construct filters of different directions, and then use the filters of different directions to filter each pixel in the initial brightness image in different directions according to the filter coefficients, to obtain the filtered pixel values ​​of each pixel corresponding to the filters of different directions. The filtered pixel values ​​refer to the pixel values ​​obtained after filtering each pixel.

[0081] Optionally, the server may set the filter to a filter without a sawtooth shape, which is more convenient for traversal calculation. Figure 2 As shown, Figure 2 Schematic diagram of filters in different directions in one embodiment, respectively representing filters in eight directions: left, right, up, down, northwest, northeast, southeast, and southwest. Figure 2 The filters in are all positive or rectangular.

[0082] Optionally, after filtering the initial brightness value using the filter in each direction, a filtered pixel value of the corresponding pixel will be obtained, so the filtered pixel value can be screened in combination with the current brightness value of each pixel to obtain a target brightness map.

[0083] Optionally, the filtered pixel value corresponding to the current pixel point may be subtracted from the current brightness value of the current pixel point to obtain an absolute difference, and a target brightness value may be selected according to the absolute difference, thereby obtaining a target brightness map.

[0084] Optionally, the server can select the filtered pixel with the largest or smallest absolute value of brightness with the current pixel as the target brightness value according to the retention of edge contour information in the brightness enhanced image. Exemplarily, if more edge contours need to be retained in the brightness enhanced image, the filtered pixel with the largest absolute value is selected as the target brightness value. Conversely, the filtered pixel with the smallest absolute difference is selected as the target brightness value. Specifically, Figure 3(a) and Figure 3(b) can be compared, where Figure 3(a) selects the filtered pixel with the smallest absolute difference as the target brightness value, and Figure (b) selects the filtered pixel with the largest absolute difference as the target brightness value. Among them, the edge information retained in Figure 3(b) is more than that retained in Figure 3(a). Figure 3(a) is a brightness enhanced image with the smallest absolute difference, and Figure 3(b) is a brightness enhanced image with the largest absolute difference.

[0085] Exemplarily, the server may obtain the target brightness map according to the following pseudo code. In this embodiment, a side window filter with a filter kernel size of 3×3 is used.

[0086]

[0087] The server processes each pixel in the brightness map by traversing the rows and columns, and then performs a, b transformation on each pixel, where a and b are filter coefficients. Then, the filtering operation of 8 filters is performed to obtain the filter output value, that is, conv_res[i]. The filter output value is then subtracted from the brightness value corresponding to the current pixel to obtain the absolute difference abs_diff[i]. Finally, the filter output value with the smallest or largest difference from the brightness value of the current pixel position is selected as the target brightness value, and the output image q, that is, the target brightness map, is obtained.

[0088] In the above embodiment, the server can obtain the filtering pixel value with the largest or closest texture difference to the original image by configuring the side window filter, and control the texture preservation at the edge contour according to the selected filtering pixel value.

[0089] In one embodiment, the calculation method of the filter coefficient includes: transforming the initial brightness map to obtain a guided output map; obtaining a target function according to the guided output map and the initial brightness value; and solving the target function to obtain the filter coefficient.

[0090] Optionally, the server performs a linear transformation on the pixels in the initial brightness image to obtain a linearly transformed output image Q, that is, a guided output image. Exemplarily, the guided image can be linearly transformed using formula (4).

[0091]

[0092] Among them, I is the guide image, that is, the initial brightness image. For any position k in the image, the filter window is w k .

[0093] In order to make the output image Q and the input image p roughly the same locally, the difference between the image Q and the input image p can be minimized to ensure the local similarity. Since the input image in this embodiment is an initial brightness image, the server can construct an objective function based on the initial brightness image and the guided output image, and obtain the filter coefficient by solving the objective function.

[0094] Exemplarily, the server may take minimizing the mean square error between the initial brightness map and the guided output map as the objective function, as shown in formula (5).

[0095]

[0096] Then for a k and b k Taking partial derivatives, we obtain formula (6) and formula (7).

[0097]

[0098]

[0099] Make a k and b k The partial derivative is equal to 0, so we can solve for a k and b k , and then a and b can be calculated based on the guidance map I and the input image p. For the specific calculation process, please refer to formulas (8) to (11).

[0100] Var I =f mean (I·I)-f mean (I)·f mean (I) Formula (8)

[0101] Cov Ip =f mean (I·P)-f mean (I)·f mean (p) Formula (9)

[0102]

[0103] b=f mean (p)-a·f mean (I) Formula (11)

[0104] Among them, f mean Represents mean filtering. Since the guide image I and the input image p are the same, both are initial brightness images, the calculation steps of a and b can be simplified as:

[0105]

[0106] b=(1-a)·f mean (Y) Formula (13)

[0107] Then, at this time, the formula for guiding the filter to calculate the output image Q using coefficient ab is:

[0108] Q=f mean (a)·I+f mean (b) Formula (14)

[0109] From formulas (12) to (14), it can be seen that for the output image Q, the larger the ε, the greater the effect of the mean filter, and the smaller the ε, the greater the effect of the guide map I. Therefore, the details that need to be retained can be controlled by adjusting ε. For Iq, the larger the ε, the more high-frequency details are retained, and the smaller the ε, the more areas of the output image q are similar to the guide map I, and there are fewer If in Iq. mean (I) Sufficiently large high-frequency details are preserved. As shown in Figure 4(a) and Figure 4(b), when ε is small, less texture information on the white original tower on the right is preserved, while the high-frequency noise of the sky on the left is preserved. Figure 4(a) is a brightness-enhanced image with ε=0.001 and λ=5; Figure 4(b) is a brightness-enhanced image with ε=0.5 and λ=3.

[0110] In the above embodiment, the server can calculate accurate filter coefficients by solving the objective function, and then filter the initial brightness image.

[0111] In one embodiment, a brightness enhanced image is obtained according to the brightness enhancement value and the color image to be processed, including: amplifying the color image to be processed to obtain an enlarged image; and adding each pixel in the enlarged image to the brightness enhancement value to obtain the brightness enhanced image.

[0112] Optionally, the server may select any upsampling method to enlarge the color image to be processed, such as bilinear interpolation, bicubic interpolation, Lanczos interpolation, etc., to obtain an enlarged image.

[0113] Specifically, the server adds each pixel in the enlarged image to the brightness enhancement value corresponding to each pixel to obtain the final required brightness enhancement image, which can be calculated according to formula (1).

[0114] For example, if a pixel of the enlarged image is [100, 120, 140], and the brightness enhancement value corresponding to the pixel is 10, then the pixel will be [110, 130, 150] after brightness enhancement. It should be noted that the brightness enhancement value is single-channel, so each pixel corresponds to only one value, that is, the same brightness enhancement value is added to each channel of each pixel in the enlarged image.

[0115] In an exemplary embodiment, an image enhancement method is provided, and the specific process is as follows:

[0116] (1) The initial brightness map Y is calculated by formula (2).

[0117] (2) The filter coefficients are calculated according to formulas (4) to (13).

[0118] (3) Use the side window filters in different directions to calculate the coefficients a and b at each position of Y, and then calculate the corresponding filtered pixel values, and select the target brightness value from the filtered pixel values. In this embodiment, the filtered pixel point with the largest or smallest absolute brightness value with respect to the current pixel point can be selected as the target brightness value according to the retention of the edge contour information in the brightness enhanced image, thereby obtaining the target brightness map.

[0119] (4) The initial brightness map and the target brightness map are calculated using formula (3) to obtain a brightness enhancement value.

[0120] (5) The color image to be processed is upsampled, and then the brightness enhancement value is applied to each pixel in the color image to be processed to obtain a brightness enhanced image.

[0121] In this embodiment, by configuring the sharpening coefficients λ, ε and the selection of the absolute difference of the side window filter, the content and intensity of the texture information in the brightness enhancement value opY can be controlled, and the degree of freedom of controlling the content and intensity of the texture information is relatively high.

[0122] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0123] Based on the same inventive concept, the embodiment of the present application also provides an image enhancement device for implementing the above-mentioned image enhancement method. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above-mentioned method, so the specific limitations in one or more image enhancement device embodiments provided below can refer to the above-mentioned limitations on the image enhancement method, and will not be repeated here.

[0124] In one embodiment, Figure 5 As shown, an image enhancement device is provided, comprising: an acquisition module 100, an extraction module 200, a calculation module 300 and an enhancement module 400, wherein:

[0125] The acquisition module 100 is used to acquire a color image to be processed.

[0126] The extraction module 200 is used to perform brightness extraction on the color image to be processed to obtain an initial brightness map.

[0127] The calculation module 300 is used to perform calculation based on the initial brightness map to obtain a brightness enhancement value.

[0128] The enhancement module 400 is used to obtain a brightness enhanced image according to the brightness enhancement value and the color image to be processed.

[0129] In one embodiment, the extraction module 200 includes:

[0130] The pixel coefficient unit is used to obtain the pixel extraction coefficient.

[0131] The brightness extraction unit is used to obtain an initial brightness map according to the pixel extraction coefficient and the color image to be processed.

[0132] In one embodiment, the enhancement module 400 includes:

[0133] The filtering unit is used to perform filtering based on the initial brightness map and the filtering coefficient to obtain a target brightness map.

[0134] The pixel enhancement unit is used to obtain a brightness enhancement value according to the target brightness map and the initial brightness map.

[0135] In one embodiment, the filtering unit comprises:

[0136] The difference subunit is used to perform a difference between the target brightness map and the initial brightness map to obtain a difference map.

[0137] The sharpening subunit is used to obtain a brightness enhancement value according to the difference map and the sharpening coefficient.

[0138] In one embodiment, the pixel enhancement unit comprises:

[0139] A subunit is constructed to filter each pixel in the initial brightness image in different directions according to the filter coefficient to obtain a filtered pixel value corresponding to each pixel.

[0140] The target brightness subunit is used to combine the brightness value of each pixel and the filtered pixel value to obtain a target brightness map.

[0141] In one embodiment, the extraction module 200 further includes:

[0142] The guiding unit is used to transform the initial brightness map to obtain a guiding output map.

[0143] The calculation unit is used to obtain the target function according to the guided output image and the initial brightness value.

[0144] The solving unit is used to solve the objective function to obtain the filter coefficient.

[0145] In one embodiment, the enhancement module 400 includes:

[0146] The enlarging unit is used to enlarge the color image to be processed to obtain an enlarged image.

[0147] The pixel processing unit is used to add each pixel in the enlarged image to the brightness enhancement value to obtain a brightness enhanced image.

[0148] Each module in the above-mentioned image enhancement device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0149] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store color image data to be processed. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an image enhancement method is implemented.

[0150] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0151] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps of the method in any one of the above embodiments are implemented.

[0152] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method in any one of the above embodiments are implemented.

[0153] In one embodiment, a computer program product is provided, comprising a computer program, which implements the steps of the method in any one of the above embodiments when executed by a processor.

[0154] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0155] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0156] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0157] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. An image enhancement method, characterized in that: The method comprises: Acquire a color image to be processed; the color image is an image obtained by superimposing three color channels of red, green and blue; According to the color gamut type of the display device and the video, the pixel extraction coefficients corresponding to the three color channels of red, green and blue are obtained respectively; the pixel extraction coefficients refer to the pre-set coefficients for extracting the brightness of the pixel points; Obtaining an initial brightness map according to the pixel extraction coefficient and the color image to be processed; Perform filtering based on the initial brightness map and the filter coefficient to obtain a target brightness map; Obtaining a brightness enhancement value according to the target brightness map and the initial brightness map; Amplifying the color image to be processed to obtain an amplified image; Each pixel in the enlarged image is added to the brightness enhancement value to obtain a brightness enhanced image.

2. The method according to claim 1, characterized in that The step of obtaining a brightness enhancement value according to the target brightness map and the initial brightness map includes: Subtracting the target brightness map from the initial brightness map to obtain a difference map; The brightness enhancement value is obtained according to the difference map and the sharpening coefficient.

3. The method according to claim 1, characterized in that: The filtering based on the initial brightness map and the filter coefficient to obtain the target brightness map includes: According to the filtering coefficient, each pixel in the initial brightness image is filtered in different directions to obtain a filtering pixel value corresponding to each pixel; The target brightness map is obtained by combining the brightness values ​​of each pixel and the filtered pixel value.

4. The method according to claim 1, characterized in that: The calculation method of the filter coefficient includes: Performing a linear transformation according to the initial brightness map to obtain a guided output map; Obtaining an objective function according to the guided output graph and the initial brightness value; The objective function is solved to obtain the filter coefficient.

5. An image enhancement device, characterized in that: The device comprises: An acquisition module is used to acquire a color image to be processed; the color image is an image obtained by superimposing three color channels of red, green and blue; An extraction module is used to obtain pixel extraction coefficients corresponding to the three color channels of red, green and blue respectively according to the color gamut type of the display device and the video; an initial brightness map is obtained according to the pixel extraction coefficients and the color image to be processed; the pixel extraction coefficients refer to the pre-set coefficients for brightness extraction of the pixel points; A calculation module, used for performing calculation based on the initial brightness map to obtain a brightness enhancement value; An enhancement module, used for obtaining a brightness enhanced image according to the brightness enhancement value and the color image to be processed; The enhancement module comprises: A filtering unit, configured to perform filtering based on the initial brightness map and a filtering coefficient to obtain a target brightness map; A pixel enhancement unit, used for obtaining the brightness enhancement value according to the target brightness map and the initial brightness map; an enlarging unit, used for enlarging the color image to be processed to obtain an enlarged image; The pixel processing unit is used to add each pixel in the enlarged image to the brightness enhancement value to obtain the brightness enhanced image.

6. The device according to claim 5, characterized in that The filtering unit comprises: A difference subunit, used for performing a difference between the target brightness map and the initial brightness map to obtain a difference map; The sharpening subunit is used to obtain the brightness enhancement value according to the difference map and the sharpening coefficient.

7. The device according to claim 5, characterized in that The pixel enhancement unit comprises: A construction subunit is used to filter each pixel in the initial brightness image in different directions according to the filter coefficient to obtain a filter pixel value corresponding to each pixel; The target brightness subunit is used to combine the brightness value of each pixel and the filtered pixel value to obtain the target brightness map.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

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 steps of the method according to any one of claims 1 to 4 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Self-adaptation image quality enhancing method capable of overcoming non-uniform illumination of colored image

    CN103106644A

  • Image signal color enhancement method and image signal color enhancement device

    CN104796682A

  • Image enhancement method based on all 1*1 convolution neural network

    CN109255758A

  • Low illumination image enhancement system for aided driving

    CN110909686A

  • Image enhancement method and device and terminal equipment

    CN111383178A