Image enhancement method, device and storage medium
By acquiring the pixel weight value of the image and using recursive Laguerre polynomial transformation, the fusion processing of fixed integral and weighted filtering is solved, and the contrast is not enhanced and image distorted is achieved, and the contrast is natural and effective Improved image enhancement.
Patent Information
- Application Number
- CN202411166382.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-08-23
AI Technical Summary
The existing image enhancement algorithms have poor contrast enhancement effects on image highlighting areas and are prone to image distortion.
By obtaining the pixel weight value in the original image, transforming the image using multiple preset transformation relationships (such as recursive Laguer polynomials), performing a fixed integral operation, obtaining a fixed integral image, and transforming it based on the pixel weight value. The images are weighted filtered and fused to generate enhanced images.
It effectively avoids image distortion and improves image enhancement effect, making the enhanced image contrast more natural and avoids the problem of abrupt contrast.
Smart Images

Figure CN118674665B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an image enhancement method, device and storage medium. Background Art
[0002] There are many problems with images obtained by image sensors, such as lack of prominent details and blurred images, which are not conducive to subsequent scientific research and also affect people's visual experience. Therefore, image enhancement, as an important branch of image processing, continues to attract the attention of many scientific workers.
[0003] Existing image enhancement algorithms can be roughly divided into: statistics-based image enhancement algorithms, such as global histogram enhancement methods, local histogram enhancement methods, Contrast Limited Adaptive Histogram Equalization (CLAHE) algorithm, etc.; layered image enhancement methods, such as the Retinex algorithm, methods that use filtering or equation optimization to extract high frequencies for image enhancement, etc.; learning-based image enhancement algorithms, such as sparse coding methods, deep learning methods, etc.
[0004] The current image enhancement algorithms have problems such as unsatisfactory contrast enhancement effect on image highlight areas and image distortion caused by gradient inversion. Summary of the invention
[0005] In order to solve the above technical problems, the present application at least provides an image enhancement method, device and storage medium.
[0006] The first aspect of the present application provides an image enhancement method, which includes: obtaining an original image and pixel weight values corresponding to each pixel in the original image, and using multiple preset transformation relationships to transform the pixel values in the original image respectively to obtain multiple transformed images; performing definite integral operations on the multiple preset transformation relationships, and using the multiple definite integral formulas obtained to calculate the definite integral images corresponding to the original image; and, based on the pixel weight values, performing weighted filtering processing on the multiple transformed images respectively to obtain multiple weighted filtered images; and using the multiple weighted filtered images to perform weighted fusion processing on the multiple definite integral images to obtain an enhanced image.
[0007] In one embodiment, the plurality of preset transformation relationships include a plurality of recursive Laguerre polynomials; the pixel values in the original image are transformed respectively using the plurality of preset transformation relationships to obtain a plurality of transformed images, including: the pixel values in the original image are transformed respectively using the plurality of recursive Laguerre polynomials to obtain a plurality of transformed images.
[0008] In one embodiment, a pixel value mapping table is pre-stored for each Laguerre polynomial, and the pixel value mapping table is used to store pixel values obtained after different pixel values are transformed by the corresponding Laguerre polynomial; the pixel values in the original image are transformed respectively using multiple recursive Laguerre polynomials to obtain multiple transformed images, including: obtaining the pixel value mapping table corresponding to each Laguerre polynomial; and using each pixel value mapping table to transform the pixel values in the original image respectively to obtain multiple transformed images.
[0009] In one embodiment, definite integral operations are performed on multiple preset transformation relationships, and the definite integral images corresponding to the original image are calculated using the multiple definite integral formulas obtained, including: determining adjacent Laguerre polynomials in a recursive order to obtain adjacent polynomial pairs; performing subtraction operations on each polynomial pair to obtain multiple definite integral formulas; and using the multiple definite integral formulas to calculate the definite integral images corresponding to the original image.
[0010] In one embodiment, multiple recursive Laguerre polynomials are used to transform the pixel values in the original image respectively to obtain multiple transformed images, including: normalizing the pixel values in the original image to obtain a normalized image; using multiple recursive Laguerre polynomials to transform the pixel values in the normalized image respectively to obtain multiple transformed images.
[0011] In one embodiment, a plurality of definite integral images are weighted fused based on a plurality of weighted filtered images to obtain an enhanced image, including: a plurality of definite integral images are weighted fused based on a plurality of weighted filtered images to obtain a weighted fused image; and pixel values in the weighted fused image are mapped to the original pixel space of the original image to obtain an enhanced image.
[0012] In one embodiment, a plurality of definite integral images are weightedly fused based on a plurality of weighted filtered images to obtain an enhanced image, including: a plurality of definite integral images are weightedly fused based on a plurality of weighted filtered images to obtain a weighted fused image; respectively obtaining weighted weights of the weighted fused image and the original image; and using the weighted weights, performing weighted summation on the weighted fused image and the original image to obtain an enhanced image.
[0013] In one embodiment, a weighted fusion process is performed on a plurality of definite integral images based on a plurality of weighted filter images to obtain a weighted fused image, including: performing multiplication operations on the weighted filter images and definite integral images associated with the same preset transformation relationship to obtain a plurality of weighted images; and performing a sum operation on the plurality of weighted images to obtain a weighted fused image.
[0014] The second aspect of the present application provides an image enhancement device, which includes: a weight acquisition and pixel transformation module, which is used to obtain the original image and the pixel weight values corresponding to each pixel in the original image, and use multiple preset transformation relationships to transform the pixel values in the original image respectively to obtain multiple transformed images; a definite integral calculation module, which is used to perform definite integral operations on multiple preset transformation relationships, and use the calculated multiple definite integral formulas to calculate the definite integral images corresponding to the original image; a weighted filtering module, which is used to perform weighted filtering processing on multiple transformed images based on pixel weight values to obtain multiple weighted filtered images; a weighted fusion module, which is used to perform weighted fusion processing on multiple definite integral images using multiple weighted filtered images to obtain an enhanced image.
[0015] A third aspect of the present application provides an electronic device, including a memory and a processor, wherein the processor is used to execute program instructions stored in the memory to implement the above-mentioned image enhancement method.
[0016] A fourth aspect of the present application provides a computer-readable storage medium having program instructions stored thereon, which implement the above-mentioned image enhancement method when the program instructions are executed by a processor.
[0017] The above scheme obtains the original image and the pixel weight values corresponding to each pixel in the original image, and uses multiple preset transformation relationships to transform the pixel values in the original image respectively to obtain multiple transformed images; performs definite integral operations on the multiple preset transformation relationships, and uses the multiple definite integral formulas obtained to calculate the definite integral images corresponding to the original image; and, based on the pixel weight values, performs weighted filtering processing on the multiple transformed images respectively to obtain multiple weighted filtered images; uses the multiple weighted filtered images to perform weighted fusion processing on the multiple definite integral images to obtain an enhanced image. A discrete image can be processed continuously, so that the contrast of the enhanced image is not abrupt, image distortion is avoided, and the image enhancement effect is improved.
[0018] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.
[0020] Figure 1 It is a schematic diagram of an implementation environment of a solution provided by an embodiment of the present application;
[0021] Figure 2 is a flow chart of an image enhancement method shown in an exemplary embodiment of the present application;
[0022] Figure 3 is a flow chart of an image enhancement method shown in another exemplary embodiment of the present application;
[0023] Figure 4 is a block diagram of an image enhancement device shown in an exemplary embodiment of the present application;
[0024] Figure 5 is a schematic structural diagram of an electronic device shown in an exemplary embodiment of the present application;
[0025] Figure 6 It is a schematic diagram of the structure of a computer-readable storage medium shown in an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0026] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.
[0027] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.
[0028] The term "and / or" in this article is only an association information describing the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the previous and next associated objects are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of, for example, including at least one of A, B, and C, can mean including any one or more elements selected from the set consisting of A, B, and C.
[0029] The image enhancement method provided in the embodiments of the present application is described below.
[0030] Please refer to Figure 1 , which shows a schematic diagram of a solution implementation environment provided by an embodiment of the present application. The solution implementation environment may include a terminal 110 and a server 120, and the terminal 110 and the server 120 are connected to each other in communication.
[0031] The number of the terminal 110 may be one or more. The terminal 110 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart watch, etc., but is not limited thereto.
[0032] Server 120 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.
[0033] In one example, the server 120 may perform enhancement processing on the original image obtained from the terminal 110 to obtain an enhanced image. Of course, the server 120 may store the enhanced image locally, transmit it back to the terminal 110, or transmit it to other terminals.
[0034] In one example, a client running a target application is installed in the terminal 110, such as an application providing image enhancement function. The server 120 may be a background server of the target application, configured to provide background services for the client of the target application.
[0035] In the image enhancement method provided in the embodiment of the present application, the execution subject of each step can be the terminal 110, such as the client of the target application installed and running in the terminal 110, or the server 120, or the terminal 110 and the server 120 can interact and cooperate to execute, that is, part of the steps of the method are executed by the terminal 110 and the other steps are executed by the server 120.
[0036] See also Figure 2 , Figure 2 is a flowchart of an image enhancement method shown in an exemplary embodiment of the present application. The image enhancement method can be applied to Figure 1 It should be understood that the method can also be applied to other exemplary implementation environments and be specifically executed by devices in other implementation environments, and this embodiment does not limit the implementation environment to which the method is applicable.
[0037] like Figure 2 As shown, the image enhancement method at least includes steps S210 to S240, which are described in detail as follows:
[0038] Step S210: obtaining an original image and pixel weight values corresponding to each pixel in the original image, and using a plurality of preset transformation equations to transform the pixel values in the original image respectively to obtain a plurality of transformed images.
[0039] The original image is the image that needs to be enhanced.
[0040] The pixel weight value corresponding to each pixel in the original image is obtained. Specifically, the pixel weight value is determined according to the size of the pixel value of the pixel.
[0041] In some embodiments, the pixel value of a pixel is mapped to a corresponding pixel weight value based on an exponential operation. (x is the input pixel value) requires a lot of computing resources, so a weight lookup table is established in advance, and the weight lookup table is used to store the pixel weight value corresponding to each pixel value. For example, for an 8-bit image, a pixel includes 256 pixel values, then the pixel weight values corresponding to the 256 pixel values are pre-calculated and stored in the weight lookup table. The weight lookup table can be directly queried later to obtain the pixel weight value corresponding to each pixel in the original image.
[0042] Optionally, the available storage resources of the execution entity are queried. If the available storage resources are greater than a preset storage resource threshold, the weight query table is sent to the execution entity for storage, so that in a subsequent response to an enhancement request for the original image, the pixel weight values corresponding to each pixel in the original image can be queried from the weight query table; if the available storage resources are not greater than the preset storage resource threshold, the weight query table is not stored in the execution entity, and in response to the enhancement request for the original image, the pixel values of each pixel in the original image are mapped to corresponding pixel weight values using a preset weight mapping formula.
[0043] Furthermore, a preset transformation relationship is obtained, and the preset transformation relationship is used to transform the original image into another domain. The preset transformation relationship can be implemented based on Laguerre polynomials, Newton interpolation formulas, polynomial interpolation formulas, etc., and can be flexibly selected according to actual application conditions. This application does not limit this.
[0044] The pixel values of each pixel in the original image are transformed respectively using a plurality of preset transformation relationships to obtain a plurality of transformed images.
[0045] Among them, the preset transformation relationship corresponding to the original image can be pre-set; or the relationship set can contain multiple selectable preset transformation relationships. According to the category of the current original image, the enhancement strength, the amount of computing resources available to the execution subject, etc., the number of relationships and / or the type of relationships to be selected are determined, so as to select the corresponding preset transformation relationship from the relationship set according to the number of relationships and / or the type of relationships.
[0046] In some implementations, before executing the above steps, the original image needs to be preprocessed, such as image cropping, image denoising, pixel normalization, etc.
[0047] Step S220: performing definite integral operations on a plurality of preset transformation relations, and using the plurality of definite integral formulas obtained by calculation to calculate a definite integral image corresponding to the original image.
[0048] For example, assume that the original image after preprocessing is represented as , the corresponding multiple preset transformation relations include , then the definite integral operation of the preset transformation relationship can be expressed as the following formula 1:
[0049] (Formula 1)
[0050] The value of i is an integer from 1 to m. is the calculated definite integral formula.
[0051] The definite integral formula calculated by the above formula 1 is used to map the pixels in the preprocessed original image to obtain multiple definite integral images. The definite integral images can be recorded as .
[0052] Step S230: performing weighted filtering processing on the plurality of transformed images based on pixel weight values to obtain a plurality of weighted filtered images.
[0053] In addition, weighted filtering is performed on the plurality of transformed images according to pixel weight values to obtain a plurality of weighted filtered images, wherein the weighted filtering can be performed on the plurality of transformed images by using mean filtering, Gaussian filtering, bilateral filtering, etc.
[0054] For example, taking mean filtering as an example, obtain the original image after preprocessing The pixel weight value corresponding to each pixel in the image is obtained, and the weight map is expressed as , assuming the transformed image is , then the weighted filtering process for the transformed image can refer to the following formula 2:
[0055] (Formula 2)
[0056] in, means The corresponding weighted filtered image, i is an integer from 1 to m, m is the number of transformed images, is the filtering range. Used to control the locality of image enhancement, The larger the value, the more the image enhancement tends to be global, the contrast effect of image enhancement is poor, but it is less likely to have black and white edges. The smaller the value, the more local the image enhancement tends to be, and the texture details of the image are more prominent, but black and white edges are prone to appear. Therefore, the value can be determined based on the category, size, enhancement strength, etc. of the current original image. The value of .
[0057] Step S240: performing weighted fusion processing on multiple definite integral images using multiple weighted filter images to obtain an enhanced image.
[0058] The weighted filtered image is used as the weight of its associated definite integral image to perform weighted fusion processing on multiple definite integral images to obtain an enhanced image.
[0059] The present application uses the form of integration to process a discrete image continuously, so that the contrast of the enhanced image is not abrupt, image distortion is avoided, and the image enhancement effect is improved.
[0060] Next, some embodiments of the present application are described in detail.
[0061] In some embodiments, the plurality of preset transformation relationships include a plurality of recursive Laguerre polynomials; in step S210, the pixel values in the original image are transformed respectively using the plurality of preset transformation relationships to obtain a plurality of transformed images, including: the pixel values in the original image are transformed respectively using the plurality of recursive Laguerre polynomials to obtain a plurality of transformed images.
[0062] Optionally, before using multiple recursive Laguerre polynomials to transform the pixel values in the original image respectively, the pixel values in the original image are normalized to obtain a normalized image. Then, using multiple recursive Laguerre polynomials to transform the pixel values in the normalized image respectively, a plurality of transformed images are obtained.
[0063] Specifically, the pixel values in the original image are mapped to the interval [0, 1] to achieve normalization processing. The relevant formula can be found in the following formula 3:
[0064] (Formula 3)
[0065] in, is the normalized image after normalization processing, I is the pixel value of any pixel in the original image, M is the number of bits of the original image, and the value of M is 8, 10, 12, etc.
[0066] For example, for an 8-bit original image, the pixel value ranges from 256, from 0 to 255. After normalizing each pixel of the original image, the pixel value ranges from 0 to 1, such as 128 corresponds to 0.5.
[0067] Since Laguerre polynomials are orthogonal in the non-negative number domain, and in order to unify the image processing of different bit widths, the original image is normalized in advance.
[0068] Then, the pixel values in the original image are transformed respectively using a plurality of recursive Laguerre polynomials to obtain a plurality of transformed images.
[0069] For example, using the 9th degree Laguerre polynomial, specifically including:
[0070]
[0071]
[0072]
[0073]
[0074]
[0075]
[0076]
[0077]
[0078]
[0079] Among them, x is the input value, which corresponds to the normalized image obtained above .
[0080] Through the above-mentioned Laguerre polynomials, multiple transformation images are calculated respectively, and the transformation images include , ,..., .
[0081] Of course, more Laguerre polynomials may be selected, and this application does not limit this.
[0082] In some embodiments, considering that directly using the Laguerre polynomial for calculation results in a large amount of calculation, a recursive Laguerre polynomial may be used for calculation. The formula of the recursive Laguerre polynomial is expressed as the following formula 4:
[0083] (Formula 4)
[0084] Among them, x is the input value, which corresponds to the normalized image obtained above ; n is the formula level, and its value is 0, 1, 2, etc. The specific value can be flexibly set according to actual conditions.
[0085] Multiple transformation images are obtained by sequentially calculating the recursive Laguerre polynomials.
[0086] In some embodiments, in order to further reduce the amount of calculation, a pixel value mapping table is pre-stored for each Laguerre polynomial, and the pixel value mapping table is used to store pixel values obtained after different pixel values are transformed by the corresponding Laguerre polynomial; multiple recursive Laguerre polynomials are used to transform the pixel values in the original image to obtain multiple transformed images, including: obtaining the pixel value mapping table corresponding to each Laguerre polynomial; using each pixel value mapping table to transform the pixel values in the original image to obtain multiple transformed images.
[0087] For example, for an 8-bit original image, the pixel value is 256. The calculation of 256 pixel values is based on arrive The value after the Laguerre polynomial transformation, due to The value of is 1, so we only need to calculate arrive The pixel value mapping table corresponding to each Laguerre polynomial is obtained by using the value of , and the length of each pixel value mapping table is 256. When calculating the transformed image corresponding to each Laguerre polynomial, the pixel value mapping table corresponding to each Laguerre polynomial is obtained, and the pixel value is queried according to each pixel value mapping table to obtain multiple transformed images.
[0088] Optionally, the calculation method of the transformed image can be determined according to the available storage resources of the execution subject. For example, the available storage resources of the execution subject are queried, and if the available storage resources are greater than a preset storage resource threshold, the pixel value mapping table corresponding to each Laguerre polynomial is sent to the execution subject for storage, so that the transformed image can be generated according to the pixel value mapping table later; if the available storage resources are not greater than the preset storage resource threshold, the transformed image is generated using Formula 4.
[0089] In some embodiments, in step S220, definite integral operations are performed on multiple preset transformation relationships, and the definite integral images corresponding to the original image are calculated using the multiple definite integral formulas obtained, including: determining adjacent Laguerre polynomials in a recursive order to obtain adjacent polynomial pairs; performing subtraction operations on the polynomial pairs to obtain multiple definite integral formulas; and using multiple definite integral formulas to respectively calculate the definite integral images corresponding to the original image.
[0090] Taking the 9th-order Laguerre polynomial shown in the above embodiment as an example, the calculated definite integral formula includes:
[0091]
[0092] Through the above multiple definite integral formulas, the definite integral images corresponding to the original image are calculated respectively, which are expressed as , ,..., .
[0093] It should be noted that the more preset transformation relations there are, that is, the more levels of Laguerre polynomials there are, the more levels of corresponding definite integral formulas there are, and the better the image enhancement effect is.
[0094] The number of preset transformation equations can be flexibly determined according to actual conditions. For example, the regional criticality corresponding to the bright area of the original image is obtained. The regional criticality can be determined according to the regional area of the bright area and / or the importance of the image content. The number of preset transformation equations is determined according to the regional criticality corresponding to the bright area. For example, the higher the regional criticality, the larger the number of preset transformation equations is, so as to balance the image contrast enhancement effect and the computing resource requirement.
[0095] Of course, the number of preset transformation relations can also be preset. For example, it has been experimentally measured that the 9th-order Laguerre polynomial (corresponding to the 8th-order definite integral formula) is an ideal solution for contrast enhancement effect and computing resource requirements.
[0096] After obtaining a plurality of transformed images and definite integral images, weighted filtering is performed on each transformed image according to pixel weight values to obtain a plurality of weighted filtered images.
[0097] For example, if the transformed image includes , ,..., , based on formula 2, each transformed image is weighted filtered to obtain multiple weighted filtered images including , ,..., .
[0098] Each weighted filter image is then used to perform weighted fusion processing on each definite integral image to obtain an enhanced image.
[0099] Exemplarily, a weighted fusion process is performed on a plurality of definite integral images based on a plurality of weighted filter images to obtain a weighted fused image: weighted weights of the weighted fused image and the original image are respectively obtained; and the weighted weights are used to perform a weighted summation on the weighted fused image and the original image to obtain an enhanced image.
[0100] Specifically, multiplication operations are performed on the weighted filter image and the definite integral image associated with the same preset transformation relation to obtain a plurality of weighted images; and a sum operation is performed on the plurality of weighted images to obtain a weighted fusion image.
[0101] For example, in combination with the above embodiment, the weighted filtered image includes , ,..., , the definite integral image includes , ,..., , the specific implementation method of weighted fusion processing of multiple definite integral images according to multiple weighted filter images can be referred to the following formula 5:
[0102] (Formula 5)
[0103] Where Res is the weighted fusion image; the value of i is an integer from 1 to 7; The value of is 1, so there is no need to Weighted calculation.
[0104] Furthermore, if the original image is normalized, the pixel values in the weighted fusion image need to be mapped to the original pixel space of the original image to obtain the final weighted fusion image, and the final weighted fusion image and the original image are weighted summed to obtain an enhanced image.
[0105] Specifically, mapping the pixel values in the weighted fusion image to the original pixel space of the original image can refer to the following formula 6:
[0106] (Formula 6)
[0107] Where X is the number of bits of the original image, is the final weighted fusion image.
[0108] Optionally, the final weighted fusion image may be directly used as the enhanced image, or the final weighted fusion image and the original image may be proportionally fused to obtain the enhanced image.
[0109] For example, the ratio fusion of the final weighted fusion image and the original image can be referred to the following formula 7:
[0110] (Formula 7)
[0111] Among them, Ide is the enhanced image; is the weighted weight. The value of is between 0 and 1. The larger it is, the closer the enhanced image Ide is to the original image I, and the weaker the enhancement strength is. The smaller it is, the more the enhanced image Ide tends to be the weighted fusion image , the stronger the enhancement.
[0112] The value can be pre-set or flexibly calculated.
[0113] For example, based on the region keyness corresponding to the bright region of the original image and / or the number of preset transformation relations, determine The higher the regional criticality corresponding to the bright area, the higher the image contrast enhancement requirement corresponding to the original image, and the more the number of preset transformation relations, the higher the The smaller the value, the better to ensure the image enhancement effect in the key area.
[0114] In some embodiments, see Figure 3 , Figure 3 A flowchart of an image enhancement method shown in another exemplary embodiment of the present application is shown in FIG. Figure 3 As shown, the original image is pixel normalized, and then the transformed image is calculated using the Laguerre polynomial, and then the definite integral image is calculated using the definite integral formula corresponding to the Laguerre polynomial; at the same time, the pixel weight value corresponding to each pixel in the original image is obtained according to the weight query table, and the transformed image is weighted filtered according to the pixel weight value to obtain a weighted filtered image; further, the definite integral image and the weighted filtered image are weighted fused, and the pixel values in the weighted fused image are mapped to the original pixel space of the original image; finally, the weighted fused image and the original image are weighted summed to obtain an enhanced image.
[0115] The image enhancement method provided by the present application obtains an original image and a pixel weight value corresponding to each pixel in the original image, and uses a plurality of preset transformation relationships to transform the pixel values in the original image respectively to obtain a plurality of transformed images; performs definite integral operations on the plurality of preset transformation relationships, and uses the plurality of calculated definite integral formulas to calculate the definite integral images corresponding to the original image; and, based on the pixel weight values, performs weighted filtering processing on the plurality of transformed images respectively to obtain a plurality of weighted filtered images; and uses the plurality of weighted filtered images to perform weighted fusion processing on the plurality of definite integral images to obtain an enhanced image. A discrete image can be processed continuously, so that the contrast of the enhanced image is not abrupt, image distortion is avoided, and the image enhancement effect is improved.
[0116] Figure 4 FIG. 1 is a block diagram of an image enhancement device shown in an exemplary embodiment of the present application. Figure 4 As shown, the exemplary image enhancement device 400 includes: a weight acquisition and pixel transformation module 410, a definite integral calculation module 420, a weighted filtering module 430 and a weighted fusion module 440. Specifically:
[0117] The weight acquisition and pixel transformation module 410 is used to acquire the original image and the pixel weight values corresponding to each pixel in the original image, and transform the pixel values in the original image respectively using a plurality of preset transformation relations to obtain a plurality of transformed images;
[0118] The definite integral calculation module 420 is used to perform definite integral operations on a plurality of preset transformation relations, and calculate a definite integral image corresponding to the original image using the calculated plurality of definite integral formulas;
[0119] The weighted filtering module 430 is used to perform weighted filtering processing on the multiple transformed images based on pixel weight values to obtain multiple weighted filtered images;
[0120] The weighted fusion module 440 is used to perform weighted fusion processing on multiple definite integral images using multiple weighted filter images to obtain an enhanced image.
[0121] It should be noted that the image enhancement device provided in the above embodiment and the image enhancement method provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment, and will not be repeated here. In practical applications, the image enhancement device provided in the above embodiment can distribute the above functions to different functional modules as needed, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above, and this is not limited here.
[0122] See also Figure 5 , Figure 5 1 is a schematic diagram of the structure of an embodiment of an electronic device of the present application. The electronic device 500 includes a memory 501 and a processor 502, and the processor 502 is used to execute program instructions stored in the memory 501 to implement the steps in any of the above-mentioned image enhancement method embodiments. In a specific implementation scenario, the electronic device 500 may include but is not limited to: a microcomputer, a server, and in addition, the electronic device 500 may also include a mobile device such as a laptop computer and a tablet computer, which is not limited here.
[0123] Specifically, the processor 502 is used to control itself and the memory 501 to implement the steps in any of the above-mentioned image enhancement method embodiments. The processor 502 can also be called a central processing unit (CPU). The processor 502 may be an integrated circuit chip with signal processing capabilities. The processor 502 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 502 can be implemented by an integrated circuit chip.
[0124] See also Figure 6 , Figure 6 The computer-readable storage medium 600 stores program instructions 610 that can be executed by a processor, and the program instructions 610 are used to implement the steps in any of the above-mentioned image enhancement method embodiments.
[0125] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0126] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0127] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0128] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program code.
Claims
1. An image enhancement method, It is characterized in that include: Obtaining an original image and pixel weight values corresponding to each pixel in the original image, and transforming the pixel values in the original image using a plurality of Laguerre polynomials to obtain a plurality of transformed images; The recursive formula of the Laguerre polynomial is: Wherein, x is the pixel value after normalization of the original image, and n is the formula level; Performing definite integral operations on the multiple Laguerre polynomials, and using the multiple definite integral formulas obtained by calculation to calculate the definite integral image corresponding to the original image; and, Performing weighted filtering processing on the multiple transformed images based on the pixel weight values to obtain multiple weighted filtered images; The weighted filter image and the definite integral image associated with the same Laguerre polynomial are multiplied respectively to obtain a plurality of weighted images, and the plurality of weighted images are summed to obtain an enhanced image.
2. The method according to claim 1, It is characterized in that A pixel value mapping table is pre-stored for each Laguerre polynomial, and the pixel value mapping table is used to store pixel values obtained after different pixel values are transformed by the corresponding Laguerre polynomial; the pixel values in the original image are transformed by the multiple Laguerre polynomials to obtain multiple transformed images, including: Obtain a pixel value mapping table corresponding to each Laguerre polynomial; Each pixel value mapping table is used to transform the pixel values in the original image to obtain a plurality of transformed images.
3. The method according to claim 1, It is characterized in that The performing definite integral operations on the multiple Laguerre polynomials and calculating the definite integral image corresponding to the original image using the multiple definite integral formulas obtained by calculation includes: Determine adjacent Laguerre polynomials in the recursive order and obtain adjacent polynomial pairs; Performing subtraction operations on each of the polynomial pairs to obtain multiple definite integral formulas; The definite integral images corresponding to the original images are respectively calculated using the multiple definite integral formulas.
4. The method according to claim 1, It is characterized in that The method of using the multiple Laguerre polynomials to transform the pixel values in the original image respectively to obtain multiple transformed images includes: Normalizing the pixel values in the original image to obtain a normalized image; The pixel values in the normalized image are transformed respectively using the multiple recursive Laguerre polynomials to obtain multiple transformed images.
5. The method according to claim 4, It is characterized in that The method comprises: performing multiplication operations on the weighted filter image and the definite integral image associated with the same Laguerre polynomial respectively to obtain a plurality of weighted images, and performing a sum operation on the plurality of weighted images to obtain an enhanced image, comprising: Performing multiplication operations on the weighted filter image and the definite integral image associated with the same Laguerre polynomial respectively to obtain a plurality of weighted images, and performing a sum operation on the plurality of weighted images to obtain a weighted fusion image; The pixel values in the weighted fused image are mapped to the original pixel space of the original image to obtain an enhanced image.
6. The method according to claim 1, It is characterized in that The method comprises: performing multiplication operations on the weighted filter image and the definite integral image associated with the same Laguerre polynomial respectively to obtain a plurality of weighted images, and performing a sum operation on the plurality of weighted images to obtain an enhanced image, comprising: The weighted filter image and the definite integral image associated with the same Laguerre polynomial are multiplied respectively to obtain a plurality of weighted images, and the plurality of weighted images are summed to obtain a weighted fusion image: Respectively obtaining weighted weights of the weighted fusion image and the original image; The weighted weights are used to perform weighted summation on the weighted fusion image and the original image to obtain an enhanced image.
7. An electronic device, It is characterized in that The electronic device comprises a memory and a processor, and the processor is used to execute program instructions stored in the memory to implement the steps in the method according to any one of claims 1 to 6.
8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores program instructions, and the program instructions can be executed by a processor to implement the steps in the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Image edge enhancement and copying device based on Laguerre Gaussian mode
CN111179181A
An image edge enhancement and replication device based on Laguerre Gaussian pattern
CN111179181B
Image edge extraction method, image edge extraction device and storage medium
CN114429549A
Image enhancement method and device and storage medium
CN116630179A
Image processing method and system
US20230237763A1
