A video image contrast enhancement method for warehouse monitoring scenarios

By constructing a variational optimization model and using an alternating iterative update method, the problems of insufficient contrast and noise amplification in warehouse monitoring video images were solved. This achieved synergistic optimization of contrast enhancement, noise suppression, and edge preservation, thereby improving the clarity of the monitoring video and the reliability of intelligent analysis.

CN122134604APending Publication Date: 2026-06-02UNIV OF JINAN

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
UNIV OF JINAN
Filing Date
2026-05-07
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing methods for enhancing warehouse surveillance video images can easily lead to noise amplification and edge distortion while improving contrast. They are difficult to balance contrast enhancement, noise suppression, and edge preservation, which affects the clarity of the surveillance video and the reliability of subsequent intelligent analysis.

Method used

A variational optimization model is constructed, which combines the variational energy function of the relative error fidelity term, the auxiliary variable consistency constraint term, the sparsity constraint term, and the adaptive regularization term with the alternating iterative update of the enhanced image and the auxiliary variables to achieve synergistic optimization of image contrast enhancement, noise suppression, and edge preservation.

Benefits of technology

In complex warehouse monitoring environments, it effectively improves the overall contrast and local detail discernibility of video images, suppresses noise amplification while maintaining key structural information, and enhances the visualization quality and reliability of intelligent analysis of monitoring videos.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122134604A_ABST
    Figure CN122134604A_ABST
Patent Text Reader

Abstract

This invention provides a video image contrast enhancement method for warehouse monitoring scenarios, relating to the fields of image processing and video surveillance technology. It aims to solve problems such as insufficient contrast, unclear details in dark areas, amplified noise, and distorted edge structures in warehouse monitoring videos. The method preprocesses the video frames by performing grayscale normalization, constructing a variational energy function that includes a relative error fidelity term, an auxiliary variable consistency constraint term, a sparsity constraint term, and an adaptive regularization term. It then employs an iterative update method, alternating between the enhanced image and auxiliary variables, to achieve image contrast enhancement, noise suppression, and edge preservation. Finally, the enhanced video frames are reconstructed based on the original temporal information to obtain an enhanced video stream. This invention can improve the clarity and recognizability of video images in complex warehouse monitoring environments, enhancing the reliability of subsequent intelligent monitoring and analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of digital image processing, and more specifically to a method for enhancing the contrast of video images in warehouse monitoring scenarios. Background Technology

[0002] With the continuous development of intelligent warehousing, smart logistics and video surveillance technologies, warehouse monitoring systems have been widely used in scenarios such as cargo storage, inbound and outbound management, abnormal behavior identification, equipment status monitoring and security protection. Warehouse monitoring videos are usually continuously collected by fixed camera equipment, and have the characteristics of large coverage, long operating cycle and complex scene changes.

[0003] In practical applications, warehouse surveillance video images are easily affected by factors such as low illumination, partial obstruction, dust interference, backlighting, shadows, unstable equipment exposure, and changes in day and night lighting. This results in video images with problems such as low overall contrast, unclear details in local dark areas, blurred edge contours, and strong noise interference. These problems directly affect the observation and judgment of monitoring personnel and also reduce the accuracy and reliability of subsequent intelligent processing tasks such as target detection, behavior recognition, and status analysis.

[0004] Existing image contrast enhancement methods mainly include histogram equalization, gamma correction, local contrast enhancement, Retinex enhancement, and image enhancement methods based on filtering or deep learning. Among these, histogram equalization and gamma correction methods, while simple to implement, are prone to problems such as local over-enhancement, imbalance between bright and dark areas, and distortion of details. Filtering-based enhancement methods, while improving brightness and contrast, are prone to causing edge blurring. Some complex models, although able to improve visual effects, suffer from significant noise amplification, insufficient structure preservation, weak model interpretability, and poor adaptability to monitoring scenarios. Furthermore, in warehouse monitoring video scenarios, simply enhancing a single frame image often fails to simultaneously achieve contrast enhancement, noise suppression, and edge structure preservation. This results in an enhanced image with improved brightness but simultaneously amplified local noise and weakened edge and texture information, which is detrimental to subsequent video analysis and practical engineering applications. Therefore, designing a video image enhancement method that can effectively enhance image contrast, suppress noise amplification, and preserve image edge and local structural information to address the problem of insufficient contrast in warehouse monitoring video images has become a pressing technical problem in this field. Summary of the Invention

