A target information detection method, a terminal and a computer readable storage medium

CN116109971BActive Publication Date: 2026-08-11ZHEJIANG DAHUA TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0003]本发明主要解决的技术问题是提供一种目标信息的检测方法、终端及计算机可读存储介质,解决现有技术中钢丝绳安全检测的准确率比较低的问题

Benefits of technology

[0037]本发明的有益效果是:区别于现有技术的情况,提供的一种目标信息的检测方法、终端及计算机可读存储介质,目标信息的检测方法包括:获取当前视频帧,当前视频帧包括待检测目标,待检测目标包括绳状物体;对当前视频帧进行透视变换校正,得到校正视频帧;校正视频帧中的待检测目标处于参考方向;对校正视频帧进行语义分割,得到各待检测目标的目标掩码;目标掩码表示待检测目标的位置和边界;基于待检测目标的目标掩码,确定待检测目标的尺寸信息达到预设要求。本申请通过对当前视频帧进行透视变换较正,以改善相机与待检测目标之间的距离不同影响待检测目标的尺寸信息的检测结果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116109971B_ABST
    Figure CN116109971B_ABST
Patent Text Reader

Abstract

This invention provides a method, terminal, and computer-readable storage medium for detecting target information. The method includes: acquiring a current video frame, the current video frame including a target to be detected, the target to be detected including a rope-like object; performing perspective transformation correction on the current video frame to obtain a corrected video frame; ensuring the target to be detected in the corrected video frame is in a reference direction; performing semantic segmentation on the corrected video frame to obtain target masks for each target to be detected; the target mask represents the position and boundary of the target to be detected; and determining the size information of the target to be detected to meet preset requirements based on the target mask. This application improves the detection results by performing perspective transformation correction on the current video frame to mitigate the impact of varying distances between the camera and the target on the size information of the target to be detected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision technology, and in particular to a method, terminal, and computer-readable storage medium for detecting target information. Background Technology

[0002] Elevators, as an important means of transportation within high-rise buildings, bring numerous conveniences to passengers, but also harbor hidden dangers. The frequent occurrence of elevator accidents serves as a stark reminder of the need for attention to elevator safety. Elevator cables, as crucial components of the elevator, are susceptible to damage when their surface is covered in grease or grime. This can lead to the cables derailing during operation, causing the elevator to lurch and disrupt the passenger experience. Furthermore, wear and tear on the cables can cause them to break, compromising elevator safety and even endangering passenger safety. Summary of the Invention

[0003] The main technical problem solved by this invention is to provide a method, terminal and computer-readable storage medium for detecting target information, thereby solving the problem of low accuracy in wire rope safety detection in the prior art.

[0004] To solve the above-mentioned technical problems, the first technical solution adopted by the present invention is: to provide a method for detecting target information, the method for detecting target information comprising:

[0005] Acquire the current video frame, which includes the target to be detected, including the rope-like object;

[0006] Perform perspective transformation correction on the current video frame to obtain the corrected video frame;

[0007] Semantic segmentation is performed on the corrected video frames to obtain the target mask of each target to be detected; the target mask represents the position and boundary of the target to be detected.

[0008] Based on the target mask of the target to be detected, the size information of the target to be detected is determined to meet the preset requirements.

[0009] This involves performing perspective transformation correction on the current video frame to obtain a corrected video frame, including:

[0010] The perspective transformation matrix is ​​used to perform a perspective transformation on the current video frame to obtain the corrected video frame corresponding to the current video frame.

[0011] The current video frame includes the checkerboard area;

[0012] The methods for determining the perspective transformation matrix include:

[0013] Intersection detection is performed on the chessboard area to obtain the corresponding set of detected intersections; the set of detected intersections includes multiple detected intersections and the position information of each detected intersection.

[0014] Based on the location information of each detection intersection point, four detection intersection points with the outermost positions are selected from the set of detection intersection points as detection corner points;

[0015] Based on the position information of each detected corner point and the position information of the corresponding target corner points, a perspective transformation matrix is ​​generated.

