CN-120730149-B - Method for adaptively dimming dynamic interference of infrared field range
Abstract
The invention discloses a method for self-adaptive dimming of dynamic interference of an infrared field range, and belongs to the technical field of self-adaptive dimming. The method comprises the steps of obtaining infrared image data, carrying out pixel-by-pixel differential operation on two adjacent frames of images to obtain differential images, judging whether dynamic interference exists in an area where pixel points are located, dividing the interference points into different interference areas by adopting a clustering algorithm according to distribution of the dynamic interference points, calculating duration time of each interference area, counting frequency of occurrence of each interference area within the duration time, collecting sample data, extracting input feature combinations, taking corresponding dimming strategies as output labels, constructing a decision tree model, training the decision tree model to obtain dimming strategies of the input feature combinations, executing the corresponding dimming strategies, setting an overlapped buffer area when one input feature combination falls into the other input feature combination, realizing strategy mixing transition, executing an inertia compensation mechanism, and carrying out self-adaptive switching of the dimming strategies.
Inventors
- CHEN HONGSHENG
Assignees
- 南京海汇装备科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20250709
Claims (9)
- 1. A method of adaptive dimming for dynamic interference in the infrared field of view, comprising the steps of: Acquiring infrared image data of continuous multiframes by using an infrared detector, and performing pixel-by-pixel differential operation on two adjacent frames of images to obtain differential images; dividing the interference points into different interference areas by adopting a clustering algorithm according to the distribution of the dynamic interference points, wherein each interference area represents a relatively concentrated dynamic interference part; Collecting sample data containing dynamic interference in the infrared imaging process, extracting the area and duration of an interference area and the occurrence frequency of each interference area in the duration, combining the areas and duration as input characteristic combinations, and taking a corresponding dimming strategy as an output label to construct a decision tree model; When the area of an interference area falls into another input feature combination from one input feature combination in the changing process, an overlapping buffer area is set at a decision boundary of the input feature combination; the executing the inertia compensation mechanism, performing adaptive switching of the dimming strategy, includes: After the dimming strategy is switched, acquiring the subsequent w-frame image data, and extracting the following evaluation indexes, namely a local signal-to-noise ratio change rate, a detail structure similarity index and a brightness gradient mean square error, when the evaluation indexes are detected to be beyond a preset stable range, starting dynamic damping adjustment, correcting the gain and the integration time of the current dimming strategy according to the deviation degree of the local signal-to-noise ratio change rate and a proportional-integral-derivative rule, and controlling the compensation quantity of a digital enhancement coefficient by adopting fuzzy logic; And when the continuous w-time evaluation does not reach the stable threshold value, judging that the strategy is mismatched, executing the method of freezing the parameters of the current dimming strategy, backing to the dimming strategy in the previous stable state, expanding the range of the overlapped buffer area, reducing the switching rate, and carrying out transition of the dimming strategy again, wherein whether the dimming strategy is in the stable state is judged based on the image gradient mean value and the residual interference pixel rate, and when the image gradient mean value fluctuation of any frame is larger than the set threshold value or the residual interference pixel rate is larger than the set threshold value in the continuous w frames, judging that the dimming strategy does not reach the stable state.
- 2. The method for adaptive dimming of dynamic interference of an infrared field range according to claim 1, wherein the acquiring infrared image data of consecutive frames by using an infrared detector, performing pixel-by-pixel differential operation on two adjacent frames of images to obtain differential images, includes: The method comprises the steps of initializing parameters of an infrared detector, selecting a continuous acquisition mode, setting an acquisition frame rate, sequentially storing continuously acquired infrared image data in a memory buffer area, sequentially reading two adjacent frames of image data from the memory buffer area, performing image format conversion and preprocessing, comparing the preprocessed two adjacent frames of image data one by one according to pixel positions, calculating the gray value difference of each pixel point in two frames of images, and completing pixel-by-pixel differential operation of the infrared image data by circularly traversing all the pixel points in the images to obtain a differential image.
- 3. The method of adaptive dimming for dynamic interference of infrared field range according to claim 1, wherein the partitioning of the interference points into different interference areas using a clustering algorithm based on the distribution of the dynamic interference points, each interference area representing a relatively concentrated dynamic interference portion, comprises: The clustering algorithm uses a K-Means algorithm, a K value is set according to the number of interference areas with highest occurrence frequency in historical data, intra-cluster error square sums WCSS under different K values are calculated, a curve of WCSS changing along with K is drawn, when the curve has inflection points, the corresponding K value is an optimal solution; The method comprises the steps of obtaining a new cluster center by taking an average value of all dynamic interference point coordinates in each cluster, replacing an old cluster center with the coordinates of the new cluster center, calculating the Euclidean distance sum between the new cluster center and the old cluster center, stopping iteration when the Euclidean distance sum is smaller than a set threshold value or reaches the maximum iteration number, marking interference areas of each cluster by different colors on a differential image, and storing a clustering result as a mask matrix with the same size as the differential image, wherein each pixel value represents the belonging cluster number.
- 4. A method of adaptive dimming of infrared field range dynamic interference as claimed in claim 1, wherein the calculating the duration of each interference region, counting the frequency of occurrence of each interference region within the duration, comprises: When a new interference area is detected for the first time, the time stamp of the current frame of the differential image is recorded as the starting time, when the existing interference area is not detected in the continuous w frames, the time stamp of the current frame is recorded as the ending time, w is a positive integer set by a user, the starting time is subtracted from the ending time to obtain single duration, when the same interference area appears in a plurality of time periods, the duration is accumulated to obtain total duration, a time window with fixed length is set, the occurrence times of the interference areas in the window are counted, and the frequency of the interference in the duration is counted by taking the interference event as a unit.
- 5. The method of claim 1, wherein the collecting sample data of dynamic interference in the infrared imaging process, extracting the interference area, duration and frequency of occurrence of each interference area in duration, combining as input feature combination, using corresponding dimming strategy as output label, and constructing decision tree model comprises: Collecting sample data containing dynamic interference in the infrared imaging process, counting the number of pixels contained in the sample data, converting the sample data into an interference area according to the resolution and imaging distance of an infrared detector, combining the interference area, duration and frequency of occurrence of each interference area in the duration into a three-dimensional vector as an input characteristic combination of the sample, classifying dimming strategies into different categories according to actual application requirements and experience, and distributing corresponding dimming strategy labels for each sample data; and using the CART algorithm as a decision tree model to initialize the model.
- 6. The method for adaptive dimming for dynamic interference of infrared field of view according to claim 1, wherein the dividing the sample data into a training set and a test set, training a decision tree model, and obtaining a dimming strategy of the input feature combination comprises: The method comprises the steps of dividing sample data into a training set and a testing set by using a random sampling method, matching input characteristic combinations in the training set with corresponding output labels to serve as input of model training, constructing a decision tree by recursively dividing the training data and selecting optimal characteristics and dividing points, dividing the training set into two subsets on each internal node according to the value of a certain characteristic, performing model evaluation and optimization on the recursive stopping condition that the maximum depth of the tree is reached or the number of samples contained in each leaf node is smaller than a set minimum value, and inputting interference area areas, duration time and frequency combinations of occurrence of each interference area in the duration time obtained in practical application into an optimized decision tree model to obtain a corresponding dimming strategy.
- 7. The method for adaptive dimming of dynamic interference of an infrared field range according to claim 1, wherein the performing a matching search based on a current input feature combination, obtaining a corresponding dimming policy, and performing the matching search comprises: based on the current input feature combination, starting from the decision tree root node, obtaining the feature judgment condition of the current node, determining to traverse the left subtree or the right subtree according to the feature value of the input feature combination until the leaf node is reached, obtaining the corresponding dimming strategy code stored by the leaf node, extracting the dimming strategy parameter, sending a control instruction to the driving module of the infrared detector through the serial port, and executing the dimming strategy.
- 8. A method of adaptive dimming for infrared field range dynamic interference as claimed in claim 1, wherein the setting of the overlap buffer at the decision boundary of an input feature combination when the interference area falls from one input feature combination to another input feature combination during the change comprises: constructing a multidimensional decision boundary according to a distribution rule of the historical input feature combination, wherein each dimming strategy corresponds to one input feature combination area; an overlapping buffer zone is arranged at the boundary of an adjacent dimming strategy area, and the range of the overlapping buffer zone is dynamically adjusted according to the space-time correlation of an interference area; And carrying out normalized distance calculation on feature points in the overlapping buffer zone, and defining the relative position relation between the current input feature combination and the boundary of the adjacent dimming strategy area.
- 9. The method for adaptive dimming of dynamic interference of an infrared field of view according to claim 1, wherein the performing of the multi-parameter collaborative interpolation achieves a strategic hybrid transition, comprising: When an input feature combination enters an overlapped buffer zone, generating a continuously-changed weight coefficient according to the normalized distance between the input feature combination and the boundary of an old dimming strategy zone, wherein the weight coefficient is dynamically associated with the change rate of the area of an interference zone, and the change rate is faster, the gradient of the transition of the weight coefficient is larger; The method comprises the steps of carrying out interpolation calculation in a logarithmic domain to ensure physical continuity of exposure time, wherein the logarithmic domain is a mathematical space after converting physical quantity into logarithmic scale, adopting a direction weighted interpolation method in combination with an interference motion vector direction, preferentially keeping detail enhancement on a motion track, wherein the interference motion vector direction is a moving direction of a dynamic interference area obtained through image sequence analysis, particularly a displacement vector of an adjacent inter-frame interference area calculated by adopting an optical flow method, constructing a dynamic prediction model of the interference area through a Kalman filter, predicting a change trend of an interference area in a future w frame, adjusting a weight coefficient in advance according to a prediction result, compensating system response delay, synchronizing strategy switching with interference evolution, wherein the system response delay is a time difference from detecting input feature combination to executing a dimming strategy to generate actual effect, the interference evolution is a continuous change process of interference on a space-time dimension, and comprises a time dimension, a space dimension and a strength dimension, particularly modeling a history input feature combination sequence by using a long-short-period memory network, and predicting the future evolution trend.
Description
Method for adaptively dimming dynamic interference of infrared field range Technical Field The invention relates to the technical field of self-adaptive dimming, in particular to a method for self-adaptive dimming of dynamic interference of an infrared field range. Background The infrared imaging technology is widely applied to various fields such as security monitoring, industrial production, medical detection and the like by virtue of the unique advantages thereof. In security monitoring scenes, the system can accurately capture the activities of personnel and objects at night or under severe illumination conditions, and can be used for detecting abnormal heating of equipment and preventing faults in industrial production. In the prior art, a simple global threshold method is adopted to detect dynamic interference, and the dynamic interference is judged only according to the overall brightness change of the image, so that the fine interference of a local area cannot be accurately identified. In the face of complex and changeable dynamic interference, the existing dimming strategies lack pertinence, and generally, fixed dimming parameters such as fixed exposure time and gain value are adopted, so that flexible adjustment cannot be performed according to the area, duration, appearance frequency and other characteristics of an interference area. When the interference condition changes and the dimming strategy needs to be switched, the prior art is often used for directly switching parameters, and the influence of the strategy switching process on the image quality is not considered. Disclosure of Invention The invention aims to provide a method for adaptively dimming dynamic interference of an infrared field range, which aims to solve the problems in the prior art. In order to achieve the above purpose, the present invention provides the following technical solutions: In a first aspect, the present invention provides a method of adaptive dimming for dynamic interference of infrared field of view, comprising the steps of: Acquiring infrared image data of continuous multiframes by using an infrared detector, and performing pixel-by-pixel differential operation on two adjacent frames of images to obtain differential images; dividing the interference points into different interference areas by adopting a clustering algorithm according to the distribution of the dynamic interference points, wherein each interference area represents a relatively concentrated dynamic interference part; Collecting sample data containing dynamic interference in the infrared imaging process, extracting the area and duration of an interference area and the occurrence frequency of each interference area in the duration, combining the areas and duration as input characteristic combinations, and taking a corresponding dimming strategy as an output label to construct a decision tree model; The method comprises the steps of carrying out matching search based on a current input feature combination to obtain a corresponding dimming strategy and executing the corresponding dimming strategy, setting an overlapped buffer area at a decision boundary of the input feature combination when the area of an interference area falls into another input feature combination from one input feature combination in the changing process, carrying out multi-parameter collaborative interpolation to realize strategy mixing transition, executing an inertia compensation mechanism and carrying out dimming strategy self-adaption switching. With reference to the first aspect, in a first implementation manner of the first aspect of the present application, the acquiring, by using an infrared detector, infrared image data of consecutive frames, performing pixel-by-pixel differential operation on two adjacent frames of images to obtain a differential image includes: The method comprises the steps of initializing parameters of an infrared detector, selecting a continuous acquisition mode, setting an acquisition frame rate, sequentially storing continuously acquired infrared image data in a memory buffer area, sequentially reading two adjacent frames of image data from the memory buffer area, performing image format conversion and preprocessing, comparing the preprocessed two adjacent frames of image data one by one according to pixel positions, calculating the gray value difference of each pixel point in two frames of images, and completing pixel-by-pixel differential operation of the infrared image data by circularly traversing all the pixel points in the images to obtain a differential image. With reference to the first aspect, in a second implementation manner of the first aspect of the present application, according to the distribution of the dynamic interference points, a clustering algorithm is used to divide the interference points into different interference areas, where each interference area represents a relatively concentrated dynamic interference portion, and th