[0005] The purpose of this invention is to provide a video image contrast enhancement method for warehouse monitoring scenarios, in order to solve the technical problems of limited contrast enhancement, easy noise amplification, and easy edge structure distortion in the existing warehouse monitoring video image enhancement process. This method achieves synergistic optimization of image contrast enhancement, noise suppression, and edge preservation, thereby improving the clarity, detail recognition, and reliability of subsequent intelligent analysis of warehouse monitoring video images.

[0006] To achieve the above objectives, the present invention provides a video image contrast enhancement method for warehouse monitoring scenarios, comprising the following steps.

[0007] S1. Obtain the video stream to be enhanced in the warehouse monitoring scenario, and extract the video frames to be processed from the video stream to be enhanced according to the preset sampling order, and retain the original timing information corresponding to each video frame to be processed.

[0008] S2. Preprocess the video frames to be processed to obtain the variational energy function. Input image for solving and enhance the resulting image. and auxiliary variables Perform initialization.

[0009] S3, based on input image Enhanced result images and auxiliary variables Construct a variational energy function for video image contrast enhancement. The variational energy function includes a relative error fidelity term, an auxiliary variable consistency constraint term, a sparsity constraint term, and an adaptive regularization term.

[0010] S4, Based on variational energy function Regarding the enhanced image The gradient or subgradient is used to determine the enhanced image. The direction of iterative updates.

[0011] S5. Update the enhanced image according to the image iteration direction. Perform iterative updates and enhance the resulting image each time. After the update, the auxiliary variables are adjusted based on the current gradient information of the enhanced image. Perform synchronized updates.

[0012] S6. When the preset convergence condition is met or the preset maximum number of iterations is reached, stop the iteration and output the corresponding enhanced video frame.

[0013] S7. According to the preset sampling order in step S1 and the original timing information retained, the output enhanced video frames are reassembled to obtain the enhanced video stream.

[0014] Preferably, in step S1, the video stream to be enhanced in the warehouse monitoring scenario is acquired, and the video frame sequence to be processed is extracted from the video stream to be enhanced according to a preset sampling order. During the extraction process, the original temporal information corresponding to each video frame to be processed is recorded, including... This indicates the total number of video frames to be processed. Indicates the first The sequence number of the nth video frame to be processed; let the nth... The image domain of each video frame to be processed is The input image is obtained after preprocessing. The corresponding enhanced image is denoted as Auxiliary variables are denoted as The original timing information includes at least the frame number. timestamp collection And one of the frame position identifiers, used for the sequential reordering of enhanced video frames.

[0015] Preferably, in step S1, the warehouse monitoring scenario includes at least one of the following: low light scenario, backlight scenario, partial shadow occlusion scenario, densely distributed shelf scenario, dust interference scenario, and day and night light change scenario; by extracting the video stream frame by frame under the above complex warehouse monitoring scenario, the continuous video processing task can be decomposed into the enhancement task of the video frame sequence to be processed, thereby facilitating the subsequent construction of a unified variational optimization model.

[0016] Preferably, in step S2, the video frame to be processed is preprocessed, including grayscale normalization and variable initialization; specifically, for the first... The video frames to be processed are first converted into grayscale images. ,in Indicates the first The image domain of each video frame to be processed; then based on the grayscale image Constructing the input image for subsequent variational energy function solving. Its expression is: , and They represent the first The minimum and maximum grayscale values ​​in the video frames to be processed. To prevent positive numbers with a denominator of zero, the above normalization process can map the grayscale distribution of different video frames to a uniform numerical range, thereby reducing the inter-frame brightness scale differences caused by uneven lighting, local brightness fluctuations, and exposure differences in the warehouse monitoring environment, and improving the numerical stability of the subsequent variational optimization solution process.