[0016] Specifically, based on the location information of each detection intersection point, four outermost detection intersection points are selected from the set of detection intersection points as detection corner points, including:

[0017] Based on the location information of each detection intersection point, the detection intersection point in the upper left corner is selected as the first candidate corner point, the detection intersection point in the lower left corner is selected as the second candidate corner point, the detection intersection point in the upper right corner is selected as the third candidate corner point, and the detection intersection point in the lower right corner is selected as the fourth candidate corner point.

[0018] Count the number of other detection intersections contained on the connecting line between two adjacent candidate corner points to obtain the first number between the first candidate corner point and the second candidate corner point, the second number between the third candidate corner point and the fourth candidate corner point, the third number between the first candidate corner point and the third candidate corner point, and the fourth number between the second candidate corner point and the fourth candidate corner point.

[0019] In response to the first and second quantities being equal and non-zero, and the third and fourth quantities being equal and non-zero, the first candidate corner point, the second candidate corner point, the third candidate corner point, and the fourth candidate corner point are selected as detection corner points.

[0020] The methods for detecting target information include:

[0021] Target detection is performed on the targets to be detected in the current video frame to obtain the position information and surface information of each target to be detected.

[0022] An alarm is issued in response to the fact that the surface information of the target to be detected does not meet the preset requirements.

[0023] Among them, determining the size information of the target to be detected based on the target mask to meet preset requirements includes:

[0024] Divide the target mask of each target to be detected into N segments along the length direction;

[0025] Based on the target mask of each target to be detected, calculate the pixel diameter corresponding to the segment of each target to be detected in the Mth segment; where N≥M, and N and M are positive integers;

[0026] If the error value between the pixel diameters of each segment in the Mth segment is not less than a first threshold, then an alarm is determined to be issued.

[0027] Specifically, based on the target mask of each target to be detected, the pixel diameter corresponding to the segment of each target to be detected in the Mth segment is calculated, including:

[0028] Calculate the pixel area of ​​the Mth segment based on the target mask of the target to be detected in the Mth segment;

[0029] Calculate the pixel length of the Mth segment in the reference direction;

[0030] The pixel diameter of the segment is determined based on the pixel area and pixel length of the Mth segment.

[0031] Among them, determining the size information of the target to be detected based on the target mask to meet preset requirements includes:

[0032] If the error value between the pixel diameters of each segment of the Mth segment is less than the first threshold, then the pixel diameters corresponding to each segment of the target to be detected are calculated based on the target mask of the target to be detected.

[0033] If the error value between the pixel diameters of each segment of the target to be detected is less than the second threshold, then the size information of the target to be detected is determined to meet the preset requirements.

[0034] If the error value between the pixel diameters of each segment of the target to be detected is less than the second threshold, it is determined that the size information of the target to be detected does not meet the preset requirements.

[0035] To solve the above-mentioned technical problems, the second technical solution adopted by the present invention is to provide a terminal, which includes a memory, a processor, and a computer program stored in the memory and running on the processor. The processor is used to execute program data to implement the steps in the above-mentioned target information detection method.

[0036] To solve the above-mentioned technical problems, the third technical solution adopted by the present invention is to provide a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps in the above-mentioned target information detection method.

[0037] The beneficial effects of this invention are as follows: Unlike existing technologies, it provides a method, terminal, and computer-readable storage medium for detecting target information. The method includes: acquiring a current video frame, which includes a target to be detected, and the target to be detected includes a rope-like object; performing perspective transformation correction on the current video frame to obtain a corrected video frame; ensuring the target to be detected in the corrected video frame is in a reference direction; performing semantic segmentation on the corrected video frame to obtain target masks for each target to be detected; the target mask represents the position and boundary of the target to be detected; and determining the size information of the target to be detected to meet preset requirements based on the target mask. This application improves the detection results by performing perspective transformation correction on the current video frame to mitigate the impact of varying distances between the camera and the target on the size information of the target to be detected. Attached Figure Description

