Inspection view point determination method and device, electronic equipment and storage medium
By performing dilation processing on the point cloud map and evaluating the viewpoint quality, the problems of large workload and difficulty in ensuring safe distance in manual annotation of viewpoints during rotor robot inspection were solved, and more reasonable inspection viewpoint generation and safe distance maintenance were achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NORTH CHINA ELECTRIC POWER UNIV
- Filing Date
- 2023-07-05
- Publication Date
- 2026-04-21
AI Technical Summary
In existing technologies, the inspection of rotorcraft requires manual marking of inspection viewpoints, which is labor-intensive and makes it difficult to ensure a safe distance from high-voltage equipment. Traditional random sampling methods are also unable to generate a reasonable number of inspection viewpoints, posing safety hazards.
By dilating the voxelized point cloud map, the safe area and candidate viewpoint set of the object to be inspected are determined. The viewpoint quality is evaluated using a ray tracing algorithm, and the target inspection viewpoint is selected to ensure the reasonableness of the safe distance and viewpoint.
It reduces manual workload, improves the accuracy and safety of inspection viewpoints, avoids safety hazards caused by relying on human experience, and generates more reasonable candidate viewpoints.
Smart Images

Figure CN116664673B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of inspection, and more specifically, to a method, apparatus, electronic device, and storage medium for determining inspection viewpoints. Background Technology
[0002] In industrial environments such as substations, mines, and factories, regular inspections of facilities are necessary to ensure their normal operation. Due to their small size and agile movement, rotorcraft are widely used for inspection tasks in industrial environments.
[0003] In existing technologies, during rotorcraft inspections, it is necessary to manually mark the locations of inspection viewpoints and manually operate the rotorcraft to fly to the manually marked locations for photography, which involves a significant workload. Furthermore, industrial inspections involve objects of varying sizes, shapes, and numbers. Traditional random sampling methods for generating candidate viewpoints require manually specifying the number of viewpoints to be sampled, making it difficult to generate a reasonable number of viewpoints for the inspection objects. Additionally, high-voltage equipment in industrial environments presents discharge distances, and personnel and machines must maintain a safe distance from high-voltage equipment during inspections. Conventional industrial inspections rely on human experience, making it difficult to guarantee safe distances between personnel and high-voltage equipment, posing safety hazards. Summary of the Invention
[0004] The purpose of this application is to address the shortcomings of the prior art by providing a method, apparatus, electronic device, and storage medium for determining inspection viewpoints, thereby improving the accuracy of inspection viewpoint generation.
[0005] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:
[0006] In a first aspect, embodiments of this application provide a method for determining inspection viewpoints, the method comprising:
[0007] Based on the attribute parameters of each object to be inspected in the voxelized point cloud map, the voxelized point cloud map is dilated to obtain the dilated voxelized point cloud map.
[0008] Based on the voxel set of each object to be inspected in the expanded voxelized point cloud map, the safe area of each object to be inspected is determined, wherein the voxel set includes at least one voxel.
[0009] Based on the security zone, a candidate viewpoint set is determined for each of the objects to be inspected, and the candidate viewpoint set includes at least one candidate viewpoint;
[0010] Determine the viewpoint quality of each candidate viewpoint in the candidate viewpoint set relative to the voxel set of the object to be inspected;
[0011] Based on the viewpoint quality of each candidate viewpoint for the voxel set of the object to be inspected, the target inspection viewpoint for the voxel set of the object to be inspected is selected from the candidate viewpoint set.
[0012] Optionally, the step of dilating the voxelized point cloud map based on the attribute parameters of each object to be inspected in the voxelized point cloud map to obtain a dilated voxelized point cloud map includes:
[0013] Determine the safe distance based on the attribute parameters of each object to be inspected;
[0014] The voxel expansion radius is determined based on the safety distance and the circumscribed circle radius of the inspection equipment;
[0015] The voxelized point cloud map is dilated according to the voxel dilation radius to obtain the dilated voxelized point cloud map.
[0016] Optionally, determining the candidate viewpoint set for each of the objects to be inspected based on the security area includes:
[0017] Redundant iterative random sampling is performed in the safe area to determine a set of candidate viewpoint locations for the object to be inspected, wherein the set of candidate viewpoint locations includes at least one candidate viewpoint location.
[0018] Based on the candidate viewpoint positions and the visibility results of the voxels in the voxel set of the object to be inspected for each candidate viewpoint position, the candidate viewpoint direction corresponding to each candidate viewpoint position is determined.
[0019] Each candidate viewpoint position and the corresponding candidate viewpoint direction are combined into a candidate viewpoint, and each candidate viewpoint is combined into a candidate viewpoint set for the object to be inspected.
[0020] Optionally, determining the viewpoint quality of each candidate viewpoint in the candidate viewpoint set relative to the voxel set of the object to be inspected includes:
[0021] Based on the ray tracing algorithm, the number of visible angles of each face of each voxel in the voxel set of the object to be inspected from the candidate viewpoint is determined;
[0022] Based on the number of visible angles of each face of each voxel in the voxel set of the object to be inspected from the candidate viewpoint, the visibility result of each face of each voxel in the voxel set of the object to be inspected from the candidate viewpoint is determined.
[0023] Based on the visibility results of each face of each voxel in the voxel set of the object to be inspected for the candidate viewpoint and the preset values, the visibility results of each voxel in the voxel set of the object to be inspected for the candidate viewpoint are determined.
[0024] Based on the visibility results of each voxel in the voxel set of the object to be inspected, the size of the voxel set of the object to be inspected, and the size of the visible voxel set of the candidate viewpoint relative to the object to be inspected, the viewpoint quality of the candidate viewpoint relative to the voxel set of the object to be inspected is determined.
[0025] Optionally, the step of selecting the target inspection viewpoint for the object to be inspected from the candidate viewpoint set based on the viewpoint quality of each candidate viewpoint for the voxel set of the object to be inspected includes:
[0026] The candidate viewpoints are sorted according to the viewpoint quality of the voxel set of the object to be inspected, and the sorted candidate viewpoints and their ranking numbers are obtained.
[0027] Based on the ranking number of each candidate viewpoint after sorting and the number of candidate viewpoints in the candidate viewpoint set, the quality weight of each candidate viewpoint for the object to be inspected is determined.
[0028] Based on the quality weight and quality weight threshold of each candidate viewpoint for the object to be inspected, the target inspection viewpoint of the voxel set of the object to be inspected is selected from the candidate viewpoint set.
[0029] Optionally, the step of selecting target inspection viewpoints for the voxel set of the object to be inspected from the candidate viewpoint set based on the quality weights and quality weight thresholds of each candidate viewpoint includes:
[0030] If there are candidate viewpoints in the candidate viewpoint set whose quality weight for the object to be inspected is greater than the quality weight threshold, then the candidate viewpoints with a quality weight greater than the quality weight threshold are combined into a first candidate viewpoint set for the voxel set of the object to be inspected.
[0031] If there are first candidate viewpoint positions in the first candidate viewpoint position set that can be inspected to other objects to be inspected, the first candidate viewpoint positions that can be inspected to other objects to be inspected are combined as the second candidate viewpoint position set, and the second candidate viewpoint position relative to other objects to be inspected and the quality weight of the second candidate viewpoint relative to the voxel set of other objects to be inspected are determined.
[0032] If the quality weight of the second candidate viewpoint for other voxel sets of objects to be inspected is also greater than the quality weight threshold, then the second candidate viewpoint is used as the target inspection viewpoint for the voxel sets of other objects to be inspected. From the first candidate viewpoint set, the first candidate viewpoint with the highest quality weight is selected from the candidate viewpoints of multiple objects to be inspected and used as the target inspection viewpoint of the object to be inspected.
[0033] If the quality weight of each of the second candidate viewpoints relative to the voxel set of other objects to be inspected is less than the weight threshold, then the first candidate viewpoint with the highest quality weight is selected from the first candidate viewpoint set as the target inspection viewpoint of the object to be inspected.
[0034] Optionally, the step of selecting target inspection viewpoints for the voxel set of the object to be inspected from the candidate viewpoint set based on the quality weights and quality weight thresholds of each candidate viewpoint includes:
[0035] If the quality weight of each candidate viewpoint in the candidate viewpoint set for the object to be inspected is less than the quality weight threshold, then the candidate viewpoint with the highest quality weight is selected from the candidate viewpoint set as the target inspection viewpoint for the object to be inspected.
[0036] Secondly, embodiments of this application also provide an inspection viewpoint determination device, the device comprising:
[0037] The processing module is used to perform dilation processing on the voxelized point cloud map based on the attribute parameters of each object to be inspected in the voxelized point cloud map, so as to obtain the dilated voxelized point cloud map.
[0038] The determination module is used to determine the safe area of each object to be inspected based on the voxel set of each object to be inspected in the dilated voxelized point cloud map, wherein the voxel set includes at least one voxel.
[0039] The determining module is further configured to determine a candidate viewpoint set for each of the objects to be inspected based on the security area, wherein the candidate viewpoint set includes at least one candidate viewpoint;
[0040] The determination module is also used to determine the viewpoint quality of each candidate viewpoint in the candidate viewpoint set relative to the voxel set of the object to be inspected;
[0041] The filtering module is used to filter out the target inspection viewpoint of the voxel set of the object to be inspected from the candidate viewpoint set based on the viewpoint quality of each candidate viewpoint for the voxel set of the object to be inspected.
[0042] Optionally, the processing module is specifically used for:
[0043] Determine the safe distance based on the attribute parameters of each object to be inspected;
[0044] The voxel expansion radius is determined based on the safety distance and the circumscribed circle radius of the inspection equipment;
[0045] The voxelized point cloud map is dilated according to the voxel dilation radius to obtain the dilated voxelized point cloud map.
[0046] Optionally, the determining module is specifically used for:
[0047] Redundant iterative random sampling is performed in the safe area to determine a set of candidate viewpoint locations for the object to be inspected, wherein the set of candidate viewpoint locations includes at least one candidate viewpoint location.
[0048] Based on the candidate viewpoint positions and the visibility results of the voxels in the voxel set of the object to be inspected for each candidate viewpoint position, the candidate viewpoint direction corresponding to each candidate viewpoint position is determined.
[0049] Each candidate viewpoint position and the corresponding candidate viewpoint direction are combined into a candidate viewpoint, and each candidate viewpoint is combined into a candidate viewpoint set for the object to be inspected.
[0050] Optionally, the determining module is specifically used for:
[0051] Based on the ray tracing algorithm, the number of visible angles of each face of each voxel in the voxel set of the object to be inspected from the candidate viewpoint is determined;
[0052] Based on the number of visible angles of each face of each voxel in the voxel set of the object to be inspected from the candidate viewpoint, the visibility result of each face of each voxel in the voxel set of the object to be inspected from the candidate viewpoint is determined.
[0053] Based on the visibility results of each face of each voxel in the voxel set of the object to be inspected for the candidate viewpoint and the preset values, the visibility results of each voxel in the voxel set of the object to be inspected for the candidate viewpoint are determined.
[0054] Based on the visibility results of each voxel in the voxel set of the object to be inspected, the size of the voxel set of the object to be inspected, and the size of the visible voxel set of the candidate viewpoint relative to the object to be inspected, the viewpoint quality of the candidate viewpoint relative to the voxel set of the object to be inspected is determined.
[0055] Optionally, the determining module is specifically used for:
[0056] The candidate viewpoints are sorted according to the viewpoint quality of the voxel set of the object to be inspected, and the sorted candidate viewpoints and their ranking numbers are obtained.
[0057] Based on the ranking number of each candidate viewpoint after sorting and the number of candidate viewpoints in the candidate viewpoint set, the quality weight of each candidate viewpoint for the object to be inspected is determined.
[0058] Based on the quality weight and quality weight threshold of each candidate viewpoint for the object to be inspected, the target inspection viewpoint of the voxel set of the object to be inspected is selected from the candidate viewpoint set.
[0059] Optionally, the filtering module is specifically used for:
[0060] If there are candidate viewpoints in the candidate viewpoint set whose quality weight for the object to be inspected is greater than the quality weight threshold, then the candidate viewpoints with a quality weight greater than the quality weight threshold are combined into a first candidate viewpoint set for the voxel set of the object to be inspected.
[0061] If there are first candidate viewpoint positions in the first candidate viewpoint position set that can be inspected to other objects to be inspected, the first candidate viewpoint positions that can be inspected to other objects to be inspected are combined as the second candidate viewpoint position set, and the second candidate viewpoint position relative to other objects to be inspected and the quality weight of the second candidate viewpoint relative to the voxel set of other objects to be inspected are determined.
[0062] If the quality weight of the second candidate viewpoint for other voxel sets of objects to be inspected is also greater than the quality weight threshold, then the second candidate viewpoint is used as the target inspection viewpoint for the voxel sets of other objects to be inspected. From the first candidate viewpoint set, the first candidate viewpoint with the highest quality weight is selected from the candidate viewpoints of multiple objects to be inspected and used as the target inspection viewpoint of the object to be inspected.
[0063] If the quality weight of each of the second candidate viewpoints relative to the voxel set of other objects to be inspected is less than the weight threshold, then the first candidate viewpoint with the highest quality weight is selected from the first candidate viewpoint set as the target inspection viewpoint of the object to be inspected.
[0064] Optionally, the filtering module is specifically used for:
[0065] If the quality weight of each candidate viewpoint in the candidate viewpoint set for the object to be inspected is less than the quality weight threshold, then the candidate viewpoint with the highest quality weight is selected from the candidate viewpoint set as the target inspection viewpoint for the object to be inspected.
[0066] Thirdly, embodiments of this application also provide an electronic device, including: a processor, a storage medium, and a bus, wherein the storage medium stores program instructions executable by the processor, and when the application runs, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the steps of the inspection viewpoint determination method described in the first aspect above.
[0067] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which is read and executes the steps of the inspection viewpoint determination method described in the first aspect.
[0068] The beneficial effects of this application are:
[0069] This application provides a method, apparatus, electronic device, and storage medium for determining inspection viewpoints. By dilating a voxelized point cloud map, the inspection equipment can maintain a safe distance from each object to be inspected during the inspection process, avoiding the reliance on human experience during routine inspections, which can easily lead to safety accidents. By determining the safe area of each object to be inspected based on the dilated voxelized point cloud map, the candidate viewpoint set determined based on the safe area can be more reasonable. By selecting target inspection viewpoints for each object to be inspected from the candidate viewpoint set based on the viewpoint quality of each candidate viewpoint relative to the voxel set of each object to be inspected, the target inspection viewpoints selected from the candidate viewpoint set are more reasonable than those determined manually from randomly generated inspection viewpoints, while also reducing the workload of manual inspection. Attached Figure Description
[0070] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0071] Figure 1 A flowchart illustrating a method for determining inspection viewpoints provided in an embodiment of this application;
[0072] Figure 2 A flowchart illustrating another method for determining inspection viewpoints provided in this application embodiment;
[0073] Figure 3 A flowchart illustrating another method for determining inspection viewpoints provided in this application embodiment;
[0074] Figure 4 A flowchart illustrating another method for determining inspection viewpoints provided in an embodiment of this application;
[0075] Figure 5 A flowchart illustrating a method for determining the inspection viewpoint of an object to be inspected, provided in an embodiment of this application;
[0076] Figure 6 A flowchart illustrating a method for determining the target inspection viewpoint of an object to be inspected, provided in an embodiment of this application;
[0077] Figure 7 A schematic diagram of an apparatus for determining inspection viewpoints according to an embodiment of this application;
[0078] Figure 8 This is a structural block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0079] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0080] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0081] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.
[0082] Routine safety inspections in industrial environments are mainly conducted manually. However, with the gradual advancement of industrial intelligence, some industrial inspections have introduced methods such as ground robots, track robots, and fixed cameras.
[0083] However, manual inspections are subject to many limitations. The inspector's skills, weather conditions, and terrain constraints can all affect the accuracy of the inspection results. Ground robots struggle to provide a comprehensive view of high-altitude areas, and tracked robots and fixed cameras have significant limitations in their inspection range. Rotary robots (such as drones), on the other hand, are small and highly maneuverable, making them suitable for inspection tasks in industrial environments. Industrial environments contain numerous electrical components, and even when using drones for inspections in conventional industrial settings, manual marking of inspection points and manual operation of the drone to fly to those points and take photographs still require a considerable amount of work.
[0084] Meanwhile, high-voltage equipment in industrial environments has a discharge distance, and the discharge distance varies for equipment of different voltage levels. Personnel and machines should maintain a safe distance from high-voltage equipment during inspections. However, routine inspections in industrial environments rely on experience, making it difficult to guarantee a safe distance from each piece of equipment, which poses a safety hazard.
[0085] In addition, during industrial inspections, the objects being inspected vary in size, shape, and number. Traditional random sampling methods require manually specifying the number of viewpoints to be sampled, making it difficult to generate a reasonable number of candidate viewpoints for each inspection object.
[0086] Therefore, this application addresses the aforementioned problems in the prior art by proposing a method for determining inspection viewpoints. For the issue of discharge distance in high-voltage equipment within industrial environments, a voxel expansion method is used to expand the surface of the high-voltage equipment by a corresponding safe distance. To address the difficulty in generating a reasonable number of candidate viewpoints for inspection objects of varying sizes and shapes, a redundant iterative random sampling method is used to generate candidate viewpoints, and a viewpoint quality evaluation function is designed to make the generated candidate viewpoints more reasonable.
[0087] The specific implementation method provided in this application is applied to an electronic device, which may be a terminal device with computing power and display function, such as a desktop computer or a laptop computer, or it may be a server.
[0088] Figure 1 This is a flowchart illustrating a method for determining inspection viewpoints according to an embodiment of this application. The execution subject of this method is the aforementioned electronic device. Figure 1 As shown, the method includes:
[0089] S101. Based on the attribute parameters of each object to be inspected in the voxelized point cloud map, the voxelized point cloud map is dilated to obtain the dilated voxelized point cloud map.
[0090] Optionally, the point cloud map can be a point cloud map of a specific industrial environment, such as a mining area, chemical plant, textile mill, cement plant, power plant, or other diverse industrial environments. A specific industrial environment to be inspected may include various objects such as multiple buildings, power transmission lines, high-voltage equipment, hillsides, trees, and vegetation. The point cloud map can include multiple point cloud points with semantic information, as well as the three-dimensional position information of each point cloud point in world coordinates. These point cloud points can indicate the specific spatial distribution of different objects in a given scene. For example, in a mining area industrial environment, different objects such as mountains, industrial equipment, buildings, trees, power transmission lines, and substations can all be displayed using a point cloud map.
[0091] Optionally, the point cloud map of the industrial environment can be voxelized to generate an octree map, which is a voxelized point cloud map. An octree is a tree-like structure used to describe three-dimensional space. Each node of an octree represents a volume element of a cube, and each node has eight child nodes. The sum of the volume elements represented by these eight child nodes is equal to the volume of the parent node.
[0092] Optionally, the point cloud map in the industrial environment can contain multiple different objects, each of which can be used as the object to be inspected in the embodiments of this application, such as power transmission lines, substations, trees, buildings, utility poles, etc.
[0093] Optionally, based on the attribute parameters of each object to be inspected, a preset method can be used to dilate the voxelized point cloud map to obtain a voxelized point cloud map after voxel dilation.
[0094] S102. Based on the voxel set of each object to be inspected in the expanded voxelized point cloud map, determine the safe area of each object to be inspected.
[0095] Optionally, if λ objects to be inspected can be obtained from the point cloud map, then a voxel set of λ objects to be inspected can be obtained. For example, O{V1,V2,…V} can be used. λ Let} represent the set of voxels of all objects to be inspected in the point cloud map, where O is the set of voxels of all objects to be inspected, V1, V2, ... V λ This represents the voxel set of each object to be inspected.
[0096] Each voxel set of an object to be inspected includes at least one voxel. For example, if the voxel set of a certain object to be inspected is V... q This set of voxels can be represented as V q {v1,v2,v3,…v n}, where v n It is any voxel in the voxel set.
[0097] Optionally, based on the voxels in the voxel set of each object to be inspected in the expanded voxelized point cloud map, a safe zone is determined for each object to be inspected. This safe zone refers to the area in the expanded voxelized point cloud map that is not occupied by voxels; in this safe zone, the UAV can fly freely and perform inspection work on each object to be inspected.
[0098] S103. Based on the safety zone, determine the candidate viewpoint set for each object to be inspected.
[0099] The candidate viewpoint set includes at least one candidate viewpoint.
[0100] Optionally, within a safe area, a preset method can be used to determine one or more candidate viewpoints as a set of candidate viewpoints for each object to be inspected. These one or more candidate viewpoints can be used to inspect the objects to be inspected.
[0101] S104. Determine the viewpoint quality of each candidate viewpoint in the candidate viewpoint set relative to the voxel set of the object to be inspected.
[0102] Optionally, the viewpoint quality can be a numerical value, such as any value between 0 and 1. Since the number of voxels in the voxel set of a certain object to be inspected observed from each candidate viewpoint is different, the viewpoint quality of each candidate viewpoint for a certain voxel set of the object to be inspected is different. The larger the viewpoint quality value, the more voxels of the object to be inspected that the candidate viewpoint can observe.
[0103] For example, candidate viewpoint ξ1 is for the voxel set V of the object to be inspected. q The viewpoint quality is 0.6, and the candidate viewpoint ξ2 is for the voxel set V of the object to be inspected. q The viewpoint quality is 0.2, and the candidate viewpoint ξ3 is for the voxel set V of the object to be inspected. q The viewpoint quality is 0.4.
[0104] S105. Based on the viewpoint quality of each candidate viewpoint for the voxel set of the object to be inspected, select the target inspection point of the voxel set of the object to be inspected from the candidate viewpoint set.
[0105] Optionally, based on the viewpoint quality of the voxel set of the object to be inspected determined in S104 above, a preset method can be used to select the target inspection point of the voxel set of the object to be inspected from each candidate viewpoint in the candidate viewpoint set.
[0106] Optionally, when each object to be inspected has obtained a target inspection viewpoint, the target inspection viewpoints of the voxel set of each object to be inspected are combined into an inspection viewpoint set, which serves as the target inspection viewpoint set of the point cloud map.
[0107] In this embodiment, by dilating the voxelized point cloud map, the inspection equipment can maintain a safe distance from each object to be inspected during the inspection process, avoiding the reliance on human experience during conventional inspections, which can easily lead to safety accidents. By determining the safe area of each object to be inspected based on the dilated voxelized point cloud map, the candidate viewpoint set determined based on the safe area can be more reasonable. By selecting target inspection viewpoints for each object to be inspected from the candidate viewpoint set based on the viewpoint quality of each candidate viewpoint relative to the voxel set of each object to be inspected, the target inspection viewpoints selected from the candidate viewpoint set are more reasonable than those determined manually from randomly generated inspection viewpoints, while also reducing the workload of manual inspection.
[0108] Figure 2 A flowchart illustrating another inspection viewpoint determination method provided in this application embodiment is shown below. Figure 2 As shown, step S101 above, which involves dilating the voxelized point cloud map based on the attribute parameters of each object to be inspected in the voxelized point cloud map to obtain the dilated voxelized point cloud map, may include:
[0109] S201. Determine the safe distance based on the attribute parameters of each object to be inspected.
[0110] The safe distance refers to the safe distance that the inspection equipment needs to maintain between itself and the object to be inspected during the inspection process. The object to be inspected can be live equipment in an industrial environment, buildings such as floors, or power transmission lines, among other things.
[0111] Optionally, if the equipment to be inspected has voltage parameters and the equipment has a discharge distance (different voltage levels require different discharge distances), then the safe distance between the inspection equipment and the equipment will vary. The safe distance between the inspection equipment and the equipment to be inspected can be determined based on the voltage parameters of the equipment. This safe distance can be calculated using [method / method / approach]. safe This can be represented by the voltage parameters of the energized equipment. Specifically, the safe voltage distance of the energized equipment can be queried based on its voltage parameters. It is worth noting that in this embodiment, the safe distance of the object to be inspected can also be determined by other attribute parameters of the object.
[0112] S202. Determine the voxel expansion radius based on the safety distance and the circumscribed circle radius of the inspection equipment.
[0113] Optionally, the voxel expansion radius of the voxel set of the object to be inspected for the live equipment is the sum of the safety distance and the radius of the circumcircle of the inspection equipment. For example, the safety distance for the live equipment determined in S201 above is l. safeIf the circumcircle radius of the inspection equipment is r, then the voxel expansion radius of the energized equipment is l. safe +r, meaning that the expansion radius of each voxel in the voxel set of the charged device is l. safe +r.
[0114] Optionally, for other non-energized objects to be inspected, such as floors, mountains, and trees, the voxel expansion radius of these objects is the radius of the circumcircle of the inspection equipment. Then, the expansion radius of each voxel in the voxel set of other non-energized objects to be inspected is r.
[0115] S203. Dilate the voxelized point cloud map according to the voxel dilation radius to obtain the dilated voxelized point cloud map.
[0116] Optionally, based on the voxel expansion radius of each object to be inspected in the point cloud map determined in S202 above, the voxels in the voxel set of each object to be inspected are expanded to finally obtain the expanded voxelized point cloud map.
[0117] In this embodiment, by performing voxel expansion treatment on the voxels of the object to be inspected, the surface of the high-voltage equipment can be expanded by a corresponding safe distance, thereby ensuring that the inspection equipment maintains a safe distance from each object to be inspected and avoiding potential safety hazards between the inspection equipment and the object to be inspected during the inspection process.
[0118] Figure 3 A flowchart illustrating another method for determining inspection viewpoints provided in this application embodiment is shown below. Figure 3 As shown, in step S103 above, determining the candidate viewpoint set for each object to be inspected based on the safety zone may include:
[0119] S301. Sampling of viewpoint positions in the safe area to determine the candidate viewpoint position set of the object to be inspected.
[0120] The candidate viewpoint location set includes at least one candidate viewpoint location.
[0121] Optionally, the candidate viewpoints mentioned above are composed of the candidate viewpoint position and the candidate viewpoint direction. Specifically, for example, a candidate viewpoint is ξ = {ξ...} l ,ξ d}, where ξ l ξ represents the candidate viewpoint position. d Let the candidate viewpoint direction be used. Then, after randomly sampling the candidate viewpoint locations within the safe area, a set of candidate viewpoint locations for the object to be inspected can be obtained. For example, one could use... To indicate, among which, This refers to the voxel set V of the object to be inspected. q The set of viewpoint positions.
[0122] S302. Based on the position of each candidate viewpoint and the visibility results of each candidate viewpoint position relative to the voxel cluster of the object to be inspected, determine the candidate viewpoint direction corresponding to each candidate viewpoint position.
[0123] The visibility result of each candidate viewpoint position relative to the voxel set of the object to be inspected refers to the number of voxels in the voxel set of the object to be inspected that can be observed at each candidate viewpoint position when there is no occlusion. Specifically, the visibility of each candidate viewpoint position relative to the voxel set of the object to be inspected can be determined using the ray casting method, thereby obtaining the visibility result of each candidate viewpoint position relative to the voxel set of the object to be inspected, which is the size of the visible voxel set of each candidate viewpoint position in the voxel set of the object to be inspected. The visible voxel set can be, for example, represented by V'. q To express.
[0124] Specifically, continuing with the voxel set V of the object to be inspected in S301 above... q For example, V q {v1,v2,v3,v4,v5} are the candidate viewpoint positions of the object to be inspected. At that location, the position can be obtained using the ray projection method. It can be observed that the voxel set V of the object to be inspected q If v1, v3, and v4 are the three voxels, then the viewpoint position is... The set of visible voxels in the voxel set of the object to be inspected is V'. q {v1,v3,v4}, that is, at this viewpoint position The visibility result of the voxel cluster for the object to be inspected is 3.
[0125] Optionally, the candidate viewpoint direction corresponding to each candidate viewpoint position can be calculated using the following formula (I).
[0126]
[0127] Where, ξ d Candidate viewpoint directions, Let be the direction vector from the candidate viewpoint position to each voxel. v i This refers to the voxels in the voxel set of the object to be inspected; ξ l This refers to the candidate viewpoint position; N refers to the position at the candidate viewpoint position ξ. l The visible voxel set V' of the voxel set of the object to be inspected q The size, which is the candidate viewpoint position ξ mentioned above. l For the voxel set V of the object to be inspected qThe visibility result of the voxels; K refers to the voxel set V of the object to be inspected. q Size.
[0128] S303. Combine the position of each candidate viewpoint and the direction of the candidate viewpoint corresponding to each candidate viewpoint position into a candidate viewpoint, and combine the candidate viewpoints into a candidate viewpoint set for the object to be inspected.
[0129] Optionally, continue with the voxel set V of the object to be inspected in S301 above. q For example, the candidate viewpoint position ξ can be calculated using the above S302. l ξ, the candidate viewpoint direction for the object to be inspected d Then, the calculated candidate viewpoint direction and candidate viewpoint position are combined to obtain the result at the candidate viewpoint position ξ. l For the voxel set V of the object to be inspected q Candidate viewpoints ξ1={ξ l ,ξ d The candidate viewpoint position ξ can also be obtained using the above method. h For the voxel set V of the object to be inspected q Candidate viewpoints ξ2={ξ h ,ξ d}, and can also obtain the candidate viewpoint position ξ r For the voxel set V of the object to be inspected q Candidate viewpoint ξ3={ξ r ,ξ d}, and other candidate viewpoint positions relative to the voxel set V of the object to be inspected. q Candidate viewpoints are selected, and their positions are assigned to the voxel set V of the object to be inspected. q By combining the candidate viewpoints, we can obtain the voxel set V of the object to be inspected. q The candidate viewpoint set. The voxel set V of the object to be inspected. q Candidate viewpoint set Ω q {ξ1,ξ2,…ξ x Let} represent the number of candidate viewpoints, where x refers to the number of candidate viewpoints.
[0130] In this embodiment, the candidate viewpoints for each candidate viewpoint position are calculated based on the visibility results of voxels in the voxel set of the object to be inspected. This makes the calculated candidate viewpoints more accurate and reasonable.
[0131] Figure 4 A flowchart illustrating another method for determining inspection viewpoints provided in this application embodiment is shown below. Figure 4 As shown, the step S104 above, which determines the viewpoint quality of each candidate viewpoint in the candidate viewpoint set relative to the voxel set of the object to be inspected, may include:
[0132] S401. Based on the ray tracing algorithm, determine the number of visible angles of each face of each voxel in the voxel set of the object to be inspected from the candidate viewpoint.
[0133] Optionally, ray tracing algorithms can inspect objects in a scene by tracing the light rays entering the scene from the eye. This method determines the number of visible angles of each face of each voxel in the voxel set of the object to be inspected from each candidate viewpoint; in other words, it determines the number of angles of each face of each voxel in the voxel set of the object to be inspected that can be observed from that candidate viewpoint.
[0134] Each voxel has six faces, which can be used with f i To represent a face in a voxel, each face has four corners. For example, from the candidate viewpoint, you can see the four corners of face f1 of voxel v1 in the voxel set of the object to be inspected, the two corners of face f2, and the one corner of face f3.
[0135] S402. Based on the number of visible angles of each face of each voxel in the voxel set of the object to be inspected from the candidate viewpoint, determine the visibility result of each face of each voxel in the voxel set of the object to be inspected from the candidate viewpoint.
[0136] Optionally, the visibility result is a value between 0 and 1.
[0137] Specifically, it can be represented by the following formula (II).
[0138] p(ξ,f i Formula (II) = n / 4
[0139] Where n is a candidate viewpoint for a certain face f of a certain voxel in the voxel set of the object to be inspected. i The number of visible angles, 0≤n≤4, p(ξ,f i () represents the visibility results of each face of a voxel in the voxel set of the object to be inspected from the candidate viewpoint.
[0140] S403. Based on the visibility results of each face of each voxel in the voxel set of the object to be inspected for the candidate viewpoint and the preset values, determine the visibility results of each voxel in the voxel set of the object to be inspected for the candidate viewpoint.
[0141] Optionally, if a candidate viewpoint can have a maximum of three faces visible for a voxel in the voxel set of the object to be inspected, then the above-preset value can be 1 / 3. The visibility result of each voxel in the voxel set of the object to be inspected for the candidate viewpoint can be expressed by the following formula (iii).
[0142]
[0143] The sum of the visibility results of each face of a voxel in the voxel set of the object to be inspected from the candidate viewpoint is multiplied by a preset value to obtain the visibility result of a voxel in the voxel set of the object to be inspected from the candidate viewpoint.
[0144] S404. Based on the visibility results of each voxel in the voxel set of the object to be inspected, the size of the voxel set of the object to be inspected, and the size of the visible voxel set of the candidate viewpoint relative to the object to be inspected, determine the viewpoint quality of the candidate viewpoint relative to the voxel set of the object to be inspected.
[0145] The size of the voxel set of the object to be inspected refers to the number of all voxels in the voxel set of the object to be inspected.
[0146] Optionally, based on the visibility results of each voxel in the voxel set of the object to be inspected by the candidate viewpoint, the number of voxels in the voxel set of the object to be inspected that the candidate viewpoint can observe can be obtained. For example, if the visibility result of a certain voxel in the voxel set of the object to be inspected by the candidate viewpoint is 0, it can be indicated that the candidate viewpoint cannot see the voxel. Therefore, the voxels in the voxel set of the object to be inspected that the candidate viewpoint can observe are formed into a visible voxel set of the candidate viewpoint for the object to be inspected. If there are M visible voxels in this visible voxel set, then the size of the visible voxel set of the candidate viewpoint for the object to be inspected is M.
[0147] For example, if a candidate viewpoint can observe 3 voxels in the voxel set of the object to be inspected, then the size of the visible voxel set of the candidate viewpoint for the object to be inspected is 3.
[0148] Then, the viewpoint quality of the candidate viewpoint relative to the voxel set of the object to be inspected can be expressed by the following formula (iv).
[0149]
[0150] Where G(ξ,P) is the viewpoint quality, K is the size of the voxel set of the object to be inspected, N is the size of the visible voxel set of the candidate viewpoint relative to the object to be inspected, and p(ξ,v) is the viewpoint quality. i () represents the visibility results of each voxel in the voxel set of the object to be inspected for the candidate viewpoint.
[0151] The above steps S401 to S404 describe the calculation process of the viewpoint quality of a candidate viewpoint relative to a set of voxels of an object to be inspected. The viewpoint quality of other candidate viewpoints in the candidate viewpoint set of the object to be inspected is also calculated by traversing the calculation process of S401 to S404. Thus, the viewpoint quality of all candidate viewpoints in the candidate viewpoint set of the object to be inspected relative to the set of voxels of the object to be inspected can be calculated.
[0152] In this embodiment, by calculating the viewpoint quality of candidate viewpoints relative to the voxel set of the object to be inspected, a reasonable number of candidate viewpoints can be generated for the object to be inspected. This avoids the need to manually specify the number of viewpoints to be sampled after generating candidate viewpoints using the traditional random sampling method, thus reducing the amount of manual work and making the number of generated candidate viewpoints more reasonable.
[0153] Figure 5 A flowchart illustrating a method for determining the inspection viewpoint of an object to be inspected, as provided in this application embodiment, is shown below. Figure 5 As shown, step S105 above, which selects the target inspection point of the object to be inspected from the candidate viewpoint set based on the viewpoint quality of each candidate viewpoint relative to the voxel set of the object to be inspected, may include:
[0154] S501. Sort the candidate viewpoints according to the viewpoint quality of the voxel set of the object to be inspected, and obtain the sorted candidate viewpoints and their ranking numbers.
[0155] For example, if candidate viewpoint ξ1 is directed to the voxel set V of the object to be inspected... q The viewpoint quality is 0.6, and the candidate viewpoint ξ2 is for the voxel set V of the object to be inspected. q The viewpoint quality is 0.2, and the candidate viewpoint ξ3 is for the voxel set V of the object to be inspected. q If the viewpoint quality is 0.4, then the sorted candidate viewpoints are {ξ}. 1, ξ3,ξ2}, the ranking of candidate viewpoint ξ1 is 1, the ranking of candidate viewpoint ξ3 is 2, and the ranking of candidate viewpoint ξ2 is 3.
[0156] S502. Based on the ranking number of each candidate viewpoint after sorting and the number of candidate viewpoints in the candidate viewpoint set, determine the quality weight of each candidate viewpoint for the object to be inspected.
[0157] Specifically, the quality weight can be represented by the following formula (V).
[0158] per(ξ,V q )=1-R(ξ,V q ) / n q Formula (5)
[0159] Where, per(ξ,V) q R(ξ,V) represents the quality weight of the candidate viewpoint for the object to be inspected. q ) represents the candidate viewpoint ξ for the voxel set V of the object to be inspected. q The viewpoint quality is the ranking number of the candidate viewpoints in the voxel set of the object to be inspected, n. q This represents the number of candidate viewpoints in the candidate viewpoint set.
[0160] S503. Based on the quality weight and quality weight threshold of each candidate viewpoint for the object to be inspected, select the target inspection viewpoint of the voxel set of the object to be inspected from the candidate viewpoint set.
[0161] The quality weight threshold can be represented by δ, where 0 < δ < 1.
[0162] Optionally, based on the quality weight and quality weight threshold of each candidate viewpoint for the object to be inspected, a preset method is used to select the target inspection viewpoint for the voxel set of the object to be inspected from the candidate viewpoint set.
[0163] In this embodiment, the quality weight of the candidate viewpoint relative to the voxel set of the object to be inspected is calculated by the viewpoint quality of the candidate viewpoint relative to the voxel set of the object to be inspected and the number of candidate viewpoints in the candidate viewpoint set. This makes the calculated quality weight of the candidate viewpoint relative to the object to be inspected more reasonable, and thus the target inspection viewpoint of the voxel set of the object to be inspected selected from the candidate viewpoint set based on the quality weight is more reasonable.
[0164] Figure 6 A flowchart illustrating a method for determining the target inspection viewpoint of an object to be inspected, as provided in this application embodiment, is shown below. Figure 6 As shown, step S503 above, which selects the target inspection viewpoints for the voxel set of the object to be inspected from the candidate viewpoint set based on the quality weight and quality weight threshold of each candidate viewpoint, may include:
[0165] S601. Determine whether the quality weight of each candidate viewpoint in the candidate viewpoint set of the object to be inspected is greater than the quality weight threshold.
[0166] If the quality weight of the candidate viewpoint for the object to be inspected is greater than the quality weight threshold, then execute S602 below; if it is not greater, then execute S608 below.
[0167] S602. Combine the candidate viewpoints that are greater than the quality weight threshold into the first candidate viewpoint set of the voxel set of the object to be inspected.
[0168] For example, for the voxel set V of the object to be inspected q The candidate viewpoint set is Ω q The candidate viewpoint sets that exceed the quality weight threshold are then assigned an Ω′. q To represent, then Ω′ q The corresponding candidate viewpoint location set is used To represent, then Ω′ q It is the first candidate viewpoint set of the voxel set of the object to be inspected.
[0169] S603. Determine whether there is a first candidate viewpoint position in the first candidate viewpoint position set that can be inspected to other objects to be inspected.
[0170] If there are first candidate viewpoints in the first candidate viewpoint location set that can be inspected to other objects to be inspected, execute S604 below; otherwise, execute S608 below.
[0171] S604. Combine the first candidate viewpoint positions that can be inspected to other objects to be inspected as the second candidate viewpoint position set, and determine the quality weight of each second candidate viewpoint position in the second candidate viewpoint position set relative to the second candidate viewpoints of other objects to be inspected, and the quality weight of the second candidate viewpoints relative to the voxel sets of other objects to be inspected.
[0172] For example, for the object V to be inspected a If the object to be inspected is V a First candidate viewpoint The corresponding candidate viewpoint position ξ l The inspection station can reach other objects awaiting inspection. b Furthermore, the first candidate viewpoint ξ is calculated. a For the object to be inspected, V a The mass weight is per(ξ) a V a According to the method described in the above specific embodiments, the candidate viewpoint position ξ is calculated. l For other objects to be inspected V b Candidate viewpoints, if ξ is calculated l For other objects to be inspected V b The candidate viewpoints are Then ξ b For other objects to be inspected V b Similarly, the second candidate viewpoint ξ is calculated according to the method described in the above specific embodiments. b For other objects to be inspected V b The mass weight per(ξ) of the voxel set b, V b S605. Determine whether the quality weight of the second candidate viewpoint relative to the voxel set of other objects to be inspected is greater than the quality weight threshold.
[0173] If the quality weight of the second candidate viewpoint for the voxel set of other objects to be inspected is also greater than the weight threshold, execute S607 below; if the quality weight of the second candidate viewpoint for the voxel set of other objects to be inspected is less than the weight threshold, execute S606 below.
[0174] S606. Determine whether the quality weights of all second candidate viewpoints relative to the voxel sets of other objects to be inspected are all less than the quality weight threshold.
[0175] If the quality weights of all second candidate viewpoints relative to the voxel sets of other objects to be inspected are less than the quality weight threshold, then execute S608 as described below. If not all second candidate viewpoints relative to the voxel sets of other objects to be inspected are less than the quality weight threshold, then execute S607 as described below.
[0176] S607. The second candidate viewpoint, which is not less than the quality weight threshold, is used as the target inspection viewpoint of the voxel set of other objects to be inspected, and the candidate viewpoint with the highest quality weight is selected from the candidate viewpoints in the first candidate viewpoint set that can inspect multiple objects to be inspected as the target inspection viewpoint of the objects to be inspected.
[0177] For example, as can be seen from the above, at the candidate viewpoint position ξ l The inspection can reach the object to be inspected, V. a and V b At this candidate viewpoint location, for the object to be inspected, V a The candidate viewpoints are ξ a For V a The first candidate viewpoint, whose position is relative to other objects to be inspected (V). b The candidate viewpoints are per(ξ a V a )>δ,ξ b For V b The second candidate viewpoint, and per(ξ) b V b )>δ, and candidate viewpoint ξ a The first candidate viewpoint ξ is the one with the highest quality weight among the first candidate viewpoints that can inspect other objects to be inspected. a As V a The target inspection viewpoint, and the second candidate viewpoint ξ b As V b The target inspection viewpoint. For example, at the candidate viewpoint location ξ l For the object to be inspected, V a The candidate viewpoints are For other objects to be inspected V b The candidate viewpoints are Furthermore, per(ξ) a V a )>δ,per(ξ b V b If ξ < δ, and at the same time, if the candidate viewpoint ξ aIf a viewpoint is the candidate viewpoint with the highest quality weight among the first candidate viewpoints capable of inspecting other objects to be inspected, then ξ will be... a V, the object to be inspected a The target inspection viewpoint, other objects to be inspected (V) b The candidate viewpoints are recalculated.
[0178] S608. Select the candidate viewpoint with the highest weight quality from the set of viewpoints of the object to be inspected as the target inspection viewpoint of the object to be inspected.
[0179] Optionally, step S503 above, which selects the target inspection viewpoints for the voxel set of the object to be inspected from the candidate viewpoint set based on the quality weight and quality weight threshold of each candidate viewpoint for the object to be inspected, may further include:
[0180] If the quality weight of each candidate viewpoint in the candidate viewpoint set of the object to be inspected is less than the quality weight threshold, then the candidate viewpoint with the highest quality weight is selected from the candidate viewpoint set of the object to be inspected as the target inspection viewpoint of the object to be inspected.
[0181] Optionally, if all objects to be inspected have found the target inspection viewpoint using the method described in the specific embodiments above, then the process ends.
[0182] In this embodiment, the target inspection viewpoint of the object to be inspected is determined by setting a quality weight threshold. Multiple inspection viewpoints can be designed at one viewpoint location to achieve the function of multiple shots at a single point, thus solving the technical problem that only one inspection viewpoint can be planned at one viewpoint location.
[0183] Figure 7 A schematic diagram of an apparatus for determining inspection viewpoints provided in an embodiment of this application is shown below. Figure 7 As shown, the device includes:
[0184] The processing module 701 is used to perform dilation processing on the voxelized point cloud map according to the attribute parameters of each object to be inspected in the voxelized point cloud map, so as to obtain the dilated voxelized point cloud map.
[0185] The determination module 702 is used to determine the safe area of each object to be inspected based on the voxel set of each object to be inspected in the expanded voxelized point cloud map, wherein the voxel set includes at least one voxel.
[0186] The determining module 702 is further configured to determine a candidate viewpoint set for each of the objects to be inspected based on the security area, wherein the candidate viewpoint set includes at least one candidate viewpoint;
[0187] The determining module 702 is further configured to determine the viewpoint quality of each candidate viewpoint in the candidate viewpoint set relative to the voxel set of the object to be inspected;
[0188] The filtering module 703 is used to filter out the target inspection viewpoint of the voxel set of the object to be inspected from the candidate viewpoint set based on the viewpoint quality of each candidate viewpoint for the voxel set of the object to be inspected.
[0189] Optionally, the processing module 701 is specifically used for:
[0190] Determine the safe distance based on the attribute parameters of each object to be inspected;
[0191] The voxel expansion radius is determined based on the safety distance and the circumscribed circle radius of the inspection equipment;
[0192] The voxelized point cloud map is dilated according to the voxel dilation radius to obtain the dilated voxelized point cloud map.
[0193] Optionally, module 702 is specifically used for:
[0194] Redundant iterative random sampling is performed in the safe area to determine a set of candidate viewpoint locations for the object to be inspected, wherein the set of candidate viewpoint locations includes at least one candidate viewpoint location.
[0195] Based on the candidate viewpoint positions and the visibility results of the voxels in the voxel set of the object to be inspected for each candidate viewpoint position, the candidate viewpoint direction corresponding to each candidate viewpoint position is determined.
[0196] Each candidate viewpoint position and the corresponding candidate viewpoint direction are combined into a candidate viewpoint, and each candidate viewpoint is combined into a candidate viewpoint set for the object to be inspected.
[0197] Optionally, module 702 is specifically used for:
[0198] Based on the ray tracing algorithm, the number of visible angles of each face of each voxel in the voxel set of the object to be inspected from the candidate viewpoint is determined;
[0199] Based on the number of visible angles of each face of each voxel in the voxel set of the object to be inspected from the candidate viewpoint, the visibility result of each face of each voxel in the voxel set of the object to be inspected from the candidate viewpoint is determined.
[0200] Based on the visibility results of each face of each voxel in the voxel set of the object to be inspected for the candidate viewpoint and the preset values, the visibility results of each voxel in the voxel set of the object to be inspected for the candidate viewpoint are determined.
[0201] Based on the visibility results of each voxel in the voxel set of the object to be inspected, the size of the voxel set of the object to be inspected, and the size of the visible voxel set of the candidate viewpoint relative to the object to be inspected, the viewpoint quality of the candidate viewpoint relative to the voxel set of the object to be inspected is determined.
[0202] Optionally, module 702 is specifically used for:
[0203] The candidate viewpoints are sorted according to the viewpoint quality of the voxel set of the object to be inspected, and the sorted candidate viewpoints and their ranking numbers are obtained.
[0204] Based on the ranking number of each candidate viewpoint after sorting and the number of candidate viewpoints in the candidate viewpoint set, the quality weight of each candidate viewpoint for the object to be inspected is determined.
[0205] Based on the quality weight and quality weight threshold of each candidate viewpoint for the object to be inspected, the target inspection viewpoint of the voxel set of the object to be inspected is selected from the candidate viewpoint set.
[0206] Optionally, the filtering module 703 is specifically used for:
[0207] If there are candidate viewpoints in the candidate viewpoint set whose quality weight for the object to be inspected is greater than the quality weight threshold, then the candidate viewpoints with a quality weight greater than the quality weight threshold are combined into a first candidate viewpoint set for the voxel set of the object to be inspected.
[0208] If there are first candidate viewpoint positions in the first candidate viewpoint position set that can be inspected to other objects to be inspected, the first candidate viewpoint positions that can be inspected to other objects to be inspected are combined as the second candidate viewpoint position set, and the second candidate viewpoint position relative to other objects to be inspected and the quality weight of the second candidate viewpoint relative to the voxel set of other objects to be inspected are determined.
[0209] If the quality weight of the second candidate viewpoint for other voxel sets of objects to be inspected is also greater than the quality weight threshold, then the second candidate viewpoint is used as the target inspection viewpoint for the voxel sets of other objects to be inspected. From the first candidate viewpoint set, the first candidate viewpoint with the highest quality weight is selected from the candidate viewpoints of multiple objects to be inspected and used as the target inspection viewpoint of the object to be inspected.
[0210] If the quality weight of each of the second candidate viewpoints relative to the voxel set of other objects to be inspected is less than the weight threshold, then the first candidate viewpoint with the highest quality weight is selected from the first candidate viewpoint set as the target inspection viewpoint of the object to be inspected.
[0211] Optionally, the filtering module 703 is specifically used for:
[0212] If the quality weight of each candidate viewpoint in the candidate viewpoint set for the object to be inspected is less than the quality weight threshold, then the candidate viewpoint with the highest quality weight is selected from the candidate viewpoint set as the target inspection viewpoint for the object to be inspected.
[0213] Figure 8 This is a structural block diagram of an electronic device 800 provided in an embodiment of this application. (See diagram below.) Figure 8 As shown, the electronic device may include: a processor 801 and a memory 802.
[0214] Optionally, a bus 803 may also be included, wherein the memory 802 is used to store machine-readable instructions executable by the processor 801. When the electronic device 800 is running, the processor 801 and the memory 802 communicate via the bus 803. When the machine-readable instructions are executed by the processor 801, the method steps in the above method embodiments are performed.
[0215] This application also provides a computer-readable storage medium storing a computer program, which, when run by a processor, executes the method steps described in the above-described inspection viewpoint determination method embodiment.
[0216] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some communication interfaces; the indirect coupling or communication connection of devices or modules can be electrical, mechanical, or other forms.
[0217] 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. If the functions are implemented as software functional units and sold or used as independent products, they 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 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.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.
[0218] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A method for determining a patrol viewpoint, characterized by, The method includes: Based on the attribute parameters of each object to be inspected in the voxelized point cloud map, the voxelized point cloud map is dilated to obtain the dilated voxelized point cloud map. Based on the voxel set of each object to be inspected in the expanded voxelized point cloud map, the safe area of each object to be inspected is determined, wherein the voxel set includes at least one voxel. Based on the security zone, a candidate viewpoint set is determined for each of the objects to be inspected, and the candidate viewpoint set includes at least one candidate viewpoint; Determine the viewpoint quality of each candidate viewpoint in the candidate viewpoint set relative to the voxel set of the object to be inspected; Based on the viewpoint quality of each candidate viewpoint for the voxel set of the object to be inspected, the target inspection viewpoint of the voxel set of the object to be inspected is selected from the candidate viewpoint set. The step of selecting the target inspection viewpoint for the object to be inspected from the candidate viewpoint set based on the viewpoint quality of each candidate viewpoint for the voxel set of the object to be inspected includes: The candidate viewpoints are sorted according to the viewpoint quality of the voxel set of the object to be inspected, and the sorted candidate viewpoints and their ranking numbers are obtained. Based on the ranking number of each candidate viewpoint after sorting and the number of candidate viewpoints in the candidate viewpoint set, the quality weight of each candidate viewpoint for the object to be inspected is determined. If the quality weight of each candidate viewpoint in the candidate viewpoint set for the object to be inspected is less than the quality weight threshold, then the candidate viewpoint with the highest quality weight is selected from the candidate viewpoint set as the target inspection viewpoint for the object to be inspected. The step of dilating the voxelized point cloud map based on the attribute parameters of each object to be inspected in the voxelized point cloud map to obtain the dilated voxelized point cloud map includes: Determine the safe distance based on the attribute parameters of each object to be inspected; The voxel expansion radius is determined based on the safety distance and the circumscribed circle radius of the inspection equipment; The voxelized point cloud map is dilated according to the voxel dilation radius to obtain the dilated voxelized point cloud map.
2. The method of claim 1, wherein, The step of determining the candidate viewpoint set for each of the objects to be inspected based on the security area includes: Redundant iterative random sampling is performed in the safe area to determine a set of candidate viewpoint locations for the object to be inspected, wherein the set of candidate viewpoint locations includes at least one candidate viewpoint location. Based on the candidate viewpoint positions and the visibility results of the voxels in the voxel set of the object to be inspected for each candidate viewpoint position, the candidate viewpoint direction corresponding to each candidate viewpoint position is determined. Each candidate viewpoint position and the corresponding candidate viewpoint direction are combined into a candidate viewpoint, and each candidate viewpoint is combined into a candidate viewpoint set for the object to be inspected.
3. The method of claim 1, wherein, Determining the viewpoint quality of each candidate viewpoint in the candidate viewpoint set relative to the voxel set of the object to be inspected includes: Based on ray tracing, the number of visible angles of each face of each voxel in the voxel set of the object to be inspected from the candidate viewpoint is determined. Based on the number of visible angles of each face of each voxel in the voxel set of the object to be inspected from the candidate viewpoint, the visibility result of each face of each voxel in the voxel set of the object to be inspected from the candidate viewpoint is determined. Based on the visibility results of each face of each voxel in the voxel set of the object to be inspected for the candidate viewpoint and the preset values, the visibility results of each voxel in the voxel set of the object to be inspected for the candidate viewpoint are determined. Based on the visibility results of each voxel in the voxel set of the object to be inspected, the size of the voxel set of the object to be inspected, and the size of the visible voxel set of the candidate viewpoint relative to the object to be inspected, the viewpoint quality of the candidate viewpoint relative to the voxel set of the object to be inspected is determined.
4. The method of claim 1, wherein, The step of selecting target inspection viewpoints for the voxel set of the object to be inspected from the candidate viewpoint set based on the quality weight and quality weight threshold of each candidate viewpoint includes: If there are candidate viewpoints in the candidate viewpoint set whose quality weight for the object to be inspected is greater than the quality weight threshold, then the candidate viewpoints with a quality weight greater than the quality weight threshold are combined into a first candidate viewpoint set for the voxel set of the object to be inspected. If there are first candidate viewpoint positions in the first candidate viewpoint position set that can be inspected to other objects to be inspected, the first candidate viewpoint positions that can be inspected to other objects to be inspected are combined as the second candidate viewpoint position set, and the second candidate viewpoint position relative to other objects to be inspected and the quality weight of the second candidate viewpoint relative to the voxel set of other objects to be inspected are determined. If the quality weight of the second candidate viewpoint for other voxel sets to be inspected is also greater than the quality weight threshold, then the second candidate viewpoint is used as the target inspection viewpoint for the voxel sets of other objects to be inspected. From the first candidate viewpoint set, the first candidate viewpoint with the highest quality weight is selected from the candidate viewpoints of multiple objects to be inspected and used as the target inspection viewpoint of the object to be inspected. If the quality weight of each of the second candidate viewpoints relative to the voxel set of other objects to be inspected is less than the weight threshold, then the first candidate viewpoint with the highest quality weight is selected from the first candidate viewpoint set as the target inspection viewpoint of the object to be inspected.
5. A device for determining inspection viewpoints, characterized in that, include: The processing module is used to perform dilation processing on the voxelized point cloud map based on the attribute parameters of each object to be inspected in the voxelized point cloud map, so as to obtain the dilated voxelized point cloud map. The determination module is used to determine the safe area of each object to be inspected based on the voxel set of each object to be inspected in the dilated voxelized point cloud map, wherein the voxel set includes at least one voxel. The determining module is further configured to determine a candidate viewpoint set for each of the objects to be inspected based on the security area, wherein the candidate viewpoint set includes at least one candidate viewpoint; The determination module is also used to determine the viewpoint quality of each candidate viewpoint in the candidate viewpoint set relative to the voxel set of the object to be inspected; The filtering module is used to filter out the target inspection viewpoint of the voxel set of the object to be inspected from the candidate viewpoint set based on the viewpoint quality of each candidate viewpoint for the voxel set of the object to be inspected. The filtering module is specifically used for: The candidate viewpoints are sorted according to the viewpoint quality of the voxel set of the object to be inspected, and the sorted candidate viewpoints and their ranking numbers are obtained. Based on the ranking number of each candidate viewpoint after sorting and the number of candidate viewpoints in the candidate viewpoint set, the quality weight of each candidate viewpoint for the object to be inspected is determined. If the quality weight of each candidate viewpoint in the candidate viewpoint set for the object to be inspected is less than the quality weight threshold, then the candidate viewpoint with the highest quality weight is selected from the candidate viewpoint set as the target inspection viewpoint for the object to be inspected. The processing module is specifically used for: Determine the safe distance based on the attribute parameters of each object to be inspected; The voxel expansion radius is determined based on the safety distance and the circumscribed circle radius of the inspection equipment; The voxelized point cloud map is dilated according to the voxel dilation radius to obtain the dilated voxelized point cloud map.
6. An electronic device, comprising: It includes a memory and a processor, wherein the memory stores a computer program executable by the processor, and the processor executes the computer program to implement the steps of the inspection viewpoint determination method according to any one of claims 1-4.
7. A computer readable storage medium characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the inspection viewpoint determination method as described in any one of claims 1-4.