[0017] Preferably, in step S2, after obtaining the input image... Then, the resulting image will be enhanced. and auxiliary variables Initialize them as follows: , ;in Indicates the enhanced image initial value, Representing auxiliary variables The initial values ​​are used to initialize the enhanced image as the input image itself and the auxiliary variables as the gradient of the input image. This allows subsequent optimization iterations to be based on the original brightness distribution and initial edge structure of the current video frame, thereby improving the stability and convergence efficiency of the enhanced image solution process.

[0018] Preferably, in step S3, based on the input image Enhance the resulting image and auxiliary variables , construct the first Variational energy function corresponding to each video frame to be processed Its expression is: The first item is based on the input image. With enhanced result image The relative error fidelity term is constructed based on the brightness ratio relationship; the second term is based on auxiliary variables. With enhancement of the resulting image gradient The consistency constraint term for auxiliary variables is constructed based on the consistency relationship; the third term is based on the consistency constraint term for auxiliary variables. The constructed sparse constraint term; the fourth term is based on the enhanced result image. The adaptive regularization term is constructed from the gradient adaptive smoothing relation; where Indicates the input image. This indicates the enhanced image. Represents auxiliary variables. Indicates the enhanced image gradient, To prevent positive constants with a denominator of zero, , and The weighting coefficients are used to unify and couple the four constraints into the same variational energy function, thereby achieving synergistic optimization of brightness ratio preservation, structural consistency constraint, sparse noise suppression, and adaptive smoothing.

[0019] Preferably, in step S3, the variational energy function The constraints in the middle have the following functions: The first term is the relative error fidelity term, which is used to maintain the input image. With enhanced result image The first term is the brightness ratio between the two images, thus preventing the enhancement result from deviating excessively from the original image during the contrast enhancement process; the second term is the auxiliary variable consistency constraint term, used to constrain the auxiliary variables. With enhancement of the resulting image gradient The consistency between the variables ensures effective representation of image structural information; the third term is a sparse constraint term, used to constrain auxiliary variables. A sparsity constraint is applied to suppress the propagation and amplification of noise components during the enhancement process; the fourth term is an adaptive regularization term used to adjust the enhanced image. The gradient is smoothed to improve image contrast while preserving edge and local structural information as much as possible. By unifying the above constraints into the same variational optimization framework, a synergistic balance is achieved between contrast enhancement, noise suppression, and edge preservation.

[0020] Preferably, in step S4, based on the variational energy function Regarding the enhanced image The gradient or subgradient is used to determine the enhanced image. The direction of iterative updates; in the first iteration In the next iteration, the gradient or subgradient is denoted as: and the enhanced result image The update direction is determined as in, Indicates the number of iterations. Indicates the first The video frame to be processed in the first Enhanced result image at the next iteration Indicates the first The video frame to be processed in the first Auxiliary variables during the next iteration; by constructing a negative gradient descent direction based on the gradient or subgradient, the enhanced image can gradually approach the optimal solution along the direction in which the variational energy function decreases.

[0021] Preferably, in step S5, the enhanced result image is updated according to the iterative update direction. Perform iterative updates and enhance the resulting image each time. After the update, for the auxiliary variables Perform synchronous updates; among which, in the first In the next iteration, the resulting image is enhanced. The update relationship is: ; Indicates the first The step size corresponding to each iteration; through the above update method, the brightness distribution and structural information of the enhanced image can be gradually corrected based on the current iteration state, so that it continuously tends to the result that meets the requirement of minimizing the variational energy function in subsequent iterations.

[0022] Preferably, in step S5, after obtaining the enhanced result image... After that, auxiliary variables Update according to the following relationship: ;in Represents a symbolic function. This indicates the operation of finding the maximum value. To enhance the gradient of the resulting image, a soft thresholding approach is used to update the auxiliary variables. This approach can suppress small random fluctuations while maintaining the main gradient structure, thereby suppressing noise components and further enhancing the ability to preserve edges and local contours.

[0023] Preferably, in step S5, the resulting image is enhanced. with auxiliary variables Updates are performed using an alternating iterative approach; with a fixed auxiliary variable... Update the enhanced image under the condition And in the fixed updated enhanced result image Update auxiliary variables under the condition Through the above-mentioned alternating iterative solution mechanism, the original coupled optimization problem can be decomposed into two relatively easy-to-solve subproblems, thereby improving the stability of the solution process and the feasibility of engineering implementation.