[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0039] Figure 1 This is a flowchart illustrating the target information detection method provided by the present invention;

[0040] Figure 2 This is a flowchart illustrating a specific embodiment of the target information detection method provided by the present invention;

[0041] Figure 3 This is a schematic diagram of an embodiment of the current video frame provided by the present invention;

[0042] Figure 4 It is the mask image of the current video frame provided by this invention;

[0043] Figure 5 This is a schematic diagram of the elevator wire rope segmentation provided by the present invention;

[0044] Figure 6 This is a schematic diagram of the framework of an embodiment of the terminal provided by the present invention;

[0045] Figure 7 A schematic diagram of a framework of an embodiment of a computer-readable storage medium provided by the present invention. Detailed Implementation

[0046] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0047] In the following description, specific details such as particular system architectures, interfaces, and technologies are presented for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of this application.

[0048] In this article, the term "and / or" simply describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "more" in this article means two or more objects.

[0049] To enable those skilled in the art to better understand the technical solution of the present invention, the following describes in further detail a target information detection method provided by the present invention in conjunction with the accompanying drawings and specific embodiments.

[0050] Please see Figure 1 and Figure 2 , Figure 1 This is a flowchart illustrating the target information detection method provided by the present invention; Figure 2 This is a flowchart illustrating a specific embodiment of the target information detection method provided by the present invention.

[0051] This embodiment provides a method for detecting target information, which includes the following steps.

[0052] S1: Obtain the current video frame, which includes the target to be detected, including rope-like objects.

[0053] Please see Figure 3 , Figure 3 This is a schematic diagram of an embodiment of the current video frame provided by the present invention.

[0054] Specifically, an image acquisition device acquires an image of the target to be detected, resulting in the current video frame. The current video frame contains the target to be detected. The target to be detected includes rope-like objects. For example, rope-like objects can be elevator steel cables, nylon ropes, polyester ropes, or other metal ropes.

[0055] In this embodiment, the target to be detected is a steel wire rope. When the steel wire rope is stationary, the image acquisition device captures images of the traction elevator's steel wire rope. When the steel wire rope is in motion, the image acquisition device pauses image acquisition of the traction elevator's steel wire rope.

[0056] An image acquisition device captures images of the target to be detected, resulting in a current video frame. The current video frame contains both the target to be detected and a checkerboard calibration board. In one embodiment, the current video frame includes at least two targets to be detected. In this embodiment, the image acquisition device is a monocular camera.

[0057] S2: Perform perspective transformation correction on the current video frame to obtain a corrected video frame; the target to be detected in the corrected video frame is in the reference direction.

[0058] S3: Perform semantic segmentation on the corrected video frames to obtain the target mask of each target to be detected; the target mask represents the position and boundary of the target to be detected.

[0059] S4: Based on the target mask of the target to be detected, determine the size information of the target to be detected to meet the preset requirements.

[0060] In one embodiment, target detection is performed on the target to be detected in the current video frame to obtain the position information and surface information of each target to be detected; in response to the surface information of the target to be detected not meeting the preset requirements, an alarm is issued.

[0061] Specifically, the surface information includes at least one of the following: sludge detection information, wire breakage detection information, rust detection information, and wear detection information.

[0062] In one embodiment, a target detection network performs surface detection on the target to be detected in the current video frame to obtain the detection information Ωd{Ωd1, Ωd2, ..., Ωd} of the target to be detected. n}, where Ωd n This represents the location and surface information of the nth target to be detected. The target detection network is a YOLOX network structure.

[0063] If the surface information of the target to be inspected shows that there is sludge on the surface of the target, it indicates that there is a risk such as the steel wire rope being derailed or the elevator running bumpily. An alarm will be issued to remind the user that there may be a safety risk in the elevator.

[0064] If the surface information of the target to be tested shows that there is no sludge on the surface of the target, it means that the elevator is operating normally, and the diameter of the target to be tested is then measured.

