Boring and milling machine tool operation area safety monitoring method based on video analysis
By using neural network mapping and adaptive threshold adjustment of dynamic interference factors, combined with clustering and Euclidean distance determination, the false alarm problem caused by coolant and chip interference in boring and milling processes was solved, thereby improving the stability of safety monitoring and production efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- QINGDAO HUITENG MACHINERY EQUIP
- Filing Date
- 2026-04-09
- Publication Date
- 2026-07-07
AI Technical Summary
In boring and milling operations, the background difference method is prone to misjudgment and frequent machine shutdowns due to strong dynamic interference from coolant and metal chips, which cannot meet the stable and reliable safety monitoring requirements of industrial sites.
By establishing a mapping between pixel coordinates and 3D machine tool physical coordinates through neural networks, dynamic interference factors are obtained by combining motion discreteness and grayscale changes, the detection threshold is adaptively adjusted, and the safety status is determined based on clustering and Euclidean distance, thereby achieving accurate segmentation of foreground targets and safety status classification.
It significantly reduces the false alarm rate caused by coolant spray and metal chip splash during boring and milling, avoids frequent shutdowns due to false alarms, and improves operational efficiency and the intelligence level of the monitoring system.
Smart Images

Figure CN122116241B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology. More specifically, this invention relates to a method for safety monitoring of the working area of a boring and milling machine based on video analysis. Background Technology
[0002] In the field of heavy machinery processing, the operating environment of large boring and milling machine tools is extremely complex, and ensuring the personal safety of operators is the primary task of industrial production. To achieve non-contact safety monitoring, the mainstream technology in the industry currently adopts computer vision-based video surveillance systems. Existing technologies typically deploy industrial cameras to collect video streams of operations and use background subtraction to extract moving foregrounds. The core logic is to acquire static work areas. If a certain position in the current frame's work area has a significant grayscale difference from the static work area, it is determined to be a foreground area. Then, a support vector machine is used to classify the shape and texture features of the foreground area to determine whether personnel have mistakenly entered a preset electronic fence area and to issue an early warning.
[0003] However, in actual boring and milling operations, the aforementioned background difference method has obvious defects and shortcomings. The boring and milling process is accompanied by high-pressure jetting emulsion coolant and high-speed splashing of high-temperature metal chips. These interfering factors have extremely strong dynamic fluctuations, which directly undermine the core assumption of the background being relatively static in the background difference method. In practical applications, since the motion characteristics of the splashing iron chips and the movement of human limbs are difficult to effectively distinguish at the pixel level, and the coolant jetting causes drastic changes in the image grayscale values, traditional algorithms are very likely to misjudge the above-mentioned interference areas as moving foreground targets, and further misidentify them as personnel intrusion, causing the machine tool control system to frequently trigger shutdown protection, seriously affecting the continuity of processing and production efficiency, and making it difficult to meet the stable and reliable safety monitoring requirements in actual industrial scenarios. Summary of the Invention
[0004] To address the problem that traditional background difference methods are prone to misjudgment and frequent machine shutdowns due to strong dynamic interference from coolant and metal chips during boring and milling operations, thus failing to meet the stable and reliable safety monitoring requirements of industrial sites, this invention proposes a video analysis-based safety monitoring method for the working area of boring and milling machines. This method includes the following steps:
[0005] Real-time working images of a boring and milling machine are acquired and the working area is identified using a neural network. A mapping relationship between pixel coordinates and three-dimensional machine tool physical coordinates is established in the working area.
[0006] Obtain the motion dispersion index of each pixel in the current frame's working region. ; This represents the number of neighboring pixels of the i-th pixel in the current frame's working region. This represents the horizontal velocity component of the i-th pixel in the current frame's working region. This represents the vertical velocity component of the i-th pixel in the current frame's working region. This represents the horizontal velocity component of the j-th neighboring pixel of the i-th pixel in the current frame's working region. The vertical velocity component of the j-th neighboring pixel of the i-th pixel in the current frame's working region; Represents a minimal constant;
[0007] Obtain the dynamic interference factor of each pixel in the current frame's working region. ; This is the motion dispersion index of the i-th pixel in the current frame's working region; It is the absolute value of the grayscale difference between the i-th pixel in the current frame's working region and the corresponding pixel in the background working region; It is a logarithmic function;
[0008] The detection threshold for each pixel in the current frame's working region is adaptively obtained using the dynamic interference factor. , The detection threshold for the i-th pixel in the current frame's working region; The set basic detection threshold; The dynamic interference factor of the i-th pixel in the current frame's working region; It is the gain factor;
[0009] Target pixels are selected based on the detection threshold, and clusters are obtained by clustering the target pixels. The center of the cluster is mapped to the three-dimensional machine tool physical coordinate system, and the safety status of the boring and milling machine tool working area is determined according to the Euclidean distance between the cluster and the center of the spindle tool.
[0010] The innovation of this invention lies in obtaining the dynamic interference factor of each pixel in the current frame's working area based on the motion dispersion index and combined with pixel grayscale changes and instantaneous motion rate. This allows for the differentiation between ordered human motion and disordered chip splash interference from the perspective of physical motion. Then, based on the dynamic interference factor, an adaptive detection threshold is set, and the foreground target is accurately segmented based on the detection threshold. Furthermore, a safety status classification is performed based on spatial distance. This can significantly reduce the false alarm rate caused by coolant spray and metal chip splash during boring and milling operations. While ensuring the safety of operators, it avoids frequent shutdowns caused by false alarms, thereby improving the machine tool's operating efficiency and the intelligence level of the monitoring system.
[0011] Preferably, the acquisition of the velocity component includes:
[0012] The working area in the real-time working image of the boring and milling machine in the current frame is denoted as the current frame working area; the difference between the horizontal coordinate of the i-th pixel in the current frame working area and the horizontal coordinate of the i-th pixel in the previous frame working area is denoted as the velocity component of the i-th pixel in the horizontal direction in the current frame working area; the difference between the vertical coordinate of the i-th pixel in the current frame working area and the vertical coordinate of the i-th pixel in the previous frame working area is denoted as the velocity component of the i-th pixel in the vertical direction in the current frame working area.
[0013] Preferably, the neighboring pixels of the i-th pixel in the current frame working region include:
[0014] The eight neighboring pixels of the i-th pixel in the current frame's working region are taken as the neighboring pixels of the i-th pixel in the current frame's working region.
[0015] Preferably, obtaining the background work area includes:
[0016] An industrial camera is deployed above the working area of the boring and milling machine. During the stationary phase before the machine starts cutting, a static background image of the boring and milling machine without dynamic interference is acquired. The working area is then identified using a neural network, and the working area in the static background image of the boring and milling machine is recorded as the background working area.
[0017] A reference baseline is established by acquiring static background images and identifying the work area during the static phase.
[0018] Preferably, the step of filtering target pixels based on the detection threshold and clustering the target pixels to obtain clusters includes:
[0019] The absolute value of the grayscale difference between the i-th pixel in the current frame's working region and the corresponding pixel in the background working region is denoted as the grayscale difference value of the i-th pixel. If the grayscale difference value of the i-th pixel is greater than or equal to the detection threshold of the i-th pixel, the i-th pixel is denoted as the target pixel. In the current frame's working region, based on the position coordinates of the target pixel, the DBSCAN clustering algorithm is used to cluster all target pixels in the current frame's working region to obtain several clusters.
[0020] Preferably, the step of mapping the center of the cluster to the three-dimensional machine tool physical coordinate system and determining the safety status of the boring and milling machine tool's working area based on the Euclidean distance between the cluster and the spindle tool center includes:
[0021] Two safety threshold parameters a1 and a2 are preset. The cluster center of any cluster is converted into coordinates in the three-dimensional machine tool physical coordinate system. The Euclidean distance between the coordinates and the spindle tool center in the three-dimensional machine tool physical coordinate system is obtained and recorded as the first distance. If the first distance is less than or equal to the safety threshold parameter a1, the state of the boring and milling machine tool is switched to the dangerous mode and a stop command is triggered.
[0022] If the first distance is greater than the safety threshold parameter a1 and less than or equal to the safety threshold parameter a2, the boring and milling machine switches to warning mode and issues a warning signal indicating that a human body is approaching the tool; if the first distance is greater than the safety threshold parameter a2, the boring and milling machine continues to operate without changing its state.
[0023] By mapping image coordinates to the physical coordinate system of a three-dimensional machine tool and implementing graded responses based on the Euclidean distance from the center of the spindle tool, the risk of personnel intrusion can be mitigated in a timely manner, and unnecessary downtime caused by targets entering the edge area can be reduced, thus achieving a balance between safety and production.
[0024] Preferably, the step of acquiring real-time working images of the boring and milling machine and using a neural network to identify the working area includes:
[0025] An industrial camera is deployed above the working area of the boring and milling machine to capture real-time video of the machine when it starts cutting. FFmpeg technology is used to process the real-time video of the boring and milling machine into frames to obtain several frames of real-time working images. Each frame of the real-time working image is then input into a trained neural network to obtain the working area in each frame of the real-time working image.
[0026] The present invention has the following beneficial effects: The innovation of the present invention lies in obtaining the dynamic interference factor of each pixel in the current frame operation area based on the motion dispersion index of the pixel and combined with the pixel grayscale change and instantaneous motion rate. This can distinguish between ordered human motion and disordered chip splash interference from the essence of physical motion. Then, based on the dynamic interference factor, an adaptive detection threshold is used to achieve accurate segmentation of the foreground target. Based on the physical spatial distance, a safety status classification judgment is made, which significantly reduces the false alarm rate caused by coolant spray and metal chip splash in boring and milling. While ensuring the safety of operators, it avoids frequent shutdowns caused by false alarms. Attached Figure Description
[0027] Figure 1 This is a flowchart illustrating the steps of the video analysis-based safety monitoring method for the working area of a boring and milling machine according to an embodiment of the present invention.
[0028] Figure 2 This is a schematic diagram comparing the dynamic evolution of adaptive thresholds under strong interference conditions on boring and milling machine tools. Detailed Implementation
[0029] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0030] Please see Figure 1 The diagram illustrates a flowchart of a video analysis-based safety monitoring method for the working area of a boring and milling machine provided by an embodiment of the present invention. The method includes the following steps:
[0031] S001. Acquire real-time working images of the boring and milling machine and use a neural network to identify the working area, and establish a mapping relationship between pixel coordinates and three-dimensional machine tool physical coordinates in the working area.
[0032] In this embodiment of the invention, an industrial camera is deployed above the working area of the boring and milling machine. During the stationary phase before the machine begins cutting, a static background image of the boring and milling machine without dynamic interference is acquired. Then, a real-time working video of the boring and milling machine is acquired. The real-time working video of the boring and milling machine is processed into frames using FFmpeg technology to obtain several frames of real-time working images of the boring and milling machine. The intrinsic and extrinsic parameter matrices of the camera are obtained using a standard calibration method (such as the Zhang Zhengyou calibration method).
[0033] For any frame of a real-time working image of a boring and milling machine, a mapping relationship is established between the coordinates of each pixel in each frame of the real-time working image of the boring and milling machine and the physical coordinates of the three-dimensional machine tool, based on the intrinsic and extrinsic parameter matrices of the camera. This process ensures that the pixel positions in the image can be accurately mapped to the physical positions of the machine tool.
[0034] The real-time working image of any frame of the boring and milling machine is input into the trained neural network to obtain the working area in the real-time working image of any frame of the boring and milling machine; wherein the neural network used in this embodiment is YOLOv3, and the method for obtaining the dataset for training the neural network is as follows:
[0035] A large number of real-time operation images of boring and milling machines are collected. The operation area is manually marked in each real-time operation image of the boring and milling machine using bounding boxes, and this marking result is recorded as the label of each real-time operation image of the boring and milling machine. A dataset is formed by collecting a large number of real-time operation images of boring and milling machines and their corresponding labels. The neural network is trained using this dataset, and the loss function used in the training process is the mean squared error loss function. The specific training process is well known in neural networks, and this embodiment will not elaborate on the specific training process.
[0036] It should be noted that the working area of the boring and milling machine tool refers to the actual physical space range in which the cutting tool, workpiece, and tooling fixture move relative to each other during the machining operations such as boring, milling, and drilling. It is also the effective machining space and safety control area defined by the machine tool during the design and debugging phases. The intrinsic parameter matrix contains information such as the focal length and optical center position of the camera, while the extrinsic parameter matrix describes the spatial relationship between the camera coordinate system and the machine tool physical coordinate system. FFmpeg technology and standard calibration methods are existing technologies, and will not be described in detail here.
[0037] Similarly, the working area in the static background image of the boring and milling machine is obtained according to the above method and is denoted as the background working area.
[0038] S002. Based on the pixel-level motion vectors of the current frame's working area and the previous frame's working area, calculate the motion dispersion index of each pixel, and construct the dynamic interference factor of each pixel by combining the pixel grayscale change and instantaneous motion rate.
[0039] It should be noted that when acquiring pixel-level motion vectors of the current frame's working area and the previous frame's working area, the existing monitoring model can only obtain horizontal and vertical velocity components, and cannot distinguish the attribute differences of different moving targets from a physical perspective. It is known that moving targets in the working space of a boring and milling machine tool are of two types. The first type is the object to be monitored, which may include the operator's arm, torso, etc. In the local area of this type of object, the motion of each pixel point follows the overall consistency law, and the velocity components corresponding to adjacent pixels show a high correlation in both direction and amplitude, that is, the pixel motion in the local area has cooperative consistency. The second type is dynamic environmental interference targets, which may include sprayed coolant droplets, splashed fine iron filings, etc. These interference targets are affected by a combination of factors such as nonlinear scattering of cutting force and breakage of liquid surface tension, and exhibit an extremely disordered motion state at the microscopic scale, and their pixel motion has no fixed pattern.
[0040] Therefore, based on the essential differences between the two types of moving targets mentioned above, this invention constructs a motion dispersion index for each pixel in the current frame's working area. This index analyzes the discrete characteristics of the motion direction of a single pixel and its neighboring pixels to pre-determine interference areas such as flying iron filings. Specifically, the determination logic is as follows: if the motion direction of a certain pixel and its neighboring pixels shows a multi-directional divergent distribution without a unified motion trend, then the area is determined to be a disordered motion area such as flying iron filings, i.e., it belongs to an environmental interference area.
[0041] In this embodiment of the invention, the working area in the real-time working image of the boring and milling machine in the current frame is denoted as the current frame working area; the difference between the horizontal coordinate of the i-th pixel in the current frame working area and the horizontal coordinate of the i-th pixel in the previous frame working area is denoted as the velocity component of the i-th pixel in the horizontal direction in the current frame working area; the difference between the vertical coordinate of the i-th pixel in the current frame working area and the vertical coordinate of the i-th pixel in the previous frame working area is denoted as the velocity component of the i-th pixel in the vertical direction in the current frame working area.
[0042] Obtain the motion dispersion index of each pixel in the current frame's job region:
[0043]
[0044] In the formula, This represents the motion dispersion index of the i-th pixel in the current frame's working region; This represents the number of neighboring pixels of the i-th pixel in the current frame's working region; This represents the horizontal velocity component of the i-th pixel in the current frame's working region; This represents the vertical velocity component of the i-th pixel in the current frame's working region; This represents the horizontal velocity component of the j-th neighboring pixel of the i-th pixel in the current frame's working region; This represents the vertical velocity component of the j-th neighboring pixel of the i-th pixel in the current frame's working region. Representing a minimal constant, to avoid the denominator being zero, in this embodiment of the invention, a preset value is used. The implementers can pre-set according to the specific implementation method. The value;
[0045] Based on the cosine similarity of the velocity components of the i-th pixel and its neighboring pixels, the consistency of a single pixel with its neighboring pixels in the direction of motion is quantified. When the i-th pixel and its neighboring pixels are completely aligned in the direction of motion... The closer the value is to 0, the more likely the i-th pixel belongs to the human body; when the i-th pixel and its neighboring pixels are not in the same direction of movement... The value is significantly greater than 0, and the i-th pixel may belong to an interference area such as iron filings.
[0046] It should be noted that motion dispersion can only determine the orderliness of moving targets from a single dimension. However, in actual boring and milling operations, there are many strong interference factors that cause traditional foreground detection algorithms to have a high false alarm rate, which cannot meet the needs of practical applications. Specifically, the high-pressure jetting behavior of coolant during the machining process not only causes the coolant and metal chips to move randomly, but also causes strong optical flickering. When the high-pressure emulsion flows and splashes, or when metal chips tumble and collide in the machining area, their surfaces will produce irregular refraction and reflection of the machine tool lighting light, which will cause the pixel grayscale value to change drastically in a short period of time. The instantaneous grayscale change value produced by this grayscale step can easily mask the true features of human skin texture, causing traditional foreground detection algorithms to mistakenly identify interference targets such as coolant or metal chips as human targets, which seriously affects the reliability of the detection system. Therefore, motion dispersion alone cannot completely suppress interference noise.
[0047] In real-world processing scenarios, iron filings and coolant not only move randomly, but also exhibit abrupt changes in grayscale due to reflections from the metal surface and refraction from the liquid, with pixels moving at relatively high instantaneous speeds. Therefore, in order to completely eliminate such dynamic background interference, this invention combines the chaotic movement of pixels, abrupt changes in brightness, and instantaneous movement speed to obtain the dynamic interference factor of each pixel in the current frame's working area, which is used to accurately distinguish between dynamic environmental interference targets and human targets.
[0048] In this embodiment of the invention, the dynamic interference factor of each pixel in the current frame's working region is obtained:
[0049]
[0050] In the formula, Represents the dynamic interference factor of the i-th pixel in the current frame's working region; This represents the horizontal velocity component of the i-th pixel in the current frame's working region; This represents the vertical velocity component of the i-th pixel in the current frame's working region; This represents the absolute value of the grayscale difference between the i-th pixel in the current frame's working region and the corresponding pixel in the background working region; Represents the logarithmic function;
[0051] It reflects the absolute value of the grayscale difference between the i-th pixel and the background working area in the current frame. The larger the value, the more likely the i-th pixel is caused by the reflection of iron filings and the refraction of liquid. This represents the instantaneous motion rate of the i-th pixel. A larger value indicates that the i-th pixel is more likely to be within the area of metal scraping. Therefore, when there is interference from high-speed metal scraping accompanied by drastic brightness changes, it leads to… The larger the value, the better. The larger the value;
[0052] The larger the value, the greater the motion dispersion index of the i-th pixel in the current frame's working area, and the more likely it is to belong to the area of metal scrap splashing.
[0053] It should be noted that because the pixels of iron filings or coolant have both high instantaneous movement speed and abrupt changes in grayscale, as well as extremely high motion dispersion, their superposition results in... A sharp increase; because the human body has extremely small motion dispersion, no matter how fast the instantaneous motion speed is, the result of multiplication is... It remains at a low level.
[0054] S003. The detection threshold for each pixel is adaptively obtained based on the dynamic interference factor of the pixel.
[0055] It should be noted that in the visual monitoring logic of the boring and milling machine tool's working area, the purity of the foreground target directly determines the reliability of subsequent target recognition. However, in real industrial processing environments, the working area acquired by the image sensor includes not only the human intrusion we are truly concerned about, but also a large number of interference areas caused by high-pressure emulsion spraying and high-temperature metal chip splashing. The foreground extraction in existing technologies usually relies on the background difference model, the core logic of which is to acquire the static working area. If a certain position in the current frame's working area has a large grayscale difference from the static working area, it is determined to be a foreground area. Therefore, the grayscale fluctuations in the interference area often form a large area of connected noise, causing it to be detected as a foreground area, resulting in the inability to distinguish between real human bodies and splashing iron chips based on the foreground area.
[0056] Therefore, this invention adaptively obtains the detection threshold of each pixel in the current frame's working area by using the dynamic interference factor of each pixel. If the dynamic interference factor is larger, it drives the final detection threshold to increase. This makes the grayscale change of iron filings unable to exceed the judgment line due to the dynamic increase of the threshold, and thus it is classified as a suppressed background. This ensures that the final output foreground area is highly pure in shape, providing a unique and high-quality data benchmark for subsequent accurate safety decisions.
[0057] In this embodiment of the invention, the detection threshold for each pixel in the current frame's working region is obtained:
[0058]
[0059] In the formula, This represents the detection threshold for the i-th pixel in the current frame's working region; This represents the set baseline detection threshold; Represents the dynamic interference factor of the i-th pixel in the current frame's working region; The gain factor represents the intensity of the influence of dynamic interference factors on the detection threshold. In this embodiment of the invention, a preset gain factor is used. In other embodiments, implementers may pre-set according to specific implementation conditions. The value; in this embodiment of the invention, a preset basic detection threshold is used. In other embodiments, implementers may pre-set according to specific implementation conditions. The value;
[0060] As the instantaneous motion rate of objects within the dynamic environmental interference area increases and brightness changes drastically, combined with the disordered nature of their motion, it leads to... The indicator shows a non-linear increase, making... The rapid approach to 1 leads to an increase in the final detection threshold. This means that the grayscale changes of iron filings that would normally trigger an alarm cannot exceed the threshold due to the dynamic increase in the threshold, and are thus classified as suppressed background. For human body areas with stable movement and stable brightness changes, the basic detection threshold is moderately raised to ensure capture sensitivity, thereby triggering accurate foreground separation.
[0061] S004. Target pixels are selected by comparing the pixel grayscale difference value with the detection threshold; clustering is performed on the target pixels to obtain clusters, and the machine tool safety status is determined based on the distance between the center of the cluster and the center of the spindle tool.
[0062] It should be noted that this invention filters target pixels by using grayscale differences and pixel monitoring thresholds, and then clusters them. The machine tool safety status is determined based on the Euclidean distance between the cluster center and the spindle tool center in the work area, thus achieving graded safety protection for boring and milling machine operations.
[0063] In this embodiment of the invention, the absolute value of the grayscale difference between the i-th pixel in the current frame operation area and the corresponding pixel in the background operation area is recorded as the grayscale difference value of the i-th pixel; if the grayscale difference value of the i-th pixel is greater than or equal to the detection threshold of the i-th pixel, the i-th pixel is recorded as the target pixel.
[0064] In the current frame's working area, based on the position coordinates of the target pixels, the DBSCAN clustering algorithm is used to cluster all target pixels in the current frame's working area to obtain several clusters;
[0065] Two preset safety threshold parameters are a1=500 mm and a2=1500 mm;
[0066] For any cluster, the cluster center of the cluster is converted into coordinates in the three-dimensional machine tool physical coordinate system. If the Euclidean distance between the coordinates and the spindle tool center in the three-dimensional machine tool physical coordinate system is less than or equal to the safety threshold parameter a1, the state of the boring and milling machine tool is switched to dangerous mode, thereby triggering a stop command.
[0067] If the Euclidean distance between the coordinates and the center of the spindle tool in the three-dimensional machine tool physical coordinate system is greater than the safety threshold parameter a1 and less than or equal to the safety threshold parameter a2, the boring and milling machine switches to warning mode and issues a warning signal indicating that a human body is approaching the tool; if the Euclidean distance between the coordinates and the center of the spindle tool in the three-dimensional machine tool physical coordinate system is greater than the safety threshold parameter a2, the boring and milling machine continues to operate without changing its state.
[0068] Figure 2 A schematic diagram showing the dynamic evolution of adaptive threshold under strong interference conditions on a boring and milling machine. Figure 2 The adaptive suppression threshold of this invention is based on a dynamic interference factor that adjusts a fixed threshold in real time. From frames 20 to 40, when human movement is detected, the threshold remains at a low baseline level because the dynamic interference factor approaches 0, ensuring sensitive detection of the human body. From frames 50 to 80, when a large number of randomly flying iron filings are detected, the dynamic interference factor drives the threshold to increase. This mechanism ensures that although the interference signal is strong, it cannot exceed the dynamically increased monitoring threshold and is thus correctly identified by the system as background noise and shielded, effectively filtering out more than 90% of false triggers. In contrast, the fixed threshold of existing technologies (such as the background difference method) is usually set to a constant threshold. It can be observed that from frames 50 to 80, even without a real human body, the difference in the original grayscale change still significantly exceeds the fixed threshold. This can cause the system to misjudge iron filings as human bodies, frequently triggering unnecessary machine tool emergency stops and seriously affecting production efficiency.
[0069] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for safety monitoring of the working area of a boring and milling machine tool based on video analysis, characterized in that, include: Real-time working images of a boring and milling machine are acquired and the working area is identified using a neural network. A mapping relationship between pixel coordinates and three-dimensional machine tool physical coordinates is established in the working area. Obtain the motion dispersion index of each pixel in the current frame's working region. ; This represents the number of neighboring pixels of the i-th pixel in the current frame's working region. This represents the horizontal velocity component of the i-th pixel in the current frame's working region. This represents the vertical velocity component of the i-th pixel in the current frame's working region. This represents the horizontal velocity component of the j-th neighboring pixel of the i-th pixel in the current frame's working region. The vertical velocity component of the j-th neighboring pixel of the i-th pixel in the current frame's working region; Represents a minimal constant; Obtain the dynamic interference factor of each pixel in the current frame's working region. ; This is the motion dispersion index of the i-th pixel in the current frame's working region; It is the absolute value of the grayscale difference between the i-th pixel in the current frame's working region and the corresponding pixel in the background working region; It is a logarithmic function; The detection threshold for each pixel in the current frame's working region is adaptively obtained using the dynamic interference factor. , The detection threshold for the i-th pixel in the current frame's working region; The set basic detection threshold; The dynamic interference factor of the i-th pixel in the current frame's working region; It is the gain factor; Based on the detection threshold, target pixels are selected and clustered to obtain clusters, including: the absolute value of the grayscale difference between the i-th pixel in the current frame operation area and the corresponding pixel in the background operation area is recorded as the grayscale difference value of the i-th pixel. If the grayscale difference value of the i-th pixel is greater than or equal to the detection threshold of the i-th pixel, the i-th pixel is recorded as the target pixel. In the current frame operation area, based on the position coordinates of the target pixel, the DBSCAN clustering algorithm is used to cluster all target pixels in the current frame operation area to obtain several clusters. The center of the cluster is mapped to the three-dimensional machine tool physical coordinate system, and the safety status of the boring and milling machine tool operation area is determined according to the Euclidean distance between the cluster and the spindle tool center.
2. The method for safety monitoring of the working area of a boring and milling machine tool based on video analysis according to claim 1, characterized in that, The acquisition of the velocity components includes: The working area in the real-time working image of the boring and milling machine in the current frame is denoted as the current frame working area; the difference between the horizontal coordinate of the i-th pixel in the current frame working area and the horizontal coordinate of the i-th pixel in the previous frame working area is denoted as the velocity component of the i-th pixel in the horizontal direction in the current frame working area; the difference between the vertical coordinate of the i-th pixel in the current frame working area and the vertical coordinate of the i-th pixel in the previous frame working area is denoted as the velocity component of the i-th pixel in the vertical direction in the current frame working area.
3. The method for safety monitoring of the working area of a boring and milling machine tool based on video analysis according to claim 1, characterized in that, The neighboring pixels of the i-th pixel in the current frame's working region include: The eight neighboring pixels of the i-th pixel in the current frame's working region are taken as the neighboring pixels of the i-th pixel in the current frame's working region.
4. The method for safety monitoring of the working area of a boring and milling machine tool based on video analysis according to claim 1, characterized in that, The acquisition of the background work area includes: An industrial camera is deployed above the working area of the boring and milling machine. During the stationary phase before the machine starts cutting, a static background image of the boring and milling machine without dynamic interference is acquired. The working area is then identified using a neural network, and the working area in the static background image of the boring and milling machine is recorded as the background working area.
5. The method for safety monitoring of the working area of a boring and milling machine tool based on video analysis according to claim 1, characterized in that, The step of mapping the center of the cluster to the three-dimensional machine tool physical coordinate system and determining the safety status of the boring and milling machine tool's working area based on the Euclidean distance between the cluster and the spindle tool center includes: Two safety threshold parameters a1 and a2 are preset. The cluster center of any cluster is converted into coordinates in the three-dimensional machine tool physical coordinate system. The Euclidean distance between the coordinates and the spindle tool center in the three-dimensional machine tool physical coordinate system is obtained and recorded as the first distance. If the first distance is less than or equal to the safety threshold parameter a1, the state of the boring and milling machine tool is switched to the dangerous mode and a stop command is triggered. If the first distance is greater than the safety threshold parameter a1 and less than or equal to the safety threshold parameter a2, the boring and milling machine switches to warning mode and issues a warning signal indicating that a human body is approaching the tool; if the first distance is greater than the safety threshold parameter a2, the boring and milling machine continues to operate without changing its state.
6. The method for safety monitoring of the working area of a boring and milling machine tool based on video analysis according to claim 1, characterized in that, The process of acquiring real-time working images of the boring and milling machine and using a neural network to identify the working area includes: An industrial camera is deployed above the working area of the boring and milling machine to capture real-time video of the machine when it starts cutting. FFmpeg technology is used to process the real-time video of the boring and milling machine into frames to obtain several frames of real-time working images. Each frame of the real-time working image is then input into a trained neural network to obtain the working area in each frame of the real-time working image.