[0024] Preferably, in step S6, the enhanced result image During the iterative update process, iteration stops when the results of two consecutive iterations satisfy the following condition: and ;in and A preset threshold is set when the number of iterations reaches the preset maximum number of iterations. When the iteration stops and the corresponding enhanced video frame is output, by setting both variable change constraints and energy function change constraints at the same time, premature stopping or over-iteration caused by a single stopping condition can be avoided, thereby improving the stability and computational efficiency of the enhancement results.

[0025] Preferably, in step S7, the enhanced video frames output in step S6 are reassembled according to the preset sampling order in step S1 and the retained original timing information to generate an enhanced video stream, ensuring that the timing order of the enhanced video stream is consistent with that of the original video stream. This reassembly process restores the frame-by-frame enhancement results to continuous video output, facilitating subsequent display, storage, and further processing on warehouse monitoring platforms, video analysis systems, or intelligent security terminals.

[0026] Preferably, the present invention, by extracting the warehouse monitoring video stream frame by frame, performing normalization preprocessing, variational energy function modeling, alternating iterative updates of the enhanced result image and auxiliary variables, and time-series reconstruction output, can effectively improve the overall contrast and local detail discernibility of video images in complex warehouse monitoring environments. At the same time, it suppresses noise amplification and maintains key information such as shelf outlines, cargo edges, and aisle structures, thereby improving the visualization quality of the monitoring video and the reliability of subsequent intelligent analysis tasks.

[0027] Compared with the prior art, the present invention has the following beneficial effects:

[0028] This invention addresses the problem of insufficient contrast in warehouse monitoring video images by constructing a unified variational optimization model. It moves beyond simple grayscale stretching or empirical enhancement methods, achieving image contrast enhancement from an optimization perspective. By constructing a variational energy function that includes a relative error fidelity term, an auxiliary variable consistency constraint term, a sparsity constraint term, and an adaptive regularization term, it enhances image contrast while simultaneously suppressing noise and preserving edges, thereby improving the naturalness and stability of the enhancement results. The introduction of auxiliary variables... Enhanced image The gradient information is decoupled and solved through an alternating iterative update mechanism, which helps to improve the stability of the model solution and enhance the ability to preserve local image structure and edge details. This invention is applicable to low-light, backlight, local shadow and complex lighting changes in warehouse monitoring scenarios. It can improve the clarity of the monitoring image and the visibility of dark areas, and provide higher quality input images for subsequent intelligent tasks such as target detection, anomaly recognition and behavior analysis. It has good promotion value and application prospects. Attached Figure Description

[0029] Figure 1 This is a schematic diagram of the overall process of a video image contrast enhancement method for warehouse monitoring scenarios according to the present invention.

[0030] Figure 2 This is a schematic diagram illustrating the extraction of video frames to be processed and the preservation of original timing information from the video stream to be enhanced in this invention.

[0031] Figure 3 This is a schematic diagram of the construction of the variational energy function in this invention.

[0032] Figure 4 This is a schematic diagram illustrating the alternating iterative update of the enhanced result image and auxiliary variables in this invention.

[0033] Figure 5 This is a schematic diagram of the enhanced video frame stopping iteration and timing reconstruction output in this invention. Detailed Implementation

[0034] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. It should be understood that the following embodiments are for illustrative purposes only and are not intended to limit the scope of protection of the present invention. All equivalent substitutions, simple modifications, or improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

[0035] like Figures 1 to 5 As shown, this invention provides a video image contrast enhancement method for warehouse monitoring scenarios, applicable to video scenarios such as warehouse aisle monitoring, shelf area monitoring, inbound / outbound monitoring, and sorting area monitoring. The method takes the video stream to be enhanced as input and the enhanced video stream as output. The core idea is to construct a variational energy function for each video frame to be processed, and achieve synergistic optimization of image contrast enhancement, noise suppression, and edge preservation by iteratively updating the enhanced image and auxiliary variables.

