A method and apparatus for detecting safe distance
By establishing a three-dimensional scene data model of the power distribution room and calculating the safe distance between the target equipment and each element model, the problems of low measurement accuracy and low efficiency in the existing technology are solved, and efficient and accurate safe distance detection is achieved.
Patent Information
- Application Number
- CN202111469422.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-03
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2041-12-03
AI Technical Summary
Existing methods are inaccurate and inefficient when measuring the safe distance between electrical equipment and surrounding equipment or walls in a power distribution room, and cannot guarantee the safe distance, requiring multiple on-site measurements for verification.
By acquiring element data of the scene to be tested, a scene data model is established, the safe distance between the target device model and each element model is calculated, and the results are displayed in the model. The accurate safe distance is obtained by using 3D laser scanning and clustering technology.
It improves the efficiency and accuracy of measuring safe distances, reduces the number of on-site measurements, and enhances the efficiency and safety of power distribution network planning.
Smart Images

Figure CN114283182B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power distribution network planning, and in particular to a method and device for detecting safe distances. Background Technology
[0002] With the development of social science and technology, people's demand for electricity is increasing. In order to better manage electrical equipment, power distribution rooms have become an essential place related to people's electricity use.
[0003] Substations are affected by various factors such as the external environment, internal space, and electrical wiring, resulting in significant variations in their size and equipment layout. To ensure the proper maintenance and protection of all electrical equipment within the substation, relevant regulations specify the minimum distance (referred to as the safety distance) between electrical equipment and surrounding equipment or the substation walls. During the distribution network planning process, planners must understand the distribution and spatial location of equipment within the substation to guarantee the safety distance during network design.
[0004] Current methods typically involve planners taking photos of the power distribution room and determining whether modifications such as cabinet assembly or the addition of new busbars are feasible based on the photos. This method is inaccurate, designs based on photos often do not match the actual conditions, and safe distances cannot be guaranteed. It requires multiple on-site measurements for verification, resulting in low efficiency and numerous inconveniences. Therefore, improving the efficiency of measuring safe distances is a key concern. Summary of the Invention
[0005] In view of this, this application provides a method and apparatus for detecting safe distances, which can improve the efficiency of measuring safe distances.
[0006] To achieve the above objectives, the following solution is proposed:
[0007] A method for detecting safe distance, comprising:
[0008] Obtain data for each element of the scene to be tested;
[0009] A scene data model composed of the model of each element is established based on the data of each element;
[0010] Add a preset target device model to the scene data model, and calculate the safe distance between the target device model and each element model;
[0011] The safe distance is displayed.
[0012] Optionally, acquiring the element data of the scene to be tested includes:
[0013] Scan to obtain the original panoramic cloud of the scene to be tested;
[0014] Cluster the original panoramic point cloud to obtain point clouds of each element;
[0015] The clustered point cloud of each element is modeled to obtain the element data corresponding to each element model of the scene under test.
[0016] Optionally, the clustering of the original panoramic point cloud to obtain the point cloud of each element includes:
[0017] The original panoramic point cloud is clustered in two dimensions to obtain the point clouds of each plane;
[0018] The point clouds of each plane are clustered in three dimensions to obtain the point clouds of each element.
[0019] Optionally, the point clouds of each element include point clouds of walls, floors, ceilings, and various devices. The step of performing three-dimensional clustering of the point clouds of each plane to obtain the point clouds of each element includes:
[0020] Based on the geometric features of the building, different planar point clouds that are within a preset range and whose normal vectors belong to the same category are merged and segmented into wall point clouds, ground point clouds, and top point clouds.
[0021] The planar point clouds, excluding wall point clouds, ground point clouds, and ceiling point clouds, are subjected to 3D clustering to segment the point clouds of each device.
[0022] Optionally, establishing a scene data model composed of the element models based on the element data includes:
[0023] The corner positions of each element model are calculated based on the model data of the wall point cloud, ground point cloud, top point cloud, and point clouds of each device.
[0024] Based on the spatial topological relationships of the corner points, the corner points are connected to construct a scene data model consisting of a wall model, a ground model, a ceiling model, and various equipment models.
[0025] Optionally, adding a target device model to the scene data model and calculating the safe distance between the target device model and each element model includes:
[0026] Place the target device model into the scene data model;
[0027] Calculate the actual distance between the target device model and each element model in the scene data model;
[0028] If the actual distance conforms to the preset safe distance judgment rule, then the actual distance is a safe distance. The safe distance judgment rule is a pre-recorded safe distance judgment standard for each element model.
[0029] Optionally, after calculating the actual distance between the target device model and each element model in the scene data model, the method further includes:
[0030] If the actual distance does not meet the preset safe distance judgment rule, the position of the target device model is adjusted, and the process returns to the step of calculating the actual distance between the target device model and each element model in the scene data model until the target device model meets the preset safe distance judgment rule.
[0031] Optionally, calculating the actual distance between the target device model and each element model in the scene data model includes:
[0032] Based on the coordinate system in which the scene data model is located, determine the coordinates of the center point of the target device model;
[0033] Based on the coordinates of the center point of the target device model, determine the direction vectors of the target device model;
[0034] Rays are constructed along the direction vectors of the target device model, respectively;
[0035] Point clouds with a distance less than a preset threshold are selected and fitted to the plane corresponding to the element model;
[0036] Calculate the distance between the ray and each plane to obtain at least one detection distance, and select the minimum value among the at least one detection distance to obtain the first target detection distance of the element model;
[0037] The distance from the outer surface of the target device model in the ray direction to the center point of the target device model is calculated as the second target detection distance;
[0038] Subtracting the first target detection distance from the second target detection distance yields the actual distance between the target device model and the element model.
[0039] Optional, also includes:
[0040] If no point cloud with a distance less than the preset threshold is selected, the plane of the element model closest to the direction vector ray is selected to calculate the detection distance.
[0041] A safe distance detection device, comprising:
[0042] The element data acquisition unit is used to acquire the element data of the scene under test;
[0043] A scene data model building unit is used to build a scene data model composed of the element models based on the element data.
[0044] A safe distance calculation unit is used to add a preset target device model to the scene data model and calculate the safe distance between the target device model and each element model;
[0045] The display unit is used to display the safe distance.
[0046] As can be seen from the above technical solutions, the safe distance detection method provided in this application obtains the data of each element of the scene to be tested and forms a scene data model. The safe distance between the target device model and each element model is calculated in the scene data model. Compared with the prior art, which requires multiple on-site photos to achieve the purpose of measuring safe distance, this solution improves the efficiency of measuring safe distance by calculating safe distance through data model, and further improves the accuracy of measuring safe distance. Attached Figure Description
[0047] Figure 1 A flowchart of a safe distance detection method provided in an embodiment of this application;
[0048] Figure 2 A schematic diagram of inspection distance calculation provided in an embodiment of this application;
[0049] Figure 3 A schematic diagram of model fabrication provided in an embodiment of this application;
[0050] Figure 4 A flowchart of another safe distance detection method provided in the embodiments of this application;
[0051] Figure 5 This is a schematic diagram of the structure of a safety distance detection device provided in an embodiment of this application;
[0052] Figure 6 This is a hardware structure block diagram of a safe distance detection device provided in an embodiment of this application. Detailed Implementation
[0053] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0054] Figure 1 A flowchart of a safe distance detection method provided in this application embodiment is included, which may include the following steps:
[0055] Step S100: Obtain the data of each element in the scene to be tested.
[0056] Specifically, data on each element of the scene under test can be obtained through electronic devices with scanning and measurement capabilities. The scene under test can be a power distribution room, for example, a 3D laser scanner can be used to collect data on each element of the power distribution room.
[0057] Step S200: Based on the data of each element, establish a scene data model composed of the models of each element.
[0058] Specifically, each element model can be a three-dimensional model, and the scene data model can be a three-dimensional model corresponding to the scene to be tested. A three-dimensional model of the scene to be tested can be built based on the three-dimensional models of each element.
[0059] Step S300: Add a preset target device model to the scene data model and calculate the safe distance between the target device model and each element model.
[0060] Specifically, the preset target equipment model can be a pre-made 3D model of the equipment. The pre-made target equipment model can be added to the scene data model, and the safe distance between the target equipment model and each element model can be calculated. For example, the target equipment model of the relevant equipment can be made according to the size of switch cabinets, transformers, automation terminals and other equipment from different manufacturers and for different purposes, and can be stored in the .obj standard 3D model file format.
[0061] Step S400: Display the safe distance.
[0062] Specifically, the safety distance can be displayed through a display device, such as a computer screen. The display format can be data or a ruler in a scene data model.
[0063] As can be seen from the above technical solutions, the safe distance detection method provided in this application embodiment can calculate the safe distance between the target device model and each element model by acquiring the data of each element of the scene to be tested and forming a scene data model. Compared with the prior art which requires multiple on-site photos to achieve the purpose of measuring safe distance, this solution improves the efficiency of measuring safe distance by calculating safe distance through a data model, and further improves the accuracy of measuring safe distance.
[0064] In some embodiments of this application, in order to safely and contactlessly acquire element data in a test scenario where there may be a risk of electric shock, the steps of step S100, which involves acquiring the element data of the test scenario, are described below. The specific process may include the following steps:
[0065] Step S110: Scan and obtain the original panoramic view cloud of the scene to be tested.
[0066] Specifically, the original panoramic point cloud can be a panoramic 3D point cloud of the scene to be tested, such as a panoramic 3D point cloud of a power distribution room. The original panoramic point cloud of the scene to be tested can be obtained by scanning with a 3D laser scanner.
[0067] Step S120: Cluster the original panoramic point cloud to obtain the point cloud of each element.
[0068] Specifically, the clustering method can be the three-dimensional Euclidean clustering method, which can be based on the characteristics of the main structure of the building and the fact that the internal equipment is mainly based on the plane as the basic structural surface to cluster the original panoramic view cloud and obtain the point cloud of each element.
[0069] Furthermore, artificial neural networks can be used to classify the different element point clouds after clustering, determine the type of device for each element point cloud, and realize the classification of device point clouds.
[0070] Step S130: Model the clustered point cloud of each element to obtain the element data corresponding to the element model of the scene under test.
[0071] Specifically, such as Figure 2 As shown, modeling can be done using Revit modeling software (a series of software specifically designed for building information modeling) to model the point cloud of each element. After modeling, the element data corresponding to each element model can be obtained in the same spatial coordinate system, such as the length, width, height of each element model and the spacing between each element model.
[0072] In some embodiments of this application, the process of clustering the original panoramic point cloud to obtain the point cloud of each element is described. The specific process may include:
[0073] Step S121: Perform two-dimensional clustering on the original panoramic point cloud to obtain each planar point cloud.
[0074] Specifically, it may include the following steps:
[0075] The original panoramic point cloud is downsampled based on a uniform grid, and the normal vector of each point cloud in the uniform grid is calculated to obtain the point cloud normal.
[0076] The angles between the normals of each point cloud are compared using a region growing algorithm to obtain the comparison results;
[0077] The comparison results satisfy the smoothness constraint and the adjacent point clouds are merged and clustered to obtain at least one point set in the same plane.
[0078] The at least one point set is fitted using the RANSAC (RANdom SAmple Consensus) plane fitting algorithm to obtain the corresponding planar point cloud.
[0079] In some embodiments of this application, considering that the clustering effect may be poor at the edge positions of the element model, this solution may further include the following steps:
[0080] Determine the intersection points of the point clouds in each plane;
[0081] Based on the intersection position, extract the planar parameters of each planar point cloud;
[0082] The steps involve adjusting the RANSAC plane fitting algorithm using the plane parameters and then using the RANSAC plane fitting algorithm to fit the at least one point set to obtain the corresponding planar point cloud.
[0083] The above describes the process of performing two-dimensional clustering on the original panoramic cloud.
[0084] Step S122: Perform three-dimensional clustering on each planar point cloud to obtain the point cloud of each element.
[0085] Specifically, the point cloud of each element can include the point clouds of walls, ground, ceiling, and various equipment. The point clouds of each plane can be clustered in three dimensions to obtain the point cloud of each element.
[0086] This application summarizes some embodiments, and describes the process of performing three-dimensional clustering on each planar point cloud to obtain the element point cloud, specifically including the following steps:
[0087] Step S1221: Based on the geometric characteristics of the building, merge different planar point clouds whose spatial positions are within a preset range and whose normal vectors belong to the same category, and segment them into wall point clouds, ground point clouds, and top point clouds.
[0088] Specifically, the geometric features of a building can be the geometric features of the walls, ground, and roof. Different planar point clouds that are close in spatial location and within a preset range and whose normal vectors belong to the same class can be merged to separate wall point clouds, ground point clouds, and roof point clouds.
[0089] Step S1222: Perform 3D clustering on the planar point clouds excluding wall point clouds, ground point clouds, and ceiling point clouds to segment out the point clouds of each device.
[0090] Specifically, since the devices in the test scene can be separated from each other in space and attached to walls or the ground, after removing the walls, ground, and ceiling, the device point clouds can be independent of each other in space. The three-dimensional spatial Euclidean clustering method can be used to cluster and segment the device point clouds. The planar point clouds other than the wall point clouds, ground point clouds, and ceiling point clouds can be three-dimensionally clustered to segment the device point clouds.
[0091] In some embodiments of this application, the process of step S200, establishing a scene data model composed of the element models based on the element data, is described, and may specifically include the following steps:
[0092] Step S210: Calculate the corner positions of each element model based on the model data of the wall point cloud, ground point cloud, top point cloud, and each device point cloud.
[0093] Specifically, the corner points of each element model can be calculated based on the plane equation fitted by the point cloud in the model data. The corner point positions of each element model can be calculated based on the model data of wall point cloud, ground point cloud, top point cloud, and point cloud of each device.
[0094] Step S220: Connect the corner points according to their spatial topological relationships to construct a scene data model consisting of a wall model, a ground model, a ceiling model, and various equipment models.
[0095] Specifically, spatial topology can clearly reflect the logical structural relationships between entities. Without using coordinates or distance, the positional relationship of one spatial entity relative to another can be determined. Based on the spatial topology of corner points, corner points can be connected to construct a scene data model composed of wall models, ground models, ceiling models, and various equipment models.
[0096] In some embodiments of this application, the process of step S300, adding a preset target device model to the scene data model, and calculating the safe distance between the target device model and each element model, is described below. The specific process may include the following steps:
[0097] Step S310: Place the target device model in the scene data model.
[0098] Specifically, the scene data model may contain various element models, and the target device model can be dragged and dropped from a preset model library into the scene data model in 3D modeling software.
[0099] Step S320: Calculate the actual distance between the target device model and each element model in the scene data model.
[0100] Specifically, the target device model can be used as a reference point to calculate the actual distances from the target device model to each element model in the surrounding scene data model in the four directions of front, back, left, and right.
[0101] Step S330: If the actual distance conforms to the preset safe distance judgment rule, then the actual distance is a safe distance. The safe distance judgment rule is a pre-recorded safe distance judgment standard for each element model.
[0102] Specifically, the safe distance judgment rule can pre-record the safe distance judgment criteria for each element model. If the actual distance meets the preset safe distance judgment rule, then the actual distance is considered a safe distance.
[0103] The example is shown in Table 1 below. Table 1 lists the conditions under which the actual distances in the front, back, left, and right directions are considered safe distances when the target device model is placed in the scene data model.
[0104] Table 1
[0105]
[0106] In some embodiments of this application, considering that the actual distance may not conform to the safe distance judgment rules, this solution may further include the following steps:
[0107] Step S340: If the actual distance does not conform to the preset safe distance judgment rule, adjust the position of the target device model and return to the step of calculating the actual distance between the target device model and each element model in the scene data model until the target device model conforms to the preset safe distance judgment rule.
[0108] Specifically, when the actual distance does not meet the preset safe distance judgment rules, the position of the target device model can be adjusted according to the needs, and the actual distance between the adjusted target device model and each element model in the scene data model can be calculated until the target device model meets the preset safe distance judgment rules.
[0109] In some embodiments of this application, the process of calculating the actual distance between the target device model and each element model in the scene data model in step S320 is described, which may specifically include the following steps:
[0110] Step S321: Determine the coordinates of the center point of the target device model based on the coordinate system of the scene data model.
[0111] Specifically, the z-axis of the target device model can be aligned with the z-axis of the scene data model to obtain the coordinates of the center point of the target device model in the coordinate system of the scene data model, such as center point o(Xo, Yo, Zo).
[0112] Step S322: Based on the coordinates of the center point of the target device model, determine the direction vectors of the target device model.
[0113] Specifically, the direction vectors can be forward (n1), backward (n2), leftward (n3), and rightward (n4). The angle between the center point coordinates and the positive x-axis can be used to determine each direction vector of the target device model. For example, let the angle be θ.
[0114] n1 = {cosθ, sinθ, 0}
[0115] n2={-cosθ,-sinθ,0}
[0116] n3={-sinθ,cosθ,0}
[0117] n4={sinθ,-cosθ,0}
[0118] Step S323: Construct rays along each direction vector of the target device model.
[0119] Specifically, you can start from the center point of the target device model and construct rays along the forward, backward, left, and right direction vectors respectively. For example, you can start from the center point o and construct rays along the forward, backward, left, and right direction vectors respectively.
[0120] Step S324: Select the point cloud with a distance less than a preset threshold and fit it into the plane corresponding to the element model.
[0121] Specifically, it can search for point clouds around the ray and within a preset threshold range, and fit the point set corresponding to the point cloud within the preset threshold range into the corresponding plane of the element model around the ray.
[0122] Step S325: Calculate the distance between the ray and each plane to obtain at least one detection distance, and select the minimum value among the at least one detection distance to obtain the first target detection distance of the element model.
[0123] Specifically, the distance between the ray and each plane can be calculated to obtain at least one detection distance. The minimum value among these at least one detection distance is then selected to obtain the first target detection distance for the element model. An example is shown below. Figure 2 As shown, Figure 2 To check the distance calculation diagram, construct the equation of plane A, which passes through the center point o(Xo, Yo, Zo) and is perpendicular to the forward direction n1:
[0124] cos(XX o )+sinθ(YY o ) = 0
[0125] Calculate the i-th (1≤i≤total number of points) point (X) in the point cloud. i Y i The distance d from plane A:
[0126] d = cosθ * X i +sinθ*Y i -(cosθ*X o +sinθ*Y o )
[0127] Get the set of points P where d > 0 within a preset range m, and select any point P in P. k (X Pk Y Pk P can be obtained using the following formula. k Distance S1 to the forward ray:
[0128]
[0129] Take all points S1 < m to form a point set Q, and simultaneously compute Q. j (X Qj Y Qj The first target detection distance S2 from point O
[0130]
[0131] Step S326: Calculate the distance from the outer surface of the target device model in the ray direction to the center point of the target device model as the second target detection distance.
[0132] Specifically, since the target device model is a preset model, the distance from the outer surface of the target device model in the ray direction to the center point of the target device model can be directly calculated based on the set data of the target device model as the second target detection distance.
[0133] Step S327: Subtract the first target detection distance from the second target detection distance to obtain the actual distance between the target device model and the element model.
[0134] Specifically, the actual distance between the target device model and the element model can be obtained by subtracting the first target detection distance from the second target detection distance. For example, if a point set R is fitted to a plane, let the intersection of the forward ray S1 and the fitted plane be the first target detection distance S2 between the center point o and the intersection point, and let the second target detection distance a between the center o of the target device model and the front surface of the target device model be the second target detection distance a. Then the actual distance S3 from the detected front surface of the target device model to the point cloud of the nearest element model in front is:
[0135] S3 = S2 - a
[0136] Similarly, the actual distances from the rear, left, and right surfaces of the target device model to the point clouds of the nearest objects on the rear, left, and right sides can be derived.
[0137] In some embodiments of this application, considering the possibility that point clouds with a distance less than a preset threshold may not be selected, this solution may further include the following steps:
[0138] Step S328: If no point cloud with a distance less than the preset threshold is selected, the plane of the element model closest to the direction vector ray is selected to calculate the detection distance.
[0139] Specifically, when no point cloud with a distance less than the preset threshold can be selected, the plane of the element model closest to the direction vector ray can be selected to calculate the detection distance.
[0140] In some embodiments of this application, to facilitate understanding of the solution, the embodiments of this application provide an application scenario of the solution after obtaining the scene data model, such as... Figure 4 As shown:
[0141] Step S1: Add the target device.
[0142] Step S2: Detect the front, back, left, and right distances of the target device and obtain the detection results.
[0143] Step S3: Determine whether the detection results meet the requirements of the safe distance rules.
[0144] Step S4: If yes, then the target device will be added successfully.
[0145] Step S5: If not, adjust the position of the target device and return to step S2 to perform front, back, left, and right distance detection on the target device and obtain the detection results.
[0146] The above embodiments can conveniently and quickly determine the location of various electrical devices within a safe distance range in a real-world scenario. Compared to the prior art which requires multiple on-site photos to measure the safe distance, this method improves the efficiency and accuracy of safe distance measurement.
[0147] The following describes the safe distance detection device provided in the embodiments of this application. The safe distance detection device described below can be referred to in correspondence with the safe distance detection method described above.
[0148] Figure 5 As shown, a schematic diagram of a safe distance detection device is disclosed, which may include:
[0149] The element data acquisition unit 11 is used to acquire the element data of the scene under test;
[0150] Scene data model building unit 12 is used to build a scene data model composed of each element model based on the element data;
[0151] The safe distance calculation unit 13 is used to add a preset target device model to the scene data model and calculate the safe distance between the target device model and each element model.
[0152] Display unit 14 is used to display the safe distance.
[0153] Optionally, the element data acquisition unit 11 may include:
[0154] The first element data acquisition subunit is used to scan and acquire the original panoramic view cloud of the scene to be tested;
[0155] The second element data acquisition subunit is used to cluster the original panoramic point cloud to obtain the point cloud of each element.
[0156] The third element data acquisition subunit is used to model the clustered point clouds of each element to obtain the element data corresponding to each element model of the scene under test.
[0157] Optionally, the second element data acquisition subunit may include:
[0158] Two-dimensional clustering unit, used to perform two-dimensional clustering on the original panoramic point cloud to obtain each planar point cloud;
[0159] A three-dimensional clustering unit is used to perform three-dimensional clustering of the planar point clouds to obtain the point clouds of each element.
[0160] Optionally, the point cloud of each element includes the point clouds of the wall, ground, ceiling, and each device; the three-dimensional clustering unit may include:
[0161] Building clustering units are used to merge different planar point clouds that are within a preset range and whose normal vectors belong to the same class, based on the geometric characteristics of the building, and to segment them into wall point clouds, ground point clouds, and roof point clouds.
[0162] The equipment clustering unit is used to perform three-dimensional clustering of planar point clouds other than wall point clouds, ground point clouds, and ceiling point clouds, and to segment out the point clouds of each equipment.
[0163] Optionally, the scene data model building unit 12 may include:
[0164] The corner calculation unit is used to calculate the corner position of each element model based on the model data of the wall point cloud, ground point cloud, top point cloud, and each device point cloud;
[0165] The model building unit is used to connect the corner points according to their spatial topological relationships, and build a scene data model consisting of wall models, ground models, ceiling models, and various equipment models.
[0166] Optionally, the safe distance calculation unit 13 may include:
[0167] A model placement unit is used to place the target device model into the scene data model;
[0168] The actual distance calculation unit is used to calculate the actual distance between the target device model and each element model in the scene data model;
[0169] The safe distance determination unit is used to determine that the actual distance is a safe distance when it meets the preset safe distance judgment rule. The safe distance judgment rule is a pre-recorded safe distance judgment standard for each element model.
[0170] Optionally, this safety distance detection device may also include:
[0171] The position adjustment unit is used to adjust the position of the target device model and return to execute the actual distance calculation unit when the actual distance does not meet the preset safe distance judgment rule after the actual distance calculation unit is executed, until the target device model meets the preset safe distance judgment rule.
[0172] Optionally, the actual distance calculation unit may include:
[0173] The center point determination unit is used to determine the coordinates of the center point of the target device model based on the coordinate system in which the scene data model is located;
[0174] The direction vector determination unit is used to determine each direction vector of the target device model based on the coordinates of the center point of the target device model;
[0175] A ray-constructing unit is used to construct rays along each direction vector of the target device model;
[0176] The first plane selection unit is used to select the point cloud with a distance less than a preset threshold and fit it into the plane corresponding to the element model;
[0177] The first target detection distance calculation unit is used to calculate the distance between the ray and each plane to obtain at least one detection distance, and select the minimum value among the at least one detection distance to obtain the first target detection distance of the element model;
[0178] The second target detection distance calculation unit is used to calculate the distance from the outer surface of the target device model in the ray direction to the center point of the target device model as the second target detection distance;
[0179] The distance subtraction unit is used to subtract the first target detection distance from the second target detection distance to obtain the actual distance between the target device model and the element model.
[0180] Optionally, this safety distance detection device may also include:
[0181] The second plane selection unit is used to select the plane of the element model closest to the direction vector ray when no point cloud can be selected with a distance less than a preset threshold, and calculate the detection distance.
[0182] The safe distance detection device provided in this application embodiment can be applied to a safe distance detection equipment. The safe distance detection equipment can be a server. Figure 6 The hardware structure block diagram of the safe distance detection device is shown. Figure 6 The hardware structure of a safe distance detection device may include: at least one processor 1, at least one communication interface 2, at least one memory 3, and at least one communication bus 4;
[0183] In this embodiment of the application, the number of processor 1, communication interface 2, memory 3, and communication bus 4 is at least one, and processor 1, communication interface 2, and memory 3 communicate with each other through communication bus 4;
[0184] Processor 1 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.
[0185] Memory 3 may include high-speed RAM, and may also include non-volatile memory, such as at least one disk storage device;
[0186] The memory stores a program, which the processor can call. The program is used for:
[0187] Obtain data for each element of the scene to be tested;
[0188] A scene data model composed of the model of each element is established based on the data of each element;
[0189] Add a preset target device model to the scene data model, and calculate the safe distance between the target device model and each element model;
[0190] The safe distance is displayed.
[0191] Optionally, the refined and extended functions of the program can be found in the description above.
[0192] This application embodiment also provides a storage medium that can store a program suitable for execution by a processor, the program being used for:
[0193] Obtain data for each element of the scene to be tested;
[0194] A scene data model composed of the model of each element is established based on the data of each element;
[0195] Add a preset target device model to the scene data model, and calculate the safe distance between the target device model and each element model;
[0196] The safe distance is displayed.
[0197] Optionally, the refined and extended functions of the program can be found in the description above.
[0198] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0199] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined with each other, and the same or similar parts can be referred to each other.
[0200] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for detecting safe distance, characterized in that, include: Obtain data for each element of the scene to be tested; A scene data model composed of the model of each element is established based on the data of each element; The scene data model is obtained by connecting the corner points based on the spatial topological relationship of the corner points of each element model. The element model is obtained by clustering the original panoramic view cloud of the scene under test and then modeling the element point cloud. The element point cloud includes wall point cloud, ground point cloud, top point cloud, and device point cloud. The corner point position of each element model is calculated based on the model data of the wall point cloud, ground point cloud, top point cloud, and device point cloud. A preset target device model is added to the scene data model, and the safe distance between the target device model and each element model is calculated. Specific steps include: placing the target device model in the scene data model; determining the coordinates of the center point of the target device model based on the coordinate system of the scene data model; determining the direction vectors of the target device model based on the center point coordinates of the target device model; constructing rays along each direction vector of the target device model; selecting point clouds with distances less than a preset threshold to fit the plane corresponding to the element model; calculating the distance between the ray and each plane to obtain at least one detection distance, and selecting the minimum value among the at least one detection distance to obtain the first target detection distance of the element model; calculating the distance from the outer surface of the target device model in the ray direction to the center point of the target device model as the second target detection distance; subtracting the first target detection distance from the second target detection distance to obtain the actual distance between the target device model and the element model; if the actual distance conforms to a preset safe distance judgment rule, then the actual distance is a safe distance, and the safe distance judgment rule pre-records the safe distance judgment criteria for each element model. The safe distance is displayed.
2. The method according to claim 1, characterized in that, The acquisition of data for each element of the scene under test includes: Scan to obtain the original panoramic cloud of the scene to be tested; Cluster the original panoramic point cloud to obtain point clouds of each element; The clustered point cloud of each element is modeled to obtain the element data corresponding to each element model of the scene under test.
3. The method according to claim 2, characterized in that, The process of clustering the original panoramic view cloud to obtain point clouds of each element includes: The original panoramic point cloud is clustered in two dimensions to obtain the point clouds of each plane; The point clouds of each plane are clustered in three dimensions to obtain the point clouds of each element.
4. The method according to claim 3, characterized in that, The step of performing three-dimensional clustering on the planar point clouds to obtain element point clouds includes: Based on the geometric features of the building, different planar point clouds that are within a preset range and whose normal vectors belong to the same category are merged and segmented into wall point clouds, ground point clouds, and top point clouds. The planar point clouds, excluding wall point clouds, ground point clouds, and ceiling point clouds, are subjected to 3D clustering to segment the point clouds of each device.
5. The method according to claim 4, characterized in that, The establishment of a scene data model composed of the element models based on the element data includes: The corner positions of each element model are calculated based on the model data of the wall point cloud, ground point cloud, top point cloud, and point clouds of each device. Based on the spatial topological relationships of the corner points, the corner points are connected to construct a scene data model consisting of a wall model, a ground model, a ceiling model, and various equipment models.
6. The method according to claim 1, characterized in that, After calculating the actual distance between the target device model and each element model in the scene data model, the method further includes: If the actual distance does not meet the preset safe distance judgment rule, the position of the target device model is adjusted, and the process returns to the step of calculating the actual distance between the target device model and each element model in the scene data model until the target device model meets the preset safe distance judgment rule.
7. The method according to claim 1, characterized in that, Also includes: If no point cloud with a distance less than the preset threshold is selected, the plane of the element model closest to the direction vector ray is selected to calculate the detection distance.
8. A safety distance detection device, characterized in that, include: The element data acquisition unit is used to acquire the element data of the scene under test; A scene data model building unit is used to build a scene data model composed of the element models based on the element data. The scene data model is obtained by connecting the corner points based on the spatial topological relationship of the corner points of each element model. The element model is obtained by clustering the original panoramic view cloud of the scene under test and then modeling the element point cloud. The element point cloud includes wall point cloud, ground point cloud, top point cloud, and device point cloud. The corner point position of each element model is calculated based on the model data of the wall point cloud, ground point cloud, top point cloud, and device point cloud. A safe distance calculation unit is used to add a preset target device model to a scene data model and calculate the safe distance between the target device model and each element model. Specific steps include: placing the target device model in the scene data model; determining the coordinates of the center point of the target device model based on the coordinate system of the scene data model; determining the direction vectors of the target device model based on the center point coordinates of the target device model; constructing rays along each direction vector of the target device model; selecting point clouds with distances less than a preset threshold to fit a plane corresponding to the element model; calculating the distance between the ray and each plane to obtain at least one detection distance, and selecting the minimum value among the at least one detection distance to obtain the first target detection distance of the element model; calculating the distance from the outer surface of the target device model in the ray direction to the center point of the target device model as the second target detection distance; subtracting the first target detection distance from the second target detection distance to obtain the actual distance between the target device model and the element model; if the actual distance conforms to a preset safe distance judgment rule, then the actual distance is a safe distance, and the safe distance judgment rule pre-records the safe distance judgment criteria for each element model. The display unit is used to display the safe distance.
Citation Information
Patent Citations
Binocular vision-based power transmission channel hidden danger identification tracking method
CN111354028A