Patrol point position determination method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202610856010.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-15
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2046-06-15
AI Technical Summary
[0003]通常,机器人的巡检点依赖人工逐点标注,效率低、易遗漏
[0021]根据本公开实施例的第三方面,提出了一种电子设备,所述电子设备包括:
Smart Images

Figure CN122392153B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, electronic device, and storage medium for determining the location of inspection points. Background Technology
[0002] In supermarkets and warehouses, it is often necessary to inspect shelves and other items. With the development of robotics technology, robots can be used to perform these inspections. Once the robot arrives at the inspection point, it can obtain information about the items on the shelf through image recording and other methods, thus achieving the inspection.
[0003] Typically, robot inspection points rely on manual labeling, which is inefficient and prone to omissions. Using fixed templates for inspection points on shelves waiting to be inspected is difficult to adapt to obstacle contours of arbitrary shapes. Using simple equidistant sampling methods easily overlooks differences in safety distances and side lengths, resulting in points that are too dense or too sparse; and there is a lack of a unified mechanism to ensure that inspection points fall within the reachable and effective area.
[0004] Therefore, how to automatically generate inspection points and match them with the shape of the objects to be inspected in order to reduce the risk of robot collisions and improve inspection efficiency is an urgent problem to be solved. Summary of the Invention
[0005] This disclosure provides a method, apparatus, electronic device, and storage medium for determining the location of inspection points.
[0006] According to a first aspect of the present disclosure, a method for determining the location of inspection points is proposed, the method comprising: Obtain the polygonal outline information of the object to be inspected on the plane of the inspection area; Based on the predetermined safe distance corresponding to the inspection equipment, the first polygon represented by the polygonal contour information is expanded outward at equal intervals to obtain the second polygon. Based on the side length of each side of the second polygon, the inspection points of the inspection equipment on at least one side of the second polygon are determined.
[0007] In some embodiments, expanding the first polygon represented by the polygonal contour information outward at equal intervals to obtain a second polygon includes: Determine the normalized normal vector pointing to the outside of the first polygon for each edge of the first polygon; Multiply each of the normalized normal vectors by the negative value of the predetermined safety distance to obtain the outward offset corresponding to each side of the first polygon; Add the corresponding outward offset to the start and end points of each side of the first polygon to obtain two points on the outward parallel side corresponding to each side of the first polygon.
[0008] The intersection of two adjacent outwardly extending parallel sides is taken as the vertex of the second polygon.
[0009] In some embodiments, determining the inspection point of the inspection device on at least one side of the second polygon based on the side length of each side of the second polygon includes: Based on the length of each side of the second polygon, the sides of the second polygon are divided into at least a first type of side and a second type of side; The inspection points on each edge of the second polygon are determined based on the type of each edge of the second polygon.
[0010] In some embodiments, determining the inspection points on each edge of the second polygon based on the type of each edge of the second polygon includes: Select at least one of the following points on the first type of edge as an inspection point: The first endpoint on the first type of edge; The second endpoint on the first type of edge; Starting from the first endpoint or the second endpoint, a plurality of intermediate points are sequentially determined along the first type of edge at predetermined intervals.
[0011] In some embodiments, determining the inspection points on each edge of the second polygon based on the type of each edge of the second polygon includes: Select at least one of the following points on the second type of edge as the inspection point: The first base point on the second type of edge at a predetermined safe distance from the first endpoint of the second type of edge; The second base point on the second type of edge, at a predetermined safe distance from the second endpoint of the second type of edge; The midpoint of each segment between the first base point and the second base point, wherein the length of the segment is equal to a predetermined segment length.
[0012] In some embodiments, obtaining the polygonal outline information of the object to be inspected on the inspection area plane includes: On the plane of the inspection area, the object to be inspected is fitted with the minimum bounding rectangle; Determine the polygonal outline information of the minimum bounding rectangle pair.
[0013] In some embodiments, the method further includes discarding the following inspection points: Inspection points located inside any object to be inspected within the inspection area; Inspection points located outside the aforementioned inspection area; Inspection points are those whose distance between the edges of the first polygon corresponding to any object to be inspected within the inspection area is less than a predetermined minimum distance.
[0014] According to a second aspect of the present disclosure, an inspection point location determination device is provided, the device comprising: a processing module, wherein the processing module is configured to: Obtain the polygonal outline information of the object to be inspected on the plane of the inspection area; Based on the predetermined safe distance corresponding to the inspection equipment, the first polygon represented by the polygonal contour information is expanded outward at equal intervals to obtain the second polygon. Based on the side length of each side of the second polygon, the inspection points of the inspection equipment on at least one side of the second polygon are determined.
[0015] In some embodiments, the processing module is specifically used for: Determine the normalized normal vector pointing to the outside of the first polygon for each edge of the first polygon; Multiply each of the normalized normal vectors by the negative value of the predetermined safety distance to obtain the outward offset corresponding to each side of the first polygon; Add the corresponding outward offset to the start and end points of each side of the first polygon to obtain two points on the outward parallel side corresponding to each side of the first polygon. The intersection of two adjacent outwardly extending parallel sides is taken as the vertex of the second polygon.
[0016] In some embodiments, the processing module is specifically used for: Based on the length of each side of the second polygon, the sides of the second polygon are divided into at least a first type of side and a second type of side; The inspection points on each edge of the second polygon are determined based on the type of each edge of the second polygon.
[0017] In some embodiments, the processing module is specifically used for: Select at least one of the following points on the first type of edge as an inspection point: The first endpoint on the first type of edge; The second endpoint on the first type of edge; Starting from the first endpoint or the second endpoint, a plurality of intermediate points are sequentially determined along the first type of edge at predetermined intervals.
[0018] In some embodiments, the processing module is specifically used for: Select at least one of the following points on the second type of edge as the inspection point: The first base point on the second type of edge at a predetermined safe distance from the first endpoint of the second type of edge; The second base point on the second type of edge, at a predetermined safe distance from the second endpoint of the second type of edge; The midpoint of each segment between the first base point and the second base point, wherein the length of the segment is equal to a predetermined segment length.
[0019] In some embodiments, the processing module is specifically used for: On the plane of the inspection area, the object to be inspected is fitted with the minimum bounding rectangle; Determine the polygonal outline information of the minimum bounding rectangle pair.
[0020] In some embodiments, the processing module is further configured to: The following inspection points should be abandoned: Inspection points located inside any object to be inspected within the inspection area; Inspection points located outside the aforementioned inspection area; Inspection points are those whose distance between the edges of the first polygon corresponding to any object to be inspected within the inspection area is less than a predetermined minimum distance.
[0021] According to a third aspect of the present disclosure, an electronic device is provided, the electronic device comprising: One or more processors; The processor is used to invoke instructions to cause the electronic device to execute the inspection point location determination method as described above.
[0022] According to a fourth aspect of the present disclosure, a storage medium is provided that stores instructions that, when executed on an electronic device, cause the electronic device to perform the inspection point location determination method as described above.
[0023] The method for determining inspection point locations according to an embodiment of this disclosure includes: acquiring polygonal contour information of an object to be inspected on a plane of the inspection area; expanding a first polygon represented by the polygonal contour information outward at equal intervals based on a predetermined safety distance corresponding to the inspection equipment to obtain a second polygon; and determining the inspection point of the inspection equipment on at least one side of the second polygon based on the side length of each side of the second polygon. Thus, by calculating the normalized normal vector of each side and multiplying it by the predetermined safety distance to determine the outward expansion offset, each side can be translated in the correct direction and distance. By using the intersection of two adjacent parallel outward expansion sides as the vertices of the second polygon, the shape distortion, gaps, or overlap problems that may occur when processing polygon corner points are reduced, thereby maintaining a predetermined safety distance between the second polygon and the first polygon. This provides a reliable basis for the accurate determination of subsequent inspection points and improves the safety and efficiency of the inspection task. Attached Figure Description
[0024] Figure 1 This is a flowchart illustrating a method for determining the location of inspection points according to an exemplary embodiment. Figure 1 ; Figure 2 This is a flowchart illustrating a method for determining the location of inspection points according to an exemplary embodiment. Figure 2 ; Figure 3 This is a schematic diagram of the structure of an electronic device according to an exemplary embodiment. Detailed Implementation
[0025] To make the technical solution and beneficial effects of the present invention more apparent and understandable, a detailed description is provided below by listing specific embodiments. The accompanying drawings are not necessarily drawn to scale, and local features may be enlarged or reduced to more clearly show the details of the local features; unless otherwise defined, the technical and scientific terms used herein have the same meanings as those in the technical field to which this application pertains.
[0026] This disclosure is not exhaustive, but merely illustrative of some embodiments, and is not intended to limit the scope of protection of this disclosure. Unless otherwise specified, each step in a particular embodiment can be implemented as an independent embodiment, and the steps can be arbitrarily combined. For example, a solution after removing some steps in a particular embodiment can also be implemented as an independent embodiment, and the order of the steps in a particular embodiment can be arbitrarily interchanged. Furthermore, the optional implementation methods in a particular embodiment can be arbitrarily combined; moreover, the embodiments can be arbitrarily combined, for example, some or all steps of different embodiments can be arbitrarily combined, and a particular embodiment can be arbitrarily combined with the optional implementation methods of other embodiments.
[0027] In each of the disclosed embodiments, unless otherwise specified or in case of logical conflict, the terminology and / or descriptions of the embodiments are consistent and can be referenced by each other. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.
[0028] The terminology used in the embodiments of this disclosure is for the purpose of describing particular embodiments only and is not intended to limit the scope of this disclosure.
[0029] In this disclosure, unless otherwise stated, elements expressed in the singular form, such as "a," "an," "the," "the," "the," "the," "the," "the," "this," etc., can mean "one and only one," or "one or more," "at least one," etc. For example, when using articles such as "a," "an," "the," etc. in translation, the noun following the article can be understood as either a singular or a plural expression.
[0030] In the embodiments of this disclosure, "multiple" refers to two or more.
[0031] In some embodiments, the terms “at least one of”, “one or more”, “a plurality of”, “multiple”, etc., may be used interchangeably.
[0032] In some embodiments, the notation "at least one of A and B", "A and / or B", "A in one case, B in another", "A in one case, B in another", etc., may include the following technical solutions depending on the situation: in some embodiments, A (A is executed regardless of B); in some embodiments, B (B is executed regardless of A); in some embodiments, execution is selected from A and B (A and B are selectively executed); in some embodiments, both A and B are executed. The same applies when there are more branches such as A, B, C, etc.
[0033] In some embodiments, the notation "A or B" may include the following technical solutions, depending on the situation: in some embodiments, A (execution of A regardless of B); in some embodiments, B (execution of B regardless of A); in some embodiments, selective execution from A and B (A and B are selectively executed). The same applies when there are more branches such as A, B, and C.
[0034] The prefixes "first," "second," etc., used in the embodiments of this disclosure are merely for distinguishing different descriptive objects and do not impose restrictions on the position, order, priority, value, or content of the descriptive objects. The description of the descriptive objects should be found in the claims or the context of the embodiments, and the use of prefixes should not constitute unnecessary restrictions. For example, if the descriptive object is a "field," the ordinal numbers preceding "field" in "first field" and "second field" do not restrict the position or order of the "fields." "First" and "second" do not restrict whether the "fields" they modify are in the same message, nor do they restrict the order of "first field" and "second field." Similarly, if the descriptive object is a "level," the ordinal numbers preceding "level" in "first level" and "second level" do not restrict the priority between "levels." Furthermore, the value of the descriptive object is not limited by ordinal numbers and can be one or more. For example, in "first device," the value of "device" can be one or more. Furthermore, the objects modified by different prefixes can be the same or different. For example, if the object being described is "device", then "first device" and "second device" can be the same device or different devices, and their types can be the same or different. Similarly, if the object being described is "information", then "first information" and "second information" can be the same information or different information, and their content can be the same or different.
[0035] In some embodiments, “including A,” “containing A,” “for indicating A,” and “carrying A” can be interpreted as directly carrying A or indirectly indicating A.
[0036] In some embodiments, terms such as “…”, “determine…”, “in the case of…”, “when…”, “when…”, “if…”, etc. can be used interchangeably.
[0037] In some embodiments, the terms “greater than,” “greater than or equal to,” “not less than,” “more than,” “more than or equal to,” “not less than,” “higher than,” “higher than or equal to,” “not lower than,” and “above” can be used interchangeably, as can the terms “less than,” “less than or equal to,” “not greater than,” “less than,” “less than or equal to,” “not more than,” “lower than,” “lower than or equal to,” “not higher than,” and “below”.
[0038] In some embodiments, devices, etc., can be interpreted as physical or virtual, and their names are not limited to the names recorded in the embodiments. Terms such as “device”, “equipment”, “circuit”, “network element”, “node”, “function”, “unit”, “section”, “system”, “network”, “chip”, “chip system”, “entity”, and “subject” can be used interchangeably.
[0039] This disclosure proposes a method for determining the location of inspection points, such as... Figure 1 As shown, the method includes: Step 101: Obtain the polygonal outline information of the object to be inspected on the plane of the inspection area; Step 102: Based on the predetermined safety distance corresponding to the inspection equipment, expand the first polygon represented by the polygon outline information outward at equal intervals to obtain the second polygon; Step 103: Based on the side length of each side of the second polygon, determine the inspection point of the inspection device on at least one side of the second polygon.
[0040] Here, the method for determining the location of inspection points can be executed by an inspection point location determination device. This device can include inspection equipment or processing equipment within the inspection system. The processing equipment of the inspection system can send the determined inspection points to the inspection equipment.
[0041] The inspection area can be a two-dimensional spatial area where inspection equipment performs inspection operations, such as the floor area of a warehouse or supermarket. The inspection equipment can be an automated or semi-automated device that performs inspection tasks, such as a mobile robot. The equipment can collect information according to defined inspection points. The object to be inspected can be an entity within the inspection area that requires information collection or status checks by the inspection equipment, such as shelves, equipment, or obstacles. Inspection points can be specific locations that the inspection equipment needs to reach and perform information collection or status checks when performing inspection tasks.
[0042] Here, there can be one or more items to be inspected within the inspection area. Inspection points for each item can be determined individually. Inspection points for multiple items can be combined to form the overall inspection point for the inspection area.
[0043] Polygon contour information can be data used to describe the geometry of the object to be inspected on the plane of the inspection area. For example, polygon contour information may include the coordinates of multiple vertices, which can be connected to form a closed polygon.
[0044] In one possible implementation, the polygonal contour information may include the geometric shape data of the object to be inspected projected onto the plane of the inspection area.
[0045] In one possible implementation, the polygonal contour information may include data of the geometric shape obtained by fitting the shape of the object to be inspected on the plane of the inspection area.
[0046] The predetermined safety distance is the minimum interval that the inspection equipment must maintain to reduce the risk of collision with the object being inspected when performing an inspection task. The setting of the predetermined safety distance takes into account the size of the inspection equipment, its motion accuracy, and the characteristics of the object being inspected.
[0047] The first polygon can be a geometric shape directly represented by the polygonal outline information of the object to be inspected. Equidistant expansion can be the process of moving each edge of the first polygon parallel to the outside of the first polygon by the same fixed distance and reconnecting the endpoints of adjacent edges to form a new polygon. The second polygon can be the new polygon obtained after the equidistant expansion operation of the first polygon, whose boundary maintains a predetermined safe distance from the boundary of the first polygon.
[0048] Contour information can be obtained in various ways. For example, the geometric dimensions of the object to be inspected can be manually measured and converted into coordinate data to construct a polygonal contour. Alternatively, image recognition technology, LiDAR technology, or similar methods can be used to photograph or scan the inspection area and convert the data into polygonal coordinate data.
[0049] In one possible implementation, the inspection point location determination device can acquire the contour information of the inspection area and the polygonal contour information of all objects to be inspected within the inspection area.
[0050] In one possible implementation, the normal direction of each edge of the first polygon can be calculated, and the polygon can be translated outward along the normal direction by a length equal to a predetermined safety distance. Subsequently, adjacent translated edges are connected to form new vertices, thereby constructing the second polygon.
[0051] For example, for a first polygon with a rectangular shape, after being expanded outward at equal intervals, it is still a rectangle, but its side length will increase accordingly, and the side of the expanded rectangle will maintain a predetermined safe distance from the corresponding side of the original rectangle.
[0052] Here, sampling points on the edges of the second polygon can be implemented in several ways. For example, each edge of the second polygon can be sampled uniformly, that is, multiple points can be selected as inspection points at fixed intervals along the length of each edge. For instance, if the length of an edge is L and the preset sampling interval is D, then L / D (usually rounded to the nearest integer) inspection points can be selected on the edge. Alternatively, only the midpoints of each edge of the second polygon can be selected as inspection points. Furthermore, only the two endpoints of each edge of the second polygon can be selected as inspection points.
[0053] In this way, by automatically acquiring the outline information of the object to be inspected and expanding it outwards at equal intervals based on a predetermined safety distance, a safe and accessible inspection area boundary is generated, and inspection points are determined based on the side length of the boundary. On the one hand, by expanding outwards at equal intervals, it can adapt to the outline of obstacles of any shape, improving the adaptability of inspection points. On the other hand, by setting a predetermined safety distance, the risk of collision between the inspection equipment and the object to be inspected can be reduced, improving the automation level and efficiency of the inspection task, thereby reducing the inefficiency and omissions of manual annotation.
[0054] In some embodiments, obtaining the polygonal outline information of the object to be inspected on the inspection area plane includes: On the plane of the inspection area, the object to be inspected is fitted with the minimum bounding rectangle; Determine the polygonal outline information of the minimum bounding rectangle pair.
[0055] On the inspection area plane, a minimum bounding rectangle fitting is performed on the object to be inspected. This can be done on a two-dimensional plane by using an algorithm to find a rectangle with the smallest area that completely encloses the object. This process simplifies the complex geometry of the object to be inspected into a regular quadrilateral, facilitating subsequent geometric calculations.
[0056] The minimum bounding rectangle of the object to be inspected is obtained. The four vertices and four sides of the rectangle constitute its polygonal contour information. Its side lengths and vertex coordinates can be directly used as inputs for the first polygon in subsequent steps. For example, the coordinates of the four corner points of the minimum bounding rectangle can be extracted, and these points can be connected in a clockwise or counterclockwise order to obtain a closed quadrilateral contour, which is the polygonal contour information.
[0057] Thus, by using the minimum bounding rectangle fitting method to obtain the polygonal contour information of the object to be inspected, the complex or irregular shape of the object can be effectively simplified into a standardized quadrilateral contour. This reduces the complexity of data acquisition and processing, and reduces the computational burden and error accumulation that may result from directly processing complex contours, thereby improving the robustness and practicality of the entire inspection point determination method.
[0058] In some embodiments, expanding the first polygon represented by the polygonal contour information outward at equal intervals to obtain a second polygon includes: Determine the normalized normal vector pointing to the outside of the first polygon for each edge of the first polygon; Multiply each of the normalized normal vectors by the predetermined safety distance to obtain the outward offset corresponding to each side of the first polygon; Add the corresponding outward offset to the start and end points of each side of the first polygon to obtain two points on the outward parallel side corresponding to each side of the first polygon. The intersection of two adjacent outwardly extending parallel sides is taken as the vertex of the second polygon.
[0059] For each edge in the first polygon, its direction vector can be calculated first. By rotating the direction vector by 90 degrees and normalizing it, a unit normal vector perpendicular to the edge can be obtained.
[0060] In one possible implementation, to ensure the normal vector points outward from the first polygon, its direction can be determined based on the vertex order of the polygon (e.g., counterclockwise or clockwise) or by judging the relative direction of the normal vector to the line connecting the center point of the polygon to the midpoint of the edge. The normalized normal vector provides a precise directional reference for subsequent equidistant expansion.
[0061] After obtaining the outward-pointing normalized normal vector for each edge, it is multiplied by a predetermined safety distance to calculate the outward offset of the edge. Alternatively, if the normalized normal vector is defined as pointing inwards into the polygon, it is multiplied by a negative value to make it point outwards, thereby achieving the outward expansion of the polygon.
[0062] Here, the outward offset can be a vector whose size is equal to the predetermined safety distance, and whose direction is perpendicular to the corresponding edge and points out of the polygon.
[0063] For each edge of the first polygon, its start and end coordinates are respectively added with the corresponding outward offset. In this way, the original edge of the first polygon is translated as a whole, forming a new line segment. The new line segment is parallel to the original edge, and the distance between the new line segment and the original edge is exactly the predetermined safety distance. This new line segment is the outward parallel edge, and its two endpoints form the basis of the second polygon.
[0064] After obtaining all the outward parallel edges, the vertices of the second polygon are determined by calculating the intersection of adjacent outward parallel edges. For any two adjacent edges in the second polygon, their respective outward parallel edges will intersect in space (if they are not parallel). This intersection is then identified as a vertex of the second polygon. By processing all adjacent outward parallel edges in this way, the complete outline of the second polygon can be accurately constructed, especially at the corners of the original polygon. This method naturally forms new corners and reduces the problems of shape discontinuity or inaccuracy that may be caused by simple vertex offsets.
[0065] For example, each edge of the first polygon (from the i-th vertex to the (i+1)%n-th vertex, where % represents the modulo operation) can be traversed, and the edge vector edgeVector = (nextPoint - point) can be calculated, where nextPoint and Point are the two vertices of an edge. The edge vector is rotated 90° clockwise to obtain the normal vector normalVector = (-edgeVector.y, edgeVector.x). It is normalized by dividing by its modulus, and then multiplied by the predetermined safe distance safeDistance and inverted to obtain the outward offset expandedNormal = -normalVector × safeDistance.
[0066] Apply an offset to each edge to obtain a new parallel edge after expansion (newEdge=[point+expandedNormal, nextPoint+expandedNormal]). After collecting all the expanded edges, find the intersection of every two adjacent expanded edges as the new vertex of the expanded polygon.
[0067] The expression (1) can be used to determine whether the two outward parallel sides intersect.
[0068] denom=(x1-x2)×(y3-y4)-(y1-y2)×(x3-x4) (1) Here, denom represents the angle between the two outward parallel edges. One outward parallel edge passes through points (x1, y1) and (x2, y2), and the other outward parallel edge passes through points (x3, y3) and (x4, y4).
[0069] Expression (2) is used to determine the proportional figures and to determine how far the intersection point is from the starting point (x1, y1) on line 1. t=0 indicates that the intersection point is at the starting point, t=1 indicates that the intersection point is at the ending point, and t=2 indicates that the intersection point is on the extension line.
[0070] t=((x1-x3)×(y3-y4)-(y1-y3)×(x3-x4)) / denom (2) The intersection point can be represented by expression (3).
[0071] intersection=(x1+t×(x2-x1), y1+t×(y2-y1)) (3) When |denom| < 1e-10 (adjacent sides are parallel), return the midpoint of the two sides ((x1+x2) / 2, (y1+y2) / 2) as an approximate solution to ensure numerical stability.
[0072] Thus, by calculating the normalized normal vector of each edge and multiplying it by a predetermined safety distance to determine the outward offset, each edge can be translated in the correct direction and distance. By using the intersection of two adjacent parallel outward edges as the vertices of the second polygon, potential shape distortion, gaps, or overlaps when processing polygon corners are reduced, thereby maintaining a predetermined safety distance between the second and first polygons. This provides a reliable basis for the accurate determination of subsequent inspection points, improving the safety and efficiency of the inspection task.
[0073] In some embodiments, determining the inspection point of the inspection device on at least one side of the second polygon based on the side length of each side of the second polygon includes: Based on the length of each side of the second polygon, the sides of the second polygon are divided into at least a first type of side and a second type of side; The inspection points on each edge of the second polygon are determined based on the type of each edge of the second polygon.
[0074] To optimize the distribution of inspection points, the length of each side of the second polygon can be analyzed first. By setting one or more preset length thresholds, the sides of the second polygon can be classified. Alternatively, the first and second types of sides can be determined by setting the ratio of the first type of sides to the second type of sides.
[0075] For example, for the second polygon of a rectangle, the first type of side can be a long side, and the second type of side can be a short side.
[0076] The classification mechanism is used to distinguish edges with different inspection needs and strategies. For example, longer edges may be suitable for equally spaced points, while shorter edges may focus more on the placement of points at the endpoints or specific key locations.
[0077] After classifying the edges of the second polygon, different strategies could be used to determine inspection points for different edge types. For example, for the first type of edge, inspection points could be evenly distributed at its endpoints or at fixed intervals; while for the second type of edge, a more refined strategy might be needed, such as placing inspection points near its endpoints or setting a small number of key inspection points based on its length and importance. This edge-type-based inspection point determination method allows the inspection equipment to achieve optimal inspection coverage and efficiency on edges with different geometric characteristics, reducing the shortcomings of a single strategy.
[0078] In some embodiments of this application, a method is proposed to divide the edges of the second polygon into at least a first type of edge and a second type of edge based on the length of each edge, and to determine the inspection points on each edge of the second polygon based on the type of each edge. However, in its implementation, for the cases where edges are classified as first type, how to specifically and effectively arrange inspection points on these edges to achieve sufficient and efficient coverage of the area represented by the first type of edge, while reducing the omission of key areas or unnecessary duplicate inspections, is a problem that needs further refinement.
[0079] In some embodiments, determining the inspection points on each edge of the second polygon based on the type of each edge of the second polygon includes: Select at least one of the following points on the first type of edge as an inspection point: The first endpoint on the first type of edge; The second endpoint on the first type of edge; Starting from the first endpoint or the second endpoint, a plurality of intermediate points are sequentially determined along the first type of edge at predetermined intervals.
[0080] In one possible implementation, the first type of edge includes the long edge in the rectangular second polygon.
[0081] The first endpoint and the second endpoint of a first-type edge can be the two vertices that constitute the first-type edge. Using the endpoints as inspection points allows for explicit inspection coverage of the start and end positions of the first-type edges.
[0082] Additional inspection points can be arranged along the length of the first type of edge, according to a predetermined length. The starting point can be either the first or second endpoint, increasing flexibility. Optimization can be performed based on the inspection path planning or the direction of equipment movement. For example, if the inspection equipment always starts moving along the edge from a certain direction, selecting the corresponding endpoint as the starting point is more reasonable.
[0083] The predetermined length can be a distance value set in advance during the inspection task planning. This length can be determined based on factors such as the size of the inspection equipment, the sensor coverage of the inspection equipment, the characteristics of the object to be inspected, the required data accuracy, and / or inspection efficiency requirements.
[0084] Intermediate points can be calculated and placed one after another along the direction of the first type of edge, at set intervals. This ensures that the distribution of inspection points on the edge is continuous and regular, thus achieving effective coverage of the entire edge length. In addition to the endpoints, multiple intermediate points are generated inside the edge to compensate for the shortcomings of relying on endpoints for inspection.
[0085] For example, for each long side of the second polygon of the rectangle, calculate the unit direction vector dir = (nextPoint - point) / edgeLength and the angle value angleRadians = atan2(dy, dx) × 180 / π (dy and dx are the vertical and horizontal components of the side vector, respectively). Determine the number of sampling points according to the formula numPoints = floor(edgeLength / samplingDistance), and generate three types of sampling points in sequence:
[0086] Starting point: Directly take the starting point of the edge, and mark the angle value as angleRadians+1500 (1500 represents a special node marker, which is a custom marker constant used to distinguish between corners and intermediate points, and facilitates the identification of turning nodes in subsequent path planning).
[0087] Midpoint: samplePoint = point + dir × (samplingDistance × j), j = 1, 2, ..., numPoints, angle value is angleRadians.
[0088] End point: Take the end point of the edge directly, and mark the angle value as angleRadians+1500.
[0089] Each point is validated immediately after it is generated; if it passes the validation, it is added to the candidate point set.
[0090] Where `point` represents the starting coordinates (x, y) of the current edge; `nextPoint` represents the ending coordinates (x, y) of the current edge; `edgeLength` represents the total length of the current edge; `dir` represents the unit direction vector of the edge (length = 1, indicating only direction); `dx` represents the horizontal component of the edge vector = `nextPoint.x` - `point.x`; `dy` represents the vertical component of the edge vector = `nextPoint.y` - `point.y`; `angleRadians` represents the angle value (°) of this edge, used to mark the orientation of the point; `samplingDistance` represents the sampling interval (how far apart to take a point); `numPoints` represents the number of intermediate sampling points; and `samplePoint` represents the coordinates (x, y) of the generated sampling point.
[0091] Using the endpoints of the first type of edge as inspection points ensures effective coverage of the start and end positions of the edge, reducing blind spots in the boundary area. Simultaneously, by sequentially determining multiple intermediate points along the first type of edge at predetermined intervals, continuous and uniform inspection of longer first-type edges is achieved. This arrangement allows for flexible adjustment of the inspection point density based on the characteristics of the inspection equipment and the needs of the inspection task, improving inspection coverage while optimizing the inspection path.
[0092] In some embodiments, determining the inspection points on each edge of the second polygon based on the type of each edge of the second polygon includes: Select at least one of the following points on the second type of edge as the inspection point: The first base point on the second type of edge at a predetermined safe distance from the first endpoint of the second type of edge; The second base point on the second type of edge, at a predetermined safe distance from the second endpoint of the second type of edge; The midpoint of each segment between the first base point and the second base point, wherein the length of the segment is equal to a predetermined segment length.
[0093] In one possible implementation, the second type of edge includes the short side in the rectangular second polygon.
[0094] In the second polygon of the rectangle, the short side intersects with the long side. Therefore, the endpoints of the second type of side have already been set as inspection points on the long side, so they will not be set again here.
[0095] A first base point can be determined on a second type of edge at a predetermined safe distance from the first endpoint of the edge. The first base point is a point located on the second type of edge and maintaining a certain safe distance from the starting endpoint of the edge. Similarly, a second base point can be determined on a second type of edge at a predetermined safe distance from the second endpoint of the edge.
[0096] The midpoint of each segment between the first and second base points can be determined, where the segment length is equal to a predetermined segment length. After determining the first and second base points, to ensure the inspection coverage and accuracy of the middle portion of the second type of edge, the area between the first and second base points is divided into several predetermined segments of equal length. The midpoint of each segment is selected as an inspection point, enabling the inspection equipment to scan or inspect the main portion of the second type of edge at a uniform and controllable density.
[0097] Here, the segment length can be the same as or different from the predetermined safety distance.
[0098] For example, for each short edge, calculate the effective length: validLength = edgeLength - 2 × safeDistance (leaving a safe distance at both ends to avoid sampling points being too close to obstacles). If validLength ≤ 0, skip the edge (no effective sampling area). Determine the number of segments based on numSegments = max(1, floor(validLength / 12)), and the number of sampling points numPoints = numSegments + 1. Using startOffset = safeDistance as the starting offset and stepSize = 10, generate sampling points using the following formula: offset = startOffset + (j + 0.5) × stepSize (j = 0, 1, ..., numPoints - 1) samplePoint = round(pointStart + dir × offset). Constraint: offset ≤ edgeLength - safeDistance (ensuring sampling points are within the effective area). Validity is also checked after each point is generated.
[0099] Where edgeLength represents the total length of the short side, safeDistance represents the predetermined safe distance reserved at both ends, validLength represents the effective length that can be sampled after removing the safe areas at both ends, numSegments represents the number of segments in the effective area division, numPoints represents the total number of sampling points generated in the end, pointStart represents the coordinates of the starting point of the short side, dir represents the unit direction vector of the short side pointing to the end point, startOffset represents the starting offset distance of the first sampling point relative to the starting point, stepSize represents the segment length between sampling points, j represents the sampling point number, offset represents the total length offset of a single sampling point from the starting point of the edge, samplePoint represents the calculated coordinates of the sampling point, and round represents the rounding of the coordinate values.
[0100] By setting a first base point and a second base point at predetermined safe distances from the endpoints at both ends of the second type of edge, the potential safety risks of the inspection equipment when it is close to the start and end positions of the edge are reduced. Between the first base point and the second base point, the midpoint of each segment is determined as an inspection point with a predetermined segment length. This ensures that the inspection points are evenly distributed and have a controllable density in the middle area of the second type of edge, thereby guaranteeing full coverage of the main body of the second type of edge and reducing blind spots.
[0101] In some embodiments, the method further includes discarding the following inspection points: Inspection points located inside any object to be inspected within the inspection area; Inspection points located outside the aforementioned inspection area; Inspection points are those whose distance between the edges of the first polygon corresponding to any object to be inspected within the inspection area is less than a predetermined minimum distance.
[0102] After generating the initial set of inspection points, these points can be traversed, and each point can be checked to see if it falls inside the original polygonal outline (i.e., the first polygon) of any object to be inspected within the inspection area (including but not limited to the object on which the inspection point was generated, as well as other adjacent or overlapping objects to be inspected). This can usually be achieved using an algorithm where points lie within polygons, such as the ray casting method. If the number of intersections between the ray from an inspection point and any first polygon is odd, it can be determined that the inspection point is located within the object to be inspected corresponding to that first polygon and should be discarded; otherwise, the inspection point is retained.
[0103] When determining initial inspection points, since the object to be inspected may be near the edge of the inspection area, the inspection points generated by the expanded second polygon may exceed the effective range of the entire inspection area. Therefore, it is necessary to perform a geographical location judgment on each initially determined inspection point to verify whether it is within the predefined inspection area boundary. Any point exceeding the inspection area boundary will be discarded to ensure that the inspection equipment always operates within the allowed working space. This can usually be achieved using an algorithm for points within the inspection area, such as the ray method. Thus, if the number of intersections between the ray from a given inspection point and any inspection area is odd, it can be determined that the inspection point is within the inspection area and needs to be retained; otherwise, the inspection point is discarded.
[0104] Although the inspection points are determined based on the second polygon expanded outward from the predetermined safety distance, to further improve safety and ensure that the inspection equipment and the object to be inspected always maintain a sufficient safety margin, the minimum distance between the inspection point and the edges of the original outline (first polygon) of all objects to be inspected can be checked. For each initially determined inspection point, the shortest distance to each edge of the first polygon within the inspection area is calculated. If the shortest distance is less than the predetermined minimum distance (the predetermined minimum distance may be the same as or different from the predetermined safety distance used for outward expansion; a conservative value is usually set), the inspection point is considered too close to the object to be inspected, posing a potential safety risk, and is therefore discarded.
[0105] In this way, through multiple screenings, all identified inspection points are within reachable and legal areas, eliminating the need for additional filtering in the subsequent path planning module.
[0106] The following provides several specific examples in conjunction with any of the above embodiments: A method for automatically generating robot inspection points includes steps 201 to 209. For example... Figure 2 As shown. The meaning of each parameter in this example is as described in the above embodiments, and will not be repeated here.
[0107] Step 201, System initialization and parameter loading.
[0108] During the system startup phase, the initial configuration of the map data storage interface, obstacle contour point parser, and HTTP interface routing is completed. At the same time, algorithm parameters such as safe distance and sampling distance are injected to provide basic support for the automatic generation of inspection points in the future.
[0109] For example, the initial parameters and scene information set in this embodiment are as follows: the safe distance is 30.0cm, which is used to control the minimum safe distance between the robot and the shelf, and to determine the polygon expansion and the effective sampling range of the short side; the sampling distance is 50.0cm, which is used to determine the interval between adjacent inspection points when sampling at a fixed distance on the long side; the site is a rectangular warehouse, and the coordinates of its outline points are A(0,0), B(1000,0), C(1000,800), and D(0,800), all in cm; the obstacle ID is shelf-001, corresponding to a single rectangular shelf, the outline of which has been normalized to a quadrilateral by the minimum bounding rectangle fitting algorithm, and the coordinates of its outline points are P0(200,300), P1(600,300), P2(600,400), and P3(200,400), where the shelf has a length of 400cm in the x direction and a width of 100cm in the y direction, with the front facing the negative y-axis direction.
[0110] Step 202: Input data reception and format conversion.
[0111] The system receives the CreateObstaclesExecPointsReq request via the interface, converts the field contour points (outerContour) from a list of PointsDto objects to a double[] two-dimensional array list (allPointsCourt), and similarly converts the contour points of each obstacle (obstacles) to a List. <List<double[]> The structure ensures a unified data format, serving as the standard input for geometric calculations. The outlines of obstacles such as shelves are fitted as quadrilaterals by default; outlines with 4 or more vertices are normalized using a minimum bounding rectangle fitting algorithm.
[0112] For example, after receiving the CreateObstaclesExecPointsReq request through the interface, the format of the site contour points and obstacle contour points is converted to the standard format required for geometric calculation: the site contour points (outerContour) are converted from a list of PointsDto objects to a double[] two-dimensional array list allPointsCourt, and the converted result is [[0.0, 0.0], [1000.0, 0.0], [1000.0, 800.0], [0.0, 800.0]]; the shelf obstacle contour points (obstacles) are converted to a List <List<double[]> The structure `allPointsObstacle` is converted to `[[[200.0, 300.0], [600.0, 300.0], [600.0, 400.0], [200.0, 400.0]]]`, achieving a unified format for use as input data in subsequent geometric calculations.
[0113] Step 203: Expand the polygon equidistantly and calculate the edge normal vectors.
[0114] Traverse each edge of the obstacle polygon (from the i-th vertex to the (i+1)%n-th vertex), calculate the edge vector edgeVector = (nextPoint-point), rotate the edge vector 90° clockwise to obtain the normal vector normalVector = (-edgeVector.y, edgeVector.x), divide by its magnitude to normalize, and then multiply by the safety distance and invert to obtain the outward offset expandedNormal = -normalVector × safeDistance.
[0115] For example, based on the shelf outline points transformed in step 202, each side of the shelf quadrilateral is traversed, and the edge vector, normal vector, normalized vector and outward offset (safe distance safeDistance=30.0cm) are calculated in sequence.
[0116] Edge 0 (P0→P1): (starting point P0 (200, 300), ending point P1 (600, 300)), edge vector is (400, 0), normalized normal vector is (0, 1), and outward offset is (0, -30). Edge 1 (P1→P2): (Start point P1 (600, 300), End point P2 (600, 400)), Edge vector is (0, 100), Normalized normal vector is (-1, 0), Outward offset is (30, 0). Edge 2 (P2→P3): (Start point P2 (600, 400), End point P3 (200, 400)), Edge vector is (-400, 0), Normalized normal vector is (0, -1), Outward offset is (0, 30). Edge 3 (P3→P0): (starting point P3 (200, 400), ending point P0 (200, 300)), edge vector is (0, -100), normalized normal vector is (1, 0), and outward offset is (-30, 0).
[0117] Step 204: Calculate the vertices of the expanded polygon.
[0118] Apply an offset to each edge to obtain a new parallel edge after expansion (newEdge=[point+offset, nextPoint+offset]). After collecting all the expanded edges, find the intersection of every two adjacent expanded edges as the new vertex of the expanded polygon. The intersection point is calculated according to the following formula: denom=(x1-x2)×(y3-y4)-(y1-y2)×(x3-x4); t=((x1-x3)×(y3-y4)-(y1-y3)×(x3-x4)) / denom; intersection=(x1+t×(x2-x1), y1+t×(y2-y1)).
[0119] When |denom| < 1e-10 (adjacent sides are parallel), return the midpoint of the two sides ((x1+x2) / 2, (y1+y2) / 2) as an approximate solution to ensure numerical stability.
[0120] For example, based on the outward offset in step 203, the start and end points of each edge of the shelf are added with the corresponding offset to generate four parallel outward-expanding new edges: newEdge0 is [(200, 270), (600, 270)], newEdge1 is [(630, 300), (630, 400)], newEdge2 is [(600, 430), (200, 430)], and newEdge3 is [(170, 400), (170, 300)].
[0121] Following the rule of "newBox[i] = newEdge[i] and newEdge[(i+3)%4] intersecting", the outer vertices are calculated as follows: Q0(170, 270), Q1(630, 270), Q2(630, 430), Q3(170, 430).
[0122] The final expanded polygons are connected in the order of Q0→Q1→Q2→Q3, forming a rectangular structure that is parallel to the original shelf outline and maintains a safe distance of 30cm.
[0123] Step 205: Calculate side length and classify long and short sides.
[0124] Since step 202 has normalized the contour into a quadrilateral, the expanded polygon is also a quadrilateral, containing exactly two long sides and two short sides. The Euclidean distance of each side of the expanded polygon is calculated as length = √[(Δx)² + (Δy)²] (Δx and Δy are the differences between the x and y coordinates of the two endpoints of the expanded polygon, respectively). This distance is then combined with the edge indices to encapsulate a list of EdgeInfo objects, sorted in ascending order of length. The edges corresponding to the last two indices after sorting are taken as the long sides, and the edges corresponding to the first two indices after sorting are taken as the short sides, forming the basis for differentiated sampling classification.
[0125] The lengths of each side of the expanded polygon are calculated using the Euclidean distance formula: .
[0126] For example, the calculation results are: edge 0 (Q0→Q1) length 460.0cm, edge 1 (Q1→Q2) length 160.0cm, edge 2 (Q2→Q3) length 460.0cm, edge 3 (Q3→Q0) length 160.0cm.
[0127] Each edge is encapsulated as an object and sorted in ascending order of length, and then by edge index for edges of the same length. The result is: edge 1, edge 3, edge 0, edge 2. According to the classification rules, edges 0 and 2 are selected as long edges, and edges 1 and 3 as short edges, forming a basis for differentiated sampling. Since the outer contour is a standard quadrilateral, the classification can fully cover all four edges, ensuring that the sampling of inspection points is complete and the trajectory is closed.
[0128] Step 206: Sampling at a fixed interval along the long side.
[0129] For each long edge, calculate the unit direction vector dir = (nextPoint - point) / edgeLength and the angle value angleRadians = atan2(dy, dx) × 180 / π (dy and dx are the vertical and horizontal components of the edge vector, respectively). Determine the number of sampling points according to the formula numPoints = floor(edgeLength / samplingDistance), and generate three types of sampling points in sequence: Starting point: Directly take the edge starting point, and mark the angle value as angleRadians+1500 (special node marker, 1500 is a custom marker constant used to distinguish between edge corners and intermediate points, which is convenient for subsequent path planning to identify turning nodes); Intermediate point: samplePoint=point+dir×(samplingDistance×j), j=1,2,...,numPoints, and the angle value is taken as angleRadians; End point: Take the end point of the edge directly, and mark the angle value as angleRadians+1500; Each point is validated immediately after it is generated (step 208), and if it passes the validation, it is added to the candidate point set.
[0130] For example, for the two long sides (side 0 and side 2) obtained from the classification, a fixed interval sampling is performed with a sampling distance of 50.0 cm, and the validity is checked immediately after the points are generated.
[0131] Long side 0 (Q0→Q1, length 460.0cm): Calculate the unit direction vector dir=(1.0,0), angle value angleRadians=0.0°; the number of intermediate sampling points is 9, obtained by formula numPoints=floor(edgeLength / samplingDistance). Generate a total of 10 sampling points: the starting point, 9 intermediate points, and the ending point. The starting point / ending point is marked with an angle of 1500.0. All points are validated and added to the candidate set.
[0132] Long side 2 (Q2→Q3, length 460.0cm): Calculate the unit direction vector dir=(-1.0, 0), angle value angleRadians=180.0°; the sampling rules are the same as those for long side 0, generating 10 valid sampling points, with the start / end angle marked as 1680.0, all of which pass the verification.
[0133] Step 207, adaptive segmented sampling of the short side.
[0134] For each short edge, calculate the effective length: validLength = edgeLength - 2 × safeDistance (a safe distance is reserved at both ends to avoid sampling points being close to obstacles). If validLength ≤ 0, skip the edge (no effective sampling area). Determine the number of segments based on numSegments = max(1, floor(validLength / 12)), and the number of sampling points numPoints = numSegments + 1. With startOffset = safeDistance as the starting offset and stepSize = 10, generate sampling points using the following formula: offset = startOffset + (j + 0.5) × stepSize (j = 0, 1, ..., numPoints - 1); samplePoint = round(pointStart + dir × offset); constraint: offset ≤ edgeLength - safeDistance (ensuring that the sampling point is within the effective area). After each point is generated, perform validity verification (step 208).
[0135] For example, for two short sides (edge 1 and edge 3), adaptive segmented sampling is performed with safeDistance=30.0cm and stepSize=50. The core formula is: validLength=edgeLength-2×safeDistance, numSegments=max(1, floor(validLength / 12)), offset=startOffset+(j+0.5)×stepSize.
[0136] Short side 1 (Q1→Q2, length 160.0cm): Calculate the effective length validLength=100.0cm, the number of score segments numSegments=3, and the number of sampling points numPoints=4; combine with the unit direction vector to generate 4 compliant sampling points, all of which pass the verification.
[0137] Short side 3 (Q3→Q0, length 160.0cm): The parameters are the same as those of short side 1. Symmetrical processing generates 4 valid sampling points, all of which pass the verification.
[0138] Step 208: Double validity check of candidate points.
[0139] Two checks are performed on each candidate inspection point: First check (obstacle removal): For all obstacle polygons, a horizontal ray is emitted from the candidate point to the right, and the number of intersections with each side of the polygon is counted; if the number of intersections is odd, the point is considered to be inside the obstacle and is discarded directly; Second check (site constraint): The ray method is also performed on the site outline polygon, and the point is discarded if it is not inside the site outline; Boundary handling: When the distance from the candidate point to the edge of the polygon is less than 1e-12, it is considered to fall on the boundary and is considered an invalid point and discarded; Points that pass both checks are output as valid inspection points.
[0140] For example, all candidate inspection points undergo dual validity checks during generation in steps 206 and 207. The check rules strictly follow the invention's description, and are summarized below: Verification targets: 10 points generated by long side 0, 10 points generated by long side 2, 4 points generated by short side 1, and 4 points generated by short side 3, for a total of 28 candidate points; Verification results: All candidate points passed two verifications. There were no invalid points that fell inside obstacles, outside the field, or on the boundary. All of them were retained as valid inspection points. Verification instructions: The first obstacle removal verification uses the isPointInsideRectangle method (a simplified implementation of the ray method) to confirm that all points are not inside the shelf; the second site constraint verification uses the isPointInsidePolygon method (a general ray method) to confirm that all points are within the warehouse site; in the boundary processing, no candidate point has a distance from the polygon edge less than 1e-12, and there are no invalid boundary points.
[0141] Step 209: Sorting and outputting the results.
[0142] Sort all valid inspection points in ascending order by the fourth dimension field (edgeIndex) to ensure that the order of the output point set is consistent with the topological order of the obstacle edges. Construct an ObstaclesExecPointsResponse object, encapsulating each point as a ShelfExecPointsDto (containing x, y, z coordinates and a plane field), and return the complete inspection point set after associating it with the obstacle ID. Sort the 28 valid inspection points obtained in step 208 in ascending order by the fourth dimension field (edgeIndex) in the following order: edge 0 (10 points) → edge 1 (4 points) → edge 2 (10 points) → edge 3 (4 points) to ensure that the order of the output point set is consistent with the topological order of the outer polygon edges, which facilitates the generation of a coherent inspection route in subsequent path planning. Subsequently, an ObstaclesExecPointsResponse object is constructed, and each valid inspection point is encapsulated as a ShelfExecPointsDto, which includes x, y, z coordinates and a plane field (z coordinate defaults to 0.0, plane field defaults to 3), and associated with the obstacle ID (shelf-001). Finally, a complete set of inspection points is output, and the output data structure conforms to the invention's description.
[0143] This disclosure provides an inspection point location determination device, the device comprising: a processing module, wherein the processing module is used for: Obtain the polygonal outline information of the object to be inspected on the plane of the inspection area; Based on the predetermined safe distance corresponding to the inspection equipment, the first polygon represented by the polygonal contour information is expanded outward at equal intervals to obtain the second polygon. Based on the side length of each side of the second polygon, the inspection points of the inspection equipment on at least one side of the second polygon are determined.
[0144] In some embodiments, the processing module is specifically used for: Determine the normalized normal vector pointing to the outside of the first polygon for each edge of the first polygon; Multiply each of the normalized normal vectors by the negative value of the predetermined safety distance to obtain the outward offset corresponding to each side of the first polygon; Add the corresponding outward offset to the start and end points of each side of the first polygon to obtain two points on the outward parallel side corresponding to each side of the first polygon. The intersection of two adjacent outwardly extending parallel sides is taken as the vertex of the second polygon.
[0145] In some embodiments, the processing module is specifically used for: Based on the length of each side of the second polygon, the sides of the second polygon are divided into at least a first type of side and a second type of side; The inspection points on each edge of the second polygon are determined based on the type of each edge of the second polygon.
[0146] In some embodiments, the processing module is specifically used for: Select at least one of the following points on the first type of edge as an inspection point: The first endpoint on the first type of edge; The second endpoint on the first type of edge; Starting from the first endpoint or the second endpoint, a plurality of intermediate points are sequentially determined along the first type of edge at predetermined intervals.
[0147] In some embodiments, the processing module is specifically used for: Select at least one of the following points on the second type of edge as the inspection point: The first base point on the second type of edge at a predetermined safe distance from the first endpoint of the second type of edge; The second base point on the second type of edge, at a predetermined safe distance from the second endpoint of the second type of edge; The midpoint of each segment between the first base point and the second base point, wherein the length of the segment is equal to a predetermined segment length.
[0148] In some embodiments, the processing module is specifically used for: On the plane of the inspection area, the object to be inspected is fitted with the minimum bounding rectangle; Determine the polygonal outline information of the minimum bounding rectangle pair.
[0149] In some embodiments, the processing module is further configured to: The following inspection points should be abandoned: Inspection points located inside any object to be inspected within the inspection area; Inspection points located outside the aforementioned inspection area; Inspection points are those whose distance between the edges of the first polygon corresponding to any object to be inspected within the inspection area is less than a predetermined minimum distance.
[0150] It should be understood that the division of units or modules in the above device is only a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, the units or modules in the device can be implemented by a processor calling software: for example, the device includes a processor connected to a memory containing instructions. The processor calls the instructions stored in the memory to implement any of the above methods or to implement the functions of the units or modules in the above device. The processor can be, for example, a general-purpose processor, such as a Central Processing Unit (CPU) or a microprocessor, and the memory can be internal or external to the device. Alternatively, the units or modules in the device can be implemented in the form of hardware circuits. The functionality of some or all of the units or modules can be achieved through the design of these hardware circuits, which can be understood as one or more processors. For example, in one implementation, the hardware circuit is an application-specific integrated circuit (ASIC), and the functionality of some or all of the units or modules is achieved through the design of the logical relationships between the components within the circuit. In another implementation, the hardware circuit can be implemented using a programmable logic device (PLD), such as a field-programmable gate array (FPGA), which can include a large number of logic gates. The connection relationships between the logic gates are configured through configuration files, thereby achieving the functionality of some or all of the units or modules. All units or modules of the above device can be implemented entirely through processor-called software, entirely through hardware circuits, or partially through processor-called software with the remaining parts implemented through hardware circuits.
[0151] This disclosure also proposes an electronic device, the electronic device comprising: One or more processors; The processor is used to invoke instructions to cause the electronic device to execute the inspection point location determination method described in any of the above embodiments.
[0152] This disclosure also proposes a storage medium storing instructions that, when executed on an electronic device, cause the electronic device to perform the inspection point location determination method described in any of the above embodiments.
[0153] In this disclosure, the processor is a circuit with signal processing capabilities. In one implementation, the processor can be a circuit with instruction read and execute capabilities, such as a Central Processing Unit (CPU), a microprocessor, a graphics processing unit (GPU) (which can be understood as a type of microprocessor), or a digital signal processor (DSP). In another implementation, the processor can implement certain functions through the logical relationships of hardware circuits. The logical relationships of the aforementioned hardware circuits are fixed or reconfigurable. For example, the processor is a hardware circuit implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), such as an FPGA. In a reconfigurable hardware circuit, the process of the processor loading a configuration document and configuring the hardware circuit can be understood as the process of the processor loading instructions to implement the functions of some or all of the above units or modules. In addition, it can also be a hardware circuit designed for artificial intelligence, which can be understood as an ASIC, such as a Neural Network Processing Unit (NPU), a Tensor Processing Unit (TPU), a Deep Learning Processing Unit (DPU), etc.
[0154] Figure 3 This is a schematic diagram of the structure of the electronic device 9100 provided in this embodiment. The electronic device 9100 can be a network device, a terminal (e.g., a user equipment), a chip, chip system, or processor that supports the network device in implementing any of the above methods, or a chip, chip system, or processor that supports the terminal in implementing any of the above information transmission methods. The electronic device 9100 can be used to implement the inspection point location determination method described in the above method embodiments; please refer to the description in the above method embodiments for details.
[0155] like Figure 3 As shown, the electronic device 9100 includes one or more processors 9101. The processor 9101 can be a general-purpose processor or a special-purpose processor, etc. The processor 9101 is used to invoke instructions to cause the electronic device 9100 to execute any of the above-mentioned inspection point location determination methods.
[0156] In some embodiments, the electronic device 9100 further includes one or more memories 9102 for storing instructions. Optionally, all or part of the memories 9102 may also be located outside the electronic device 9100.
[0157] In some embodiments, the electronic device 9100 further includes one or more transceivers 9103. When the electronic device 9100 includes one or more transceivers 9103, the steps of sending, receiving and / or acquiring in the above method are performed by the transceivers 9103, and the other steps are performed by the processor 9101.
[0158] In some embodiments, the acquisition steps in the above method can also be executed by the processor 9101, for example, acquiring information from the memory 9102.
[0159] In some embodiments, a transceiver may include a receiver and a transmitter, which may be separate or integrated. Optionally, the terms transceiver, transceiver unit, transceiver, transceiver circuit, etc., may be used interchangeably; the terms transmitter, transmitting unit, transmitter, transmitting circuit, etc., may be used interchangeably; and the terms receiver, receiving unit, receiver, receiving circuit, etc., may be used interchangeably.
[0160] Optionally, the electronic device 9100 further includes one or more interface circuits 9104 connected to the memory 9102. The interface circuits 9104 can be used to receive signals from the memory 9102 or other devices, and can be used to send signals to the memory 9102 or other devices. For example, the interface circuits 9104 can read instructions stored in the memory 9102 and send the instructions to the processor 9101.
[0161] The electronic device 9100 described in the above embodiments may be a network device or a terminal, but the scope of the electronic device 9100 described in this disclosure is not limited thereto, and the structure of the electronic device 9100 may vary. Figure 3 The limitations. Electronic devices can be standalone devices or part of a larger device. For example, the electronic devices can be: (1) standalone integrated circuits (ICs), or chips, or chip systems or subsystems; (2) a collection of one or more ICs, optionally including storage components for storing data and programs; (3) ASICs, such as modems; (4) modules that can be embedded in other devices; (5) receivers, terminal devices, smart terminal devices, cellular phones, wireless devices, handheld devices, mobile units, vehicle-mounted devices, network devices, cloud devices, artificial intelligence devices, etc.; (6) others, etc.
[0162] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program commands. The aforementioned program can be stored in a storage medium, including various media capable of storing program code such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks or optical disks.
[0163] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several commands to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.
[0164] It should be understood that the above embodiments are exemplary and are not intended to encompass all possible implementations included in the claims. Various modifications and changes can be made to the above embodiments without departing from the scope of this disclosure. Similarly, the various technical features of the above embodiments can be arbitrarily combined to form other embodiments of the present invention that may not be explicitly described. Therefore, the above embodiments only illustrate several implementations of the present invention and do not limit the scope of protection of this patent.
Claims
1. A method for determining the location of inspection points, characterized in that, The method includes: Obtain the polygonal outline information of the object to be inspected on the plane of the inspection area; Based on the predetermined safe distance corresponding to the inspection equipment, the first polygon represented by the polygonal contour information is expanded outward at equal intervals to obtain the second polygon. Based on the side length of each side of the second polygon, the inspection points of the inspection equipment on at least one side of the second polygon are determined; The step of determining the inspection points of the inspection equipment on at least one side of the second polygon based on the side length of each side of the second polygon includes: Based on the length of each side of the second polygon, the sides of the second polygon are divided into at least a first type of side and a second type of side; The inspection points on each edge of the second polygon are determined based on the type of each edge of the second polygon; The step of determining the inspection points on each edge of the second polygon based on the type of each edge of the second polygon includes: Select at least one of the following points on the first type of edge as an inspection point: The first endpoint on the first type of edge; The second endpoint on the first type of edge; Starting from the first endpoint or the second endpoint, a plurality of intermediate points are sequentially determined along the first type of edge at predetermined intervals; Select at least one of the following points on the second type of edge as the inspection point: The first base point on the second type of edge at a predetermined safe distance from the first endpoint of the second type of edge; The second base point on the second type of edge, at a predetermined safe distance from the second endpoint of the second type of edge; The midpoint of each segment between the first base point and the second base point, wherein the length of the segment is equal to a predetermined segment length.
2. The method for determining the location of inspection points according to claim 1, characterized in that, The step of expanding the first polygon, which represents the polygonal contour information, outward at equal intervals to obtain the second polygon includes: Determine the normalized normal vector pointing to the outside of the first polygon for each edge of the first polygon; Multiply each of the normalized normal vectors by the negative value of the predetermined safety distance to obtain the outward offset corresponding to each side of the first polygon; Add the corresponding outward offset to the start and end points of each side of the first polygon to obtain two points on the outward parallel side corresponding to each side of the first polygon. The intersection of two adjacent outwardly extending parallel sides is taken as the vertex of the second polygon.
3. The method for determining the location of inspection points according to claim 1 or 2, characterized in that, The step of obtaining the polygonal outline information of the object to be inspected on the plane of the inspection area includes: On the plane of the inspection area, the object to be inspected is fitted with the minimum bounding rectangle; Determine the polygonal outline information of the minimum bounding rectangle pair.
4. The method for determining the location of inspection points according to claim 1 or 2, characterized in that, The method further includes: The following inspection points should be abandoned: Inspection points located inside any object to be inspected within the inspection area; Inspection points located outside the aforementioned inspection area; Inspection points are those whose distance between the edges of the first polygon corresponding to any object to be inspected within the inspection area is less than a predetermined minimum distance.
5. A device for determining the location of inspection points, characterized in that, The device includes a processing module, wherein the processing module is used for: Obtain the polygonal outline information of the object to be inspected on the plane of the inspection area; Based on the predetermined safe distance corresponding to the inspection equipment, the first polygon represented by the polygonal contour information is expanded outward at equal intervals to obtain the second polygon. Based on the side length of each side of the second polygon, the inspection points of the inspection equipment on at least one side of the second polygon are determined; The processing module is specifically used for: Based on the length of each side of the second polygon, the sides of the second polygon are divided into at least a first type of side and a second type of side; The inspection points on each edge of the second polygon are determined based on the type of each edge of the second polygon; The processing module is specifically used for: Select at least one of the following points on the first type of edge as an inspection point: The first endpoint on the first type of edge; The second endpoint on the first type of edge; Starting from the first endpoint or the second endpoint, a plurality of intermediate points are sequentially determined along the first type of edge at predetermined intervals; Select at least one of the following points on the second type of edge as the inspection point: The first base point on the second type of edge at a predetermined safe distance from the first endpoint of the second type of edge; The second base point on the second type of edge, at a predetermined safe distance from the second endpoint of the second type of edge; The midpoint of each segment between the first base point and the second base point, wherein the length of the segment is equal to a predetermined segment length.
6. An electronic device, characterized in that, The electronic device includes: One or more processors; The processor is used to invoke instructions to cause the electronic device to execute the inspection point location determination method according to any one of claims 1 to 4.
7. A storage medium, characterized in that, The storage medium stores instructions that, when executed on an electronic device, cause the electronic device to perform the inspection point location determination method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Building inspection waypoint automatic generation method and system based on three-dimensional point cloud
CN122149490A