[0036] like Figure 1 As shown in the figure, a video image contrast enhancement method for warehouse monitoring scenarios in this embodiment includes the following steps.

[0037] S1. Obtain the video stream to be enhanced in the warehouse monitoring scenario, and extract the video frames to be processed from the video stream to be enhanced according to the preset sampling order, and retain the original timing information corresponding to each video frame to be processed.

[0038] Further, in step S1, the video stream to be enhanced can be obtained from a warehouse monitoring camera, a network camera, an edge acquisition terminal, or a surveillance recording device. The video stream to be enhanced can be a real-time acquired video stream or a historically stored video stream. A sequence of video frames to be processed is extracted from the video stream to be enhanced according to a preset sampling order. And during the extraction process, the original temporal information corresponding to each video frame to be processed is recorded, among which... This indicates the total number of video frames to be processed. Indicates the first The sequence number of the nth video frame to be processed; let the nth... The image domain of each video frame to be processed is The input image is obtained after preprocessing. The corresponding enhanced image is denoted as Auxiliary variables are denoted as The original timing information includes at least the frame sequence number. timestamp collection And one of the frame position identifiers, used for the sequential reordering of enhanced video frames.

[0039] S2. Preprocess the video frame to be processed to obtain the input image used for subsequent variational energy function solution. and enhance the resulting image. and auxiliary variables Perform initialization.

[0040] Furthermore, such as Figure 2 As shown, in step S2, the preprocessing includes grayscale normalization and variable initialization. Specifically, the video frame to be processed is preprocessed to convert it into an input image for solving the variational energy function. Let the first The grayscale image of each video frame to be processed is Then input image Represented as: , ,in and They represent the first The minimum and maximum grayscale values ​​in the video frames to be processed. To prevent positive constants with a denominator of zero; and to initialize the enhanced image and auxiliary variables as follows: , ;in, Indicates the enhanced image initial value, Representing auxiliary variables The initial value.

[0041] S3, Based on the input image Enhanced result images and auxiliary variables Construct a variational energy function for video image contrast enhancement. The variational energy function includes a relative error fidelity term, an auxiliary variable consistency constraint term, a sparsity constraint term, and an adaptive regularization term.

[0042] Furthermore, such as Figure 3 As shown, in step S3, the variational energy function constructed in step S3... Represented as: The first term is the relative error fidelity term, the second term is the auxiliary variable consistency constraint term, the third term is the sparsity constraint term, and the fourth term is the adaptive regularization term. Indicates the input image. This indicates the enhanced image. Represents auxiliary variables. Indicates the enhanced image gradient, To prevent positive constants with a denominator of zero, , and The weighting coefficients are used; the relative error fidelity term in the variational energy function is used to maintain the brightness ratio between the input image and the enhanced image, and the auxiliary variable consistency constraint term is used to constrain the auxiliary variables. With enhancement of the resulting image gradient Consistency, sparse constraint terms are used for auxiliary variables Sparse constraints are applied to suppress noise components, and an adaptive regularization term is used to enhance the resulting image. The gradient is subject to adaptive smoothing constraints.

[0043] Furthermore, in step S3, by unifying the relative error fidelity term, auxiliary variable consistency term, sparse constraint term, and adaptive regularization term into the same variational optimization framework, the present invention can effectively suppress noise amplification while enhancing image brightness and local contrast, and maintain key structural information such as shelf outline, cargo boundary, and aisle edge, thereby achieving synergistic optimization of contrast enhancement, noise suppression, and edge preservation.

[0044] S4, Based on the variational energy function Regarding the enhanced image The gradient or subgradient is used to determine the enhanced image. The direction of iterative updates.

[0045] Furthermore, such as Figure 4 As shown, in step S4, based on the variational energy function Regarding the enhanced image The gradient or subgradient is used to determine the enhanced image. The direction of iterative updates; in the first iteration In the next iteration, the gradient or subgradient is denoted as: ; and the enhanced result image The update direction is determined as ,in, Indicates the number of iterations. Indicates the first The video frame to be processed in the first Enhanced result image at the next iteration Indicates the first The video frame to be processed in the first Auxiliary variables during the next iteration.