[0065] In one embodiment, the current video frame also includes a checkerboard area.

[0066] In one embodiment, intersection detection is performed on the checkerboard region in the current video frame to obtain a corresponding set of detected intersection points; the set of detected intersection points includes multiple detected intersection points and the position information of each detected intersection point. For example, the set of detected intersection points Ωh = {Ωh1, Ωh2, ..., Ωhn}.

[0067] Based on the location information of each detection intersection point, four detection intersection points at the outermost edge of the detection intersection point set are selected as detection corner points.

[0068] In one specific embodiment, based on the position information of each detection intersection point, the detection intersection point at the top left corner is selected as the first candidate corner point, the detection intersection point at the bottom left corner as the second candidate corner point, the detection intersection point at the top right corner as the third candidate corner point, and the detection intersection point at the bottom right corner as the fourth candidate corner point. For example, the coordinates of the top left, bottom left, top right, and bottom right corners in the detection intersection point set are selected according to the relationship between the horizontal and vertical coordinates and are denoted as p1, p2, p3, and p4, respectively.

[0069] Count the number of other detected intersections contained on the connecting line between two adjacent candidate corner points to obtain the first quantity N between the first candidate corner point and the second candidate corner point. p1p2 The second quantity N between the third and fourth candidate corner points p3p4 The third quantity N between the first candidate corner point and the third candidate corner point p1p3 And the fourth quantity N between the second candidate corner point and the fourth candidate corner point p2p4 .

[0070] The response is that the first quantity is equal to the second quantity and is non-zero, and the third quantity is equal to the fourth quantity and is non-zero, i.e., N p1p2 =N p3p4 ≠0, N p1p3 =N p2p4 If the coordinates are not equal to 0, then the first, second, third, and fourth candidate corner points are selected as detection corner points. This indicates that the four detection corner points are the four vertices of a rectangle, which can be used to obtain the original point coordinates on the perspective transformation matrix.

[0071] The response is that the first quantity is not equal to the second quantity, or the third quantity is not equal to the fourth quantity, i.e., N p1p2 ≠N p3p4 , or N p1p3 ≠N p2p4 If the first, second, third, and fourth candidate corner points are not the four vertices of a rectangle, then a new candidate corner point (p1, p2, p3, p4) is searched for near each intersection point detected in p1, p2, p3, and p4. i Based on the search of four new p i The judgment is repeated until four detection corner points are found from the set of detection intersections, which are used as the original point coordinates on the perspective transformation matrix.

[0072] Specifically, the four detection corner points obtained on the perspective transformation matrix are collectively referred to as p1', p2', p3', and p4'.

[0073] p4.

[0074] The actual length and width of the checkerboard area can be determined based on four detected corner points. For example, rw = (N p′1p′3 +1)a,rh=(Np′1p′2 +1)a. Where a represents the length of each square.

[0075] In one embodiment, projection mapping is performed based on the actual chessboard area to obtain the position information of each target corner point of the chessboard area. The target corner points include p1”, p2”, p3”, and p4”. p″1 = p′1 = (x′1, y′1), p″2 = (x′1, y′1 + p… h ), p″3=(x′1+p w ,y′1),p″4=(x′1+p w y′1+p h ).

[0076] For ease of calculation, the pixel coordinates of p1' and p1" overlap. w p h Let p be the coordinate distance. w p h Need to meet p w Can be taken from L p1p3 Values ​​with similar line segment lengths.

[0077] Based on the position information of each detected corner point and the position information of the corresponding target corner points, a perspective transformation matrix is ​​generated.

[0078] In one embodiment, the specific implementation of obtaining the corrected video frame in step S2 includes the following steps.

[0079] A perspective transformation matrix is ​​used to perform a perspective transformation on the current video frame to obtain the corresponding corrected video frame. The corrected video frame reduces the impact of the different distances between the camera and the steel cable on the test.

[0080] In one specific embodiment, the position coordinates of each pixel in the current video frame are corrected based on the following formula.

