Inspection path optimization method and system based on preset bit generation
Through automated observation angle screening and docking position adjustment, combined with ant colony algorithm to optimize the inspection path, the problems of inefficiency and high error rate of traditional inspection methods are solved, and the planning of the optimal inspection route and the improvement of patrol intelligence are achieved.
Patent Information
- Application Number
- CN202411646873.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-02-28
AI Technical Summary
Traditional inspection methods rely on manual experience and are difficult to adapt to complex and dynamic inspection environments, resulting in inefficient configuration efficiency and high error rates, and path planning does not fully consider the performance and limitations of inspection equipment.
By obtaining the video collected by the inspection robot, target recognition and docking position calculation, automatically filtering the observation angle and adjusting the docking position, combining it into preset positions, and using the ant colony algorithm to optimize the patrol path to achieve the most time-saving route planning.
Automatic observation angle screening and docking position adjustment have been realized, freeing the burden of manual configuration of preset positions, and planning the best inspection route, greatly improving the intelligence and efficiency of inspection.
Smart Images

Figure CN119536263A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of automated inspection, and in particular relates to an inspection path optimization method and system based on preset position generation. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] In the field of inspection, the traditional preset position configuration method relies heavily on manual experience. This model is particularly inadequate when facing the challenges of complex and changeable inspection environments and the surge in the number of inspection points. Operation and maintenance personnel need to manually adjust the PTZ control parameters according to different locations and types of inspection points, which is not only time-consuming and labor-intensive, but also easily affected by human factors, resulting in low configuration efficiency and high error rates.
[0004] Therefore, realizing the automated planning of observation angles and parking positions has become the key to improving the level of intelligent inspection. In addition, the observation angles and parking positions during the inspection process also directly affect the time and energy costs of the entire inspection process. Traditional path planning methods are often based on static environmental information and simple rules, which are difficult to adapt to dynamically changing inspection scenarios and complex inspection task requirements. Moreover, when planning the path, the actual performance and constraints of the inspection equipment are often not fully considered, resulting in the planned path being suboptimal. Summary of the invention
[0005] In order to solve the technical problems existing in the above-mentioned background technology, the present invention provides a patrol path optimization method and system based on preset position generation. During the patrol process, the observation angle is automatically screened and the docking position is adjusted according to the actual situation, and a candidate set of preset positions is constructed. The most time-saving patrol route is planned according to the candidate set. It not only liberates the inspection method of manual inspection or manual remote control robot manual configuration of preset positions, but also plans the optimal patrol route, greatly improving the intelligence and efficiency of patrol.
[0006] In order to achieve the above object, the present invention adopts the following technical solution:
[0007] A first aspect of the present invention provides a method for optimizing an inspection path based on preset position generation, comprising:
[0008] Obtain the video collected by the inspection robot during its movement along the set inspection route;
[0009] For the video frame, the detection target is identified and the position coordinates of the detection target are calculated. Then, the relative position vector between the robot position and the detection target is calculated. Based on the relative position vector, a set of observation angles is set and a parking position is calculated.
[0010] After the inspection robot is controlled to move to the docking position, the video frames collected by the robot at each observation angle are obtained, and based on the latest video frames, the occlusion area and occlusion orientation of the detection target are determined, the observation angle is screened based on the occlusion area, and the docking position is adjusted based on the occlusion area and occlusion orientation;
[0011] Control the inspection robot to move to the adjusted parking position, obtain the video frames collected by the robot under the selected observation angles, and determine the pan / tilt control parameters and camera parameters based on the latest acquired video frames;
[0012] For each detection target, the adjusted parking position, the selected observation angle, the determined gimbal control parameters and the camera parameters are combined into a preset position;
[0013] Based on all preset positions, the inspection path is optimized with the goal of minimizing the stop time and moving distance.
[0014] Furthermore, the step of calculating the position coordinates of the detection target includes:
[0015] By identifying the detection target, a bounding box of the detection target in the video frame is obtained, and the pixel coordinates of the center point of the bounding box are calculated;
[0016] After the pixel coordinates of the center point are converted into coordinates of the camera coordinate system, the position coordinates of the detection target are calculated in combination with the coordinates of the robot position.
[0017] Furthermore, based on the relative position vector, the method for calculating the docking position is:
[0018] stopping position =robot position +k*relative vector *normalize(relative vector )
[0019] Among them, k is the adjustment coefficient, normalize() is used to normalize the vector, robot position is the coordinate of the robot position, relative vector is the relative position vector between the robot position and the detection target.
[0020] Furthermore, the step of determining the occlusion area and occlusion orientation of the detection target includes:
[0021] For the latest acquired video frame, the detection target is identified, and the area where the depth difference between the detection target and the background area exceeds the threshold is regarded as the occlusion area, and the boundary box of the occlusion area is determined;
[0022] The occlusion orientation is obtained by comparing the bounding box of the occluded area with the bounding box of the most recently identified detection target.
[0023] Furthermore, the step of adjusting the docking position includes:
[0024] If the occluded area is on the left side of the detection target, the docking position moves to the right. If the occluded area is on the right side of the detection target, the docking position moves to the left, and the moving distance is D. x =k x *(x' max -x' min );
[0025] If the occluded area is above or below the detection target, the parking position moves forward and the moving distance is D y =k y *(y' max -y' min );
[0026] Among them, k x and k y is the empirical coefficient, and the bounding box of the detected target is (x min, y min, x max, y max ), the bounding box of the occluded area is (x' min, y' min, x' max, y' max ).
[0027] Furthermore, the moving distance is the distance between two consecutive preset positions.
[0028] Furthermore, the closer the observation angle, the pan / tilt control parameters and the camera parameters between two consecutive preset positions are, the shorter the stop time is.
[0029] A second aspect of the present invention provides an inspection path optimization system based on preset position generation, comprising:
[0030] An initialization module is configured to: obtain a video collected by the inspection robot during the process of traveling along a set inspection route;
[0031] A docking position generation module is configured to: for a video frame, perform detection target recognition, calculate the position coordinates of the detection target, calculate the relative position vector between the robot position and the detection target, set a set of observation angles based on the relative position vector, and calculate a docking position;
[0032] A docking position adjustment module is configured to: after controlling the inspection robot to move to the docking position, obtain the video frames collected by the robot at each observation angle, determine the occlusion area and occlusion orientation of the detection target based on the latest acquired video frame, filter the observation angle based on the occlusion area, and adjust the docking position based on the occlusion area and occlusion orientation;
[0033] A parameter determination module is configured to: control the inspection robot to move to the adjusted parking position, obtain video frames collected by the robot under the selected observation angles, and determine the pan / tilt control parameters and camera parameters based on the latest obtained video frames;
[0034] A preset position generation module is configured to: for each detection target, combine the adjusted parking position, the screened observation angle, the determined pan / tilt control parameters and the camera parameters into a preset position;
[0035] The path optimization module is configured to optimize the inspection path based on all preset positions with the goal of minimizing the stop time and moving distance.
[0036] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the inspection path optimization method based on preset position generation as described above.
[0037] The fourth aspect of the present invention provides a computer device, including a computer-readable storage medium, a processor, and a computer program stored on the computer-readable storage medium and executable on the processor, wherein when the processor executes the program, the steps in the inspection path optimization method based on preset position generation as described above are implemented.
[0038] Compared with the prior art, the present invention has the following beneficial effects:
[0039] During the inspection process, the present invention automatically screens the observation angle and adjusts the docking position according to the actual situation, constructs a candidate set of preset positions, and plans the most time-saving inspection route based on the candidate set. It not only frees up manual inspection or the inspection method of manually configuring preset positions by a remote-controlled robot, but also plans the optimal inspection route, greatly improving the intelligence and efficiency of inspection. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0041] Figure 1 is a flowchart of constructing a preset position candidate set according to the first embodiment of the present invention;
[0042] Figure 2 is a schematic diagram of the observation angle of the first embodiment of the present invention;
[0043] Figure 3 is a flowchart of inspection route optimization according to the first embodiment of the present invention;
[0044] Figure 4 It is a structural diagram of a computer device according to a fourth embodiment of the present invention. DETAILED DESCRIPTION
[0045] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0046] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0047] Embodiment 1
[0048] This embodiment provides a method for optimizing an inspection path based on preset position generation.
[0049] The present embodiment provides a method for optimizing an inspection path based on preset position generation, which is applicable to an automatic inspection robot.
[0050] This embodiment provides a patrol route optimization method based on preset position generation. Based on the traversable routes on the navigation map, the intelligent identification and positioning of the target patrol points are realized through video analysis technology, and the observation angle and the parking position are planned. During the patrol process, the observation angle is automatically screened and the parking position is adjusted according to the actual situation, and a preset position candidate set is constructed. The ant colony algorithm (ACO) is used to plan the route that saves the most time or the shortest path based on the candidate set. This method not only liberates the patrol mode of manual patrol or manual remote control robot to manually configure the preset position, but also plans the optimal patrol route, greatly improving the intelligence and efficiency of patrol.
[0051] This embodiment provides a method for optimizing an inspection path based on preset position generation, comprising the following steps:
[0052] Step 1: Initial setting of inspection route:
[0053] Based on the traversable paths in the navigation map, the inspection robot's route is preliminarily set, covering all target inspection points.
[0054] Send the set inspection route instructions to the navigation system for autonomous line inspection.
[0055] Step 2: Video information collection and preprocessing:
[0056] The robot moves along the set inspection route and collects real-time video information along the way through a camera equipped with a depth sensor.
[0057] The input video stream is preprocessed, including digital filtering and denoising, color space conversion and correction, and image enhancement, to improve the accuracy and efficiency of subsequent processing.
[0058] Step 3: Target identification and positioning:
[0059] Step 301: Use a convolutional neural network (CNN) to extract features from the preprocessed video frame, including key information such as target outline and position, and output a feature map of depth information. Based on the extracted feature information, target recognition and positioning are performed. By comparing the preset target model or feature library, the key targets or areas in the video are identified, and the bounding box (x) of the target in the video frame is determined. min, y min, x max, y max ), and calculate the pixel coordinates of the center point of the target bounding box (U center ,V center ):
[0060] U center =(x min +x max ) / 2
[0061] V center =(y min +y max ) / 2
[0062] Step 302: read the depth values of all pixels in the target bounding box through the depth sensor data synchronized with the video frame, and select the median depth value as the target depth d target .
[0063] Step 303: Obtain the camera parameter matrix K (including f x ,f y and the optical center coordinates (c x ,c y )), convert pixel coordinates to camera coordinate system coordinates:
[0064]
[0065] Combined with the current coordinates sent by the robot (i.e., the coordinates of the robot's position) robot position (x robot ,y robot), calculate the target point (inspection point) coordinates (i.e., the position coordinates of the detection target) target position (x target ,y target ):
[0066]
[0067] y target =y robot +Y c
[0068] Where θ is the pitch angle of the robot.
[0069] Step 4: Construct the candidate set of preset positions, such as Figure 1 As shown, including:
[0070] Step 401: Generate multiple observation angles and docking positions based on the relative position between the current position of the robot and the target point. First, calculate the relative position vector between the robot and the target point:
[0071] relative vector =target position -robot position
[0072] Step 402: Figure 2 As shown, according to the relative position vector relative vector , set a set of predefined observation angles observation angles . According to the relative position vector relative vector and the current position of the robot to calculate the docking position.
[0073] First, determine the basic direction, assuming that the front of the robot is the positive direction of the X axis, that is, 0° or 360°, the right side is 90°, the back is 180°, and the left side is 270°; then calculate the deflection angle, using the relative position vector relative vector To calculate the deflection angle from the robot's current position to the target position, the angle θ can be calculated using the following formula:
[0074] θ=arctan2(relative vector .y,relative vector .x)
[0075] Among them, relative vector .y and relative vector .x are relative position vectors vector The x-axis values and y-axis values of .
[0076] Then, based on the deflection angle θ, a set of observation angles are set, {θ-nα, ..., θ-2α, θ-α, θ, θ+α, θ+2α, ..., θ+nα}, where α is a preset offset and n is a positive integer, where nα≤60°.
[0077] Among them, the docking position is calculated:
[0078] stopping position =robot position +k*relative vector *normalize(relative vector )
[0079] Among them, k is the adjustment coefficient, normalize(relative vector ) is used to normalize the vector.
[0080] Step 403: After the inspection robot is controlled to move to the parking position, the video frames collected by the robot at each observation angle are obtained to screen the observation angle and adjust the parking position:
[0081] (1) Compare the depth information of the target area with the background depth information to determine the occlusion situation:
[0082] Depth information comparison: Use the depth sensor to obtain the depth map of the entire scene, identify the key targets or areas in the video by comparing the preset target model or feature library, and compare the depth information of the target area with the surrounding background area; through regional statistical analysis, the median is obtained to reflect the depth difference.
[0083] Occlusion judgment: Based on the comparison results of depth information, a reasonable threshold is set to judge the occlusion situation; if a part of the target area deviates significantly from the expected depth of its background area in depth, and this deviation exceeds the preset threshold, then the part is considered to be occluded. That is, the area in the detection target where the depth difference with the background area exceeds the threshold is regarded as an occlusion area.
[0084] (2) For each observation angle, the occlusion direction and area are determined as follows:
[0085] (a) Depth map gradient analysis: To determine the location and specific area of occlusion, the depth map gradient is further analyzed. By applying the image gradient operator, the areas in the depth map where the pixel values change significantly are detected, which usually correspond to the boundaries of occlusion.
[0086] (b) Bounding box determination: By tracking the pixels with large gradient changes, the bounding box (x' min, y' min, x'max, y' max ), and determine the bounding box (x min, y min, x max, y max ) to determine the orientation of the occluded area.
[0087] (c) Determine whether the occluded area exists:
[0088] If x' min >x max or y' min >y max , or x' max <x min or y' max <y min , then the occluded area is completely outside the target area and there is no occlusion.
[0089] Otherwise, the occluded region at least partially overlaps with the target region and occlusion may exist.
[0090] (d) Determine the orientation of the occluded area:
[0091] Horizontal orientation: If x' min ≥x min And x' max ≤x max , then the occluded area is in the horizontal direction of the target area, if x' min <x min , then the occluded area is at least partially to the left of the target area, if x' max >x max , then the occluded area is at least partially on the right side of the target area.
[0092] Vertical orientation: If y' min ≥y min And y' min ≤y max , then the occluded area is in the vertical direction of the target area, if y' min <y min , then the occluded area is at least partially above the target area. max >y max , then the occluded area is at least partially below the target area.
[0093] (e) Special case handling: If the occluded area completely contains the target area (i.e. x' min ≤x min , x' max ≥x max , y' min ≤y min, y' max ≥y max ), the target area is completely occluded.
[0094] (3) The rules for selecting observation angles are as follows:
[0095] Unobstructed observation angles are prioritized;
[0096] If there is an obstruction, then according to the obstruction area A = (x' max -x' min )*(y' max -y' min ) Filter out the observation angle with the smallest occlusion area.
[0097] (4) Stop point adjustment:
[0098] For the selected observation angles, if the left side of the target area is blocked, the robot will be called to automatically move right. Moving distance D x It can be set according to the severity of the occlusion and the size of the target. x =k x *(x' max -x' min ), where k x is an empirical coefficient. Similarly, if the right side is blocked, the robot moves to the left. Similarly, if the upper or lower side of the target area is blocked, the robot is called to move forward automatically, moving a distance D y =k y *(y' max -y' min ).
[0099] Step 404, the inspection robot automatically moves to the adjusted docking position, obtains the video frames collected by the robot under the screened observation angle, and then mobilizes the servo interface to automatically servo-adjust the target image to the video center based on the pixel coordinates of the center point of the target boundary box in the latest acquired video frame and the video center offset value, and automatically performs magnification according to the preset rules for different detection points (for example, if the target is a meter, the preset magnification value is 1 / 3).
[0100] Calculation of the offset between the target center and the camera center: Assume that the resolution of the video frame is (width, height), and the coordinates of the center point of the camera's current field of view are (width / 2, height / 2); Calculate the offset: horizontal offset d x =U center -width / 2; vertical offset d y =V center -height / 2.
[0101] If the offset exceeds the preset threshold, the servo needs to be called and the offset is converted into a gimbal control parameter (d' x ,d' y ), determined by the servo template table: d' x =d x *focusCoef*1e -4 ;d' y =d y *focusCoef*1e -4 .
[0102] The focusCoef in the formula is obtained from the servo template table. Some examples of servo template parameters are as follows:
[0103] <param>
[0104] <FocusCoef_X> 2.4830< / FocusCoef_X>
[0105] <FocusCoef_Y> 2.4830< / FocusCoef_Y>
[0106] <enable> false< / enable>
[0107]
[0108] <param>
[0109] <FocusCoef_X> 2.3587< / FocusCoef_X>
[0110] <FocusCoef_Y> 2.3587< / FocusCoef_Y>
[0111] <enable> false< / enable>
[0112]
[0113] Each item in this servo template defines the focus coefficient (FocusCoef) of the gimbal under specific conditions. Specifically, each parameter contains two key focus coefficients: FocusCoef_X and FocusCoef_Y, which correspond to the adjustment coefficients of the gimbal in the horizontal (X-axis) and vertical (Y-axis) directions respectively. These coefficients are used to adjust the offset (d x ,d y ) is converted into the PTZ control parameter (d' x ,d' y ), thereby achieving precise control of the gimbal.
[0114] The PTZ control interface obtains control parameters to adjust the PTZ so that the target moves to the center of the field of view.
[0115] Step 405: read the zoom template table to obtain the current magnification according to the ratio of the target boundary box and the video boundary. If it is lower than the required zoom value, the camera calls the interface according to the preset zoom value to automatically zoom, focus, and expose.
[0116] Step 406: Combine the observation angle, the docking position, the adjusted gimbal control parameters and the camera parameters obtained by the above calculation into a preset position, and output it to the preset position candidate set.
[0117] Step 5: Inspection route optimization:
[0118] Based on the obtained preset position candidate set, the ant colony algorithm (ACO) is used to plan the optimal route. The specific steps are as follows: Figure 3 shown.
[0119] Step 501: Define the problem.
[0120] Node: Each piece of data in the preset position candidate set.
[0121] Edge: A path between nodes. Each edge has two costs: movement cost and observation cost. Here, the observation cost is simplified to observation time, because the observation time is usually independent of the location, but related to the length of time spent at each location.
[0122] The stop time (observation time) is the time it takes to change from the observation angle, PTZ control parameters and camera parameters in the previous preset position (preset position i) to the observation angle, PTZ control parameters and camera parameters in the current preset position (preset position j). In other words, the closer the observation angle, PTZ control parameters and camera parameters between two consecutive preset positions are, the shorter the stop time is.
[0123] Step 502: Initialization.
[0124] Initialize pheromones and ants:
[0125] Initialize the pheromone concentration between each position in the preset position candidate set. At the same time, initialize a certain number of ants, each ant starting from the current position of the robot.
[0126] Pheromone: Initialize a certain amount of pheromone τ on each possible edge ij (0), indicating the attractiveness of the path.
[0127] Heuristic information: Calculate heuristic information for each edge, based on the inverse of the Euclidean distance to indicate the difficulty of moving where d ij is the distance between the stop positions i and j, and ∈ is a small positive number to prevent division by zero.
[0128] Number of ants: Determine the number of ants m that participate in the search.
[0129] Step 503: Ant movement process.
[0130] The ant starts from the starting position.
[0131] Ants select the next node based on a probabilistic formula of pheromone concentration and heuristic information.
[0132] The probability of selection can be defined as:
[0133]
[0134] Among them, τ ij is the pheromone on edge ij, η ij is the heuristic information, α and β are parameters that control the relative importance of pheromone and heuristic information, and allowed i is the set of next positions that the ant can choose at its current position i.
[0135] When the ant moves to the next node, it updates its accumulated observation time cost according to the observation time of that node.
[0136] The ant continues to move until it has traversed all preset positions.
[0137] Step 504: Cost calculation.
[0138] For each path constructed by an ant, calculate its total cost. Consider distance and stop time. Path cost C k The path for ant k can be expressed as:
[0139]
[0140] where path k is the set of all edges (i, j) on the path of ant k. ij is the distance of edge (i,j). stoppedtime j is the stop time at preset position j. γ and δ are weight parameters that control the importance of distance and stop time.
[0141] Step 505: Pheromone update.
[0142] After each ant completes its path, it updates the pheromones on the path according to the total cost of its path. Generally, the paths with lower costs get more pheromones.
[0143]
[0144] Where ρ is the pheromone evaporation rate, m is the number of ants, is the amount of pheromone left by the kth ant on edge ij, which is usually inversely proportional to the path cost.
[0145] Step 506: iteration and convergence.
[0146] The process of ant movement, cost calculation, and pheromone update is repeated until the pheromone distribution stable stopping condition is met and the path with the lowest total cost is output as the optimal observation route.
[0147] Embodiment 2
[0148] This embodiment provides an inspection path optimization system based on preset position generation.
[0149] This embodiment provides a patrol path optimization system based on preset position generation, such as Figure 2 As shown, it specifically includes:
[0150] An initialization module is configured to: obtain a video collected by the inspection robot during the process of traveling along a set inspection route;
[0151] A docking position generation module is configured to: for a video frame, perform detection target recognition, calculate the position coordinates of the detection target, calculate the relative position vector between the robot position and the detection target, set a set of observation angles based on the relative position vector, and calculate a docking position;
[0152] A docking position adjustment module is configured to: after controlling the inspection robot to move to the docking position, obtain the video frames collected by the robot at each observation angle, determine the occlusion area and occlusion orientation of the detection target based on the latest acquired video frame, filter the observation angle based on the occlusion area, and adjust the docking position based on the occlusion area and occlusion orientation;
[0153] A parameter determination module is configured to: control the inspection robot to move to the adjusted parking position, obtain video frames collected by the robot under the selected observation angles, and determine the pan / tilt control parameters and camera parameters based on the latest obtained video frames;
[0154] A preset position generation module is configured to: for each detection target, combine the adjusted parking position, the screened observation angle, the determined pan / tilt control parameters and the camera parameters into a preset position;
[0155] The path optimization module is configured to optimize the inspection path based on all preset positions with the goal of minimizing the stop time and moving distance.
[0156] It should be noted here that each module in this embodiment corresponds to each step in Example 1 one by one, and the specific implementation process is the same, which will not be repeated here.
[0157] Embodiment 3
[0158] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the inspection path optimization method based on preset position generation as described in the first embodiment above are implemented.
[0159] Embodiment 4
[0160] This embodiment provides a computer device, such as Figure 4 As shown, it includes a computer-readable storage medium 1003, a processor 1001, a communication interface 1002, and a computer program stored on the computer-readable storage medium 1003 and executable on the processor 1001, wherein the processor 1001, the communication interface 1002, and the computer-readable storage medium 1003 may be connected via a bus or other means. The communication interface 1002 is used to receive and send data, and when the processor 1001 executes the program, the steps in the inspection path optimization method based on preset position generation as described in the first embodiment above are implemented.
[0161] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0162] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0163] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1The steps for the functions specified in one or more boxes.
[0164] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for optimizing inspection paths based on preset position generation, characterized in that: include: Obtain the video collected by the inspection robot during its movement along the set inspection route; For the video frame, the detection target is identified and the position coordinates of the detection target are calculated. Then, the relative position vector between the robot position and the detection target is calculated. Based on the relative position vector, a set of observation angles is set and a parking position is calculated. After the inspection robot is controlled to move to the docking position, the video frames collected by the robot at each observation angle are obtained, and based on the latest video frames, the occlusion area and occlusion orientation of the detection target are determined, the observation angle is screened based on the occlusion area, and the docking position is adjusted based on the occlusion area and occlusion orientation; Control the inspection robot to move to the adjusted parking position, obtain the video frames collected by the robot under the selected observation angles, and determine the pan / tilt control parameters and camera parameters based on the latest acquired video frames; For each detection target, the adjusted parking position, the selected observation angle, the determined gimbal control parameters and the camera parameters are combined into a preset position; Based on all preset positions, the inspection path is optimized with the goal of minimizing the stop time and moving distance.
2. The inspection path optimization method based on preset position generation according to claim 1, characterized in that: The step of calculating the position coordinates of the detection target includes: By identifying the detection target, a bounding box of the detection target in the video frame is obtained, and the pixel coordinates of the center point of the bounding box are calculated; After the pixel coordinates of the center point are converted into coordinates of the camera coordinate system, the position coordinates of the detection target are calculated in combination with the coordinates of the robot position.
3. The inspection path optimization method based on preset position generation according to claim 1, characterized in that: Based on the relative position vector, the method for calculating the docking position is: stopping position =robot position +k*relative vector *normalize(relative vector ) Among them, k is the adjustment coefficient, normalize() is used to normalize the vector, robot position To detect the coordinates of the target, relative vector is the relative position vector between the detection target and the detection target.
4. The inspection path optimization method based on preset position generation according to claim 1, characterized in that: The step of determining the occlusion area and occlusion orientation of the detection target includes: For the latest acquired video frame, the detection target is identified, and the area where the depth difference between the detection target and the background area exceeds the threshold is regarded as the occlusion area, and the boundary box of the occlusion area is determined; The occlusion orientation is obtained by comparing the bounding box of the occluded area with the bounding box of the most recently identified detection target.
5. The inspection path optimization method based on preset position generation according to claim 1, characterized in that: The step of adjusting the docking position comprises: If the occluded area is on the left side of the detection target, the docking position moves to the right. If the occluded area is on the right side of the detection target, the docking position moves to the left, and the moving distance is D. x =k x *(x' max -x' min ); If the occluded area is above or below the detection target, the parking position moves forward and the moving distance is D y =k y *(y' max -y' min ); Among them, k x and k y is the empirical coefficient, and the bounding box of the detected target is (x min, y min, x max, y max ), the bounding box of the occluded area is (x' min, y' min, x' max, y' max ).
6. The inspection path optimization method based on preset position generation according to claim 1, characterized in that: The moving distance is the distance between two consecutive preset positions.
7. The inspection path optimization method based on preset position generation according to claim 1, characterized in that: The closer the observation angle, the pan / tilt control parameters and the camera parameters between two consecutive preset positions are, the shorter the stop time is.
8. A patrol route optimization system based on preset position generation, characterized in that: include: An initialization module is configured to: obtain a video collected by the inspection robot during the process of traveling along a set inspection route; A docking position generation module is configured to: for a video frame, perform detection target recognition, calculate the position coordinates of the detection target, calculate the relative position vector between the robot position and the detection target, set a set of observation angles based on the relative position vector, and calculate a docking position; A docking position adjustment module is configured to: after controlling the inspection robot to move to the docking position, obtain the video frames collected by the robot at each observation angle, determine the occlusion area and occlusion orientation of the detection target based on the latest acquired video frame, filter the observation angle based on the occlusion area, and adjust the docking position based on the occlusion area and occlusion orientation; A parameter determination module is configured to: control the inspection robot to move to the adjusted parking position, obtain video frames collected by the robot under the selected observation angles, and determine the pan / tilt control parameters and camera parameters based on the latest obtained video frames; A preset position generation module is configured to: for each detection target, combine the adjusted parking position, the screened observation angle, the determined pan / tilt control parameters and the camera parameters into a preset position; The path optimization module is configured to optimize the inspection path based on all preset positions with the goal of minimizing the stop time and moving distance.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps in the inspection path optimization method based on preset position generation as described in any one of claims 1 to 7 are implemented.
10. A computer device comprising a computer-readable storage medium, a processor, and a computer program stored in the computer-readable storage medium and executable on the processor, characterized in that: When the processor executes the program, the steps in the inspection path optimization method based on preset position generation as described in any one of claims 1 to 7 are implemented.