[0046] S5. Improve the enhanced result image according to the iterative update direction. Perform iterative updates and enhance the resulting image each time. After the update, the auxiliary variables are adjusted based on the current gradient information of the enhanced image. Perform synchronized updates.

[0047] Further, in step S5, the enhanced result image is updated according to the iterative update direction. Perform iterative updates and enhance the resulting image each time. After the update, for the auxiliary variables Perform synchronous updates; among them, in the first In the next iteration, the resulting image is enhanced. The update relationship is: ;in, This represents the step size corresponding to the k-th iteration; in obtaining the enhanced image... After that, auxiliary variables Update according to the following relationship: , Represents a symbolic function. This indicates the operation of finding the maximum value.

[0048] Further, in step S5, the resulting image is enhanced. with auxiliary variables Updates are performed using an alternating iterative approach, with a fixed auxiliary variable. Update the enhanced image under the condition Enhanced result image after fixed update Update auxiliary variables under the condition Through the above-mentioned alternating iterative solution mechanism, the original coupled optimization problem can be decomposed into two relatively easy-to-solve subproblems, thereby improving the stability of the solution process and the feasibility of engineering implementation.

[0049] S6. When the preset convergence condition is met or the preset maximum number of iterations is reached, stop the iteration and output the corresponding enhanced video frame.

[0050] Furthermore, in step S6, during the iterative update of the enhanced image u, the iteration stops when the results of two adjacent iterations satisfy the following condition: and ; and A preset threshold is set when the number of iterations reaches the preset maximum number of iterations. When the iteration stops and the corresponding enhanced video frame is output, the problem of premature stopping or excessive iteration caused by a single stopping condition can be avoided by setting both variable change constraints and energy function change constraints simultaneously, thereby improving the stability and computational efficiency of the enhancement results.

[0051] Furthermore, in step S6, for each video frame to be processed in the video frame sequence, steps S2 to S6 are executed respectively to obtain the corresponding enhanced video frame sequence. Since the original timing information of each video frame has been saved during extraction, the enhanced video frames can be accurately reassembled based on the frame number, timestamp, or location identifier.

[0052] S7. According to the preset sampling order in step S1 and the original timing information retained, the output enhanced video frames are reassembled to obtain the enhanced video stream.

[0053] Furthermore, such as Figure 5 As shown, in step S7, the enhanced video frames output in step S6 are reassembled according to the preset sampling order in step S1 and the retained original temporal information to generate an enhanced video stream, ensuring that the temporal order of the enhanced video stream is consistent with that of the original video stream. The enhanced video stream integrates the frame-by-frame enhancement results of each video frame to be processed after grayscale normalization preprocessing, variational energy function modeling, alternating iterative updates of the enhanced result image and auxiliary variables, and convergence determination. It is used to characterize the contrast enhancement effect of video images in warehouse monitoring scenarios under low illumination, local shadows, backlight interference, and noise conditions, and serves as the output result of the video image contrast enhancement method for warehouse monitoring scenarios described in this invention. Through this reassembly process, the frame-by-frame enhancement results can be restored to continuous video output, facilitating subsequent display, storage, and further processing in warehouse monitoring platforms, video analysis systems, or intelligent security terminals.

[0054] Preferably, in low-light warehouse monitoring scenarios, the combined effect of grayscale normalization in step S2 and the relative error fidelity term and adaptive regularization term in step S3 can improve the brightness representation and local contrast of dark areas. In warehouse scenarios with dense shelves and abundant edge information, the auxiliary variable consistency constraint term and the auxiliary variable soft threshold update mechanism in step S5 can better preserve key structural information such as shelf edges, cargo outlines, and aisle edges. In scenarios with dust interference and image noise, the sparse constraint term and alternating iterative solution mechanism can suppress the synchronous amplification of noise components during the enhancement process, thereby improving the stability and visual naturalness of the enhancement results.