[0081]

[0082] In the formula: [x′, y′, w′] are the position coordinates of the pixel after perspective transformation; [u, v, w] are the position coordinates of the pixel before perspective transformation. This is the perspective transformation matrix.

[0083] Please see Figure 4 , Figure 4 It is the mask image of the current video frame provided by this invention.

[0084] Semantic segmentation of the calibration video frames is performed using a semantic segmentation network to obtain the mask images of the calibration video frames. Based on the mask images, the width detection information of the targets to be detected in the calibration video frames is determined. The target masks of each target to be detected can be obtained from the mask images, denoted as R from left to right. k (1≤k≤N r ), where N r This represents the number of steel wire ropes in the current video frame.

[0085] Please see Figure 5 , Figure 5 This is a schematic diagram of the segmentation of the elevator wire rope provided by the present invention.

[0086] Based on the target mask of each target to be detected, calculate the pixel diameter corresponding to the segment of each target to be detected in the Mth segment; where N≥M, and N and M are positive integers.

[0087] Based on the target mask of the Mth segment to be detected, calculate the pixel area of ​​the Mth segment; calculate the pixel length of the Mth segment in the reference direction; and determine the pixel diameter of the segment based on the pixel area and pixel length of the Mth segment.

[0088] In one embodiment, the target mask of each target to be detected is divided into N segments along its length. Each wire rope is then divided into N equal segments. l The steel wire rope is divided into R from top to bottom. kl (1≤l≤N l ), where R kl R represents the l-th segment of the k-th wire rope. kl The segment can be approximated as a parallelogram, and the area of ​​the parallelogram is R. kl The pixel area of ​​a steel wire rope segment is denoted as S. Rkl And calculate the pixel length of the perpendicular hypotenuse of the parallelogram, denoted as H. Rkl .

[0089] The pixel diameter PD of the l-th segment of the k-th wire rope is calculated based on the following formula. Rkl .

[0090]

[0091] Based on the pixel diameter PD of the l-th segment of the k-th wire rope Rkl The actual diameter RD of the l-th segment of the k-th wire rope is calculated from the actual size of the checkerboard pattern in the current video frame. Rkl .

[0092]

[0093] The actual diameter of each section of the wire rope is calculated using the above-described method. The actual diameters of the same section of each wire rope are then compared.

