A low-light image processing method and system based on image enhancement
Establish an adaptive model through Retinex algorithm and BP neural network, adjust camera parameters and perform image enhancement, which solves the problem of poor low-light image enhancement effect of catenary and achieves the best enhancement effect and visual quality improvement of low-light images of catenary .
Patent Information
- Application Number
- CN202410905660.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-07-08
AI Technical Summary
The existing technology has limited image enhancement effects on low-light images of catenary lines, and it is difficult to maximize the enhancement of low-light images of catenary lines.
Based on the Retinex algorithm framework and BP neural network, by acquiring images of the catenary under normal luminosity and low luminosity, an adaptive model is established to adjust camera parameters, obtain the optimal catenary low-light captured image, and use the multi-scale Retinex algorithm to image Enhance.
The optimal low-light catenary image enhancement effect is achieved, the visual quality of the catenary low-light image is improved, and the influence of low light is eliminated to the greatest extent.
Smart Images

Figure CN118446911B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of overhead line image processing, and in particular to a low-light image processing method and system based on image enhancement. Background Art
[0002] The overhead contact network is a high-voltage transmission line that is erected in a zigzag shape above the railway line in an electrified railway and is used by the pantograph to draw current. The overhead contact network is the main structure of the railway electrification project and is a special form of transmission line that supplies power to electric locomotives. It consists of contact suspension, support device, positioning device, pillars and foundation.
[0003] Catenary inspection usually uses the image of the catenary to identify faults. However, the catenary inspection images often have low light conditions when they are taken, which makes it difficult to accurately identify the faults of the catenary in the low light images of the catenary. In order to accurately identify the faults, the low light images of the catenary are currently enhanced.
[0004] In the existing technology, image enhancement of low-light images of the contact network usually only relies on the image enhancement effect of intelligent algorithms, and cannot enhance the low-light images of the contact network through hardware control during shooting to ensure the shooting effect of the image. Therefore, the image enhancement effect of low-light images of the contact network by the existing technology is limited, and it is difficult to achieve the enhancement of low-light images of the contact network to the greatest extent. Summary of the invention
[0005] The purpose of the present invention is to provide a low-light image processing method and system based on image enhancement, so as to solve the technical problem that the image enhancement effect of low-light images of contact networks in the prior art is limited and it is difficult to achieve the enhancement of low-light images of contact networks to the greatest extent.
[0006] In order to solve the above technical problems, the present invention specifically provides the following technical solutions:
[0007] A low-light image processing method based on image enhancement comprises the following steps:
[0008] Acquire images of the contact network at normal light intensity and multiple low light intensity levels respectively, and obtain corresponding images of the contact network at normal light intensity and multiple images of the contact network at low light intensity;
[0009] Based on the Retinex algorithm framework and BP neural network, the low-light images of the contact network are photographed and evaluated with the normal-light images of the contact network as the evaluation reference, and an adaptive model for setting the optimal camera parameters is established based on the shooting evaluation results.
[0010] The adaptive model is used to adjust the optimal camera parameters for photographing the contact network under low light conditions, so as to obtain the optimal low light photographed image of the contact network;
[0011] The Retinex algorithm framework is used to perform image enhancement on the low-light photographed image of the contact network to obtain a low-light enhanced image of the contact network.
[0012] As a preferred solution of the present invention, the method for photographing low-light images of the contact network includes:
[0013] At each low light level, multiple groups of camera parameters are randomly set to shoot the contact network, and multiple low-light images of the contact network at each low light level are obtained.
[0014] As a preferred solution of the present invention, the camera parameters include exposure time, aperture value, exposure compensation value and sensitivity.
[0015] As a preferred solution of the present invention, the method for constructing the adaptive model includes:
[0016] The single-scale Retinex algorithm SSR is used to decompose the normal photometric image of the contact network into a reflection component and an illumination component, and the normal photometric reflection component and the normal photometric illumination component of the contact network are obtained.
[0017] The single-scale Retinex algorithm SSR is used to decompose the low-light image of the contact network into reflection component and illumination component, and the low-light reflection component of the contact network and the low-light illumination component of the contact network are obtained.
[0018] The reflection component is evaluated by using the normal light intensity reflection component and the low light intensity reflection component of the contact network, and the illumination component is evaluated by using the normal light intensity illumination component and the low light intensity illumination component of the contact network;
[0019] The evaluation result of the reflection component and the evaluation result of the illumination component are combined to serve as the evaluation result of the low-light image of the contact network;
[0020] The photometric values of low-light images of the contact network and the camera parameters used to shoot the low-light images of the contact network are used as input items of the BP neural network, and the evaluation results of the low-light images of the contact network are used as output items of the BP neural network. The BP neural network is used to train the input items and output items, and an evaluation model that characterizes the mapping relationship between photometric values, camera parameters and evaluation results is established.
[0021] The evaluation model is: d=BP(K,{A,B,C,D});
[0022] In the formula, d is the evaluation result, K is the photometric value, A is the exposure time, B is the aperture value, C is the exposure compensation value, D is the sensitivity, and BP is the BP neural network;
[0023] The photometric values of all low-light images of the overhead line are fixed one by one, and all values of the camera parameters are input into the evaluation model one by one, and the evaluation model outputs the evaluation result obtained by each value of the camera parameter under the fixed photometric value;
[0024] Taking the camera parameter value corresponding to the minimum value of the evaluation result as the optimal camera parameter of the fixed photometric value;
[0025] Using a fixed photometric value as an input item of the second BP neural network, and using a fixed photometric value as an output item of the second BP neural network, and using the BP neural network to train the input item and the output item, to establish an adaptive model that characterizes the mapping relationship between the photometric value and the camera parameter;
[0026] The adaptive model is: {A,B,C,D} best =BP2(K);
[0027] In the formula, {A, B, C, D} best is the optimal camera parameter, K is the photometric value, and BP2 is the second BP neural network.
[0028] As a preferred solution of the present invention, the evaluation of the reflection component is: il =||R l,i -R n ||1, where d il is the reflection component evaluation result of the i-th overhead line low-light image, R l,i is the low-light reflection component of the catenary network of the i-th catenary network low-light image, R n is the normal photometric reflection component of the contact network, ||R l,i -R n ||1 is the L1 norm;
[0029] The evaluation of the illumination component is: , where d is is the evaluation result of the illumination component of the i-th overhead line low-light image, I l,i is the low-light illumination component of the catenary network of the i-th catenary network low-light image, I n is the normal luminous intensity illumination component of the contact network, is the horizontal gradient, For I l,i The horizontal gradient of For I n The horizontal gradient of is the vertical gradient, For I l,i The vertical gradient of For I n The vertical gradient of and All are L1 norm forms;
[0030] The evaluation results are: i = d il + d is , where d i is the evaluation result of the i-th low-light image of the overhead line, d il is the reflection component evaluation result of the i-th overhead line low-light image, d is is the evaluation result of the illumination component of the i-th overhead contact network low-light image.
[0031] As a preferred solution of the present invention, a method for shooting an optimal overhead line low-light image comprises:
[0032] Monitor the photometric value of the contact network at the shooting time node;
[0033] Using the adaptive model, the optimal camera parameters at the shooting time node are calculated according to the photometric value at the shooting time node;
[0034] According to the optimal camera parameters, the contact network is photographed to obtain the optimal low-light image of the contact network at the shooting time node.
[0035] As a preferred solution of the present invention, a method for enhancing the image of the overhead line captured at low light levels comprises:
[0036] The multi-scale Retinex algorithm MSR is used to decompose the optimal low-light image of the overhead line at the shooting time node into n-scale images;
[0037] Each scale image is decomposed into a reflection component and an illumination component, and the reflection component R of each scale image is obtained. j and the illumination component I j , where R j is the reflection component of the j-th scale image, I j is the illumination component of the j-th scale image;
[0038] Combine the reflection component and illumination component of each scale image to obtain the enhanced image M of each scale image j =exp(R j +I j ), where M j is the enhanced image of the j-th scale image;
[0039] The enhanced images of all scale images are weighted fused to obtain the low-light enhanced image of the overhead contact network at the shooting time node. , where Gz is the low-light enhanced image of the contact network, w jis the weight of the jth scale image, n is the number of scale images, n>1, .
[0040] As a preferred solution of the present invention, the present invention provides a low-light image processing system based on image enhancement, the system comprising:
[0041] Light monitoring equipment, used to obtain the photometric value of the contact network at the shooting time node;
[0042] A parameter adaptive unit, used to calculate the optimal camera parameters at the shooting time node using a pre-established adaptive model;
[0043] An image capturing device is used to capture the contact network according to the optimal camera parameters at the capturing time node, so as to obtain the optimal low-light captured image of the contact network at the capturing time node;
[0044] The image enhancement unit is used to enhance the low-light-photographed image of the contact network by using a multi-scale Retinex algorithm MSR to obtain a low-light-enhanced image of the contact network.
[0045] As a preferred solution of the present invention, the method for establishing the adaptive model in the parameter adaptive unit includes:
[0046] The single-scale Retinex algorithm SSR is used to decompose the normal photometric image of the contact network into a reflection component and an illumination component, and the normal photometric reflection component and the normal photometric illumination component of the contact network are obtained.
[0047] The single-scale Retinex algorithm SSR is used to decompose the low-light image of the contact network into reflection component and illumination component, and the low-light reflection component of the contact network and the low-light illumination component of the contact network are obtained.
[0048] The reflection component is evaluated by using the normal light intensity reflection component and the low light intensity reflection component of the contact network, and the illumination component is evaluated by using the normal light intensity illumination component and the low light intensity illumination component of the contact network;
[0049] The evaluation result of the reflection component and the evaluation result of the illumination component are combined to serve as the evaluation result of the low-light image of the contact network;
[0050] The photometric values of low-light images of the contact network and the camera parameters used to shoot the low-light images of the contact network are used as input items of the BP neural network, and the evaluation results of the low-light images of the contact network are used as output items of the BP neural network. The BP neural network is used to train the input items and output items, and an evaluation model that characterizes the mapping relationship between photometric values, camera parameters and evaluation results is established.
[0051] The evaluation model is: d=BP(K,{A,B,C,D});
[0052] In the formula, d is the evaluation result, K is the photometric value, A is the exposure time, B is the aperture value, C is the exposure compensation value, D is the sensitivity, and BP is the BP neural network;
[0053] The photometric values of all low-light images of the overhead line are fixed one by one, and all values of the camera parameters are input into the evaluation model one by one, and the evaluation model outputs the evaluation result obtained by each value of the camera parameter under the fixed photometric value;
[0054] Taking the camera parameter value corresponding to the minimum value of the evaluation result as the optimal camera parameter of the fixed photometric value;
[0055] Using a fixed photometric value as an input item of the second BP neural network, and using a fixed photometric value as an output item of the second BP neural network, and using the BP neural network to train the input item and the output item, to establish an adaptive model that characterizes the mapping relationship between the photometric value and the camera parameter;
[0056] The adaptive model is: {A,B,C,D} best =BP2(K);
[0057] In the formula, {A, B, C, D} best is the optimal camera parameter, K is the photometric value, and BP2 is the second BP neural network.
[0058] As a preferred solution of the present invention, the image enhancement method of the image enhancement unit includes:
[0059] The method for enhancing the low-light-shot image of the overhead line includes:
[0060] The multi-scale Retinex algorithm MSR is used to decompose the optimal low-light image of the overhead line at the shooting time node into n-scale images;
[0061] Each scale image is decomposed into a reflection component and an illumination component, and the reflection component R of each scale image is obtained. j and the illumination component I j , where R j is the reflection component of the j-th scale image, I j is the illumination component of the j-th scale image;
[0062] Combine the reflection component and illumination component of each scale image to obtain the enhanced image M of each scale image j =exp(R j +I j ), where M jis the enhanced image of the j-th scale image;
[0063] The enhanced images of all scale images are weighted fused to obtain the low-light enhanced image of the overhead contact network at the shooting time node. , where Gz is the low-light enhanced image of the contact network, w j is the weight of the jth scale image, n is the number of scale images, n>1, .
[0064] Compared with the prior art, the present invention has the following beneficial effects:
[0065] Based on the image enhancement algorithm framework, the present invention constructs an adaptive model that calculates the optimal camera parameters according to the photometric value, which can obtain the optimal low-light image of the contact network during shooting, and the optimal low-light image of the contact network is matched with the image enhancement algorithm framework, so that the image enhancement effect of the low-light image of the contact network can be superimposed to achieve optimal enhancement, thereby maximizing the visual quality of the low-light image of the contact network. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.
[0067] Figure 1 A flow chart of a low-light image processing method based on image enhancement provided by an embodiment of the present invention;
[0068] Figure 2 A block diagram of a low-light image processing system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0069] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0070] like Figure 1 As shown, the present invention provides a low-light image processing method based on image enhancement, comprising the following steps:
[0071] Acquire images of the contact network at normal light intensity and multiple low light intensity levels respectively, and obtain corresponding images of the contact network at normal light intensity and multiple images of the contact network at low light intensity;
[0072] Based on the Retinex algorithm framework and BP neural network, the low-light images of the contact network are photographed and evaluated with the normal-light images of the contact network as the evaluation reference, and an adaptive model for setting the optimal camera parameters is established based on the shooting evaluation results.
[0073] The adaptive model is used to adjust the optimal camera parameters for photographing the contact network under low light conditions, and the optimal low-light photographic image of the contact network is obtained.
[0074] The Retinex algorithm framework is used to enhance the low-light images of the contact network and obtain the low-light enhanced images of the contact network.
[0075] The present invention utilizes the Retinex algorithm framework to perform image enhancement on the low-light image of the contact network, restores the clarity of the low-light image of the contact network, realizes image enhancement in the image processing stage, and clearly displays the fault condition of the contact network.
[0076] In order to further improve the image enhancement effect of low-light images of the contact network based on the Retinex algorithm framework, the present invention selects the optimal camera parameters for shooting in the image shooting stage, and obtains the optimal low-light image (i.e., the low-light image of the contact network) in the image shooting stage. The image enhancement performed by the Retinex algorithm framework on the basis of the optimal low-light image can obtain a better enhancement effect.
[0077] In order to match the setting of camera parameters to the Retinex algorithm framework, the present invention can make the adaptive model that sets the optimal camera parameters serve the Retinex algorithm framework, and realize the optimal camera setting so that the captured low-light image can achieve the optimal enhancement effect in the Retinex algorithm framework. When constructing the adaptive model, the Retinex algorithm framework is combined with the BP neural network to obtain the mapping relationship between the photometric value and the camera parameter.
[0078] Specifically, the present invention decomposes the reflection component and the illumination component of the low-light image and the normal-light image through the Retinex algorithm framework. Due to the decomposition theory of the Retinex algorithm framework, the reflection component is independent of the luminosity value, and the illumination component shows the overall texture and structure of the shooting target (contact network). The gradient of the illumination component quantifies the brightness smoothness of the overall texture and structure of the shooting target. Therefore, the reflection component between the low-light image and the normal-light image should be as consistent as possible, and the brightness smoothness of the overall texture and structure of the shooting target between the low-light image and the normal-light image should be as consistent as possible. That is, the higher the consistency of the reflection component between the low-light image and the normal-light image, the higher the consistency of the brightness smoothness of the overall texture and structure of the shooting target between the low-light image and the normal-light image, the better the quality of the low-light image, and the higher the effect when the Retinex algorithm framework is used for image enhancement. In other words, the more reasonable the camera parameters are when the low-light image is shot, the better the quality of the low-light image, and the higher the effect when the Retinex algorithm framework is used for image enhancement.
[0079] In summary, the present invention uses the normal-light reflection component and the low-light reflection component of the contact network to evaluate the reflection component, and uses the normal-light illumination component and the low-light illumination component of the contact network to evaluate the illumination component. The evaluation results of the reflection component and the evaluation results of the illumination component are combined as the evaluation results of the low-light image of the contact network, and the BP neural network is combined to establish an evaluation model that characterizes the mapping relationship between the light value, camera parameters and the evaluation results.
[0080] Furthermore, the photometric value in the evaluation model is fixed, and all values of the camera parameters are input into the evaluation model one by one. The evaluation model outputs the evaluation results of each value of the camera parameter under the fixed photometric value, and then the camera parameter value corresponding to the minimum value of the evaluation result (that is, the higher the consistency of the reflection component between the low-light image and the normal-light image, the higher the consistency of the brightness smoothness of the overall texture and structure of the photographed target between the low-light image and the normal-light image) is taken as the optimal camera parameter for the fixed photometric value. The BP neural network is combined to establish an adaptive model that characterizes the mapping relationship between the photometric value and the camera parameter, so that the optimal camera parameters that are most suitable for the Retinex algorithm framework can be calculated according to the photometric value, so as to capture the low-light image of the contact network (that is, the low-light image of the contact network) that enables the Retinex algorithm framework to perform the maximum image enhancement.
[0081] The optimal camera parameters obtained by the adaptive model can obtain low-light images that are closest to normal light conditions, that is, the low-light images obtained by the optimal camera parameters can be closest to the decomposition results of the reflection component and illumination component of the normal light image under the Retinex algorithm framework, so that the image enhancement results synthesized by the reflection component and the illumination component under the Retinex algorithm framework are closest to the image enhancement under normal light conditions. Therefore, the best enhancement effect is produced and the influence of low light is eliminated to the greatest extent.
[0082] Methods for capturing low-light images of overhead contact lines include:
[0083] At each low light level, multiple groups of camera parameters are randomly set to shoot the contact network, and multiple low-light images of the contact network at each low light level are obtained.
[0084] Camera parameters include exposure time, aperture value, exposure compensation value and sensitivity. Increasing exposure time, increasing aperture (increasing light flux), positively adjusting exposure compensation value (increasing exposure based on automatic metering) and sensitivity adjustment can all be used to improve image capture quality under low light conditions.
[0085] In order to match the camera parameter settings to the Retinex algorithm framework, the present invention enables the adaptive model that sets the optimal camera parameters to serve the Retinex algorithm framework, and realizes the optimal camera settings so that the captured low-light images can achieve the optimal enhancement effect in the Retinex algorithm framework. When constructing the adaptive model, the Retinex algorithm framework is combined with the BP neural network to obtain the mapping relationship between the photometric value and the camera parameter, which is as follows:
[0086] The methods for building adaptive models include:
[0087] The single-scale Retinex algorithm SSR is used to decompose the normal photometric image of the contact network into a reflection component and an illumination component, and the normal photometric reflection component and the normal photometric illumination component of the contact network are obtained.
[0088] The single-scale Retinex algorithm SSR is used to decompose the low-light image of the contact network into reflection component and illumination component, and the low-light reflection component of the contact network and the low-light illumination component of the contact network are obtained.
[0089] The reflection component is evaluated by using the normal light reflection component of the contact network and the low light reflection component of the contact network, that is, the consistency of the reflection component between the low light image and the normal light image is evaluated; and the illumination component is evaluated by using the normal light illumination component of the contact network and the low light illumination component of the contact network, that is, the consistency of the brightness smoothness of the overall texture and structure of the photographed target between the low light image and the normal light image is evaluated;
[0090] The evaluation result of the reflection component and the evaluation result of the illumination component are combined to serve as the evaluation result of the low-light image of the contact network;
[0091] The photometric values of low-light images of the contact network and the camera parameters used to shoot the low-light images of the contact network are used as input items of the BP neural network, and the evaluation results of the low-light images of the contact network are used as output items of the BP neural network. The BP neural network is used to train the input items and output items, and an evaluation model that characterizes the mapping relationship between photometric values, camera parameters and evaluation results is established.
[0092] The present invention decomposes the reflection component and the illumination component of the low-light image and the normal-light image through the Retinex algorithm framework. Due to the decomposition theory of the Retinex algorithm framework, the reflection component is independent of the luminosity value, the illumination component shows the overall texture and structure of the shooting target (contact network), and the gradient of the illumination component quantifies the brightness smoothness of the overall texture and structure of the shooting target. Therefore, the reflection component between the low-light image and the normal-light image should be as consistent as possible, and the brightness smoothness of the overall texture and structure of the shooting target between the low-light image and the normal-light image should be as consistent as possible. That is, the higher the consistency of the reflection component between the low-light image and the normal-light image, the higher the consistency of the brightness smoothness of the overall texture and structure of the shooting target between the low-light image and the normal-light image, the better the quality of the low-light image, and the higher the effect of image enhancement when the Retinex algorithm framework is used. In other words, the more reasonable the camera parameters are when the low-light image is shot, the better the quality of the low-light image, and the higher the effect of image enhancement when the Retinex algorithm framework is used.
[0093] In summary, the present invention uses the normal-light reflection component and the low-light reflection component of the contact network to evaluate the reflection component, and uses the normal-light illumination component and the low-light illumination component of the contact network to evaluate the illumination component. The evaluation results of the reflection component and the evaluation results of the illumination component are combined as the evaluation results of the low-light image of the contact network, and the BP neural network is combined to establish an evaluation model that characterizes the mapping relationship between the light value, camera parameters and the evaluation results.
[0094] The evaluation model is: d=BP(K,{A,B,C,D});
[0095] In the formula, d is the evaluation result, K is the photometric value, A is the exposure time, B is the aperture value, C is the exposure compensation value, D is the sensitivity, and BP is the BP neural network;
[0096] The photometric values of all low-light images of the overhead line are fixed one by one, and all values of the camera parameters are input into the evaluation model one by one. The evaluation model outputs the evaluation results of each value of the camera parameter under the fixed photometric value;
[0097] The camera parameter value corresponding to the minimum value of the evaluation result is taken as the optimal camera parameter of the fixed photometric value;
[0098] Using a fixed photometric value as an input item of the second BP neural network, and using a fixed photometric value as an output item of the second BP neural network, and using the BP neural network to train the input item and the output item, to establish an adaptive model that characterizes the mapping relationship between the photometric value and the camera parameter;
[0099] The adaptive model is: {A,B,C,D} best =BP2(K);
[0100] In the formula, {A, B, C, D} best is the optimal camera parameter, K is the photometric value, and BP2 is the second BP neural network.
[0101] The reflection component is evaluated as: d il =||R l,i -R n ||1, where d il is the reflection component evaluation result of the i-th overhead line low-light image, R l,i is the low-light reflection component of the catenary network of the i-th catenary network low-light image, R n is the normal photometric reflection component of the contact network, ||R l,i -R n ||1 is the L1 norm;
[0102] The evaluation of the illumination component is: , where d is is the evaluation result of the illumination component of the i-th overhead line low-light image, I l,i is the low-light illumination component of the catenary network of the i-th catenary network low-light image, I n is the normal luminous intensity illumination component of the contact network, is the horizontal gradient, For I l,i The horizontal gradient of For I n The horizontal gradient of is the vertical gradient, For I l,i The vertical gradient of For I n The vertical gradient of and All are L1 norm forms;
[0103] The evaluation results are: d i = d il + d is , where di is the evaluation result of the i-th low-light image of the overhead line, d il is the reflection component evaluation result of the i-th overhead line low-light image, d is is the evaluation result of the illumination component of the i-th overhead contact network low-light image.
[0104] Furthermore, the photometric value in the evaluation model is fixed, and all values of the camera parameters are input into the evaluation model one by one. The evaluation model outputs the evaluation results of each value of the camera parameter under the fixed photometric value, and then the camera parameter value corresponding to the minimum value of the evaluation result (that is, the higher the consistency of the reflection component between the low-light image and the normal-light image, the higher the consistency of the brightness smoothness of the overall texture and structure of the photographed target between the low-light image and the normal-light image) is taken as the optimal camera parameter for the fixed photometric value. The BP neural network is combined to establish an adaptive model that characterizes the mapping relationship between the photometric value and the camera parameter, so that the optimal camera parameters that are most suitable for the Retinex algorithm framework can be calculated according to the photometric value, so as to capture the low-light image of the contact network (that is, the low-light image of the contact network) that enables the Retinex algorithm framework to perform the maximum image enhancement.
[0105] The optimal camera parameters obtained by the adaptive model can obtain low-light images that are closest to normal light conditions, that is, the low-light images obtained by the optimal camera parameters can be closest to the decomposition results of the reflection component and illumination component of the normal light image under the Retinex algorithm framework, so that the image enhancement results synthesized by the reflection component and the illumination component under the Retinex algorithm framework are closest to the image enhancement under normal light conditions. Therefore, the best enhancement effect is produced and the influence of low light is eliminated to the greatest extent.
[0106] In order to ensure the training effect of the BP neural network, a large number of samples are required. Therefore, the amount of image data is large when constructing the adaptive model. In order to improve the construction efficiency of the adaptive model, the present invention uses the single-scale Retinex algorithm SSR to decompose and evaluate the illumination component and the reflection component, which can complete the decomposition and evaluation while saving the calculation processing time to a great extent.
[0107] The methods for capturing the optimal low-light images of the overhead line include:
[0108] Monitor the photometric value of the contact network at the shooting time node;
[0109] Using the adaptive model, the optimal camera parameters at the shooting time node are calculated according to the photometric value at the shooting time node;
[0110] According to the optimal camera parameters, the contact network is photographed to obtain the optimal low-light image of the contact network at the shooting time node.
[0111] The method for enhancing the image of the overhead line taken at low light conditions includes:
[0112] The multi-scale Retinex algorithm MSR is used to decompose the optimal low-light image of the overhead line at the shooting time node into n-scale images;
[0113] Each scale image is decomposed into a reflection component and an illumination component, and the reflection component R of each scale image is obtained. j and the illumination component I j , where R j is the reflection component of the j-th scale image, I j is the illumination component of the j-th scale image;
[0114] Combine the reflection component and illumination component of each scale image to obtain the enhanced image M of each scale image j =exp(R j +I j ), where M j is the enhanced image of the j-th scale image;
[0115] The enhanced images of all scale images are weighted fused to obtain the low-light enhanced image of the overhead contact network at the shooting time node. , where Gz is the low-light enhanced image of the contact network, w j is the weight of the jth scale image, n is the number of scale images, n>1, .
[0116] In order to ensure the image enhancement effect of low-light images of the contact network, the enhanced pictures are single or multiple images of a single time node with a small amount of data. Therefore, the multi-scale Retinex algorithm MSR is chosen for image enhancement. Although the operation time is longer than that of SSR image enhancement, the image fidelity is higher and the image enhancement effect is better.
[0117] The present invention utilizes the multi-scale Retinex algorithm MSR to perform image enhancement on the low-light image of the contact network, and on the basis of the optimal captured image, better restores the clarity of the low-light image of the contact network and clearly displays the fault condition of the contact network.
[0118] like Figure 2 As shown, the present invention provides a low-light image processing system based on image enhancement, which is applied to a low-light image processing method based on image enhancement. The system includes:
[0119] Light monitoring equipment, used to obtain the photometric value of the contact network at the shooting time node;
[0120] A parameter adaptive unit, used to calculate the optimal camera parameters at the shooting time node using a pre-established adaptive model;
[0121] An image capturing device is used to capture the contact network according to the optimal camera parameters at the capturing time node, so as to obtain the optimal low-light captured image of the contact network at the capturing time node;
[0122] The image enhancement unit is used to enhance the low-light image of the contact network by using the multi-scale Retinex algorithm MSR to obtain the low-light enhanced image of the contact network.
[0123] The method for establishing the adaptive model in the parameter adaptive unit includes:
[0124] The single-scale Retinex algorithm SSR is used to decompose the normal photometric image of the contact network into a reflection component and an illumination component, and the normal photometric reflection component and the normal photometric illumination component of the contact network are obtained.
[0125] The single-scale Retinex algorithm SSR is used to decompose the low-light image of the contact network into reflection component and illumination component, and the low-light reflection component of the contact network and the low-light illumination component of the contact network are obtained.
[0126] The reflection component is evaluated by using the normal light intensity reflection component and the low light intensity reflection component of the contact network, and the illumination component is evaluated by using the normal light intensity illumination component and the low light intensity illumination component of the contact network;
[0127] The evaluation result of the reflection component and the evaluation result of the illumination component are combined to serve as the evaluation result of the low-light image of the contact network;
[0128] The photometric values of low-light images of the contact network and the camera parameters used to shoot the low-light images of the contact network are used as input items of the BP neural network, and the evaluation results of the low-light images of the contact network are used as output items of the BP neural network. The BP neural network is used to train the input items and output items, and an evaluation model that characterizes the mapping relationship between photometric values, camera parameters and evaluation results is established.
[0129] The evaluation model is: d=BP(K,{A,B,C,D});
[0130] In the formula, d is the evaluation result, K is the photometric value, A is the exposure time, B is the aperture value, C is the exposure compensation value, D is the sensitivity, and BP is the BP neural network;
[0131] The photometric values of all low-light images of the overhead line are fixed one by one, and all values of the camera parameters are input into the evaluation model one by one. The evaluation model outputs the evaluation results of each value of the camera parameter under the fixed photometric value;
[0132] The camera parameter value corresponding to the minimum value of the evaluation result is taken as the optimal camera parameter of the fixed photometric value;
[0133] Using a fixed photometric value as an input item of the second BP neural network, and using a fixed photometric value as an output item of the second BP neural network, and using the BP neural network to train the input item and the output item, to establish an adaptive model that characterizes the mapping relationship between the photometric value and the camera parameter;
[0134] The adaptive model is: {A,B,C,D} best =BP2(K);
[0135] In the formula, {A, B, C, D} best is the optimal camera parameter, K is the photometric value, and BP2 is the second BP neural network.
[0136] The image enhancement method of the image enhancement unit includes:
[0137] The method for enhancing the image of the overhead line taken at low light conditions includes:
[0138] The multi-scale Retinex algorithm MSR is used to decompose the optimal low-light image of the overhead line at the shooting time node into n-scale images;
[0139] Each scale image is decomposed into a reflection component and an illumination component, and the reflection component R of each scale image is obtained. j and the illumination component I j , where R j is the reflection component of the j-th scale image, I j is the illumination component of the j-th scale image;
[0140] Combine the reflection component and illumination component of each scale image to obtain the enhanced image M of each scale image j =exp(R j +I j ), where M j is the enhanced image of the j-th scale image;
[0141] The enhanced images of all scale images are weighted fused to obtain the low-light enhanced image of the overhead contact network at the shooting time node. , where Gz is the low-light enhanced image of the contact network, w j is the weight of the jth scale image, n is the number of scale images, n>1, .
[0142] Based on the image enhancement algorithm framework, the present invention constructs an adaptive model that calculates the optimal camera parameters according to the photometric value, which can obtain the optimal low-light image of the contact network during shooting, and the optimal low-light image of the contact network is matched with the image enhancement algorithm framework, so that the image enhancement effect of the low-light image of the contact network can be superimposed to achieve optimal enhancement, thereby maximizing the visual quality of the low-light image of the contact network.
[0143] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.
Claims
1. A low-light image processing method based on image enhancement, characterized in that: The following steps are involved: Acquire images of the contact network at normal light intensity and multiple low light intensity levels respectively, and obtain corresponding images of the contact network at normal light intensity and multiple images of the contact network at low light intensity; Based on the Retinex algorithm framework and BP neural network, the low-light images of the contact network are photographed and evaluated with the normal-light images of the contact network as the evaluation reference, and an adaptive model for setting the optimal camera parameters is established based on the shooting evaluation results. The adaptive model is used to adjust the optimal camera parameters for photographing the contact network under low light conditions, so as to obtain an optimal low-light photographed image of the contact network; Using the Retinex algorithm framework, the low-light photographed image of the contact network is enhanced to obtain a low-light enhanced image of the contact network; The methods for building adaptive models include: The single-scale Retinex algorithm SSR is used to decompose the normal photometric image of the contact network into a reflection component and an illumination component, and the normal photometric reflection component and the normal photometric illumination component of the contact network are obtained. The single-scale Retinex algorithm SSR is used to decompose the low-light image of the contact network into reflection component and illumination component, and the low-light reflection component of the contact network and the low-light illumination component of the contact network are obtained. The reflection component is evaluated by using the normal light intensity reflection component and the low light intensity reflection component of the contact network, and the illumination component is evaluated by using the normal light intensity illumination component and the low light intensity illumination component of the contact network; The evaluation result of the reflection component and the evaluation result of the illumination component are combined to serve as the evaluation result of the low-light image of the contact network; The photometric values of low-light images of the contact network and the camera parameters used to shoot the low-light images of the contact network are used as input items of the BP neural network, and the evaluation results of the low-light images of the contact network are used as output items of the BP neural network. The BP neural network is used to train the input items and output items, and an evaluation model that characterizes the mapping relationship between photometric values, camera parameters and evaluation results is established. The evaluation model is: d=BP(K,{A,B,C,D}); In the formula, d is the evaluation result, K is the photometric value, A is the exposure time, B is the aperture value, C is the exposure compensation value, D is the sensitivity, and BP is the BP neural network; The photometric values of all low-light images of the overhead line are fixed one by one, and all values of the camera parameters are input into the evaluation model one by one, and the evaluation model outputs the evaluation result obtained by each value of the camera parameter under the fixed photometric value; Taking the camera parameter value corresponding to the minimum value of the evaluation result as the optimal camera parameter of the fixed photometric value; Using a fixed photometric value as an input item of the second BP neural network, and using a fixed photometric value as an output item of the second BP neural network, and using the BP neural network to train the input item and the output item, and establish an adaptive model that characterizes the mapping relationship between the photometric value and the camera parameter; The adaptive model is: {A,B,C,D} best =BP2(K); In the formula, {A, B, C, D} best is the optimal camera parameter, K is the photometric value, and BP2 is the second BP neural network; The reflection component is evaluated as: d il =||R l,i -R n ||1, where d il is the reflection component evaluation result of the i-th overhead line low-light image, R l,i is the low-light reflection component of the catenary network of the i-th catenary network low-light image, R n is the normal photometric reflection component of the contact network, ||R l,i -R n ||1 is the L1 norm; The evaluation of the illumination component is: , where d is is the evaluation result of the illumination component of the i-th overhead line low-light image, I l,i is the low-light illumination component of the catenary network of the i-th catenary network low-light image, I n is the normal luminous intensity illumination component of the contact network, is the horizontal gradient, For I l,i The horizontal gradient of For I n The horizontal gradient of is the vertical gradient, For I l,i The vertical gradient of For I n The vertical gradient of and All are L1 norm forms; The evaluation results are: i = d il + d is , where d i is the evaluation result of the i-th low-light image of the overhead line, d il is the reflection component evaluation result of the i-th overhead line low-light image, d is is the evaluation result of the illumination component of the i-th overhead contact network low-light image.
2. The low-light image processing method based on image enhancement according to claim 1, characterized in that: The method for shooting the low-light image of the contact network comprises: At each low light level, multiple groups of camera parameters are randomly set to shoot the contact network, and multiple low-light images of the contact network at each low light level are obtained.
3. The low-light image processing method based on image enhancement according to claim 1, characterized in that: The camera parameters include exposure time, aperture value, exposure compensation value and sensitivity.
4. The low-light image processing method based on image enhancement according to claim 1, characterized in that: The methods for capturing the optimal low-light images of the overhead line include: Monitor the photometric value of the contact network at the shooting time node; Using the adaptive model, the optimal camera parameters at the shooting time node are calculated according to the photometric value at the shooting time node; According to the optimal camera parameters, the contact network is photographed to obtain the optimal low-light image of the contact network at the shooting time node.
5. The low-light image processing method based on image enhancement according to claim 4, characterized in that: The method for enhancing the low-light-shot image of the overhead line includes: The multi-scale Retinex algorithm MSR is used to decompose the optimal low-light image of the overhead line at the shooting time node into n-scale images; Each scale image is decomposed into a reflection component and an illumination component, and the reflection component R of each scale image is obtained. j and the illumination component I j , where R j is the reflection component of the j-th scale image, I j is the illumination component of the j-th scale image; Combine the reflection component and illumination component of each scale image to obtain the enhanced image M of each scale image j =exp(R j +I j ), where M j is the enhanced image of the j-th scale image; The enhanced images of all scale images are weighted fused to obtain the low-light enhanced image of the overhead contact network at the shooting time node. , where Gz is the low-light enhanced image of the overhead line, w j is the weight of the jth scale image, n is the number of scale images, n>1, .
6. A low-light image processing system based on image enhancement, characterized in that: The system includes: Light monitoring equipment, used to obtain the photometric value of the contact network at the shooting time node; A parameter adaptive unit, used to calculate the optimal camera parameters at the shooting time node using a pre-established adaptive model; An image capturing device is used to capture the contact network according to the optimal camera parameters at the capturing time node, so as to obtain the optimal low-light captured image of the contact network at the capturing time node; An image enhancement unit is used to enhance the low-light photographed image of the contact network by using a multi-scale Retinex algorithm MSR to obtain a low-light enhanced image of the contact network; The methods for building adaptive models include: The single-scale Retinex algorithm SSR is used to decompose the normal photometric image of the contact network into a reflection component and an illumination component, and the normal photometric reflection component and the normal photometric illumination component of the contact network are obtained. The single-scale Retinex algorithm SSR is used to decompose the low-light image of the contact network into reflection component and illumination component, and the low-light reflection component of the contact network and the low-light illumination component of the contact network are obtained. The reflection component is evaluated by using the normal light intensity reflection component and the low light intensity reflection component of the contact network, and the illumination component is evaluated by using the normal light intensity illumination component and the low light intensity illumination component of the contact network; The evaluation result of the reflection component and the evaluation result of the illumination component are combined to serve as the evaluation result of the low-light image of the contact network; The photometric values of low-light images of the contact network and the camera parameters used to shoot the low-light images of the contact network are used as input items of the BP neural network, and the evaluation results of the low-light images of the contact network are used as output items of the BP neural network. The BP neural network is used to train the input items and output items, and an evaluation model that characterizes the mapping relationship between photometric values, camera parameters and evaluation results is established. The evaluation model is: d=BP(K,{A,B,C,D}); In the formula, d is the evaluation result, K is the photometric value, A is the exposure time, B is the aperture value, C is the exposure compensation value, D is the sensitivity, and BP is the BP neural network; The photometric values of all low-light images of the overhead line are fixed one by one, and all values of the camera parameters are input into the evaluation model one by one, and the evaluation model outputs the evaluation result obtained by each value of the camera parameter under the fixed photometric value; Taking the camera parameter value corresponding to the minimum value of the evaluation result as the optimal camera parameter of the fixed photometric value; Using a fixed photometric value as an input item of the second BP neural network, and using a fixed photometric value as an output item of the second BP neural network, and using the BP neural network to train the input item and the output item, and establish an adaptive model that characterizes the mapping relationship between the photometric value and the camera parameter; The adaptive model is: {A,B,C,D} best =BP2(K); In the formula, {A, B, C, D} best is the optimal camera parameter, K is the photometric value, and BP2 is the second BP neural network; The reflection component is evaluated as: d il =||R l,i -R n ||1, where d il is the reflection component evaluation result of the i-th overhead line low-light image, R l,i is the low-light reflection component of the catenary network of the i-th catenary network low-light image, R n is the normal photometric reflection component of the contact network, ||R l,i -R n ||1 is the L1 norm; The evaluation of the illumination component is: , where d is is the evaluation result of the illumination component of the i-th overhead line low-light image, I l,i is the low-light illumination component of the catenary network of the i-th catenary network low-light image, I n is the normal luminous intensity illumination component of the contact network, is the horizontal gradient, For I l,i The horizontal gradient of For I n The horizontal gradient of is the vertical gradient, For I l,i The vertical gradient of For I n The vertical gradient of and All are L1 norm forms; The evaluation results are: i = d il + d is , where d i is the evaluation result of the i-th low-light image of the overhead line, d il is the reflection component evaluation result of the i-th overhead line low-light image, d is is the evaluation result of the illumination component of the i-th overhead contact network low-light image.
7. The low-light image processing system based on image enhancement according to claim 6, characterized in that: The image enhancement method of the image enhancement unit comprises: The method for enhancing the low-light-level image of the overhead line comprises: The multi-scale Retinex algorithm MSR is used to decompose the optimal low-light image of the overhead line at the shooting time node into n-scale images; Each scale image is decomposed into a reflection component and an illumination component, and the reflection component R of each scale image is obtained. j and the illumination component I j , where R j is the reflection component of the j-th scale image, I j is the illumination component of the j-th scale image; Combine the reflection component and illumination component of each scale image to obtain the enhanced image M of each scale image j =exp(R j +I j ), where M j is the enhanced image of the j-th scale image; The enhanced images of all scale images are weighted fused to obtain the low-light enhanced image of the overhead contact network at the shooting time node. , where Gz is the low-light enhanced image of the overhead line, w j is the weight of the jth scale image, n is the number of scale images, n>1, .