[0055] Furthermore, in this embodiment, the method of the present invention can be deployed in a monitoring backend server, edge computing device, embedded vision terminal, or industrial control platform; for real-time video streams, the above steps can be executed frame by frame according to a set sampling frequency; for offline video streams, the above steps can be executed sequentially on all video frames to be processed; the method can be embedded as an image enhancement module in a warehouse monitoring system, intelligent inspection system, abnormal behavior recognition system, or cargo status detection system to improve the quality of input images for subsequent visual analysis tasks.

[0056] Furthermore, this embodiment uses Python to implement the video image contrast enhancement method for the warehouse monitoring scenario. The operating environment is Windows 11 operating system, the development tool is PyCharm, the Python version is 3.8, the image processing library used is OpenCV, and the matrix operation library is NumPy. Further, during program execution, the input video stream or video frame sequence file is read, and the following steps are executed sequentially: video frame extraction, grayscale preprocessing, grayscale normalization, initialization of the enhanced result image and auxiliary variables, construction of the variational energy function, gradient or subgradient calculation, iterative update of the enhanced result image, synchronous update of auxiliary variables, and convergence determination. After enhancing each video frame to be processed, it is reassembled according to the original temporal information, and the enhanced video stream is output. During program execution, the program reads the video frames to be enhanced from the video stream as input data. It then sequentially performs grayscale conversion, normalization, and initialization operations on each frame. Based on the input image, the enhanced result image, and auxiliary variables, it constructs a variational energy function containing a relative error fidelity term, an auxiliary variable consistency constraint term, a sparsity constraint term, and an adaptive regularization term. Subsequently, it uses an alternating iterative approach to optimize the variational energy function, gradually updating the enhanced result image and auxiliary variables until a preset convergence condition is met or the maximum number of iterations is reached. Finally, after enhancing all the video frames, it outputs the enhanced video stream result. The program can save the video frame images before and after enhancement separately to demonstrate the changes in cargo outlines, shelf edges, aisle lines, and local details in dark areas during warehouse monitoring. This effectively improves and enhances the video image contrast in complex warehouse monitoring environments.

[0057] Therefore, this invention, by extracting frames one by one from the warehouse monitoring video stream, performing normalization preprocessing, variational energy function modeling, alternating iterative updates of the enhanced result image and auxiliary variables, and time-series reconstruction output, can effectively improve the overall contrast and local detail discernibility of video images in complex warehouse monitoring environments. At the same time, it suppresses noise amplification and maintains key information such as shelf outlines, cargo edges, and aisle structures, thereby improving the visualization quality of monitoring videos and the reliability of subsequent intelligent analysis tasks.

[0058] The above are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make several improvements and modifications without departing from the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for enhancing video image contrast in warehouse monitoring scenarios, characterized in that, Includes the following steps: S1. Obtain the video stream to be enhanced in the warehouse monitoring scenario, extract the video frames to be processed from the video stream to be enhanced according to the preset sampling order, and retain the original timing information corresponding to each video frame to be processed. S2. Preprocess the video frames to be processed to obtain the variational energy function. Input image for solving and enhance the resulting image. and auxiliary variables Perform initialization; S3, based on input image Enhanced result images and auxiliary variables Construct a variational energy function for video image contrast enhancement. The variational energy function includes a relative error fidelity term, an auxiliary variable consistency constraint term, a sparsity constraint term, and an adaptive regularization term. S4, Based on variational energy function Regarding the enhanced image The gradient or subgradient is used to determine the enhanced image. The direction of iterative updates; S5. Update the enhanced image according to the image iteration direction. Perform iterative updates and enhance the resulting image each time. After the update, the auxiliary variables are adjusted based on the current gradient information of the enhanced image. Perform synchronized updates; S6. When the preset convergence condition is met or the preset maximum number of iterations is reached, stop the iteration and output the corresponding enhanced video frame. S7. According to the preset sampling order in step S1 and the original timing information retained, the output enhanced video frames are reassembled to obtain the enhanced video stream.