[0094] Specifically, the actual diameter deviation E between the wire ropes in the Mth segment of each wire rope is calculated based on the actual diameter of the wire rope in the Mth segment. ij(M) (1≤i,j≤N r (i≠j).

[0095] If the error value between the pixel diameters of each segment in the Mth segment is not less than a first threshold, then an alarm is determined to be issued.

[0096] If E ij(M) Greater than or equal to the preset value T h This indicates that the elevator cable in that section has become thinner, suggesting a potential elevator malfunction risk, and an alarm should be triggered. If E ij(M) Less than the preset value T h If the signal is positive, it indicates that the wire rope is not thinning in that section, and no alarm is needed.

[0097] If the error value between the pixel diameters of each segment in the Mth segment is less than the first threshold, then the pixel diameters corresponding to each segment in the target to be detected are calculated based on the target mask of the target to be detected; if the error value between the pixel diameters of each segment in the target to be detected is less than the second threshold, then the size information of the target to be detected is determined to meet the preset requirements; if the error value between the pixel diameters of each segment in the target to be detected is less than the second threshold, then the size information of the target to be detected is determined to not meet the preset requirements.

[0098] Specifically, for the same wire rope, calculate the deviation E of the actual diameter of the Mth segment of the wire rope from the actual diameters of other segments. ilklm And the diameter deviation E between the actual diameter of the Mth segment of the wire rope and the actual diameter of the Mth segment of the same wire rope in historical video frames prior to the current video frame. hilklm .

[0099] If the actual diameter of the Mth section of the wire rope deviates from the actual diameter of other sections of the wire rope by E... ilklm Greater than or equal to the preset value T v Or the diameter deviation E between the actual diameter of the Mth segment of the wire rope and the actual diameter of the Mth segment of the same wire rope in a historical video frame preceding the current video frame. hilklm Greater than or equal to the preset value T v This indicates that for the Mth segment of the steel wire rope itself, there is a situation where the elevator steel wire rope becomes thinner at different locations, and an alarm needs to be triggered.

[0100] If the actual diameter of the Mth section of the wire rope deviates from the actual diameter of other sections of the wire rope by E... ilklm Less than the preset value T v Furthermore, the diameter deviation E between the actual diameter of the Mth segment of the wire rope and the actual diameter of the same segment of the wire rope in historical video frames preceding the current video frame is... hilklm Less than the preset value T v This indicates that there is no thinning of the elevator wire rope at different locations for the Mth segment, so no alarm is triggered, and data such as buffer time, corresponding diameter, and deviation are recorded.

[0101] The target information detection method provided in this embodiment includes: acquiring a current video frame, the current video frame including a target to be detected, the target to be detected including a rope-like object; performing perspective transformation correction on the current video frame to obtain a corrected video frame; performing semantic segmentation on the corrected video frame to obtain target masks for each target to be detected; the target mask represents the position and boundary of the target to be detected; and determining the size information of the target to be detected to meet preset requirements based on the target mask. This application improves the detection results by performing perspective transformation correction on the current video frame to mitigate the impact of different distances between the camera and the target on the size information of the target to be detected.

[0102] Please see Figure 6 , Figure 6 This is a schematic diagram of a terminal embodiment provided by the present invention. The terminal 80 includes a memory 81 and a processor 82 coupled to each other. The processor 82 is used to execute program instructions stored in the memory 81 to implement the steps of any of the above-described target information detection method embodiments. In a specific implementation scenario, the terminal 80 may include, but is not limited to, a microcomputer or a server. In addition, the terminal 80 may also include mobile devices such as laptops and tablets, which are not limited here.

[0103] Specifically, processor 82 controls itself and memory 81 to implement the steps of any of the above-described target information detection method embodiments. Processor 82 can also be referred to as a CPU (Central Processing Unit). Processor 82 may be an integrated circuit chip with signal processing capabilities. Processor 82 can also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor. Furthermore, processor 82 can be implemented using integrated circuit chips.

[0104] Please see Figure 7 , Figure 7 This is a schematic diagram of a framework of an embodiment of a computer-readable storage medium provided by the present invention. The computer-readable storage medium 90 stores program instructions 901 that can be executed by a processor. The program instructions 901 are used to implement the steps of any of the above-described embodiments of the target information detection method.

[0105] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0106] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.

[0107] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

[0108] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0109] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0110] The above are merely embodiments of the present invention and do not limit the scope of patent protection of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A method for detecting target information, characterized in that, The method for detecting the target information includes: Acquire the current video frame, wherein the current video frame includes the target to be detected, and the target to be detected is a rope-like object; Perform perspective transformation correction on the current video frame to obtain a corrected video frame; The corrected video frames are semantically segmented to obtain target masks for each of the targets to be detected; the target masks represent the position and boundaries of the targets to be detected. The target mask of each of the targets to be detected is divided into N segments along the length direction; Based on the target mask of each of the targets to be detected, calculate the pixel diameter corresponding to the segment of each of the targets to be detected in the Mth segment; where N≥M, and N and M are positive integers; An alarm is issued in response to the error value between the pixel diameters of each segment of the Mth segment being not less than a first threshold.

2. The target information detection method according to claim 1, characterized in that, The step of performing perspective transformation correction on the current video frame to obtain a corrected video frame includes: The current video frame is subjected to perspective transformation using a perspective transformation matrix to obtain the corrected video frame corresponding to the current video frame.

