Dark image enhancement method and device, electronic equipment and storage medium
By introducing structural tensors and incident light map estimation, combined with gamma correction formulas and gradient matrix calculations, the problem of high computational complexity of existing dark image enhancement methods is solved, and effective enhancement of dark images and preservation of edge details is achieved.
Patent Information
- Application Number
- CN202411581036.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-03-21
AI Technical Summary
The existing dark image enhancement method has high computational complexity and cannot effectively preserve the edge details and color information of the image.
By introducing structural tensors for energy supplementation, combining incident light map estimation and gamma correction formulas, the brightness adjustment of the difference image and gradient matrix calculation are performed, and finally image reconstruction is carried out through a lookup table to obtain the enhanced fusion image.
The calculation complexity is reduced, the edge details and color information of the original dark image are retained, and the effective enhancement of the dark image is achieved.
Smart Images

Figure CN119671914A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a dark image enhancement method and a device, electronic equipment, and storage medium thereof. Background Art
[0002] Dark images are common in the security, industrial, medical and consumer electronics industries. Their image quality is poor, which will reduce the performance of back-end visual analysis and recognition algorithms. Existing dark image enhancement methods are mainly divided into two types: enhancement methods based on Retinex theory and enhancement methods based on deep learning. The method based on Retinex theory decomposes the image into a brightness map and a reflection map, enhances the brightness map, and then merges the two. This method has limited effect and cannot accurately separate the brightness map and the reflection map. At the same time, due to the low signal-to-noise ratio, strong noise will make image decomposition difficult. The method based on deep learning uses supervised or unsupervised networks to comprehensively deal with common problems in dark images such as low contrast, low brightness, noise and color deviation. However, the object of learning in this method is often simulated data or noise-free data, resulting in poor practical application effect. For the problem of dark image enhancement, the two existing mainstream methods are both highly computationally complex and require complex image decomposition processes or the collection of large amounts of data for long-term training. Summary of the invention
[0003] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes a dark image enhancement method and device, electronic device, and storage medium, which realizes dark image enhancement by introducing a structure tensor for energy supplement and fusing the estimated difference image, retaining the edge details and color information of the original dark image while reducing the complexity of calculation.
[0004] In a first aspect, an embodiment of the present invention provides a dark image enhancement method, comprising:
[0005] Perform incident light map estimation processing on the acquired original dark image to obtain an incident light map;
[0006] Performing difference processing on the original dark image and the incident light image to obtain a difference image; wherein the difference image is an image formed by the absorbed light and reflected light lost during the imaging process of the original dark image;
[0007] Performing brightness adjustment processing on the difference image according to a gamma correction formula to obtain an enhanced corrected image;
[0008] Determine a first gradient matrix according to the first gradient of the original dark image and the second gradient of the corrected image;
[0009] Calculating according to the first gradient matrix and the preset matrix Q to obtain a first structure tensor;
[0010] Calculating a second gradient matrix of the original dark image;
[0011] The second gradient matrix is dot-multiplied with the supernormal matrix M of the preset matrix Q to obtain a third gradient matrix, and an image is reconstructed according to the third gradient matrix through a lookup table to obtain an enhanced fused image; wherein the second structure tensor of the fused image is equal to the first structure tensor.
[0012] In some embodiments of the present invention, the step of performing incident light map estimation processing on the acquired original dark image to obtain the incident light map includes:
[0013] Dividing the original dark image into regions according to preset sizes to obtain a plurality of regions to be estimated;
[0014] Determine the incident light intensity of the center point of each of the areas to be estimated;
[0015] An incident light map is constructed according to the incident light intensity at the center point of each of the areas to be estimated.
[0016] In some embodiments of the present invention, determining the incident light intensity of the center point of each of the to-be-estimated areas includes:
[0017] Obtaining a pixel value of each pixel point in the area to be estimated;
[0018] Perform red channel intensity comparison processing according to the pixel values of each of the pixel points to determine the maximum red channel intensity;
[0019] Performing green channel intensity comparison processing according to the pixel values of each of the pixel points to determine the maximum green channel intensity;
[0020] Performing a blue channel intensity comparison process according to the pixel values of each of the pixel points to determine the maximum blue channel intensity;
[0021] Determine the incident light intensity of the center point of the area to be estimated according to the maximum intensity of the red channel, the maximum intensity of the green channel, and the maximum intensity of the blue channel;
[0022] Continue to determine the incident light intensity of the center point of the next area to be estimated until all the areas to be estimated are processed.
[0023] In some embodiments of the present invention, the gamma correction formula is: y=x γ ; wherein, x represents the pixel value of the difference image before adjustment, y represents the pixel value of the corrected image after adjustment, and γ represents the gamma coefficient; wherein the value range of the gamma coefficient is 0.2 to 0.8.
[0024] In some embodiments of the present invention, the expression of the first gradient matrix is:
[0025]
[0026] Wherein, the second gradient of the corrected image includes: ER x , ER y EG x EG y , EB x and EB y ; The first gradient of the original dark image includes: R x , R y , G x , G y , B x and B y ER x is the lateral gradient of the red channel of the corrected image, ER y is the longitudinal gradient of the red channel of the corrected image; EG x is the lateral gradient of the green channel of the corrected image, EG y EB is the longitudinal gradient of the green channel of the corrected image; x is the lateral gradient of the blue channel of the corrected image, EB y is the vertical gradient of the blue channel of the corrected image; R x is the lateral gradient of the red channel of the original dark image, R y is the longitudinal gradient of the red channel of the original dark image; G x is the horizontal gradient of the green channel of the original dark image, G y is the vertical gradient of the green channel of the original dark image; x is the horizontal gradient of the blue channel of the original dark image, B y is the longitudinal gradient of the blue channel of the original dark image.
[0027] In some embodiments of the present invention, the expression of the first structure tensor is: in, is the first gradient matrix, is the transposed matrix of the first gradient matrix.
[0028] In some embodiments of the present invention, the expression of the second structure tensor is: in, The third gradient matrix, is the transposed matrix of the third gradient matrix.
[0029] In a second aspect, an embodiment of the present invention provides a dark image enhancement device, comprising at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions executable by the at least one control processor, and the instructions are executed by the at least one control processor so that the at least one control processor can execute the dark image enhancement method as described in any one of claims 1 to 7.
[0030] In a third aspect, an embodiment of the present invention provides an electronic device, comprising the dark image enhancement device as described in the second aspect above.
[0031] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to execute the dark image enhancement method as described in the first aspect above.
[0032] The dark image enhancement method according to the embodiment of the present invention has at least the following beneficial effects:
[0033] The incident light map of the acquired original dark image is estimated to obtain the incident light map; the difference processing is performed based on the original dark image and the incident light map to obtain the difference image; wherein the difference image is an image formed by the absorbed light and reflected light lost during the imaging process of the original dark image; the brightness of the difference image is adjusted according to the gamma correction formula to obtain an enhanced corrected image; the first gradient matrix is determined according to the first gradient of the original dark image and the second gradient of the corrected image; the first structure tensor is calculated according to the first gradient matrix and the preset matrix Q; the second gradient matrix of the original dark image is calculated; the second gradient matrix is multiplied by the hypernormal matrix M of the preset matrix Q to obtain the third gradient matrix, and the image is reconstructed according to the third gradient matrix through a lookup table to obtain an enhanced fused image; wherein the second structure tensor of the fused image is equal to the first structure tensor. The dark image enhancement is achieved by introducing the structure tensor for energy supplementation and fusing the estimated difference image, while retaining the edge details and color information of the original dark image, the complexity of the calculation is reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 is a flow chart of a dark image enhancement method provided by an embodiment of the present invention;
[0035] Figure 2 is a flow chart of an incident light map estimation process in a dark image enhancement method provided by an embodiment of the present invention;
[0036] Figure 3 is a flow chart of a process for estimating the incident light intensity at the center point of a region to be estimated in a dark image enhancement method provided by an embodiment of the present invention;
[0037] Figure 4 It is a structural diagram of a dark image enhancement device provided by another embodiment of the present invention. DETAILED DESCRIPTION
[0038] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0039] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0040] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0041] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.
[0042] The embodiment of the present invention provides a dark image enhancement method and its device, electronic device, and storage medium, wherein an incident light map is estimated for an acquired original dark image to obtain an incident light map; a difference is performed between the original dark image and the incident light map to obtain a difference image; wherein the difference image is an image formed by absorbed light and reflected light lost during the imaging process of the original dark image; a brightness adjustment is performed on the difference image according to a gamma correction formula to obtain an enhanced corrected image; a first gradient matrix is determined according to a first gradient of the original dark image and a second gradient of the corrected image; a first structure tensor is calculated according to the first gradient matrix and a preset matrix Q; a second gradient matrix of the original dark image is calculated; a third gradient matrix is obtained by dot multiplication of the second gradient matrix and a supernormal matrix M of the preset matrix Q, and an image is reconstructed according to the third gradient matrix by a lookup table to obtain an enhanced fused image; wherein the second structure tensor of the fused image is equal to the first structure tensor. Dark image enhancement is achieved by introducing a structure tensor for energy supplementation and fusing the estimated difference image, while retaining the edge details and color information of the original dark image, the complexity of calculation is reduced.
[0043] The dark image enhancement method according to the embodiment of the present invention is further described below based on the accompanying drawings.
[0044] Reference Figure 1 , Figure 1 A flowchart of a dark image enhancement method provided by an embodiment of the present invention, the dark image enhancement method includes but is not limited to the following steps:
[0045] Step S110, performing incident light map estimation processing on the acquired original dark image to obtain an incident light map;
[0046] Step S120, performing difference processing between the original dark image and the incident light image to obtain a difference image; wherein the difference image is an image formed by the absorbed light and reflected light lost in the imaging process of the original dark image;
[0047] Step S130, performing brightness adjustment processing on the difference image according to a gamma correction formula to obtain an enhanced corrected image;
[0048] Step S140, determining a first gradient matrix according to the first gradient of the original dark image and the second gradient of the corrected image;
[0049] Step S150, calculating a first structure tensor according to the first gradient matrix and the preset matrix Q;
[0050] Step S160, calculating a second gradient matrix of the original dark image;
[0051] Step S170, multiplying the second gradient matrix by the supernormal matrix M of the preset matrix Q to obtain a third gradient matrix, and reconstructing the image according to the third gradient matrix by a lookup table to obtain an enhanced fused image; wherein the second structure tensor of the fused image is equal to the first structure tensor.
[0052] It should be noted that, in step S110, the original dark image is the image captured by the camera when the reflected light of the photographed object is irradiated to the camera.
[0053] It should be noted that in step S120, based on the light reflection model, incident light will be reflected, refracted and absorbed when it hits the surface of the object, and its light energy is also distributed in proportion. 入射 Should be equal to the energy of the reflected light E 反射 , the energy of absorbed light E 吸收 and the energy of the refracted light E 折射 The sum is:
[0054] E 入射 =E 反射 +E 吸收 +E 折射 ;
[0055] The ratio of the sum of absorbed light energy and refracted light energy to incident light energy is:
[0056]
[0057] The ratio of the reflected light energy to the incident light energy is the reflectivity of the object surface, and the ratio of the sum of the absorbed light energy and the refracted light energy to the incident light energy is 1 minus the reflectivity of the object surface. The difference between the original dark image and the incident light image is calculated to obtain a difference image. Each pixel value in the difference image represents the brightness or color difference between the original dark image and the incident light image at the corresponding position.
[0058] It should be noted that in step S130, the gamma correction formula is: y=x γ ; Wherein, x represents the pixel value of the difference image before adjustment, y represents the pixel value of the corrected image after adjustment, and γ represents the gamma coefficient; a gamma coefficient less than 1 can improve the brightness of the difference image. When the gamma coefficient is less than 0.1, the brightness of the difference image is increased too much, resulting in a decrease in contrast; when the gamma coefficient is greater than 0.9 and less than 1, the image brightness is increased less and the expected effect cannot be achieved. Therefore, in the embodiment of the present application, by setting the gamma coefficient value range to 0.2 to 0.8, the brightness of the dark image can be increased without reducing the contrast of the dark image.
[0059] It should be noted that, in step S140, the expression of the first gradient matrix is:
[0060]
[0061] The second gradient of the corrected image includes: x , ER y EG x EG y , EB x and EB y ; The first gradient of the original dark image includes: R x , R y , G x , G y , B x and B y ER x To correct the horizontal gradient of the red channel of the image, ER y To correct the vertical gradient of the red channel of the image; EG x To correct the horizontal gradient of the green channel of the image, EG y To correct the vertical gradient of the green channel of the image; EB x To correct the horizontal gradient of the blue channel of the image, EB y To correct the vertical gradient of the blue channel of the image; R x is the horizontal gradient of the red channel of the original dark image, R y is the vertical gradient of the red channel of the original dark image; G x is the horizontal gradient of the green channel of the original dark image, G y is the vertical gradient of the green channel of the original dark image; B x is the horizontal gradient of the blue channel of the original dark image, B y is the vertical gradient of the blue channel of the original dark image.
[0062] It should be noted that, in step S150, the expression of the first structure tensor is: in, is the first gradient matrix, is the transposed matrix of the first gradient matrix, and Q is a preset matrix. The preset matrix Q can be set to a 2*2 matrix, which is used to suppress noise. At the same time, using a simple preset matrix Q=2*2 to suppress noise can reduce the computational complexity.
[0063] It should be noted that, in step S160, the process of constructing the second gradient matrix in calculating the second gradient matrix of the original dark image is similar to the principle of constructing the first gradient matrix in step S140.
[0064] It should be noted that in step S170, when the condition M is met, TWhen QM=Q, define matrix M as the supernormal matrix of the preset matrix Q. Where Q is the preset matrix, M is the supernormal matrix of the preset matrix Q, and M T is the transposed matrix of the supernormal matrix M.
[0065] It should be noted that, in step S170, the expression of the second structure tensor is: in, is the third gradient matrix, is the transposed matrix of the third gradient matrix. The relationship between the first structure tensor and the second structure tensor is that the first structure tensor is equal to the second structure tensor. In other words, the third gradient matrix In satisfying At the same time, it should satisfy The constraints are: is the second gradient matrix of the original dark image.
[0066] It should be noted that in step S170, the enhanced fused image is obtained by performing image reconstruction according to the third gradient matrix by looking up the table. The fused image is reconstructed by using the correspondence between the third gradient matrix and the table. This method has high computational efficiency and can quickly complete the gradient to image mapping process.
[0067] Through steps S110 to S170, the incident light map of the acquired original dark image is estimated to obtain an incident light map; the difference processing is performed based on the original dark image and the incident light map to obtain a difference image; wherein the difference image is an image formed by the absorbed light and reflected light lost during the imaging process of the original dark image; the brightness of the difference image is adjusted according to the gamma correction formula to obtain an enhanced corrected image; the first gradient matrix is determined according to the first gradient of the original dark image and the second gradient of the corrected image; the first structure tensor is calculated according to the first gradient matrix and the preset matrix Q; the second gradient matrix of the original dark image is calculated; the second gradient matrix is multiplied by the hypernormal matrix M of the preset matrix Q to obtain a third gradient matrix, and the image is reconstructed according to the third gradient matrix by a lookup table to obtain an enhanced fused image; wherein the second structure tensor of the fused image is equal to the first structure tensor. By introducing the structure tensor for energy supplementation and fusing the estimated difference image to achieve dark image enhancement, the edge details and color information of the original dark image are retained while reducing the complexity of calculation.
[0068] According to some embodiments of the present invention, referring to Figure 2 ,exist Figure 1 In step S110 of the illustrated embodiment, the incident light map is estimated and processed on the acquired original dark image to obtain the incident light map, including but not limited to the following steps:
[0069] S211, dividing the original dark image into regions according to a preset size to obtain a plurality of regions to be estimated;
[0070] S212, determining the incident light intensity of the center point of each area to be estimated;
[0071] S213: construct an incident light map according to the incident light intensity of the center point of each area to be estimated.
[0072] It should be noted that the size of the preset size can be set according to the size of the original dark image. When the size of the original dark image is small, the preset size can be set to a smaller size; when the size of the original dark image is large, the preset size can be set to a larger size. By setting different preset sizes to adapt to original dark images of different sizes, the original dark image is segmented, and the flexibility of dark image enhancement is increased. At the same time, the brightness information of each area or object can be processed more accurately to avoid indiscriminate brightness adjustment of the entire image. Specifically, the value of the preset size can be 3, 5, 7, etc. Therefore, the embodiment of the present application does not impose specific restrictions on the value of the preset size.
[0073] According to some embodiments of the present invention, referring to Figure 3 ,exist Figure 1 In step S110 of the illustrated embodiment, determining the incident light intensity of the center point of each area to be estimated includes:
[0074] S311, obtaining the pixel value of each pixel point in a region to be estimated;
[0075] S312, performing red channel intensity comparison processing according to the pixel value of each pixel point to determine the maximum red channel intensity;
[0076] S313, performing green channel intensity comparison processing according to the pixel value of each pixel point to determine the maximum green channel intensity;
[0077] S314, performing a blue channel intensity comparison process according to the pixel value of each pixel point to determine the maximum blue channel intensity;
[0078] S315, determining the incident light intensity of the center point of the area to be estimated according to the maximum intensity of the red channel, the maximum intensity of the green channel, and the maximum intensity of the blue channel;
[0079] S316, continue to determine the incident light intensity of the center point of the next area to be estimated, until all areas to be estimated are processed.
[0080] It should be noted that the area to be estimated can be set according to different needs. Taking the area to be estimated as the neighborhood of the center point as an example, the pixel values of each pixel in the neighborhood of the center point are obtained; the red channel intensity comparison processing is performed according to the pixel values of each pixel point to determine the maximum red channel intensity; the green channel intensity comparison processing is performed according to the pixel values of each pixel point to determine the maximum green channel intensity; the blue channel intensity comparison processing is performed according to the pixel values of each pixel point to determine the maximum blue channel intensity; the incident light intensity of the center point of the area to be estimated is determined according to the maximum red channel intensity, the maximum green channel intensity, and the maximum blue channel intensity; this can reduce the impact of the abnormality of a single pixel point on the result, and the abnormality of a single pixel point may include noise, sensor failure, etc. At the same time, the incident light intensity of the center point is obtained only through a simple comparison operation, which reduces the complexity of the calculation.
[0081] like Figure 4 As shown, Figure 4 : is a structural diagram of a dark image enhancement device provided by an embodiment of the present invention. The present invention also provides a dark image enhancement device, comprising:
[0082] The processor 401 may be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0083] The memory 402 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 402 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 402, and the processor 401 calls and executes the dark image enhancement method of the embodiment of this application;
[0084] Input / output interface 403, used to implement information input and output;
[0085] Communication interface 404, used to realize communication interaction between the apparatus and other devices, which can be realized by wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WI FI, Bluetooth, etc.);
[0086] Bus 405 , which transmits information between various components of the device (e.g., processor 401 , memory 402 , input / output interface 403 , and communication interface 404 );
[0087] The processor 401 , the memory 402 , the input / output interface 403 and the communication interface 404 are connected to each other in communication within the device via the bus 805 .
[0088] An embodiment of the present application further provides an electronic device, comprising the dark image enhancement device as described above.
[0089] An embodiment of the present application further provides a storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to execute the dark image enhancement method as described above.
[0090] As a non-transient computer-readable storage medium, the memory can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage devices. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and are implemented to be located in one place, or may also be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0091] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically include computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0092] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the above-mentioned implementation mode. Technical personnel familiar with the field can also make various equivalent deformations or substitutions under the shared conditions without violating the spirit of the present invention. These equivalent deformations or substitutions are all included in the scope defined by the claims of the present invention.
Claims
1. A dark image enhancement method, characterized in that: include: Perform incident light map estimation processing on the acquired original dark image to obtain an incident light map; Performing difference processing on the original dark image and the incident light image to obtain a difference image; wherein the difference image is an image formed by the absorbed light and reflected light lost during the imaging process of the original dark image; Performing brightness adjustment processing on the difference image according to a gamma correction formula to obtain an enhanced corrected image; Determine a first gradient matrix according to the first gradient of the original dark image and the second gradient of the corrected image; Calculating a first structure tensor according to the first gradient matrix and a preset matrix Q; Calculating a second gradient matrix of the original dark image; The second gradient matrix is dot-multiplied with the supernormal matrix M of the preset matrix Q to obtain a third gradient matrix, and an image is reconstructed according to the third gradient matrix through a lookup table to obtain an enhanced fused image; wherein the second structure tensor of the fused image is equal to the first structure tensor.
2. The dark image enhancement method according to claim 1, characterized in that: The step of performing incident light map estimation processing on the acquired original dark image to obtain the incident light map comprises: Dividing the original dark image into regions according to preset sizes to obtain a plurality of regions to be estimated; Determine the incident light intensity of the center point of each of the areas to be estimated; An incident light map is constructed according to the incident light intensity at the center point of each of the areas to be estimated.
3. The dark image enhancement method according to claim 2, characterized in that: The determining of the incident light intensity of the center point of each of the to-be-estimated areas includes: Obtaining a pixel value of each pixel point in the area to be estimated; Perform red channel intensity comparison processing according to the pixel values of each of the pixel points to determine the maximum red channel intensity; Performing green channel intensity comparison processing according to the pixel values of each of the pixel points to determine the maximum green channel intensity; Performing a blue channel intensity comparison process according to the pixel values of each of the pixel points to determine the maximum blue channel intensity; Determine the incident light intensity of the center point of the area to be estimated according to the maximum intensity of the red channel, the maximum intensity of the green channel, and the maximum intensity of the blue channel; Continue to determine the incident light intensity of the center point of the next area to be estimated until all the areas to be estimated are processed.
4. The dark image enhancement method according to claim 1, characterized in that: The gamma correction formula is: y=x γ ; wherein, x represents the pixel value of the difference image before adjustment, y represents the pixel value of the corrected image after adjustment, and γ represents the gamma coefficient; wherein the value range of the gamma coefficient is 0.2 to 0.
8.
5. The dark image enhancement method according to claim 1, characterized in that: The expression of the first gradient matrix is: Wherein, the second gradient of the corrected image includes: ER x , ER y EG x EG y , EB x and EB y ; The first gradient of the original dark image includes: R x , R y , G x , G y , B x and B y ER x is the lateral gradient of the red channel of the corrected image, ER y is the longitudinal gradient of the red channel of the corrected image; EG x is the lateral gradient of the green channel of the corrected image, EG y EB is the longitudinal gradient of the green channel of the corrected image; x is the lateral gradient of the blue channel of the corrected image, EB y is the vertical gradient of the blue channel of the corrected image; R x is the lateral gradient of the red channel of the original dark image, R y is the longitudinal gradient of the red channel of the original dark image; G x is the horizontal gradient of the green channel of the original dark image, G y is the vertical gradient of the green channel of the original dark image; x is the horizontal gradient of the blue channel of the original dark image, B y is the longitudinal gradient of the blue channel of the original dark image.
6. The dark image enhancement method according to claim 1, characterized in that: The expression of the first structure tensor is: in, is the first gradient matrix, is the transposed matrix of the first gradient matrix.
7. The dark image enhancement method according to claim 1, characterized in that: The expression of the second structure tensor is: in, The third gradient matrix, is the transposed matrix of the third gradient matrix.
8. A dark image enhancement device, characterized in that: It includes at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor to enable the at least one control processor to execute the dark image enhancement method as described in any one of claims 1 to 7.
9. An electronic device, characterized in that: Comprising the dark image enhancement device as described in claim 8. 10 . A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to enable a computer to execute the dark image enhancement method according to claim 1 .
Citation Information
Cited By
Image enhancement method for edge exposure machine
CN120894255A