A real-time tracking method for detecting the state of a split knife switch
Through real-time tracking and detection methods, video surveillance and edge detection technology are used to solve the problem of low accuracy in status detection of split knife gates in the existing technology, achieve higher detection accuracy and speed, and reduce the risk of arc generation.
Patent Information
- Application Number
- CN201910895609.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-21
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2039-09-21
AI Technical Summary
The real-time detection accuracy of the open knife gate status in the existing technology is low and cannot meet actual needs, especially when the background is complex, resulting in an increased risk of arc generation and equipment damage.
Using the real-time tracking detection method, each frame of image is obtained through video monitoring, the boundary line model of the knife gate arm is established, feature points are extracted, edge detection and angle calculation are performed, and the system error is estimated based on the center line to determine the status of the knife gate in real time, and through Feature point tracking improves positioning accuracy.
It improves the detection accuracy and speed of the split knife gate status, reduces the angle error, meets the needs of real-time detection, and ensures the safe and stable operation of the equipment.
Smart Images

Figure CN110675452B
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image recognition, and in particular to a real-time tracking method for detecting the state of a split knife switch. Background Art
[0002] The knife switch is a frequently used electrical appliance in high-voltage switchgear, and plays an isolating role in the circuit. In actual applications, due to the long-term operation of the knife switch, the knife switch may be closed or not opened properly, which will cause an arc between the left and right knife switch arms of the knife switch. The arc is a gas discharge phenomenon. The instantaneous spark generated by the current passing through certain insulating media may cause a fire or threaten personal safety. In addition, the arc temperature is extremely high, which can easily burn the insulating material, causing leakage events or damage to the knife switch equipment. Therefore, the closed state of the knife switch needs to be accurately detected.
[0003] In practice, the detection of the real-time status of the double-open knife switch mainly relies on manual observation; in the prior art, the status of the knife switch is also determined by calculating the angle between the left and right knife switch arms. At present, there are many calculation schemes for calculating the angle between the left and right knife switch arms at home and abroad. One is to modify the internal circuit and add sensors or signal lights; the other is a method based on digital image processing to judge the switch status of the knife switch by monitoring the image. In the method based on digital image processing, due to the complex background, the calculation accuracy of the angle between the left and right knife switch arms is low and the calculation speed is slow, which cannot meet the actual needs. Summary of the invention
[0004] In order to solve the problem of low accuracy in real-time detection of knife switch status in the prior art, the present invention proposes a real-time tracking detection method for the split knife switch status.
[0005] The technical solution of the present invention is achieved in this way:
[0006] A real-time tracking detection method for the state of a split knife switch comprises: collecting a real-time monitoring video of the split knife switch, obtaining each frame of the video and establishing a boundary line model of the knife switch arm of the model according to any frame of the video and saving it as a model file, and calculating the left midpoint, right midpoint, midpoint and midline of the knife switch arm according to the model file;
[0007] The first frame of the video is acquired and the knife gate therein is positioned, and the characteristic points of the knife gate arm in the first frame of the image that are conducive to tracking are extracted and recorded; the edge of the knife gate in the first frame of the image is detected according to the positioning result, and the final edge line of the left knife gate arm and the edge line of the right knife gate arm in the first frame of the image are determined, and then the initial angle between the left knife gate arm and the right knife gate arm is calculated, and the real-time state of the knife gate in the first frame of the image is determined;
[0008] Extract the feature points of the knife gate arm of the previous frame image, correspond them to the current frame image and obtain the positions of these feature points in the current frame image, track and locate the knife gate arm in the current frame image, perform edge detection on the knife gate in the current frame image according to the positioning result, determine the edge line of the left knife gate arm and the edge line of the right knife gate arm in the current frame image, and then calculate the initial angle between the left knife gate arm and the right knife gate arm;
[0009] According to the midline estimation system error, the correction angle between the left knife gate arm and the right knife gate arm in the current frame image is determined, and the real-time state of the knife gate in the current frame image is judged;
[0010] The next frame image is processed in the same way as the current frame image, until the knife switch stops moving, verifying the final state of the knife switch movement in the video.
[0011] Preferably, edge detection is performed on the knife gate in the first frame image according to the positioning result, and a specific method for determining the edge line of the left knife gate arm and the edge line of the right knife gate arm in the first frame image is:
[0012] Perform edge detection on the first frame image according to the positioning result to obtain an edge line set; directly correspond the left midpoint, right midpoint and center line of the knife gate arm in the model file to the first frame image, calculate the distance from the left midpoint and right midpoint of the knife gate arm in the first frame image to each edge line in the edge line set, remove the edge lines corresponding to the distances that are not within the threshold range, and obtain an updated edge line set;
[0013] The updated edge line set is divided into left and right parts using the center line, and the left knife gate arm edge line set and the right knife gate arm edge line set are obtained and symmetrically paired to determine the final left knife gate arm edge line and right knife gate arm edge line of the first frame image.
[0014] Preferably, the specific method for tracking and locating the knife gate arm in the current frame image is: the feature points in the previous frame image are corresponding to the tracking points in the current frame image, and the displacements dx and dy in the x and y directions between the feature points in the previous frame image and the tracking points in the current frame image are calculated;
[0015] Traverse all corresponding feature points and tracking point pairs in the previous frame and the current frame image, give a displacement threshold, remove the tracking points whose dx and dy are not within the given displacement threshold range, update the tracking points and record them;
[0016] Given a number threshold, if the number of updated tracking points is less than the number threshold, then add the currently non-existent detectable tracking points in the current frame image, update the tracking points again and record them; traverse all tracking points in the current frame image, record the current position of the tracking point as the end point end, and the position of the tracking point when it first appears in the previous frame image as the starting point start, and the movement amount of the tracking point in the current frame image is shift = abs(end.x-start.x)+abs(end.y-start.y), where end.x and end.y represent the x and y coordinates of the end point, and start.x and start.y represent the x and y coordinates of the starting point;
[0017] Calculate the equation of the straight line where the left and right midpoints of the knife gate arm in the current frame image are located, and record it as the baseline y=k_base*x+b_base; traverse the end points of all tracking points, if end.y<=k_base*end.x+ b_base, then the end point is above the baseline, otherwise it is below the baseline, and count the number of end points on the upper and lower sides of the baseline and the average movement respectively;
[0018] The relatively large average movement is the final average movement, and the number of tracking points corresponding to it is recorded;
[0019] Given a moving threshold, if the product of the final average movement and the corresponding number of tracking points is less than or equal to the moving threshold, it means that the knife gate has just started to move or has not started to move, and the knife gate arm of the current frame is tracked and located according to the position of the knife gate arm in the previous frame image; if the product of the final average movement and the corresponding number of tracking points is greater than the moving threshold, the left knife gate arm angle and the right knife gate arm angle of the knife gate in the current frame image are estimated respectively, and the knife gate arm of the current frame is tracked and located in combination with the tracking points.
[0020] Preferably, the specific method of "estimating the left blade arm angle and the right blade arm angle of the blade in the current frame image" is:
[0021] Calculate the unit direction vector baseN which is perpendicular to the center line and points to the right or left, starting from the midpoint of the line connecting the left and right midpoints of the knife gate arm. Calculate the vector vec corresponding to the end point and the starting point of each tracking point in the current frame image. For the unit direction vector pointing to the left, if baseN*vec is greater than or equal to 0, the current tracking point is the left knife gate arm tracking point, otherwise it is the right knife gate arm tracking point; for the unit direction vector pointing to the right, if baseN*vec is greater than or equal to 0, the current tracking point is the right knife gate arm tracking point, otherwise it is the left knife gate arm tracking point, so as to obtain all the left knife gate arm tracking points and the right knife gate arm tracking points;
[0022] For all left knife gate arm tracking points, calculate the distance from each left knife gate arm tracking point to the left midpoint, count the number of tracking points corresponding to the same distance into a left distance distribution histogram, set the left distance threshold according to the left distance distribution histogram, eliminate the tracking points whose distance to the left midpoint is less than the given threshold, update the left knife gate arm tracking points, and count the right distance distribution histogram in the same way to update the right knife gate arm tracking points; traverse the updated left knife gate arm tracking points, and calculate the angle between each knife gate arm tracking point and the line segment where the left midpoint is located and the baseline, calculate the average angle of all left knife gate arm tracking points and the baseline as the estimated left knife gate arm angle of the current frame image, and obtain the estimated right knife gate arm angle of the current frame image in the same way.
[0023] Preferably, edge detection is performed on the knife gate in the current frame image according to the positioning result to determine the left knife gate arm edge line and the right knife gate arm edge line in the current frame image in the same manner as the left knife gate arm edge line set and the right knife gate arm edge line set in the first frame image;
[0024] Traverse the left gate arm edge line set of the current frame image, give a left angle threshold, if the left gate arm edge line angle is greater than the sum of the estimated left gate arm angle of the current frame image and the left angle threshold, or is less than the estimated difference between the left gate arm angle of the current frame image and the left angle threshold, then remove the left gate arm edge line and obtain an updated left gate arm edge line set; traverse the right gate arm edge line set, give a right angle threshold, if the right gate arm edge line angle is greater than the sum of the estimated right gate arm angle of the current frame image and the right angle threshold, or is less than the estimated difference between the right gate arm angle of the current frame image and the right angle threshold, then remove the right gate arm edge line and obtain an updated right gate arm edge line set;
[0025] The updated left knife gate arm edge line set and the updated right knife gate arm edge line set are symmetrically paired to determine the final left knife gate arm edge line and right knife gate arm edge line in the current frame image.
[0026] Preferably, the specific method of determining the correction angle between the left knife gate arm and the right knife gate arm in the current frame image according to the midline estimation system error is:
[0027] Calculate the angles between the final left and right knife gate arm edge lines in the current frame image and the previous frame image in the real-time video and the straight line where the closed state knife gate arm is located, set the angle between the final left knife gate arm edge line in the current frame image and the straight line where the closed state knife gate arm is located to α1, the angle between the final right knife gate arm edge line and the straight line where the closed state knife gate arm is located to γ1, the angle between the final left knife gate arm edge line in the previous frame image and the straight line where the closed state knife gate arm is located to α2, the angle between the final right knife gate arm edge line and the straight line where the closed state knife gate arm is located to γ2, and record the system error as noise = |(α1-α2)-(γ1-γ2)|; Combined with the system error, determine the correction angle between the left and right knife gate arms in the current frame as θ correct =|γ1-α1|+noise, the correction angle is the angle between the left knife gate arm and the right knife gate arm in the second frame image.
[0028] Preferably, the specific method of determining the real-time state of the knife switch in the first frame image is:
[0029] According to user needs, two thresholds To and Tc for the "open" and "closed" states of the split knife switch are given;
[0030] If the angle between the left gate arm and the right gate arm is greater than To, the gate in the first frame image is judged to be in an open state. If the actual angle between the left gate arm and the right gate arm is less than Tc, the gate in the first frame image is judged to be in a closed state. If the actual angle between the left gate arm and the right gate arm is between To and Tc, the gate in the first frame image is judged to be in a virtually closed state.
[0031] Preferably, the specific method of judging the real-time state of the knife switch in the current frame image is:
[0032] According to user needs, two thresholds To and Tc of the "open" and "closed" states of the split knife switch are given, and the high threshold hT-o and the low threshold lT-o of the open state are set, and To is between the high threshold hT-o and the low threshold lT-o, hT-o>To>lT-o; the high threshold hT-c and the low threshold lT-c of the closed state are set, and Tc is between the high threshold hT-c and the low threshold lT-c, hT-c>Tc>lT-c, and lT-o>hT-c;
[0033] If the correction angle between the left knife gate arm and the right knife gate arm is greater than hT-o, it is determined that the knife gate in the current frame image is in an open state; if the correction angle between the left knife gate arm and the right knife gate arm is less than lT-c, it is determined that the knife gate in the current frame image is in a closed state; if the correction angle between the left knife gate arm and the right knife gate arm is between hT-c and lT-o, it is determined that the knife gate in the current frame image is in a virtual closed state; if the correction angle between the left knife gate arm and the right knife gate arm is between lT-o and hT-o or between lT-c and hT-c, it is determined that the knife gate state in the current frame image is the same as the state of the knife gate in the previous frame image.
[0034] Preferably, until the knife switch stops moving, the specific method of verifying the final state of the knife switch movement in the video is: determine the real-time state of the knife switch in each continuous frame image and record it; given a continuous frame number threshold, if the knife switch state in the continuous frame image remains unchanged, and the continuous frame number is greater than the continuous frame number threshold, it indicates that the knife switch maintains the same state, and the knife switch stops moving;
[0035] If the initial state of the knife switch is open, and it is closed when the final state is verified, the operation is completed. If it is a virtual closed state when the final state is verified, an alarm will be triggered and the staff will be asked to manually confirm and handle it; if the initial state of the knife switch is closed, and it is open when the final state is verified, the operation is completed. If it is a virtual closed state when the final state is verified, an alarm will be triggered and the staff will be asked to manually confirm and handle it; if the initial state of the knife switch is a virtual closed state, and it is closed or open when the final state is verified, the operation is completed. If it is a virtual closed state when the final state is verified, an alarm will be triggered and the staff will be asked to manually confirm and handle it.
[0036] The beneficial effects of the present invention are as follows: the detection method of the state of the split knife gate of the present invention for real-time tracking corresponds the left midpoint, right midpoint, midpoint and midline of the knife gate arm in the model file to the target image as a reference, so as to facilitate the subsequent processing of the target image. The positioning method of the knife gate arm in the first frame image is different from the positioning method of the knife gate arm in the remaining frame images. By extracting the feature points of the knife gate in the first frame image that are conducive to tracking, when processing the subsequent frame images, real-time tracking is achieved by tracking the feature points, and the knife gate arms in the remaining frame images are positioned, which helps to improve stability and positioning accuracy.
[0037] When determining the edge line of the left gate arm and the right gate arm, the left gate arm angle and the right gate arm angle are estimated by tracking points, and then the left gate arm edge line set and the right gate arm edge line set are screened and eliminated again according to the estimated left gate arm angle and the right gate arm angle, so as to further improve the accuracy of determining the edge line of the left gate arm and the right gate arm edge line.
[0038] In actual use, through real-time tracking, the knife switch in each frame of the image can be accurately located, the detection speed can be improved, and the needs of real-time detection in practice can be met. The correction angle between the knife switch arms in each frame of the image except the first frame is obtained according to the centerline estimation system error, the angle error is reduced, the real-time state of the knife switch in each frame of the image is judged in real time, the final state of the knife switch movement in the video is verified, and the real-time detection accuracy is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0040] Figure 1 It is the first frame image in the real-time video of the present invention.
[0041] In the figure:
[0042] 1. Left knife gate arm; 2. Right knife gate arm. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] Example 1: Figure 1As shown, a real-time tracking detection method for the state of a split knife gate comprises: collecting real-time monitoring video of the split knife gate, obtaining each frame of the video and establishing a boundary line model of the knife gate arm of this model according to any frame of the video and saving it as a model file, and calculating the left midpoint, right midpoint, midpoint and midline of the knife gate arm according to the model file; obtaining the first frame of the video and locating the knife gate therein, and extracting and recording the feature points of the knife gate arm in the first frame that are conducive to tracking; performing edge detection on the first frame of the video according to the result of the above positioning, obtaining an edge line set, calculating the distance from the left midpoint of the left knife gate arm 1 and the right midpoint of the right knife gate arm 2 in the first frame to each edge line in the edge line set, eliminating the edge lines corresponding to the distances that are not within the threshold range, and obtaining an updated edge line set; using the midline to distinguish the updated edge line set from left to right, respectively obtaining the left knife gate arm edge line set and the right knife gate arm edge line set and performing symmetrical pairing, and determining the final left knife gate arm edge line and right knife gate arm edge line, Calculate the initial angle between the left knife gate arm and the right knife gate arm to determine the real-time state of the knife gate in the first frame image; Extract the feature points of the knife gate arm of the previous frame image, correspond them to the current frame image and obtain the positions of these feature points in the current frame image, track and locate the knife gate arm in the current frame image, perform edge detection on the knife gate in the current frame image according to the positioning result, obtain an edge line set, calculate the distance from the left midpoint and the right midpoint of the knife gate arm in the current frame image to each edge line in the edge line set, eliminate the edge lines corresponding to the distances that are not within the threshold range, and obtain an updated edge line set; use the center line to distinguish the updated edge line set from left to right, obtain the left knife gate arm edge line set and the right knife gate arm edge line set respectively and perform symmetrical pairing, determine the final left knife gate arm edge line and right knife gate arm edge line in the current frame image, and then calculate the initial angle between the left knife gate arm and the right knife gate arm, estimate the system error according to the center line, determine the corrected angle between the left knife gate arm and the right knife gate arm in the current frame image, and judge the real-time state of the knife gate in the current frame image; process the next frame image in the same way as processing the current frame image until it is detected that the knife gate stops moving, and verify the final state of the knife gate movement in the video.
[0045] The positioning method of the first frame image is different from that of other frames. The positioning method of other frames is to use feature point tracking and positioning. The method of positioning the knife switch in the first frame image is: obtain sample images of split knife switches through various means, use deep learning to train sample images with the knife switch arm area marked to obtain a training model, use the training model to detect the first frame image of the video, obtain all the knife switch areas and knife switch states in the first frame image, and locate the knife switch in the first frame image in combination with the model file. Classic machine vision algorithms can also be used to eliminate interference areas based on the shape, color, and size ratio characteristics of the knife switch, obtain the area where the knife switch arm is located, and realize knife switch positioning.
[0046] In the first frame image, edge detection is performed on the knife gate in the first frame image according to the positioning result. The specific method for determining the edge line of the left knife gate arm and the right knife gate arm in the first frame image is as follows: edge detection is performed on the first frame image according to the positioning result to obtain an edge line set; the left midpoint and the right midpoint of the knife gate arm calculated according to the model file are directly matched to the first frame image, and the distance from the left midpoint and the right midpoint of the knife gate arm in the first frame image to each edge line in the edge line set is calculated, and the edge lines corresponding to the distances that are not within the threshold range are eliminated to obtain an updated edge line set; the updated edge line set is distinguished by the center line to the left and right, and the left knife gate arm edge line set and the right knife gate arm edge line set are respectively obtained and symmetrically paired to determine the final left knife gate arm edge line and the right knife gate arm edge line of the first frame image.
[0047] The specific process of locating the knife switch in the first frame image in combination with the model file is as follows: all the knife switch areas in the first frame image and the knife switch states corresponding to each knife switch area have been obtained according to the training model; the corresponding area for the knife switch in the "closed" and "virtually closed" states is the overall rectangular frame area containing the left and right knife switch arms; the corresponding area for the knife switch in the "open" state is the left rectangular frame area containing the left knife gate arm and the right rectangular frame area containing the right knife gate arm; for the knife switch in the "closed" and "virtually closed" states, the contact point position rectangular frames of the left and right knife gate arms are obtained at the same time; the closed rectangular frame area of the knife switch in the closed state is obtained according to the model file, and all the overall rectangular frame areas existing in the above-mentioned first frame image are calculated, The overlapping areas of the left rectangular frame area and the right rectangular frame area with the closed rectangular frame area respectively; traverse the areas where all the knife gates in the "closed" and "virtually closed" states in the first frame image are located, and obtain the area containing the left midpoint and the right midpoint and with the largest overlapping area as the final overall area of the left and right knife gate arms, and at the same time calculate the center point of the rectangular frame of the contact point position of the left and right knife gate arms and record it as the contact point, with the central straight line passing through the contact point and parallel to the short side of the rectangular frame of the overall area of the left and right knife gate arms as the boundary, the left rectangular frame is the left knife gate arm rectangular frame, and the right rectangular frame is the right knife gate arm rectangular frame, so as to realize the positioning of the knife gate in the "closed" or "virtually closed" state in the first frame image;
[0048] If there is no area containing the left midpoint and the right midpoint and with the largest overlapping area, it means that the current state of the knife gate to be detected is not a "closed" or "virtually closed" state. The knife gate positioning is realized from all the knife gates in the "open" state. Given an overlapping area threshold, the areas where all knife gates in the "open" state and whose overlapping areas are greater than the overlapping area threshold in the first frame image are traversed, and the area containing the left midpoint and with the largest overlapping area is obtained, which is recorded as the first open left knife gate arm area; the area containing the right midpoint and with the largest overlapping area is obtained, which is recorded as the first open right knife gate arm area; the areas where all knife gates in the "open" state in the first frame image and whose overlapping areas are less than or equal to the overlapping area threshold are traversed, and the first two areas containing the left midpoint and with the largest overlapping area are obtained, which are recorded as the left knife gate arm matching areas; the first two areas containing the right midpoint and with the largest overlapping area are obtained, which are recorded as the right knife gate arm matching areas; the 4 The distances from the four vertices to the left midpoint are calculated and the left minimum distance is selected. The two left minimum distances are compared and the left gate arm matching area corresponding to the smaller left minimum distance is recorded as the second open left gate arm area; the distances from the four vertices to the right midpoint of any right gate arm matching area are calculated and the right minimum distance is selected. The two right minimum distances are compared and the right gate arm matching area corresponding to the smaller right minimum distance is recorded as the second open right gate arm area; given a gate arm area threshold, the first open left gate arm area greater than the gate arm area threshold is recorded as the final left gate arm area, otherwise the second open left gate arm area greater than the gate arm area threshold is recorded as the final left gate arm area; the first open right gate arm area greater than the gate arm area threshold is recorded as the final right gate arm area, otherwise the second open right gate arm area greater than the gate arm area threshold is recorded as the final right gate arm area, so as to realize the positioning of the gate in the "open" state in the first frame image.
[0049] The tracking and positioning method for other frame images except the first frame image is explained by taking the tracking and positioning of the knife gate arm in the current frame image as an example: the feature points in the previous frame image correspond to the tracking points in the current frame image, and the displacement dx and dy in the x and y directions of the feature points in the previous frame image and the tracking points in the current frame image are calculated; all corresponding feature point and tracking point pairs in the previous frame image and the current frame image are traversed, and a displacement threshold is given, and the tracking points whose dx and dy are not within the given displacement threshold range are eliminated, and the tracking points are updated and recorded; a number threshold is given, and if the number of tracking points after update is less than the number threshold, then the currently non-existent detectable tracking points are added to the current frame image, and the tracking points are updated and recorded again; all tracking points in the current frame image are traversed, and the current position of the tracking point is recorded as the end point end, and the position of the tracking point when it first appears in the previous frame image is recorded as the starting point start, and the movement of the tracking point in the current frame image is shift = abs(end.x-start.x)+abs(end.y-start.y), where end.x and end.y represent the x and y coordinates of the end point, and start.x and start.y represent the x and y coordinates of the starting point; calculate the equation of the straight line where the left and right midpoints of the knife gate arm in the current frame image are located, and record it as the baseline y=k_base*x+b_base; traverse the end points of all tracking points, if end.y<=k_base*end.x+ b_base, then the end point is above the baseline, otherwise it is below the baseline, and count the number of end points on the upper and lower sides of the baseline and the average movement respectively; the relatively large average movement is the final average movement, And record the number of tracking points corresponding to it; given a moving threshold, if the product of the final average movement and the corresponding number of tracking points is less than or equal to the moving threshold, it means that the knife switch has just started to move or has not started to move, and the knife switch arm of the current frame is tracked and located according to the position of the knife switch arm in the previous frame image; if the product of the final average movement and the corresponding number of tracking points is greater than the moving threshold, the left knife gate arm angle and the right knife gate arm angle of the knife switch in the current frame image are estimated respectively, and the knife gate arm of the current frame is tracked and located in combination with the tracking points.
[0050] During tracking and positioning, the switch arm is moving, while the left and right insulators are fixed. The movement of the switch arm is estimated based on the position change information of the feature points that are conducive to tracking. When the switch arm moves significantly, the angles of the left and right switch arms are estimated to improve the accuracy of the estimation.
[0051] The specific method of "estimating the left and right blade arm angles of the blade in the current frame image" is: Calculate the unit direction vector baseN which is perpendicular to the center line and to the right or left with the midpoint of the line connecting the left and right midpoints of the knife gate arm as the starting point, calculate the vector vec corresponding to the end point and the starting point of each tracking point in the current frame image, for the unit direction vector to the left, if baseN*vec is greater than or equal to 0, the current tracking point is the left knife gate arm tracking point, otherwise it is the right knife gate arm tracking point; for the unit direction vector to the right, if baseN*vec is greater than or equal to 0, the current tracking point is the right knife gate arm tracking point, otherwise it is the left knife gate arm tracking point, so as to obtain all the left knife gate arm tracking points and the right knife gate arm tracking points; for all the left knife gate arm tracking points, calculate the distance from each left knife gate arm tracking point to the left midpoint, count the number of tracking points corresponding to the same distance into the left distance distribution histogram, set the left distance threshold according to the left distance distribution histogram, eliminate the tracking points whose distance to the left midpoint is less than the given threshold, and update the left knife gate arm tracking point. In the same way, the right distance distribution histogram is counted to update the right knife gate arm tracking point; the updated left knife gate arm tracking points are traversed, and the angle between each left knife gate arm tracking point and the line segment where the left midpoint is located and the baseline is calculated, and the average angle of the angles between all left knife gate arm tracking points and the baseline is calculated to be the estimated left knife gate arm angle of the current frame image; the estimated right knife gate arm angle of the current frame image is obtained in the same way.
[0052] The specific method of judging the real-time state of the knife switch in the first frame image is as follows: two threshold values To and Tc of the "open" and "closed" states of the split knife switch are given according to user requirements; if the angle between the left knife switch arm and the right knife switch arm is greater than To, the knife switch in the first frame image is judged to be in an open state; if the angle between the left knife switch arm and the right knife switch arm is less than Tc, the knife switch in the first frame image is judged to be in a closed state; if the actual angle between the left knife switch arm and the right knife switch arm is between To and Tc, the knife switch in the first frame image is judged to be in a virtual closed state. The state of the knife switch in the first frame image is recorded as the initial state of the knife switch.
[0053] Embodiment 2: On the basis of embodiment 1, in the current frame image, interference edge lines of the left knife gate arm edge line set and the right knife gate arm edge line set are eliminated, and the edge of the knife gate therein is detected according to the positioning result in the current frame image to determine the left knife gate arm edge line and the right knife gate arm edge line in the current frame image. The specific method is as follows: the left knife gate arm edge line set and the right knife gate arm edge line set in the current frame image are obtained in the same way as the left knife gate arm edge line set and the right knife gate arm edge line set in the first frame image; the left knife gate arm edge line set of the current frame image is traversed, and a left angle threshold is given. If the angle of the left knife gate arm edge line is greater than the estimated angle of the left knife gate arm of the current frame image and the left angle of the left knife gate arm, the left knife gate arm edge line set is removed. If the angle of the right knife gate arm edge line is greater than the sum of the estimated right knife gate arm angle of the current frame image and the right angle threshold, or is less than the difference between the estimated right knife gate arm angle of the current frame image and the left angle threshold, then the left knife gate arm edge line is removed to obtain an updated left knife gate arm edge line set; traverse the right knife gate arm edge line set, give the right angle threshold, if the right knife gate arm edge line angle is greater than the sum of the estimated right knife gate arm angle of the current frame image and the right angle threshold, or is less than the difference between the estimated right knife gate arm angle of the current frame image and the right angle threshold, then the right knife gate arm edge line is removed to obtain an updated right knife gate arm edge line set; symmetrically pair the updated left knife gate arm edge line set and the updated right knife gate arm edge line set to determine the final left knife gate arm edge line and right knife gate arm edge line in the current frame image.
[0054] In Example 2, the interfering edge lines in the left gate arm edge line set and the right gate arm edge line set in the current frame image are eliminated again to further improve the efficiency and accuracy of confirming the final left gate arm edge line and right gate arm edge line.
[0055] In Example 2, the estimated left gate arm angle of the current frame image and the estimated right gate arm angle of the current frame image are close to the actual left gate arm edge line angle and the actual right gate arm edge line angle, respectively. If the current left gate arm edge line angle and the right gate arm edge line angle are significantly different from the estimated left gate arm angle and the right gate arm angle of the current frame image, respectively, it indicates that the current left gate arm edge line and the right gate arm edge line are not the actual left gate arm edge line and the actual right gate arm edge line. These edge lines are removed, which reduces the amount of calculation for symmetrical pairing of the left gate arm edge line set and the right gate arm edge line set, while increasing accuracy.
[0056] In the above embodiment, the method of "establishing the boundary line model of the knife switch arm of this model according to any frame image of the video and saving it as a model file" is: set a program on the computer, use the program to open any frame image of the video and stroke the upper and lower boundary lines of the knife switch arm therein, draw the left insulator center line and the right insulator center line, and save the line segment endpoint coordinates corresponding to the stroke and the line segment endpoint coordinates corresponding to the left and right insulator center lines as a model file; if the knife switch in any of the above frame images is in a closed state, stroke the upper and lower boundaries of the entire knife switch arm; if the knife switch in any of the above frame images is in an open or virtual closed state, stroke according to the actual upper and lower boundaries of the left knife switch arm and the upper and lower boundaries of the right knife switch arm. The recognition of the state of the knife switch in the frame image for establishing the model file is manual recognition. When establishing the model file and using the training model to obtain the knife switch state, the closed state of the knife switch refers to the left and right knife switch arms being in the same straight line, the virtual closed state refers to the left and right knife switch arms being in contact but not in the same straight line, and the open state refers to the left and right knife switch arms being in contact. The knife switch state here is general, and is different from the real-time state of the knife switch obtained according to the angle between the knife switch arms. The real-time state of the knife switch obtained according to the angle between the knife switch arms is the final state of the knife switch in each frame image.
[0057] In the above embodiment, the method of "calculating the left midpoint, right midpoint and midpoint of the knife gate arm according to the model file" is:
[0058] According to the model file, two intersection points of the upper and lower boundary line extension lines of the top and bottom ends of the integral knife switch arm and the left insulator center line extension line are obtained respectively, which are recorded as two left end points; two intersection points of the upper and lower boundary line extension lines of the top and bottom ends of the integral knife switch arm and the right insulator center line extension line are obtained, which are recorded as two right end points; the left midpoint and the right midpoint are obtained according to the two left end points and the two right end points;
[0059] In the closed state, the midpoint of the line segment between the left midpoint and the right midpoint is the midpoint of the knife gate arm, or the midpoint of the closed frame formed by the two left endpoints and the two right endpoints is the midpoint of the knife gate arm; in the virtual closed or open state, the midpoint of the line segment between the left midpoint and the right midpoint is the midpoint of the knife gate arm, or the midpoint of the closed frame formed by the two left endpoints and the two right endpoints is the midpoint of the knife gate arm.
[0060] The left midpoint, right midpoint and midpoint of the knife gate arm are fixed and unchanged. The left midpoint, right midpoint and midpoint of the knife gate arm calculated according to the model file directly correspond to any frame image of the video.
[0061] In the above embodiment, the method of "calculating the center line of the knife gate arm according to the model file" is: mark the image used when establishing the model file as the template image, when the knife gate is in the closed state, obtain the distortion coefficient of the camera that collects the video, and calculate the camera matrix camera_matrix = [focal_length, 0, center.x; 0, focal_length, center.y; 0, 0, 1], where focal_length is the width of the template image, center.x and center.y are the x-coordinate and y-coordinate of the midpoint of the template image respectively; the coordinate position of the camera relative to the knife gate during acquisition is obtained according to the two left endpoints, the two right endpoints, the distortion coefficient and the camera matrix, the projection direction of the camera's Z axis on the template image is the centerline direction of the knife gate arm, and the centerline of the knife gate arm is determined in combination with the midpoint of the knife gate arm; when the knife gate arm is virtually closed or open, the left centerline is obtained according to the average slope of the left midpoint and the upper and lower boundary lines of the left knife gate arm, and the right centerline is obtained according to the average slope of the right midpoint and the upper and lower boundary lines of the right knife gate arm, and the left centerline and the right centerline are extended to form an intersection; the line passing through the intersection and the midpoint is the centerline of the knife gate arm.
[0062] In the above embodiment, the left midpoint and the right midpoint of the split knife gate calculated according to the model file are matched to the first frame image, and the left midpoint and the right midpoint of the knife gate arm of the first frame image are obtained. The distance from the left midpoint and the right midpoint of the knife gate arm in the first frame image to each edge line in the edge line set is calculated, and the edge lines corresponding to the distances not within the threshold range are eliminated to obtain the updated edge line set. The method for obtaining the updated edge line set in each frame image is the same as the method for obtaining the updated edge line set in the first frame image.
[0063] In the above embodiment, the specific method of "using the center line to distinguish the updated edge line set from the left and right, and respectively obtaining the left knife gate arm edge line set and the right knife gate arm edge line set" is: the center line calculated according to the model file is matched to the current frame image, and a unit direction vector perpendicular to the center line in the direction to the left or right is calculated on the current frame image with the midpoint as the starting point. Traverse and update the edge lines in the edge line set, record the two endpoints of any edge line as T1 and T2, and record the vector between T1 and the midpoint as The vector between T2 and the midpoint is denoted by calculate and For a unit direction vector pointing to the right like Then T1 is on the right side of the midline, otherwise it is on the left side of the midline. Then T2 is on the right side of the midline, otherwise on the left side of the midline; for a unit direction vector pointing to the left like Then T1 is on the left side of the midline, otherwise it is on the right side of the midline; if Then T2 is on the left side of the center line, otherwise it is on the right side of the center line; if T1 and T2 are both on the left side of the center line, then the edge line is the left-left knife gate arm edge line, if T1 and T2 are both on the right side of the center line, then the edge line is the right-left knife gate arm edge line, if T1 and T2 are respectively on both sides of the center line, calculate the length of the left and right line segments of the edge line with the center line as the dividing line, and the edge line is the edge line on the longer side of the left and right side segments; in this way, the left knife gate arm edge line set and the right knife gate arm edge line set are obtained.
[0064] The method of “symmetrically pairing the left knife gate arm edge line set and the right knife gate arm edge line set to determine the left knife gate arm edge line and the right knife gate arm edge line” is as follows: given an angle threshold, the angle of any edge line in the left knife gate arm edge line set relative to the horizontal position is recorded as M h , h represents different left knife gate arm edge lines, any two left knife gate arm edge lines whose angle difference is within the angle threshold are divided into the same group, and the left knife gate arm edge lines in the same group are sorted from long to short; for any edge line in the right knife gate arm edge line set, the angle relative to the horizontal position is recorded as N m , m represents different right gate arm edge lines, divide any two right gate arm edge lines whose angle difference is within the angle threshold into the same group, and sort the right gate arm edge lines in the same group from long to short; traverse all the same groups of the left gate arm edge line set and all the same groups of the right gate arm edge line set and pair them one by one, calculate the corrected gate arm edge lines and pairing scores of any two groups, and the corrected left gate arm edge line and the corrected right gate arm edge line corresponding to the combination with the highest score are the final left gate arm edge line and right gate arm edge line.
[0065] The method of "traversing all the same groups of the left knife gate arm edge line set and all the same groups of the right knife gate arm edge line set and pairing them one by one, and calculating the corrected knife gate arm edge lines and pairing scores of any two groups" is as follows: traverse all the same groups of the left knife gate arm edge line set and all the same groups of the right knife gate arm edge line set, calculate the average angle of each group, the average angle of each group of the left knife gate arm edge line set is combined with the left midpoint to obtain the corrected left knife gate arm edge line of each group of the left knife gate arm edge line set, and the intersection point of the corrected left knife gate arm edge line and the midline is recorded as point A; the average angle of each group of the right knife gate arm edge line set is combined with the right midpoint to obtain the corrected right knife gate arm edge line of each group of the right knife gate arm edge line set, and the intersection point of the corrected right knife gate arm edge line and the midline is recorded as point B, and the distance d between point A and point B is calculated AB ; The distance between the left and right midpoints of the knife switch arm is d0, d ABThe smaller / d0 is, the greater the probability that the paired corrected left knife gate arm edge line and corrected right knife gate arm edge line are the actual left knife gate arm edge line and the actual right knife gate arm edge line. AB / d0>0.5, then the group where point A is located and the group where point B is located are eliminated; the calculation formula for the pairing score of any two groups is set as The coefficient S L S represents the sum of the squares of the lengths of any edge line in the same group of the left knife gate arm edge line set; R represents the sum of the squares of the lengths of any edge lines in the same group of the right knife gate arm edge line set; β is an adjustable sensitivity parameter; the corrected left knife gate arm edge line at point A and the corrected right knife gate arm edge line at point B corresponding to the highest pairing score S are the final left knife gate arm edge line and right knife gate arm edge line.
[0066] In the above embodiment, the specific method of calculating the initial angle between the left gate arm and the right gate arm is: taking the final left gate arm edge line and the right gate arm edge line as the reference, if the final angle of the left gate arm edge line relative to the straight line where the closed gate arm is located is α, and the final angle of the right gate arm edge line relative to the straight line where the closed gate arm is located is γ, the final angle between the left gate arm edge line and the right gate arm edge line is θ=|γ-α|, and the angle between the left gate arm and the right gate arm is θ=|γ-α|.
[0067] In the above embodiment, the specific method of determining the correction angle between the left and right blade gate arms in the current frame image according to the midline estimation system error is as follows: calculate the angles between the final left blade gate arm edge line and the right blade gate arm edge line in the current frame image and the previous frame image in the real-time video and the straight line where the closed state blade gate arm is located, set the angle between the final left blade gate arm edge line in the current frame image and the straight line where the closed state blade gate arm is located to α1, the angle between the final right blade gate arm edge line and the straight line where the closed state blade gate arm is located to γ1, the angle between the final left blade gate arm edge line in the previous frame image and the straight line where the closed state blade gate arm is located to α2, the angle between the final right blade gate arm edge line and the straight line where the closed state blade gate arm is located to γ2, and record the system error as noise=|(α1-α2)-(γ1-γ2)|; combined with the system error, determine the correction angle between the left and right blade gate arms in the current frame to be θ correct =|γ1-α1|+noise, the correction angle is the angle between the left knife gate arm and the right knife gate arm in the second frame image.
[0068] The specific method for judging the real-time state of the knife switch in the current frame image is as follows: according to user needs, two thresholds To and Tc for the "open" and "closed" states of the split knife switch are given, and the high threshold hT-o and the low threshold lT-o of the open state are set, and To is between the high threshold hT-o and the low threshold lT-o, hT-o>To>lT-o; the high threshold hT-c and the low threshold lT-c of the closed state are set, and Tc is between the high threshold hT-c and the low threshold lT-c, hT-c>Tc>lT-c, and lT-o>hT-c, and the low threshold of the open state is higher than the high threshold of the closed state;
[0069] If the correction angle between the left knife gate arm and the right knife gate arm is greater than hT-o, it is determined that the knife gate in the current frame image is in an open state; if the correction angle between the left knife gate arm and the right knife gate arm is less than lT-c, it is determined that the knife gate in the current frame image is in a closed state; if the correction angle between the left knife gate arm and the right knife gate arm is between hT-c and lT-o, it is determined that the knife gate in the current frame image is in a virtual closed state; if the correction angle between the left knife gate arm and the right knife gate arm is between lT-o and hT-o or between lT-c and hT-c, it is determined that the knife gate state in the current frame image is the same as the state of the knife gate in the previous frame image.
[0070] Until it is detected that the knife switch has stopped moving, the specific method of verifying the final state of the knife switch in the video is: determine the real-time state of the knife switch in each frame image and then record it; give a continuous frame number threshold, if the knife switch state in the continuous frame image remains unchanged, and the continuous frame number is greater than the continuous frame number threshold, it indicates that the knife switch maintains the same state, and it is detected that the knife switch has stopped moving; if the initial state of the knife switch judged by the first frame image is an open state, if it is a closed state during verification, the operation is completed, and if it is a virtual closed state during verification, an alarm prompt will be issued and the staff will be asked to manually confirm and process it; if the initial state of the knife switch is a closed state, and the final state is verified to be an open state, the operation is completed, and if the final state is verified to be a virtual closed state, an alarm prompt will be issued and the staff will be asked to manually confirm and process it; if the initial state of the knife switch is a virtual closed state, and the final state is verified to be closed or open, the operation is completed, and if the final state is verified to be a virtual closed state, an alarm prompt will be issued and the staff will be asked to manually confirm and process it.
[0071] Since the movement state of the knife switch in the real-time video of the knife switch to be processed is unidirectional, from open to closed or from closed to open, the final state of verification is also relatively simple, and the knife switch has only three states during the movement: open, closed and virtual closed. The left and right knife switch arms in the present invention refer to the left knife switch arm and the right knife switch arm, and the knife switch in the present invention refers to a split knife switch.
[0072] What is detected in the present invention is the opening and closing state of the split knife gate in the real-time monitoring video. If the split knife gate in the video does not move, the state of the split knife gate is the initial state and is in a safe state.
[0073] 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 spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A real-time tracking method for detecting the state of a split knife switch, characterized in that: include: Collect real-time monitoring video of the split knife gate, obtain each frame of the video, and establish a boundary line model of the knife gate arm of this model according to any frame of the video and save it as a model file, and calculate the left midpoint, right midpoint, midpoint and midline of the knife gate arm according to the model file; The first frame of the video is acquired and the knife gate therein is positioned, and the characteristic points of the knife gate arm in the first frame of the image that are conducive to tracking are extracted and recorded; the edge of the knife gate in the first frame of the image is detected according to the positioning result, and the final edge line of the left knife gate arm and the edge line of the right knife gate arm in the first frame of the image are determined, and then the initial angle between the left knife gate arm and the right knife gate arm is calculated, and the real-time state of the knife gate in the first frame of the image is determined; Extract the feature points of the knife gate arm of the previous frame image and correspond them to the current frame image and obtain the positions of these feature points in the current frame image, track and locate the knife gate arm in the current frame image, perform edge detection on the knife gate in the current frame image according to the positioning result, determine the final edge line of the left knife gate arm and the edge line of the right knife gate arm in the current frame image, and then calculate the initial angle between the left knife gate arm and the right knife gate arm; According to the midline estimation system error, the correction angle between the left knife gate arm and the right knife gate arm in the current frame image is determined, and the real-time state of the knife gate in the current frame image is judged; The next frame image is processed in the same way as the current frame image, until the knife switch stops moving, verifying the final state of the knife switch movement in the video.
2. The method for detecting the state of a split knife switch with real-time tracking according to claim 1 is characterized in that: The edge detection of the knife gate in the first frame image is performed according to the positioning result, and the specific method of determining the final left knife gate arm edge line and the right knife gate arm edge line in the first frame image is: Perform edge detection on the first frame image according to the positioning result to obtain an edge line set; directly correspond the left midpoint and the right midpoint of the knife gate arm calculated according to the model file to the first frame image, calculate the distance from the left midpoint and the right midpoint of the knife gate arm in the first frame image to each edge line in the edge line set, remove the edge lines corresponding to the distances that are not within the threshold range, and obtain an updated edge line set; The updated edge line set is divided into left and right parts using the center line, and the left knife gate arm edge line set and the right knife gate arm edge line set are obtained and symmetrically paired to determine the final left knife gate arm edge line and right knife gate arm edge line of the first frame image.
3. The method for detecting the state of a split knife switch by real-time tracking according to claim 2 is characterized in that: The specific method of tracking and locating the knife gate arm in the current frame image is as follows: the feature points in the previous frame image are mapped to the tracking points in the current frame image, and the displacements dx and dy in the x and y directions between the feature points in the previous frame image and the tracking points in the current frame image are calculated; Traverse all corresponding feature points and tracking point pairs in the previous frame and the current frame image, give a displacement threshold, remove tracking points whose dx and dy are not within the given displacement threshold range, update the tracking points and record them; Given a number threshold, if the number of updated tracking points is less than the number threshold, then add the currently non-existent detectable tracking points in the current frame image, update the tracking points again and record them; traverse all tracking points in the current frame image, record the current position of the tracking point as the end point end, and the position of the tracking point when it first appears in the previous frame image as the starting point start, and the movement amount of the tracking point in the current frame image is shift = abs (end.x-start.x) + abs (end.y-start.y), where end.x and end.y represent the x and y coordinates of the end point, and start.x and start.y represent the x and y coordinates of the starting point; Calculate the equation of the straight line where the left and right midpoints of the knife gate arm in the current frame image are located, and record it as the baseline y=k_base*x+b_base; traverse the end points of all tracking points, if end.y<=k_base*end.x+b_base, then the end point is above the baseline, otherwise it is below the baseline, and count the number of end points on the upper and lower sides of the baseline and the average movement respectively; The relatively large average movement is the final average movement, and the number of tracking points corresponding to it is recorded; Given a moving threshold, if the product of the final average movement and the corresponding number of tracking points is less than or equal to the moving threshold, it means that the knife gate has just started to move or has not started to move, and the knife gate arm of the current frame is tracked and located according to the position of the knife gate arm in the previous frame image; if the product of the final average movement and the corresponding number of tracking points is greater than the moving threshold, the left knife gate arm angle and the right knife gate arm angle of the knife gate in the current frame image are estimated respectively, and the knife gate arm of the current frame is tracked and located in combination with the tracking points.
4. The method for detecting the state of a split knife switch with real-time tracking according to claim 3 is characterized in that: The specific method of "estimating the left and right blade arm angles of the blade in the current frame image" is: Calculate the unit direction vector baseN which is perpendicular to the center line and points to the right or left, starting from the midpoint of the line connecting the left and right midpoints of the knife gate arm. Calculate the vector vec corresponding to the end point and the starting point of each tracking point in the current frame image. For the unit direction vector pointing to the left, if baseN*vec is greater than or equal to 0, the current tracking point is the left knife gate arm tracking point, otherwise it is the right knife gate arm tracking point; for the unit direction vector pointing to the right, if baseN*vec is greater than or equal to 0, the current tracking point is the right knife gate arm tracking point, otherwise it is the left knife gate arm tracking point, so as to obtain all the left knife gate arm tracking points and the right knife gate arm tracking points; For all left knife gate arm tracking points, calculate the distance from each left knife gate arm tracking point to the left midpoint, count the number of tracking points corresponding to the same distance into the left distance distribution histogram, set the left distance threshold according to the left distance distribution histogram, eliminate the tracking points whose distance to the left midpoint is less than the given threshold, update the left knife gate arm tracking points, and count the right distance distribution histogram in the same way to update the right knife gate arm tracking points; traverse the updated left knife gate arm tracking points, and calculate the angle between each knife gate arm tracking point and the line segment where the left midpoint is located and the baseline, and calculate the average angle of all left knife gate arm tracking points and the baseline as the estimated left knife gate arm angle of the current frame image; obtain the estimated right knife gate arm angle of the current frame image in the same way.
5. The method for detecting the state of a split knife switch with real-time tracking according to claim 2 is characterized in that: Perform edge detection on the knife gate in the current frame image according to the positioning result, and determine the left knife gate arm edge line and the right knife gate arm edge line in the current frame image in the same manner as the left knife gate arm edge line set and the right knife gate arm edge line set in the first frame image; Traverse the left gate arm edge line set of the current frame image, give a left angle threshold, if the angle of the left gate arm edge line is greater than the sum of the estimated left gate arm angle of the current frame image and the left angle threshold, or is less than the difference between the estimated left gate arm angle of the current frame image and the left angle threshold, then remove the left gate arm edge line and obtain an updated left gate arm edge line set; traverse the right gate arm edge line set, give a right angle threshold, if the angle of the right gate arm edge line is greater than the sum of the estimated right gate arm angle of the current frame image and the right angle threshold, or is less than the difference between the estimated right gate arm angle of the current frame image and the right angle threshold, then remove the right gate arm edge line and obtain an updated right gate arm edge line set; The updated left knife gate arm edge line set and the updated right knife gate arm edge line set are symmetrically paired to determine the final left knife gate arm edge line and right knife gate arm edge line in the current frame image.
6. The method for detecting the state of a split knife switch with real-time tracking according to claim 4 is characterized in that: The specific method of estimating the system error based on the midline and determining the correction angle between the left knife gate arm and the right knife gate arm in the current frame image is: Calculate the angles between the final left and right knife gate arm edge lines in the current frame image and the previous frame image in the real-time video and the straight line where the closed state knife gate arm is located, set the angle between the final left knife gate arm edge line in the current frame image and the straight line where the closed state knife gate arm is located to α1, the angle between the final right knife gate arm edge line and the straight line where the closed state knife gate arm is located to γ1, the angle between the final left knife gate arm edge line in the previous frame image and the straight line where the closed state knife gate arm is located to α2, the angle between the final right knife gate arm edge line and the straight line where the closed state knife gate arm is located to γ2, and record the system error as noise = |(α1-α2)-(γ1-γ2)|; Combined with the system error, determine the correction angle between the left and right knife gate arms in the current frame as θ correct =|γ1-α1|+noise, the correction angle is the angle between the left knife gate arm and the right knife gate arm in the second frame image.
7. The method for detecting the state of a split knife switch with real-time tracking according to claim 4 is characterized in that: The specific method for judging the real-time status of the knife switch in the first frame image is: According to user needs, two thresholds To and Tc for the "open" and "closed" states of the split knife switch are given; If the angle between the left gate arm and the right gate arm is greater than To, the gate in the first frame image is judged to be in an open state. If the actual angle between the left gate arm and the right gate arm is less than Tc, the gate in the first frame image is judged to be in a closed state. If the actual angle between the left gate arm and the right gate arm is between To and Tc, the gate in the first frame image is judged to be in a virtually closed state.
8. The method for detecting the state of a split knife switch with real-time tracking according to claim 4 is characterized in that: The specific method for judging the real-time status of the knife switch in the current frame image is: According to user needs, two thresholds To and Tc for the "open" and "closed" states of the split knife switch are given, and the high threshold hT-o and the low threshold lT-o of the open state are set, and To is between the high threshold hT-o and the low threshold lT-o, hT-o>To>lT-o; the high threshold hT-c and the low threshold lT-c of the closed state are set, and Tc is between the high threshold hT-c and the low threshold lT-c, hT-c>Tc>lT-c, and lT-o>hT-c; If the correction angle between the left knife gate arm and the right knife gate arm is greater than hT-o, it is determined that the knife gate in the current frame image is in an open state; if the correction angle between the left knife gate arm and the right knife gate arm is less than lT-c, it is determined that the knife gate in the current frame image is in a closed state; if the correction angle between the left knife gate arm and the right knife gate arm is between hT-c and lT-o, it is determined that the knife gate in the current frame image is in a virtual closed state; if the correction angle between the left knife gate arm and the right knife gate arm is between lT-o and hT-o or between lT-c and hT-c, it is determined that the knife gate state in the current frame image is the same as the state of the knife gate in the previous frame image.
9. The method for detecting the state of a split knife switch with real-time tracking according to claim 1, characterized in that: Until the knife switch stops moving, the specific method of verifying the final state of the knife switch movement in the video is as follows: determine the real-time state of the knife switch in each continuous frame image and record it; given a continuous frame number threshold, if the knife switch state in the continuous frame image remains unchanged and the continuous frame number is greater than the continuous frame number threshold, it indicates that the knife switch maintains the same state and the knife switch stops moving; If the initial state of the knife switch is open, and the final state is closed when verified, the operation is completed. If the final state is virtual closed when verified, an alarm prompt will be issued and the staff will be asked to manually confirm and handle it; If the initial state of the knife switch is closed, and the final state is open during verification, the operation is completed. If the final state is virtual closed, an alarm will be triggered and the staff will be asked to manually confirm and handle the problem. If the initial state of the knife switch is a virtual closed state, and the final state is verified to be closed or open, the operation is completed. If the final state is verified to be a virtual closed state, an alarm will be issued and the staff will be asked to manually confirm and handle it.
Citation Information
Patent Citations
Machine vision-based method for judging the closing operation of disconnector
CN109063764A
Method and device for determining opening-closing state of knife switch
CN110163833A
