Machine vision-based boundary intrusion target detection method
By constructing a background model for grayscale image sequences and performing multi-dimensional feature analysis, the problem of distinguishing between environmental interference and intrusion targets in boundary monitoring was solved, achieving highly accurate and robust intrusion target detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-15
- Publication Date
- 2026-03-13
AI Technical Summary
Existing technologies struggle to effectively distinguish between dynamic environmental interference and genuine intrusion targets in boundary monitoring, resulting in a high false alarm rate and impacting the accuracy and practicality of detection.
By constructing a background model of grayscale image sequences, the temporal fluctuation index, spatial discrete entropy, and directional chaos index are obtained. Combined with motion gradient vectors, intrusion confidence is constructed and connected region detection is performed to achieve accurate identification of intrusion targets.
It effectively suppresses environmental interference in complex and dynamic environments, improves the accuracy and robustness of boundary intrusion target detection, and reduces the false alarm rate.
Smart Images

Figure CN121330621B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology. More specifically, this invention relates to a machine vision-based method for detecting intrusive targets at designated boundaries. Background Technology
[0002] Border surveillance plays a vital role in border security, park security, and the management of military restricted areas. During the control of border areas, illegal intrusion incidents occur frequently, which seriously threaten the security and order of the region. Therefore, achieving accurate and timely detection of intrusion targets is particularly important for ensuring the security of border areas.
[0003] In related technologies, moving target detection methods based on background subtraction or inter-frame subtraction are commonly used. These methods generally include: constructing a static background model of the scene using historical video frames; performing pixel-level subtraction operations between the current video frame and the background model; and marking areas in the subtraction results where the grayscale change exceeds a preset threshold as foreground moving areas, thereby realizing the detection of moving targets within the field of view.
[0004] However, related technologies primarily rely on direct changes in pixel grayscale values for detection, neglecting non-target dynamic interference commonly present in natural environments. In outdoor boundary scenes, vegetation swaying in the wind, shadows cast by changes in lighting, and random movements caused by rain or snow all produce significant grayscale changes in video footage. Related technologies struggle to effectively distinguish whether these changes are caused by rigid intrusion targets with clear movement intentions or by environmental dynamic noise. This leads to a large number of false alarms in complex dynamic environments, thus affecting the accuracy and practicality of intrusion target detection in boundary areas. Summary of the Invention
[0005] To address the technical problem of high false alarm rates in boundary area intrusion detection due to the difficulty in distinguishing between dynamic environmental interference and real intrusion targets, this invention provides a machine vision-based boundary intrusion target detection method, comprising: acquiring a boundary monitoring video frame sequence and extracting grayscale images; converting images within a time window containing consecutive frames from the current and historical times into grayscale images to construct a grayscale image sequence; constructing a background model image based on the mean grayscale value of each pixel in the grayscale image sequence; taking any pixel in the grayscale image sequence as a target pixel, obtaining the temporal fluctuation index of the target pixel based on the standard deviation of the temporal grayscale set of the target pixel within the time window and the number of flips; taking any pixel in the current frame grayscale image as a target pixel; and taking any pixel in the current frame grayscale image as a target pixel. A neighborhood window is set up with a pixel as the center. The gray-level histogram within the neighborhood window is statistically analyzed. The information entropy of the pixel is obtained from the gray-level histogram, and the spatial discrete entropy of the pixel is obtained. The difference image between the gray-level image of the current frame and the background model image is calculated. The gradient of the pixel in the difference image is obtained to construct the motion gradient vector. The directional chaos index of the pixel is obtained by summing the magnitude of the vector sum of the motion gradient vectors of all pixels in the neighborhood window and the algebraic magnitude. The absolute values of all pixels in the difference image are taken to form the original motion response map. The original motion response map is corrected according to the temporal fluctuation index, spatial discrete entropy and directional chaos index to obtain the intrusion confidence. Connectivity detection is performed based on the intrusion confidence to determine the real intrusion target.
[0006] This invention acquires a sequence of boundary monitoring video frames and constructs a background model image, which can blur transient moving objects while preserving the inherent structure of the scene, providing a reliable static reference for subsequent capture of abnormal changes in the scene. By acquiring the temporal fluctuation index of target pixels and utilizing the standard deviation and flip count of pixel grayscale within a time window, it effectively distinguishes between monotonous grayscale changes caused by the passage of intruding targets and reciprocating oscillations caused by environmental disturbances such as swaying branches, thereby suppressing interference from dynamic backgrounds in the time dimension. By obtaining spatial discrete entropy through statistical analysis of grayscale histograms within the neighborhood window, it accurately characterizes the local texture distribution complexity of the scene, enabling the capture of shrub edges. The identification of high-frequency texture regions reduces false alarms caused by noise or subtle environmental changes in complex backgrounds. By constructing motion gradient vectors to obtain directional chaos indices, and utilizing the ratio between the magnitude of the vector sum and the sum of the algebraic magnitudes, it effectively distinguishes rigid intrusion targets with highly consistent motion trends from environmental interference such as rain, snow, and flying insects that exhibit random motion characteristics, thus improving detection robustness under adverse weather conditions. By fusing the above indices to construct intrusion confidence and performing connected region detection, it achieves correction of the original motion response, enhancing the response of real targets while suppressing multiple environmental interferences, thereby achieving high-accuracy boundary intrusion target detection in complex dynamic environments.
[0007] Preferably, the step of constructing a background model image based on the average gray value of each pixel in the grayscale image sequence includes: obtaining the average gray value of pixels at the same position in the grayscale image sequence, and the average gray values of all corresponding positions constitute the background model image.
[0008] Preferably, the method for obtaining the number of flips includes: using the number of target pixels in consecutive... The grayscale value within the frame is the temporal grayscale sequence of the target pixel. The difference between each value in the temporal grayscale sequence and its next adjacent value is obtained to get the difference sequence. The product between each value in the difference sequence and its next adjacent value is obtained. The number of times the product is less than 0 is used as the number of times the target pixel is flipped.
[0009] This invention obtains the difference sequence of the time-series grayscale sequence and counts the number of times the product in the difference sequence is less than zero as the number of flips, reflecting the oscillation frequency of the grayscale change of the pixel. It can keenly capture the high-frequency characteristics of repeated oscillations of environmental interference, and then distinguish them from the monotonic grayscale change characteristics generated when an intrusion target enters the monitoring area, providing a key frequency dimension basis for determining whether a pixel is in a dynamic background area.
[0010] Preferably, the time-series fluctuation index satisfies the following relationship: In the formula, For the first in the surveillance video Line number The temporal fluctuation index of column pixels, For the first in the surveillance video Line number The standard deviation of the temporal grayscale set of column pixels. For the first in the surveillance video Line number The number of times the column pixels are flipped. The number of frames in the image within the time window. This is the oscillation penalty coefficient.
[0011] This invention obtains the temporal fluctuation index by combining the standard deviation and the number of flips. When the number of flips is larger, it indicates that the grayscale change exhibits high-frequency oscillation characteristics, which is more likely to be due to environmental interference. Therefore, the temporal fluctuation index is increased to amplify the difference between environmental interference and the real intrusion target. For real motion with a smaller number of flips, the temporal fluctuation index level is maintained at a lower level, thereby effectively suppressing false alarms in dynamic background while preserving the real motion response.
[0012] Preferably, the spatial discrete entropy satisfies the following relation: In the formula, The first grayscale image in the current frame Line number Spatial discrete entropy of column pixels, The first grayscale image in the current frame Line number The grayscale value within the neighborhood window of a column pixel is The frequency of pixel occurrence.
[0013] This invention uses the information entropy of grayscale distribution within the neighborhood window of a pixel as spatial discrete entropy, which can quantitatively characterize the local spatial complexity of the monitoring scene, thereby effectively identifying high-frequency textured areas that are prone to false alarms, such as the edges of bushes. For the interior of a target or road surface with flat texture, the entropy value is small, which reduces the algorithm's sensitivity to subtle changes in complex background areas and avoids false detections caused by complex background textures.
[0014] Preferably, the step of obtaining the gradient of the pixel in the difference image to construct the motion gradient vector includes: taking the gradient values of the pixel in the difference image in the horizontal and vertical directions using the Sobel operator, and combining the gradient values in the horizontal and vertical directions to form the motion gradient vector.
[0015] Preferably, the directional chaos index satisfies the following relationship: In the formula, The first grayscale image in the current frame Line number The directional chaos index of the column pixels, The number of pixels within the neighborhood window. and These are the difference images of the current frame's grayscale image, respectively. Line number Within the neighborhood window of the column pixel The gradient values of each pixel in the horizontal and vertical directions. To prevent constants with a denominator of zero.
[0016] This invention obtains the directional chaos index by the ratio between the magnitude of the sum of the vector sum of motion gradient vectors within the neighborhood window and the sum of their algebraic magnitudes. This effectively reflects the degree of disorder in the local motion field. When changes in the monitored image are caused by environmental interference such as rain, snow, or flying insects, the chaotic motion directions cause the vectors to cancel each other out, resulting in the index approaching its maximum value. However, for intrusion targets with clear motion intentions, their local motion directions are highly consistent, and the index approaches its minimum value. This achieves effective filtering of random interference sources in the motion dimension.
[0017] Preferably, the intrusion confidence level satisfies the following relationship: In the formula, The first grayscale image in the current frame Line number Intrusion confidence of column pixels The first one in the original motion response diagram Line number The value of each pixel. For the first in the surveillance video Line number The temporal fluctuation index of column pixels, The first grayscale image in the current frame Line number Spatial discrete entropy of column pixels, The first grayscale image in the current frame Line number The directional chaos index of the column pixels, The preset sensitivity adjustment factor, It is an exponential function with the natural constant as the base.
[0018] This invention uses temporal fluctuation index, spatial discrete entropy, and directional chaos index to correct the original motion response value to obtain intrusion confidence, effectively suppressing false alarms caused by swaying leaves, complex background textures, and rainy or snowy weather; while for real intrusion targets without interference features, the intrusion confidence remains at a high level, thus achieving the suppression of environmental interference and the effective enhancement of real targets, improving the accuracy of target detection in complex dynamic environments.
[0019] Preferably, the connected region detection based on intrusion confidence includes: constructing an intrusion confidence map from the intrusion confidence of each pixel, generating a binarized image of the intrusion confidence map, obtaining foreground pixels and background pixels, performing morphological closing operations on the binarized image, scanning the morphologically processed binary image based on the 8-neighborhood connectivity rule, marking adjacent foreground pixels as belonging to the same object, thereby obtaining several independent connected regions.
[0020] Preferably, generating a binarized image of the intrusion confidence map to obtain foreground pixels and background pixels includes: using the maximum inter-class variance method to obtain an adaptive segmentation threshold for the intrusion confidence map, marking pixels with intrusion confidence greater than the adaptive segmentation threshold as foreground pixels, and marking the rest as background pixels.
[0021] The beneficial effects of this invention are as follows: This invention utilizes the temporal fluctuation index to capture the oscillating characteristics of non-rigid objects in nature, such as leaves and grass, effectively solving the problem of false vegetation detection during windy weather. Simultaneously, by combining spatial discrete entropy and directional chaos index, it can eliminate false motion responses caused by rain, snow, insect interference, and high-frequency textured backgrounds from the perspective of texture distribution and motion vector consistency. By constructing an intrusion confidence score, it can adaptively suppress environmental interference sources and enhance the signal of rigid intrusion targets with clear motion intentions, thereby reducing the false alarm rate of the boundary monitoring system during intrusion target detection. This invention overcomes the shortcomings of traditional inter-frame difference methods or background subtraction methods, which are easily affected by environmental noise in uncontrolled outdoor environments, by integrating physical features of temporal, spatial, and motion dimensions. This invention does not rely solely on changes in pixel intensity but establishes an intrusion confidence score that reflects oscillation frequency, texture complexity, and motion disorder through the inherent laws of pixel changes in the video, achieving effective identification of environmental interference sources and real intrusion targets in dynamic backgrounds in monitoring scenes, improving the robustness and practicality of the system in all-weather environments. Attached Figure Description
[0022] Figure 1 This is a flowchart illustrating the machine vision-based boundary intrusion target detection method of the present invention;
[0023] Figure 2 This is a schematic illustration of the current frame grayscale image in this invention;
[0024] Figure 3 This is a schematic illustration of the background model image in this invention;
[0025] Figure 4 This is a schematic diagram illustrating the spatial discrete entropy distribution in this invention;
[0026] Figure 5 This is a schematic diagram illustrating the directional chaos index distribution in this invention;
[0027] Figure 6 This is a schematic diagram illustrating the original motion response in this invention;
[0028] Figure 7 This is a schematic diagram illustrating the intrusion confidence distribution in this invention. Detailed Implementation
[0029] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0030] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0031] This invention discloses a machine vision-based method for detecting intrusive targets at designated boundaries, with reference to... Figure 1 This includes steps S1 to S5:
[0032] S1. Obtain the boundary monitoring video frame sequence and extract grayscale images, and construct a background model image based on the historical frame sequence.
[0033] It should be noted that color images contain redundant chromaticity information, and changes in illumination are often first reflected in the luminance component. In order to improve computational efficiency and focus on illumination and motion features, the video stream needs to be preprocessed. At the same time, in order to accurately calculate the difference between the current frame and the environmental baseline state, a background model that can reflect the static features of the environment needs to be constructed.
[0034] Specifically, surveillance video streams are acquired using fixed cameras deployed in the boundary area, and images are captured sequentially within a time window, which includes the current moment and consecutive historical moments. Each frame of the image is converted into a grayscale image, constructing a grayscale image sequence. The pixel values at each location in all images within the grayscale image sequence are then obtained. The average grayscale value within a frame, and the average grayscale value corresponding to all pixels at all positions, constitute the background model image.
[0035] For example, It is 10.
[0036] For example, Figure 2 This is the grayscale image of the current frame in this invention. Figure 3 The background model image in this invention can be seen from the figure. It can reflect the static features of the monitoring scene, blur short-lived moving objects, and preserve the inherent structure of the scene, providing a reference for subsequent capture of abnormal changes in the scene through differential operations.
[0037] S2. Obtain the temporal fluctuation index based on the grayscale change characteristics of pixels within the time window.
[0038] It should be noted that when an intrusion target passes through a certain point, the pixel grayscale usually exhibits a monotonous change, while environmental interference causes the pixel grayscale to oscillate repeatedly around the mean. For example, when an intrusion target enters a monitored area, the color of the intrusion target in the image will change from the background color to the color of the intrusion target, and then back to the background color. Swaying tree branches, on the other hand, cause the pixel grayscale to oscillate repeatedly around the mean. To effectively distinguish between these two, this invention obtains a temporal fluctuation index based on the grayscale change characteristics of pixels within a time window.
[0039] Specifically, taking any pixel in the grayscale image sequence as the target pixel, and taking the target pixel in a continuous sequence... The grayscale values within a frame are the temporal grayscale sequences of the target pixels. The standard deviation of the temporal grayscale set of the target pixels is calculated. The difference between each value in the temporal grayscale sequence and its next adjacent value is obtained, resulting in a difference sequence. The product of each value in the difference sequence and its next adjacent value is obtained, and the number of times the product is less than 0 is taken as the flip count of the target pixel. Based on the standard deviation of the temporal grayscale set of the target pixels and the flip count, the temporal fluctuation index of the target pixel is obtained.
[0040] Specifically, the time series volatility index satisfies the following relationship:
[0041] ;
[0042] In the formula, For the first in the surveillance video Line number The temporal fluctuation index of column pixels, For the first in the surveillance video Line number The standard deviation of the temporal grayscale set of column pixels. For the first in the surveillance video Line number The number of times the column pixels are flipped. The number of frames in the image within the time window. The oscillation penalty coefficient is used in this embodiment. .
[0043] It should be noted that, This value reflects the magnitude of grayscale changes in the surveillance video; a larger value indicates a significant change in the pixels. This reflects the oscillation frequency of grayscale changes in the surveillance video. A larger value indicates greater instability in the direction of grayscale changes. Therefore, by... The amplitude base is adjusted upwards when A larger value indicates that the grayscale change at that point is more likely to exhibit high-frequency oscillation characteristics, and the higher the probability of environmental interference. Therefore, the time-series fluctuation index should be increased to amplify the distinction between environmental interference and target intrusion. The smaller the value, the lower the time-series fluctuation index, even if there are some grayscale changes. It also remains at a relatively low level, thus preserving the response to real motion and achieving the differentiation of intrusion targets. Specifically, since there is no value after the last value in the temporal grayscale sequence, and no value after the last value in the difference sequence, it is achieved by dividing by... right Normalize.
[0044] S3. Obtain the spatial discrete entropy based on the texture distribution characteristics within the neighborhood of each pixel.
[0045] It should be noted that environmental disturbance sources (such as grass, tree canopies, and water ripples) typically have complex texture details and chaotic grayscale distributions in space, while flat backgrounds or the interior of a complete target usually have a relatively uniform grayscale distribution. Therefore, this invention uses spatial discrete entropy to characterize the spatial complexity of a scene in order to identify high-frequency texture regions that are prone to false alarms.
[0046] Specifically, a point is set centered on any pixel in the current frame's grayscale image. The neighborhood window is defined. The gray-level histograms of all pixels within the neighborhood window are statistically analyzed, and the information entropy of each pixel is obtained based on the gray-level histograms, thus yielding the spatial discrete entropy of each pixel.
[0047] Specifically, the spatial discrete entropy satisfies the following relation:
[0048] ;
[0049] In the formula, The first grayscale image in the current frame Line number Spatial discrete entropy of column pixels, The first grayscale image in the current frame Line number The grayscale value within the neighborhood window of a column pixel is The frequency of pixel occurrence.
[0050] Among them, spatial discrete entropy The larger the value, the higher the value of the grayscale image in the current frame. Line number The more uniform and chaotic the distribution of gray values in the neighborhood of a column pixel, the more likely it is to correspond to a complex textured area, such as the edge of a bush, which is prone to false alarms. The smaller the value, the higher the value of the grayscale image in the current frame. Line number The more concentrated the grayscale value distribution within the neighborhood of a column pixel, the more likely it corresponds to the interior of an intrusion target or a flat area such as a road surface.
[0051] For example, Figure 4 This is a spatial discrete entropy distribution diagram of the present invention. As can be seen from the diagram, the present invention can distinguish between complex texture regions and regions with smooth textures in a spatial dimension. By calculating the spatial discrete entropy, the sensitivity to changes in high-texture regions can be reduced, thereby avoiding false alarms caused by camera noise or subtle environmental changes in complex backgrounds.
[0052] S4. Obtain the directional chaos index based on the vector distribution of local motion gradients.
[0053] It should be noted that, since the motion directions of interference sources in the natural environment (such as raindrops and flying insects) at the microscopic scale usually exhibit isotropic random distribution characteristics, while real intrusion targets, as rigid or semi-rigid objects, typically have pixels within their local areas exhibiting highly consistent motion trends. Therefore, this invention identifies interference by measuring the degree of disorder in the local motion field based on the vector distribution of the local motion gradient of the pixels.
[0054] Specifically, the difference image between the current frame grayscale image and the background model image is calculated. Gradient operators are used to extract the gradient values in the horizontal and vertical directions of the difference image, constructing the motion gradient vectors of pixels in the difference image. The magnitude of the vector sum of the motion gradient vectors of all pixels within a neighborhood window of any pixel in the current frame grayscale image is obtained, along with the sum of their algebraic magnitudes. Based on the sum of the magnitudes of the vector sums and the algebraic magnitudes, the directional chaos index of the pixels in the current frame grayscale image is obtained.
[0055] In one embodiment, the gradient operator is the Sobel operator.
[0056] Specifically, the directional chaos index satisfies the following relationship:
[0057] ;
[0058] In the formula, The first grayscale image in the current frame Line number The directional chaos index of the column pixels, The number of pixels within the neighborhood window. and These are the difference images of the current frame's grayscale image, respectively. Line number Within the neighborhood window of the column pixel The gradient values of each pixel in the horizontal and vertical directions. To prevent constants with a denominator of zero, this embodiment... .
[0059] It should be noted that, It is the sum of the algebraic magnitudes of the motion gradient vectors of all pixels within the local window. Let be the magnitude of the vector sum of the motion gradient vectors of all pixels within the local window. When an intrusion target passes through the monitored area, all pixels within the local window corresponding to the intrusion target will typically move in the same direction, thus causing... Approaching This causes the directional chaos index to approach 0; when changes in the monitored area are caused by environmental interference sources (such as rain and snow), the local motion directions of the corresponding pixels of the environmental interference source are chaotic, and the vectors in each direction cancel each other out, making... much smaller , making the directional chaos index It approaches 1. Therefore, the directional chaos index can effectively reflect the degree of directional chaos of the motion of objects in an image, and thus distinguish intrusion targets from environmental interference sources based on the motion characteristics of the monitoring screen.
[0060] For example, Figure 5 This is a distribution map of the directional chaos index in this invention. The map shows that this invention can distinguish between regions of ordered and disordered motion in the motion dimension. Because pedestrians exhibit a low directional chaos index characteristic with a clear directionality, the directional chaos index effectively filters out random motion interference such as rain, snow, flying insects, or the chaotic swaying of leaves, thereby identifying targets with a clear intention to move.
[0061] S5. Construct an intrusion confidence score based on the temporal fluctuation index, spatial discrete entropy, and directional chaos index, and perform connected component detection based on the intrusion confidence score.
[0062] It should be noted that since a single motion difference cannot distinguish between the real target and environmental interference, high-frequency moving background objects may produce high-amplitude responses. To suppress such false alarms, this invention constructs an intrusion confidence score based on the temporal fluctuation index, spatial discrete entropy, and directional chaos index, and performs connected component detection based on the intrusion confidence score.
[0063] Specifically, the absolute values of all pixels in the difference image are used to construct the original motion response map. The values in the original motion response map are then corrected based on the temporal fluctuation index, spatial discrete entropy, and directional chaos index to obtain the intrusion confidence. The intrusion confidence of each pixel is then used to construct an intrusion confidence map. An adaptive segmentation threshold is obtained using the Otsu's method on the intrusion confidence map. Pixels with an intrusion confidence greater than the adaptive segmentation threshold are marked as foreground pixels, and the rest are marked as background pixels, generating a binarized image. Morphological closing operations are then performed on the binarized image. Finally, the morphologically processed binary image is scanned based on the 8-neighborhood connectivity rule, marking adjacent foreground pixels as belonging to the same object, thereby obtaining several independent connected regions.
[0064] Furthermore, if the mean intrusion confidence of all pixels within a connected region is greater than a preset threshold, the connected region is determined to be a real intrusion target. The preset threshold is 30, and the implementer can adjust the threshold according to the actual situation.
[0065] Specifically, the intrusion confidence satisfies the following relationship:
[0066] ;
[0067] In the formula, The first grayscale image in the current frame Line number Intrusion confidence of column pixels The first one in the original motion response diagram Line number The value of each pixel. For the first in the surveillance video Line number The temporal fluctuation index of column pixels, The first grayscale image in the current frame Line number Spatial discrete entropy of column pixels, The first grayscale image in the current frame Line number The directional chaos index of the column pixels, The preset sensitivity adjustment factor, In this embodiment, it is an exponential function with the natural constant as the base. The implementers can determine the implementation based on the actual situation. The value of .
[0068] in, This initially reflects changes in the monitored scene. Since not only intrusions can cause changes in the monitored scene, environmental interference sources can also lead to these changes. To reduce the impact of environmental interference on the detection of intrusions in the monitored scene, [further measures were taken]. Suppressing oscillation interference from environmental sources in the time dimension, through Suppressing complex texture interference from environmental sources in the spatial dimension, through Suppress chaotic interference from environmental sources in the motion dimension. When the pixel size is larger, the object corresponding to the pixel is more likely to have features such as high-frequency oscillation, complex texture, or chaotic movement direction. Therefore, the pixel is more likely to correspond to an environmental interference source, and the intrusion confidence is lower, thus avoiding the detection of intrusion targets in the monitored area by environmental interference sources. The smaller the pixel size, the less the object corresponding to the pixel has the characteristics of environmental interference sources, the more likely the pixel is to correspond to an intrusion target, and the greater the intrusion confidence.
[0069] For example, Figure 6 This is the original motion response diagram in this invention. Figure 7 The intrusion confidence distribution map in this invention shows that the original motion response map cannot distinguish between the real target and environmental interference, while the intrusion confidence suppresses the influence of environmental interference and retains the real intrusion target, thereby achieving boundary intrusion target detection with reduced environmental interference.
Claims
1. A method for detecting a boundary intrusion target based on machine vision, characterized in that, Comprise: The boundary monitoring video frame sequence is acquired and a gray image is extracted, images in a time window containing current time and continuous frame images of historical time are converted into gray images, a gray image sequence is constructed, and a background model image is constructed according to the mean value of the gray value of each position pixel point in the gray image sequence; any pixel point in the gray image sequence is taken as a target pixel point, the standard deviation and the number of flips of the time sequence gray set of the target pixel point in the time window are obtained, and a time sequence fluctuation index of the target pixel point is obtained: ; in the formula, is the time sequence fluctuation index of the pixel point in the row and the column of the monitoring video, is the standard deviation of the time sequence gray set of the pixel point in the row and the column of the monitoring video, is the number of flips of the pixel point in the row and the column of the monitoring video, is the frame number of the image in the time window, is a shock penalty coefficient; a neighborhood window is set with any pixel point in the current frame gray image as the center, a gray histogram in the neighborhood window is counted, an information entropy of the pixel point is obtained according to the gray histogram, and a spatial dispersion entropy of the pixel point is obtained: ; in the formula, is the spatial dispersion entropy of the pixel point in the row and the column of the current frame gray image, is the frequency of the pixel point with the gray value of in the neighborhood window of the pixel point in the row and the column of the current frame gray image. Calculate the difference image between the current frame's grayscale image and the background model image, obtain the gradient of each pixel in the difference image to construct the motion gradient vector, and obtain the directional chaos index of the pixel based on the sum of the magnitude of the vector sum of the motion gradient vectors of all pixels within the pixel's neighborhood window and the sum of their algebraic magnitudes. In the formula, The first grayscale image in the current frame Line number The directional chaos index of the column pixels, The number of pixels within the neighborhood window. and These are the difference images of the current frame's grayscale image, respectively. Line number Within the neighborhood window of the column pixel The gradient values of each pixel in the horizontal and vertical directions. To prevent constants with zero denominators, the absolute values of all pixels in the difference image are taken to construct the original motion response map. The original motion response map is then corrected based on the temporal fluctuation index, spatial discrete entropy, and directional chaos index to obtain the intrusion confidence. In the formula, The first grayscale image in the current frame Line number Intrusion confidence of column pixels The first one in the original motion response diagram Line number The value of each pixel. The preset sensitivity adjustment factor, It is an exponential function with the natural constant as the base; it performs connected component detection based on intrusion confidence to determine the true intrusion target. 2.The machine vision based boundary intrusion target detection method of claim 1, wherein, The background model image is constructed according to the mean value of the gray value of each position pixel point in the gray image sequence, comprising: obtaining the mean value of the gray value of the same position pixel point in the gray image sequence, and the mean value of the gray value of all positions constitutes the background model image. 3.The machine vision based boundary intrusion target detection method of claim 1, wherein, The obtaining method of the number of times of flipping includes: obtaining a time sequence of gray values of the target pixel point in a continuous frame, obtaining a difference sequence by obtaining a difference between each value in the time sequence of gray values and a next value adjacent to the each value, obtaining a product between each value in the difference sequence and a next value adjacent to the each value, and taking a number of times of the product being less than 0 as the number of times of flipping of the target pixel point. 4.The machine vision based boundary intrusion target detection method of claim 1, wherein, The motion gradient vector is constructed by obtaining the gradient of the pixel point in the difference image, comprising: the gradient value of the pixel point in the horizontal direction and the vertical direction of the difference image is obtained by the Sobel operator, and the gradient value in the horizontal direction and the vertical direction is combined into the motion gradient vector. 5.The machine vision based boundary intrusion target detection method of claim 1, wherein, According to the invasion confidence, the connected region detection comprises: the invasion confidence of each pixel point constitutes the invasion confidence graph, the binary image of the invasion confidence graph is generated, the foreground pixel point and the background pixel point are obtained, and the morphological closing operation is carried out on the binary image, the binary image after morphological processing is scanned based on the 8 neighborhood connection rule, the adjacent foreground pixel points are marked as belonging to the same object, so as to obtain several independent connected regions. 6.The machine vision based boundary intrusion target detection method of claim 5, wherein, The binary image of the invasion confidence graph is generated, the foreground pixel point and the background pixel point are obtained, comprising: the adaptive segmentation threshold is obtained by using the maximum inter-class variance method on the invasion confidence graph, the pixel point with the invasion confidence greater than the adaptive segmentation threshold is marked as the foreground pixel point, and the rest is marked as the background pixel point.
Citation Information
Patent Citations
Moving target detection method with combination of region extraction and improved texture feature
CN108765463A
Video SAR moving target detection method based on shadow extraction
CN111881837A