Low-illumination image multi-level enhancement method, device, electronic device and storage medium
By collecting and calculating the illumination components of low-illumination images, constructing and utilizing intensity transformation matrices, multi-level illumination intensity enhancement of low-illumination images is achieved, solving the problem of narrow illumination intensity enhancement range in the existing technology, and providing multi-level enhancement Effect.
Patent Information
- Application Number
- CN202211423157.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-15
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2042-11-15
AI Technical Summary
Existing low-illumination image enhancement methods cannot achieve multi-level enhancement of illumination intensity. The output enhanced image illumination intensity is relatively single. Users cannot select multiple images with enhanced illumination, and the range of image enhancement is narrow.
By collecting low-illumination images and their contrast-enhanced images, calculating low-illumination components and low-reflection components, constructing the illumination matrix norm and illumination matrix trace, calculating the intensity transformation matrix, and using this matrix to determine the enhanced illumination component, the low-illumination image can be processed Multi-level light intensity enhancement.
It realizes multi-level light intensity enhancement of low-light images, and can select multiple levels of light intensity for image processing. The enhanced image is not affected by ambient light and provides multi-level enhancement effects.
Smart Images

Figure CN115908175B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular to a low-illumination image multi-level enhancement method, device, electronic equipment and storage medium. Background Art
[0002] Low-light image multi-level enhancement refers to the process of enhancing the light intensity of pictures taken under low light intensity, so as to achieve the purpose of converting low-light intensity images into images under sufficient light intensity.
[0003] At present, some low-light image enhancement schemes are implemented using conditional re-enhancement networks. By merging the low-light image and its maximum channel image and its expected maximum channel image into a matrix and using it as the input of the conditional re-enhancement network, the low-light image is enhanced using the multi-layer convolutional layers and activation functions of the trained conditional re-enhancement network to obtain the final enhanced image. However, since the model is pre-trained, the enhanced illumination of the output enhanced image is relatively single, and it is not possible to select multiple images with enhanced illumination for the user to use. Other schemes calculate the RGB triplicate quantum images of the low-light image and merge the calculated sub-images with the gain image to obtain the final enhanced image. However, this scheme also fails to reflect the multi-level enhancement of the image and cannot achieve the enhancement of the image to images with multiple levels of illumination intensity. Therefore, since the illumination intensity for enhancing the low-light image is a fixed illumination intensity, the range of available options for the illumination intensity enhancement of the low-light image is relatively narrow. Summary of the invention
[0004] In order to solve the above problems, the present invention provides a low-illumination image multi-level enhancement method, device, electronic device and storage medium, which can characterize the illumination intensity matrix of ambient light changes under different lighting conditions, and enhance the low-illumination image into an enhanced image with multi-level illumination intensity that is not affected or less affected by ambient light.
[0005] In a first aspect, the present invention provides a low-illumination image multi-level enhancement method, comprising:
[0006] Acquire a low-illumination image and its corresponding contrast-enhanced image, identify the low-illumination intensity of the low-illumination image, calculate the low-illumination component and the low-reflection component of the low-illumination image, and calculate the contrast-illumination component of the contrast-enhanced image;
[0007] constructing an illumination matrix norm between the low illumination component and the contrast illumination component, calculating an illumination matrix trace of the illumination matrix norm, and calculating an intensity transformation matrix of the low illumination intensity according to the illumination matrix trace;
[0008] An enhanced illumination component of the low illumination image is determined by using the intensity transformation matrix, and an enhanced illumination image of the low illumination image is calculated based on the enhanced illumination component and the low reflection component.
[0009] In a possible implementation manner of the first aspect, acquiring the low-illuminance image and its corresponding contrast-enhanced image includes:
[0010] Measure light intensity using a pre-built light meter;
[0011] determining an intensity bandwidth of the illumination intensity;
[0012] Dividing the illumination intensity into illumination intensity bands according to the intensity bandwidth;
[0013] Identifying a low intensity band and an increased intensity band from the light intensity band;
[0014] Based on the low intensity band and the enhanced intensity band, the low illumination image and its corresponding contrast enhanced image are acquired by using a pre-built camera.
[0015] In a possible implementation manner of the first aspect, calculating the low illumination component and the low reflection component of the low illumination image includes:
[0016] The low-light image is decomposed into components using the following formula to obtain the decomposed components of the low-light image:
[0017] I(x,y)=R(x,y)·P(x,y)→(R(x,y),P(x,y))
[0018] Wherein, (R(x,y), P(x,y)) represents the decomposed components of the low-light image, I(x,y) represents the pixel value of the low-light image, (x,y) represents the pixel coordinates of the low-light image, R(x,y) represents the low-reflection component to be solved in the decomposed components of the low-light image, which is just an unknown symbol at this time, and P(x,y) represents the low-illumination component to be solved in the decomposed components of the low-light image, which is just an unknown symbol at this time;
[0019] According to the decomposed components, the low reflection component of the low illumination image is calculated using the following formula:
[0020]
[0021]
[0022] Wherein, R′(x,y) represents the low reflection component of the low illumination image, F(x,y) represents the center surround function, I(x,y) represents the pixel value of the low illumination image, (x,y) represents the pixel coordinates of the low illumination image, R(x,y) represents the low reflection component to be solved in the decomposed components of the low illumination image, which is just an unknown symbol at this time, P(x,y) represents the low illumination component to be solved in the decomposed components of the low illumination image, which is just an unknown symbol at this time, c represents the Gaussian surround scale, and λ represents a scale;
[0023] According to the low reflection component, the low illumination component of the low illumination image is calculated using the following formula:
[0024]
[0025] Among them, P′(x, y) represents the low illumination component of the low illumination image, R′(x, y) represents the low reflection component of the low illumination image, I(x, y) represents the pixel value of the low illumination image, and (x, y) represents the pixel coordinates of the low illumination image.
[0026] In a possible implementation manner of the first aspect, constructing an illumination matrix norm between the low illumination component and the contrast illumination component includes:
[0027] The illumination matrix norm between the low illumination component and the contrast illumination component is constructed using the following formula:
[0028]
[0029] Wherein, F represents the illumination matrix norm between the low illumination component and the contrast illumination component, P1 represents the contrast illumination component, P2 represents the low illumination component, represents the illumination intensity transformation matrix mapped from the low illumination component to the contrast illumination component, which is an unknown symbol to be solved at this time, and L2 represents the illumination intensity band of the low illumination image corresponding to the low illumination component.
[0030] In a possible implementation manner of the first aspect, calculating the illumination matrix trace of the illumination matrix norm includes:
[0031] The illumination matrix norm is decomposed into a trace function using the following formula to obtain a decomposed trace function:
[0032]
[0033] in, represents the decomposition trace function, tr represents the trace function symbol, F represents the illumination matrix norm between the low illumination component and the contrast illumination component, P1 represents the contrast illumination component, P2 represents the low illumination component, represents the illumination intensity transformation matrix mapped from the low illumination component to the contrast illumination component, which is an unknown symbol to be solved, L2 represents the illumination intensity band of the low illumination image corresponding to the low illumination component, and T represents the transposed symbol;
[0034] An illumination matrix trace of the illumination matrix norm is extracted from the decomposition trace function.
[0035] In a possible implementation manner of the first aspect, calculating the intensity transformation matrix of the low illumination intensity according to the illumination matrix trace includes:
[0036] The illumination matrix in the illumination matrix trace is obtained using the following formula:
[0037]
[0038] in, represents the illumination matrix in the illumination matrix trace, P1 represents the contrast illumination component, P2 represents the low illumination component, represents the illumination intensity transformation matrix mapped from the low illumination component to the contrast illumination component, which is an unknown symbol to be solved, L2 represents the illumination intensity band of the low illumination image corresponding to the low illumination component, and T represents the transposed symbol;
[0039] The illumination matrix is subjected to singular matrix decomposition using the following formula to obtain a decomposed singular matrix:
[0040]
[0041] Wherein, (U, V) represents the decomposed singular matrix, U represents The left singular matrix of The right singular matrix, σ1,σ2,…,σ n express The singular value of n represents , P1 represents the contrast illumination component, P2 represents the low illumination component, T represents the transposed sign, and diag represents the diag function;
[0042] Based on the decomposed singular matrix, the illumination matrix trace is transformed using the following formula to obtain the transformed form of the illumination matrix trace:
[0043]
[0044]
[0045] Where tr(ZΣ) represents the transformed form of the illumination matrix trace, and U represents The left singular matrix of The right singular matrix, σ1,σ2,…,σ n express The singular value of n represents The number of singular values of The singular value number of , P1 represents the contrast illumination component, P2 represents the low illumination component, T represents the transposed sign, represents the illumination intensity transformation matrix mapped from the low illumination component to the contrast illumination component, which is an unknown symbol to be solved. L2 represents the illumination intensity band of the low illumination image corresponding to the low illumination component, that is, the low illumination intensity. tr represents the trace function symbol. Z represents
[0046] According to the conversion form, the intensity transformation matrix of the low illumination intensity is calculated using the following formula:
[0047]
[0048] in, represents the intensity transformation matrix of the low illumination intensity, and U represents The left singular matrix of The right singular matrix of , T represents the transposed sign, and L2 represents the illumination intensity band of the low illumination image corresponding to the low illumination component, that is, the low illumination intensity.
[0049] In a possible implementation manner of the first aspect, determining the enhanced illumination component of the low-illuminance image by using the intensity transformation matrix includes:
[0050] The enhanced illumination component of the low-light image is calculated using the following formula:
[0051]
[0052] Wherein, P′2 represents the enhanced illumination component of the low illumination image, P2 represents the low illumination component, An intensity transformation matrix representing the low light intensity.
[0053] In a second aspect, the present invention provides a low-illumination image multi-level enhancement device, the device comprising:
[0054] A contrast component calculation module, used for collecting a low-illumination image and its corresponding contrast-enhanced image, identifying the low-illumination intensity of the low-illumination image, calculating the low-illumination component and the low-reflection component of the low-illumination image, and calculating the contrast-illumination component of the contrast-enhanced image;
[0055] a transformation matrix calculation module, used to construct an illumination matrix norm between the low illumination component and the contrast illumination component, calculate an illumination matrix trace of the illumination matrix norm, and calculate an intensity transformation matrix of the low illumination intensity according to the illumination matrix trace;
[0056] The enhanced image calculation module is used to determine the enhanced illumination component of the low illumination image by using the intensity transformation matrix, and calculate the enhanced illumination image of the low illumination image based on the enhanced illumination component and the low reflection component.
[0057] In a third aspect, the present invention provides an electronic device, comprising:
[0058] at least one processor; and a memory communicatively coupled to the at least one processor;
[0059] The memory stores a computer program executable by the at least one processor, so that the at least one processor can execute the low-illumination image multi-level enhancement method as described in any one of the first aspects above.
[0060] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the method for multi-level enhancement of low-illumination images as described in any one of the first aspects above is implemented.
[0061] Compared with the prior art, the technical principle and beneficial effects of this solution are:
[0062] The embodiment of the present invention firstly collects low-illuminance images and their corresponding contrast-enhanced images to collect corresponding captured images under multiple illumination intensities as a prerequisite for subsequently enhancing the low-illuminance images into images under multiple illumination intensity levels. Furthermore, the embodiment of the present invention identifies the low illumination intensity of the low-illuminance image to subsequently perform multi-level enhancement transformation on the illumination intensity of the low-illuminance image. Furthermore, the embodiment of the present invention calculates the low illumination component and the low reflection component of the low illumination image to decompose the low illumination image into two parts, the illumination component and the reflection component, so as to facilitate the subsequent multi-level illumination intensity enhancement of the illumination component of the ambient light. Furthermore, the embodiment of the present invention calculates the contrast illumination component of the contrast-enhanced image to subsequently construct a mapping relationship from the low illumination component to the contrast illumination component. Secondly, the embodiment of the present invention constructs an illumination matrix norm between the low illumination component and the contrast illumination component to construct the illumination matrix norm between the low illumination component and the contrast illumination component. The mapping relationship between the low illumination component and the contrast illumination component can be used to calculate the illumination intensity mapping relationship from the low illumination image to the multi-level enhanced image. Furthermore, the embodiment of the present invention calculates the illumination matrix trace of the illumination matrix norm to decompose the minimization problem of the illumination matrix norm into the minimization problem between the contrast illumination component, the low illumination component and the illumination intensity transformation matrix, so as to solve the value of the illumination intensity transformation matrix. Furthermore, the embodiment of the present invention calculates the intensity transformation matrix of the low illumination intensity according to the illumination matrix trace to enhance the illumination intensity of the low illumination image using the intensity transformation matrix of the low illumination intensity. Furthermore, the embodiment of the present invention determines the enhanced illumination component of the low illumination image by using the intensity transformation matrix to enhance the illumination intensity of the low illumination image, thereby achieving the purpose of image enhancement. At the same time, the intensity transformation matrix corresponding to n levels of illumination intensity can be obtained. An intensity transformation matrix can be selected from the matrix to enhance the image, thereby realizing multi-level enhancement of the image. Therefore, a method, device, electronic device, and storage medium for multi-level enhancement of low-light images proposed in an embodiment of the present invention can characterize the illumination intensity matrix of ambient light changes under different illumination conditions, and enhance the low-light image into an enhanced image with multi-level illumination intensity that is not affected by or is less affected by ambient light. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0064] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0065] Figure 1 A schematic diagram of a flow chart of a low-illumination image multi-level enhancement method provided by an embodiment of the present invention;
[0066] Figure 2 In one embodiment of the present invention Figure 1 A schematic diagram of components of a low-light image in a multi-level enhancement method for low-light images is provided;
[0067] Figure 3 A schematic diagram of a module of a low-illumination image multi-level enhancement device provided by an embodiment of the present invention;
[0068] Figure 4 A schematic diagram of the internal structure of an electronic device for implementing a multi-level enhancement method for low-illumination images provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0069] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0070] An embodiment of the present invention provides a method for multi-level enhancement of low-light images, and the execution subject of the method for multi-level enhancement of low-light images includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present invention. In other words, the method for multi-level enhancement of low-light images can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can 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 (CDNs), and big data and artificial intelligence platforms.
[0071] See also Figure 1 FIG. 1 is a flow chart of a multi-level enhancement method for low-light images provided by an embodiment of the present invention. Figure 1 The low-light image multi-level enhancement method described in includes:
[0072] S1. Collect a low-illumination image and its corresponding contrast-enhanced image, identify the low-illumination intensity of the low-illumination image, calculate the low-illumination component and the low-reflection component of the low-illumination image, and calculate the contrast-illumination component of the contrast-enhanced image.
[0073] The embodiment of the present invention collects low-light images and their corresponding contrast-enhanced images to collect corresponding images captured under multiple light intensities, which is a prerequisite for subsequently enhancing the low-light images into images under multiple light intensity levels. The low-light images refer to images captured under low light intensity, and the contrast-enhanced images refer to images captured under multiple sufficient light intensities, such as an image captured in the morning and an image captured in the afternoon, which are images captured under two different light intensities.
[0074] In one embodiment of the present invention, the process of acquiring a low-illuminance image and its corresponding contrast-enhanced image comprises: measuring light intensity using a pre-built light meter; determining an intensity bandwidth of the light intensity; dividing the light intensity into light intensity bands according to the intensity bandwidth; identifying a low-intensity band and an enhanced-intensity band from the light intensity bands; and based on the low-intensity band and the enhanced-intensity band, acquiring the low-illuminance image and its corresponding contrast-enhanced image using a pre-built camera.
[0075] Exemplarily, a light meter is used to divide the illumination into a finite number of levels. For example, the illumination intensity is equally divided into several illumination intensity bands with an intensity bandwidth of 0.01LUX, for example, a 0-0.01LUX illumination intensity band and a 0.01LUX-0.02LUX illumination intensity band. Pictures are taken under different illumination intensity bands, and the angles of the pictures taken under different illumination intensities are consistent. The low-intensity band may be a 0-0.01LUX illumination intensity band, and the enhanced intensity band must be higher in intensity than the low-intensity band, and may be a 0.01LUX-0.02LUX illumination intensity band.
[0076] Furthermore, the embodiment of the present invention identifies the low illumination intensity of the low illumination image, so as to subsequently perform a multi-level enhancement transformation on the illumination intensity of the low illumination image, wherein the low illumination intensity refers to the illumination intensity band of the low illumination image.
[0077] Furthermore, the embodiment of the present invention calculates the low illumination component and the low reflection component of the low illumination image to decompose the low illumination image into two parts, the illumination component and the reflection component, so as to facilitate the subsequent multi-level illumination intensity enhancement of the illumination component of the ambient light. The low illumination component and the low reflection component refer to the illumination component of the ambient light represented by the original image to be observed or received by the camera and the reflection component of the target object carrying the image detail information.
[0078] See also Figure 2 As shown, an embodiment of the present invention Figure 1 A schematic diagram of components of a low-light image in a multi-level enhancement method for low-light images is provided. Figure 2 , including incident light L, reflecting object R and observer, indicating the process in which the incident light L irradiates the surface of the object to be photographed and the observer photographs the object to be photographed using a camera, wherein S(x,y)=R(x,y)·L(x,y) S(x,y) represents the low-illuminance image, R(x,y) and L(x,y) represent the low-reflection component and the low-illuminance component of the low-illuminance image, respectively.
[0079] In one embodiment of the present invention, the calculating of the low illumination component and the low reflection component of the low illumination image includes: performing component decomposition on the low illumination image using the following formula to obtain the decomposed components of the low illumination image:
[0080] I(x,y)=R(x,y)·P(x,y)→(R(x,y),P(x,y))
[0081] Wherein, (R(x,y), P(x,y)) represents the decomposed components of the low-light image, I(x,y) represents the pixel value of the low-light image, (x,y) represents the pixel coordinates of the low-light image, R(x,y) represents the low-reflection component to be solved in the decomposed components of the low-light image, which is just an unknown symbol at this time, and P(x,y) represents the low-illumination component to be solved in the decomposed components of the low-light image, which is just an unknown symbol at this time;
[0082] According to the decomposed components, the low reflection component of the low illumination image is calculated using the following formula:
[0083]
[0084]
[0085] Wherein, R′(x,y) represents the low reflection component of the low illumination image, F(x,y) represents the center surround function, I(x,y) represents the pixel value of the low illumination image, (x,y) represents the pixel coordinates of the low illumination image, R(x,y) represents the low reflection component to be solved in the decomposed components of the low illumination image, which is just an unknown symbol at this time, P(x,y) represents the low illumination component to be solved in the decomposed components of the low illumination image, which is just an unknown symbol at this time, c represents the Gaussian surround scale, and λ represents a scale;
[0086] According to the low reflection component, the low illumination component of the low illumination image is calculated using the following formula:
[0087]
[0088] Among them, P′(x, y) represents the low illumination component of the low illumination image, R′(x, y) represents the low reflection component of the low illumination image, I(x, y) represents the pixel value of the low illumination image, and (x, y) represents the pixel coordinates of the low illumination image.
[0089] Furthermore, the embodiment of the present invention calculates the contrast illumination component of the contrast enhanced image to subsequently construct a mapping relationship from the low illumination component to the contrast illumination component.
[0090] It should be noted that the principle of calculating the contrast illumination component of the contrast-enhanced image is similar to the principle of calculating the low illumination component of the low illumination image, and will not be further elaborated here.
[0091] S2. Constructing an illumination matrix norm between the low illumination component and the contrast illumination component, calculating an illumination matrix trace of the illumination matrix norm, and calculating an intensity transformation matrix of the low illumination intensity according to the illumination matrix trace.
[0092] The embodiment of the present invention constructs an illumination matrix norm between the low illumination component and the contrast illumination component to construct a mapping relationship from the low illumination component to the contrast illumination component. The illumination intensity mapping relationship from the low illumination image to the multi-level enhanced image can be calculated through the mapping relationship. The illumination matrix norm refers to the F-norm (Frobenius norm), a matrix norm, that is, the arithmetic square root of the sum of the squares of each number in the matrix, which can be used to approximate a single data matrix using a low-rank matrix. Mathematically speaking, it is to find a matrix B with a rank of k, so that the F-norm of the difference between the matrix B and the original data matrix A is as small as possible. For example, for the matrix norm Go find one The matrix of The F-norm of the difference with the original data matrix A is as small as possible.
[0093] In one embodiment of the present invention, the illumination matrix norm between the low illumination component and the contrast illumination component is constructed using the following formula:
[0094]
[0095] Wherein, F represents the illumination matrix norm between the low illumination component and the contrast illumination component, P1 represents the contrast illumination component, P2 represents the low illumination component, represents the illumination intensity transformation matrix mapped from the low illumination component to the contrast illumination component, which is an unknown symbol to be solved at this time, and L2 represents the illumination intensity band of the low illumination image corresponding to the low illumination component.
[0096] Furthermore, the embodiment of the present invention calculates the illumination matrix trace of the illumination matrix norm to decompose the minimization problem of the illumination matrix norm into a minimization problem between the contrast illumination component, the low illumination component and the illumination intensity transformation matrix, thereby facilitating solving the value of the illumination intensity transformation matrix.
[0097] In one embodiment of the present invention, the calculating the illumination matrix trace of the illumination matrix norm includes: performing a trace function decomposition on the illumination matrix norm using the following formula to obtain a decomposed trace function:
[0098]
[0099] in, represents the decomposition trace function, tr represents the trace function symbol, F represents the illumination matrix norm between the low illumination component and the contrast illumination component, P1 represents the contrast illumination component, P2 represents the low illumination component, represents the illumination intensity transformation matrix mapped from the low illumination component to the contrast illumination component, which is an unknown symbol to be solved, L2 represents the illumination intensity band of the low illumination image corresponding to the low illumination component, and T represents the transposed symbol;
[0100] An illumination matrix trace of the illumination matrix norm is extracted from the decomposition trace function.
[0101] The decomposition trace function includes three trace functions, which are and in is the illumination matrix trace of the illumination matrix norm. It should be noted that at this time The minimization problem is transformed into of maximization.
[0102] Furthermore, the embodiment of the present invention calculates the intensity transformation matrix of the low illumination intensity according to the illumination matrix trace, so as to enhance the illumination intensity of the low illumination image using the intensity transformation matrix of the low illumination intensity. The intensity transformation matrix refers to the illumination intensity transformation matrix, that is,
[0103] In one embodiment of the present invention, calculating the intensity transformation matrix of the low illumination intensity according to the illumination matrix trace includes: obtaining the illumination matrix in the illumination matrix trace using the following formula:
[0104]
[0105] in, represents the illumination matrix in the illumination matrix trace, P1 represents the contrast illumination component, P2 represents the low illumination component, represents the illumination intensity transformation matrix mapped from the low illumination component to the contrast illumination component, which is an unknown symbol to be solved, L2 represents the illumination intensity band of the low illumination image corresponding to the low illumination component, and T represents the transposed symbol;
[0106] The illumination matrix is subjected to singular matrix decomposition using the following formula to obtain a decomposed singular matrix:
[0107]
[0108] Wherein, (U, V) represents the decomposed singular matrix, U represents The left singular matrix of The right singular matrix, σ1,σ2,…,σ n express The singular value of n represents , P1 represents the contrast illumination component, P2 represents the low illumination component, T represents the transposed sign, and diag represents the diag function;
[0109] Based on the decomposed singular matrix, the illumination matrix trace is transformed using the following formula to obtain the transformed form of the illumination matrix trace:
[0110]
[0111]
[0112] Where tr(ZΣ) represents the transformed form of the illumination matrix trace, and U represents The left singular matrix of The right singular matrix, σ1,σ2,…,σ n express The singular value of n represents The number of singular values of The singular value number of , P1 represents the contrast illumination component, P2 represents the low illumination component, T represents the transposed sign, represents the illumination intensity transformation matrix mapped from the low illumination component to the contrast illumination component, which is an unknown symbol to be solved. L2 represents the illumination intensity band of the low illumination image corresponding to the low illumination component, that is, the low illumination intensity. tr represents the trace function symbol. Z represents
[0113] According to the conversion form, the intensity transformation matrix of the low illumination intensity is calculated using the following formula:
[0114]
[0115] in, represents the intensity transformation matrix of the low illumination intensity, and U represents The left singular matrix of The right singular matrix of , T represents the transposed sign, and L2 represents the illumination intensity band of the low illumination image corresponding to the low illumination component, that is, the low illumination intensity.
[0116] Alternatively, if and only if Z is the identity matrix, that is, hour, Get the maximum value.
[0117] S3. Determine an enhanced illumination component of the low illumination image using the intensity transformation matrix, and calculate an enhanced illumination image of the low illumination image based on the enhanced illumination component and the low reflection component.
[0118] The embodiment of the present invention determines the enhanced illumination component of the low-illuminance image by using the intensity transformation matrix to enhance the illumination intensity of the low-illuminance image, thereby achieving the purpose of image enhancement. At the same time, the intensity transformation matrix corresponding to n levels of illumination intensity can be obtained. An intensity transformation matrix can be selected from the image to enhance the image, thereby achieving multi-level enhancement of the image.
[0119] In one embodiment of the present invention, determining the enhanced illumination component of the low-illuminance image using the intensity transformation matrix includes: calculating the enhanced illumination component of the low-illuminance image using the following formula:
[0120]
[0121] Wherein, P′2 represents the enhanced illumination component of the low illumination image, P2 represents the low illumination component, An intensity transformation matrix representing the low light intensity.
[0122] Furthermore, the embodiment of the present invention calculates an enhanced illumination image of the low illumination image based on the enhanced illumination component and the low reflection component, so as to perform multi-level enhancement on the low illumination image.
[0123] In one embodiment of the present invention, the step of calculating the enhanced illumination image of the low illumination image based on the enhanced illumination component and the low reflection component includes:
[0124] I′(x,y)=R′(x,y)·P′2(x,y)
[0125] Among them, I′(x, y) represents the enhanced illumination image of the low illumination image, R′(x, y) represents the low reflection component of the low illumination image, (x, y) represents the pixel coordinates of the low illumination image, and P′2(x, y) represents the enhanced illumination component of the low illumination image.
[0126] It can be seen that the embodiment of the present invention first collects low-illuminance images and their corresponding contrast-enhanced images to collect corresponding captured images under multiple illumination intensities as a prerequisite for subsequently enhancing the low-illuminance images into images under multiple illumination intensity levels. Furthermore, the embodiment of the present invention identifies the low illumination intensity of the low-illuminance image to subsequently perform multi-level enhancement transformation on the illumination intensity of the low-illuminance image. Furthermore, the embodiment of the present invention calculates the low illumination component and the low reflection component of the low illumination image to decompose the low illumination image into two parts, the illumination component and the reflection component, so as to facilitate the subsequent multi-level illumination intensity enhancement of the illumination component of the ambient light. Furthermore, the embodiment of the present invention calculates the contrast illumination component of the contrast-enhanced image to subsequently construct a mapping relationship from the low illumination component to the contrast illumination component. Secondly, the embodiment of the present invention constructs an illumination matrix norm between the low illumination component and the contrast illumination component to construct The mapping relationship between the low illumination component and the contrast illumination component can be used to calculate the illumination intensity mapping relationship from the low illumination image to the multi-level enhanced image. Furthermore, the embodiment of the present invention calculates the illumination matrix trace of the illumination matrix norm to decompose the minimization problem of the illumination matrix norm into the minimization problem among the contrast illumination component, the low illumination component and the illumination intensity transformation matrix, so as to solve the value of the illumination intensity transformation matrix. Furthermore, the embodiment of the present invention calculates the intensity transformation matrix of the low illumination intensity according to the illumination matrix trace to enhance the illumination intensity of the low illumination image using the intensity transformation matrix of the low illumination intensity. Furthermore, the embodiment of the present invention determines the enhanced illumination component of the low illumination image by using the intensity transformation matrix to enhance the illumination intensity of the low illumination image, thereby achieving the purpose of image enhancement, and at the same time, the intensity transformation matrix corresponding to n levels of illumination intensity can be obtained. An intensity transformation matrix can be selected from the matrix to enhance the image, thereby realizing multi-level enhancement of the image. Therefore, a multi-level enhancement method for low-light images proposed in an embodiment of the present invention can characterize the illumination intensity matrix of ambient light changes under different illumination conditions, and enhance the low-light image into an enhanced image with multiple levels of illumination intensity that is not affected by or is less affected by ambient light.
[0127] like Figure 3 The figure shows a functional module diagram of the low-illumination image multi-level enhancement device of the present invention.
[0128] The low-light image multi-level enhancement device 300 of the present invention can be installed in an electronic device. According to the functions to be implemented, the low-light image multi-level enhancement device can include a contrast component calculation module 301, a transformation matrix calculation module 302, and an enhanced image calculation module 303. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.
[0129] In the embodiment of the present invention, the functions of each module / unit are as follows:
[0130] The contrast component calculation module 301 is used to collect a low-illumination image and its corresponding contrast-enhanced image, identify the low-illumination intensity of the low-illumination image, calculate the low-illumination component and the low-reflection component of the low-illumination image, and calculate the contrast-illumination component of the contrast-enhanced image;
[0131] The transformation matrix calculation module 302 is used to construct an illumination matrix norm between the low illumination component and the contrast illumination component, calculate an illumination matrix trace of the illumination matrix norm, and calculate an intensity transformation matrix of the low illumination intensity according to the illumination matrix trace;
[0132] The enhanced image calculation module 303 is used to determine the enhanced illumination component of the low illumination image by using the intensity transformation matrix, and calculate the enhanced illumination image of the low illumination image based on the enhanced illumination component and the low reflection component.
[0133] In detail, each module in the low-light image multi-level enhancement device 300 in the embodiment of the present invention is used in the same manner as described above. Figure 1 to Figure 2 The multi-level enhancement method for low-illumination images described in the present invention has the same technical means and can produce the same technical effects, which will not be repeated here.
[0134] like Figure 4 FIG. 1 is a schematic diagram of the structure of an electronic device for implementing a multi-level enhancement method for low-illuminance images according to the present invention.
[0135] The electronic device may include a processor 40 , a memory 41 , a communication bus 42 , and a communication interface 43 , and may also include a computer program stored in the memory 41 and executable on the processor 40 , such as a low-illumination image multi-level enhancement program.
[0136] In some embodiments, the processor 40 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 40 is the control core (ControlUnit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 41 (for example, executing a low-light image multi-level enhancement program, etc.), and calls data stored in the memory 41 to execute various functions of the electronic device and process data.
[0137] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 41 may also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 41 may also include both an internal storage unit of the electronic device and an external storage device. The memory 41 may not only be used to store application software and various types of data installed in the electronic device, such as the code of the database configuration connection program, but also be used to temporarily store data that has been output or is to be output.
[0138] The communication bus 42 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 41 and at least one processor 40, etc.
[0139] The communication interface 43 is used for communication between the above-mentioned electronic device 4 and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.
[0140] Figure 4 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 4 The structure shown does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0141] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 40 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, and power status indicators. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.
[0142] It should be understood that the embodiment is for illustrative purposes only and the scope of the patent invention is not limited to this structure.
[0143] The database configuration connection program stored in the memory 41 in the electronic device is a combination of multiple computer programs. When running in the processor 40, it can achieve:
[0144] Acquire a low-illumination image and its corresponding contrast-enhanced image, identify the low-illumination intensity of the low-illumination image, calculate the low-illumination component and the low-reflection component of the low-illumination image, and calculate the contrast-illumination component of the contrast-enhanced image;
[0145] constructing an illumination matrix norm between the low illumination component and the contrast illumination component, calculating an illumination matrix trace of the illumination matrix norm, and calculating an intensity transformation matrix of the low illumination intensity according to the illumination matrix trace;
[0146] An enhanced illumination component of the low illumination image is determined by using the intensity transformation matrix, and an enhanced illumination image of the low illumination image is calculated based on the enhanced illumination component and the low reflection component.
[0147] Specifically, the specific implementation method of the processor 40 for the above computer program can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0148] Furthermore, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium. The storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0149] The present invention further provides a storage medium, wherein the readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:
[0150] Acquire a low-illumination image and its corresponding contrast-enhanced image, identify the low-illumination intensity of the low-illumination image, calculate the low-illumination component and the low-reflection component of the low-illumination image, and calculate the contrast-illumination component of the contrast-enhanced image;
[0151] constructing an illumination matrix norm between the low illumination component and the contrast illumination component, calculating an illumination matrix trace of the illumination matrix norm, and calculating an intensity transformation matrix of the low illumination intensity according to the illumination matrix trace;
[0152] An enhanced illumination component of the low illumination image is determined by using the intensity transformation matrix, and an enhanced illumination image of the low illumination image is calculated based on the enhanced illumination component and the low reflection component.
[0153] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0154] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0155] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0156] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0157] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0158] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0159] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.
Claims
1. A low-light image multi-level enhancement method, characterized in that: The method comprises: Acquire a low-illumination image and its corresponding contrast-enhanced image, identify the low-illumination intensity of the low-illumination image, calculate the low-illumination component and the low-reflection component of the low-illumination image, and calculate the contrast-illumination component of the contrast-enhanced image; constructing an illumination matrix norm between the low illumination component and the contrast illumination component, calculating an illumination matrix trace of the illumination matrix norm, and calculating an intensity transformation matrix of the low illumination intensity according to the illumination matrix trace; The calculating the illumination matrix trace of the illumination matrix norm comprises: The illumination matrix norm is decomposed into a trace function using the following formula to obtain a decomposed trace function: in, represents the decomposition trace function, tr represents the trace function symbol, F represents the illumination matrix norm between the low illumination component and the contrast illumination component, P1 represents the contrast illumination component, P2 represents the low illumination component, represents the illumination intensity transformation matrix mapped from the low illumination component to the contrast illumination component, which is an unknown symbol to be solved, L2 represents the illumination intensity band of the low illumination image corresponding to the low illumination component, and T represents the transposed symbol; extracting an illumination matrix trace of the illumination matrix norm from the decomposition trace function; The step of calculating the intensity transformation matrix of the low illumination intensity according to the illumination matrix trace comprises: The illumination matrix in the illumination matrix trace is obtained using the following formula: in, represents the illumination matrix in the illumination matrix trace, P1 represents the contrast illumination component, P2 represents the low illumination component, represents the illumination intensity transformation matrix mapped from the low illumination component to the contrast illumination component, which is an unknown symbol to be solved, L2 represents the illumination intensity band of the low illumination image corresponding to the low illumination component, and T represents the transposed symbol; The illumination matrix is subjected to singular matrix decomposition using the following formula to obtain a decomposed singular matrix: Wherein, (U, V) represents the decomposed singular matrix, U represents The left singular matrix of The right singular matrix, σ1,σ2,…,σ n express The singular value of n represents , P1 represents the contrast illumination component, P2 represents the low illumination component, T represents the transposed sign, and diag represents the diag function; Based on the decomposed singular matrix, the illumination matrix trace is transformed using the following formula to obtain the transformed form of the illumination matrix trace: Where tr(ZΣ) represents the transformed form of the illumination matrix trace, and U represents The left singular matrix of The right singular matrix, σ1,σ2,…,σ n express The singular value of n represents The number of singular values of The singular value number of , P1 represents the contrast illumination component, P2 represents the low illumination component, T represents the transposed sign, represents the illumination intensity transformation matrix mapped from the low illumination component to the contrast illumination component, which is an unknown symbol to be solved. L2 represents the illumination intensity band of the low illumination image corresponding to the low illumination component, that is, the low illumination intensity. tr represents the trace function symbol. Z represents According to the conversion form, the intensity transformation matrix of the low illumination intensity is calculated using the following formula: in, represents the intensity transformation matrix of the low illumination intensity, and U represents The left singular matrix of The right singular matrix of , T represents the transposed sign, L2 represents the illumination intensity band of the low illumination image corresponding to the low illumination component, that is, the low illumination intensity; An enhanced illumination component of the low illumination image is determined by using the intensity transformation matrix, and an enhanced illumination image of the low illumination image is calculated based on the enhanced illumination component and the low reflection component.
2. The method according to claim 1, characterized in that The collecting of the low-light image and the corresponding contrast-enhanced image includes: Measure light intensity using a pre-built light meter; determining an intensity bandwidth of the illumination intensity; Dividing the illumination intensity into illumination intensity bands according to the intensity bandwidth; Identifying a low intensity band and an increased intensity band from the light intensity band; Based on the low intensity band and the enhanced intensity band, the low illumination image and its corresponding contrast enhanced image are acquired by using a pre-built camera.
3. The method according to claim 1, characterized in that The calculating the low illumination component and the low reflection component of the low illumination image comprises: The low-light image is decomposed into components using the following formula to obtain the decomposed components of the low-light image: I(x,y)=R(x,y)·P(x,y)→(R(x,y),P(x,y)) Wherein, (R(x,y), P(x,y)) represents the decomposed components of the low-light image, I(x,y) represents the pixel value of the low-light image, (x,y) represents the pixel coordinates of the low-light image, R(x,y) represents the low-reflection component to be solved in the decomposed components of the low-light image, which is just an unknown symbol at this time, and P(x,y) represents the low-illumination component to be solved in the decomposed components of the low-light image, which is just an unknown symbol at this time; According to the decomposed components, the low reflection component of the low illumination image is calculated using the following formula: Wherein, R′(x,y) represents the low reflection component of the low illumination image, F(x,y) represents the center surround function, I(x,y) represents the pixel value of the low illumination image, (x,y) represents the pixel coordinates of the low illumination image, R(x,y) represents the low reflection component to be solved in the decomposed components of the low illumination image, which is just an unknown symbol at this time, P(x,y) represents the low illumination component to be solved in the decomposed components of the low illumination image, which is just an unknown symbol at this time, c represents the Gaussian surround scale, and λ represents a scale; According to the low reflection component, the low illumination component of the low illumination image is calculated using the following formula: Among them, P′(x, y) represents the low illumination component of the low illumination image, R′(x, y) represents the low reflection component of the low illumination image, I(x, y) represents the pixel value of the low illumination image, and (x, y) represents the pixel coordinates of the low illumination image.
4. The method according to claim 1, characterized in that The constructing an illumination matrix norm between the low illumination component and the contrast illumination component comprises: The illumination matrix norm between the low illumination component and the contrast illumination component is constructed using the following formula: Wherein, F represents the illumination matrix norm between the low illumination component and the contrast illumination component, P1 represents the contrast illumination component, P2 represents the low illumination component, represents the illumination intensity transformation matrix mapped from the low illumination component to the contrast illumination component, which is an unknown symbol to be solved at this time, and L2 represents the illumination intensity band of the low illumination image corresponding to the low illumination component.
5. The method according to claim 1, characterized in that The step of determining the enhanced illumination component of the low illumination image by using the intensity transformation matrix comprises: The enhanced illumination component of the low-illuminance image is calculated using the following formula: Wherein, P′2 represents the enhanced illumination component of the low illumination image, P2 represents the low illumination component, An intensity transformation matrix representing the low light intensity.
6. A low-light image multi-level enhancement device, characterized in that: The device comprises: A contrast component calculation module, used for collecting a low-illumination image and its corresponding contrast-enhanced image, identifying the low-illumination intensity of the low-illumination image, calculating the low-illumination component and the low-reflection component of the low-illumination image, and calculating the contrast-illumination component of the contrast-enhanced image; a transformation matrix calculation module, used to construct an illumination matrix norm between the low illumination component and the contrast illumination component, calculate an illumination matrix trace of the illumination matrix norm, and calculate an intensity transformation matrix of the low illumination intensity according to the illumination matrix trace; The calculating the illumination matrix trace of the illumination matrix norm comprises: The illumination matrix norm is decomposed into a trace function using the following formula to obtain a decomposed trace function: in, represents the decomposition trace function, tr represents the trace function symbol, F represents the illumination matrix norm between the low illumination component and the contrast illumination component, P1 represents the contrast illumination component, P2 represents the low illumination component, represents the illumination intensity transformation matrix mapped from the low illumination component to the contrast illumination component, which is an unknown symbol to be solved, L2 represents the illumination intensity band of the low illumination image corresponding to the low illumination component, and T represents the transposed symbol; extracting an illumination matrix trace of the illumination matrix norm from the decomposition trace function; The step of calculating the intensity transformation matrix of the low illumination intensity according to the illumination matrix trace comprises: The illumination matrix in the illumination matrix trace is obtained using the following formula: in, represents the illumination matrix in the illumination matrix trace, P1 represents the contrast illumination component, P2 represents the low illumination component, represents the illumination intensity transformation matrix mapped from the low illumination component to the contrast illumination component, which is an unknown symbol to be solved, L2 represents the illumination intensity band of the low illumination image corresponding to the low illumination component, and T represents the transposed symbol; The illumination matrix is subjected to singular matrix decomposition using the following formula to obtain a decomposed singular matrix: Wherein, (U, V) represents the decomposed singular matrix, U represents The left singular matrix of The right singular matrix, σ1,σ2,…,σ n express The singular value of n represents , P1 represents the contrast illumination component, P2 represents the low illumination component, T represents the transposed sign, and diag represents the diag function; Based on the decomposed singular matrix, the illumination matrix trace is transformed using the following formula to obtain the transformed form of the illumination matrix trace: Where tr(ZΣ) represents the transformed form of the illumination matrix trace, and U represents The left singular matrix of The right singular matrix, σ1,σ2,…,σ n express The singular value of n represents The number of singular values of The singular value number of , P1 represents the contrast illumination component, P2 represents the low illumination component, T represents the transposed sign, represents the illumination intensity transformation matrix mapped from the low illumination component to the contrast illumination component, which is an unknown symbol to be solved. L2 represents the illumination intensity band of the low illumination image corresponding to the low illumination component, that is, the low illumination intensity. tr represents the trace function symbol. Z represents According to the conversion form, the intensity transformation matrix of the low illumination intensity is calculated using the following formula: in, represents the intensity transformation matrix of the low illumination intensity, and U represents The left singular matrix of The right singular matrix of , T represents the transposed sign, L2 represents the illumination intensity band of the low illumination image corresponding to the low illumination component, that is, the low illumination intensity; The enhanced image calculation module is used to determine the enhanced illumination component of the low illumination image by using the intensity transformation matrix, and calculate the enhanced illumination image of the low illumination image based on the enhanced illumination component and the low reflection component.
7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the low-illumination image multi-level enhancement method as described in any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the low-illumination image multi-level enhancement method according to any one of claims 1 to 5 is implemented.