2. The video image contrast enhancement method for warehouse monitoring scenarios according to claim 1, characterized in that, In step S1, the video stream to be enhanced in the warehouse monitoring scenario is acquired, and the video frame sequence to be processed is extracted from the video stream to be enhanced according to a preset sampling order. During the extraction process, the original temporal information corresponding to each video frame to be processed is recorded, including... This indicates the total number of video frames to be processed. Indicates the first The sequence number of the nth video frame to be processed; let the nth... The image domain of each video frame to be processed is The input image is obtained after preprocessing. The corresponding enhanced image is denoted as Auxiliary variables are denoted as The original timing information includes at least the frame number. timestamp collection And one of the frame position identifiers, used for the sequential reordering of enhanced video frames.

3. The video image contrast enhancement method for warehouse monitoring scenarios according to claim 2, characterized in that, In step S2, the preprocessing includes grayscale normalization and variable initialization. The video frames to be processed are preprocessed to convert them into input images for solving the variational energy function. Let the first The grayscale image of each video frame to be processed is Then input image Represented as: , ; and They represent the first The minimum and maximum grayscale values ​​in the video frames to be processed. To prevent positive constants with a denominator of zero; and to initialize the enhanced image and auxiliary variables as follows: , ,in, Indicates the enhanced image initial value, Representing auxiliary variables The initial value.

4. The video image contrast enhancement method for warehouse monitoring scenarios according to claim 3, characterized in that, In step S3, the variational energy function is constructed. Represented as: The first item is based on the input image. With enhanced result image The relative error fidelity term is constructed from the brightness ratio relationship; The second item is based on auxiliary variables. With enhancement of the resulting image gradient Consistency constraint terms for auxiliary variables constructed from consistency relationships; The third item is based on auxiliary variables. The constructed sparse constraint term; the fourth term is based on the enhanced result image. The adaptive regularization term is constructed from the gradient adaptive smoothing relation; where Indicates the input image. This indicates the enhanced image. Represents auxiliary variables. Indicates the enhanced image gradient, To prevent positive constants with a denominator of zero, , and These are the weighting coefficients; The relative error fidelity term is used to maintain the brightness ratio between the input image and the enhanced image, while the auxiliary variable consistency constraint term is used to constrain the auxiliary variables. With enhancement of the resulting image gradient Consistency, sparse constraint terms are used for auxiliary variables Sparse constraints are applied to suppress noise components, and an adaptive regularization term is used to enhance the resulting image. The gradient is adaptively smoothed; the four constraints are uniformly coupled into the same variational energy function to achieve synergistic optimization of brightness ratio preservation, structural consistency constraint, sparse noise suppression and adaptive smoothing.

5. A video image contrast enhancement method for warehouse monitoring scenarios according to claim 4, characterized in that, In step S4, based on the variational energy function Regarding the enhanced image The gradient or subgradient is used to determine the enhanced image. The direction of iterative updates, in the first... In the next iteration, the gradient or subgradient is denoted as: and the enhanced result image The update direction is determined as ;in Indicates the number of iterations. Indicates the first The video frame to be processed in the first Enhanced result image at the next iteration Indicates the first The video frame to be processed in the first Auxiliary variables during the next iteration.

6. A video image contrast enhancement method for warehouse monitoring scenarios according to claim 5, characterized in that, In step S5, the enhanced image is updated according to the iterative update direction. Perform iterative updates and enhance the resulting image each time. After the update, for the auxiliary variables Perform synchronous updates; in the In the next iteration, the resulting image is enhanced. The update relationship is as follows: ; Indicates the first The step size corresponding to the next iteration; in obtaining the enhanced result image. After that, auxiliary variables Update according to the following relationship: , Symbolic function This indicates the operation of finding the maximum value. To enhance the gradient of the resulting image.

7. A video image contrast enhancement method for warehouse monitoring scenarios according to claim 6, characterized in that, In step S6, the enhanced result image During the iterative update process, iteration stops when the results of two consecutive iterations satisfy the following condition: and ,in and A preset threshold is set when the number of iterations reaches the preset maximum number of iterations. When the iteration stops, the corresponding enhanced video frame is output.

8. A video image contrast enhancement method for warehouse monitoring scenarios according to claim 7, characterized in that, In step S7, the output enhanced video frames are reassembled according to the preset sampling order in step S1 and the retained original timing information to generate an enhanced video stream, so that the timing order of the enhanced video stream is consistent with that of the original video stream.