3. The target information detection method according to claim 2, characterized in that, The current video frame includes a checkerboard area; The methods for determining the perspective transformation matrix include: Intersection detection is performed on the chessboard area to obtain a corresponding set of detected intersections; the set of detected intersections includes multiple detected intersections and the position information of each detected intersection. Based on the position information of each detection intersection point, four detection intersection points with the outermost positions are selected from the set of detection intersection points as detection corner points; the four positions are the upper left corner, the lower left corner, the upper right corner, and the lower right corner; Projection mapping is performed on the actual chessboard area to obtain the position information of each target corner point in the chessboard area. Based on the position information of each detected corner point and the position information of the corresponding target corner point, the perspective transformation matrix is ​​generated.

4. The target information detection method according to claim 3, characterized in that, The step of selecting four outermost detection intersection points from the set of detection intersection points as detection corner points based on the position information of each detection intersection point includes: Based on the position information of each detection intersection point, the detection intersection point in the upper left corner is selected as the first candidate corner point, the detection intersection point in the lower left corner is selected as the second candidate corner point, the detection intersection point in the upper right corner is selected as the third candidate corner point, and the detection intersection point in the lower right corner is selected as the fourth candidate corner point. The number of other detected intersections contained on the connecting line between two adjacent candidate corner points is counted to obtain a first number between the first candidate corner point and the second candidate corner point, a second number between the third candidate corner point and the fourth candidate corner point, a third number between the first candidate corner point and the third candidate corner point, and a fourth number between the second candidate corner point and the fourth candidate corner point. In response to the first quantity being equal to and non-zero with the second quantity, and the third quantity being equal to and non-zero with the fourth quantity, the first candidate corner point, the second candidate corner point, the third candidate corner point, and the fourth candidate corner point are selected as the detected corner points.

5. The target information detection method according to claim 1, characterized in that, The method for detecting the target information further includes: Target detection is performed on the targets to be detected in the current video frame to obtain the position information and surface information of each target to be detected. An alarm is issued in response to the fact that the surface information of the target to be detected does not meet the preset requirements.

6. The target information detection method according to claim 1, characterized in that, The step of calculating the pixel diameter corresponding to the segment of each of the M-th detected targets based on the target mask of each of the detected targets includes: Based on the target mask of the target to be detected in the Mth segment, calculate the pixel area of ​​the Mth segment; Calculate the pixel length of the segment described in segment M along the reference direction; The pixel diameter corresponding to the segment is determined based on the pixel area and pixel length of the segment corresponding to the Mth segment.

7. The target information detection method according to claim 1, characterized in that, The rope-like object is a steel wire rope; the method further includes: If the error value between the pixel diameters of each segment of the Mth segment is less than the first threshold, then for the same wire rope, the diameter deviation between the actual diameter of the wire rope of the Mth segment and the actual diameter of the wire rope of other segments is calculated, as well as the diameter deviation between the actual diameter of the wire rope of the Mth segment and the actual diameter of the wire rope of the Mth segment in the same historical video frame before the current video frame. If the diameter deviation between the actual diameter of the Mth segment of the wire rope and the actual diameter of the other segments of the wire rope is greater than or equal to a preset value, or if the diameter deviation between the actual diameter of the Mth segment of the wire rope and the actual diameter of the Mth segment of the same wire rope in a historical video frame before the current video frame is greater than or equal to the preset value, an alarm will be triggered. If the diameter deviation between the actual diameter of the Mth segment of the wire rope and the actual diameter of the other segments of the wire rope is less than the preset value, and the diameter deviation between the actual diameter of the Mth segment of the wire rope and the actual diameter of the Mth segment of the same wire rope in a historical video frame before the current video frame is less than the preset value, then no alarm will be triggered.

8. A terminal, characterized in that, The terminal includes a memory, a processor, and a computer program stored in the memory and running on the processor, the processor being used to execute program data to implement the steps in the target information detection method as described in any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the target information detection method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Video processing method and device

    CN109327668A

  • Winch steel wire rope broken wire detection method and device

    CN112669315A

  • Projection picture correction method, device and system, correction equipment and projection equipment

    CN115086625A