Container endpoint detection method, apparatus, storage medium, and device

By constructing a linear equation for container laser scanning data using the least squares method, the problem of low container inspection efficiency was solved, enabling rapid location of endpoints and improving inspection and maintenance efficiency.

CN116222377BActive Publication Date: 2025-12-23GUANGDONG FUHUA MACHINERY EQUIP MFG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211726800.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2025-12-23
Estimated Expiration
2042-12-30

AI Technical Summary

Technical Problem

Existing technologies for container inspection are inefficient, costly in terms of manpower and resources, and difficult to quickly locate anomalies.

Method used

The least squares method is used to construct the linear equation of the container laser scanning data. By judging whether the sampling point deviates from the linear equation, the offset sampling point is obtained, and the coordinate information of the container endpoint is determined.

Benefits of technology

Quickly locate the positions of each end of the container, improve inspection efficiency, facilitate maintenance or replacement of parts, and enhance inspection and maintenance efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116222377B_ABST
    Figure CN116222377B_ABST
Patent Text Reader

Abstract

The application relates to a container endpoint detection method and device, a storage medium and equipment. A least square method is used to construct a straight line equation of n sampling points of laser scanning data of a to-be-detected container. Whether a sampling point after the nth sampling point belongs to the same straight line equation is judged to obtain an offset sampling point. The coordinate information of the first sampling point of the straight line equation and the coordinate information of the offset sampling point are used to obtain the coordinate information of a straight line endpoint. The straight line equation of the sampling point after the offset sampling point is reconstructed, and the coordinate information of the endpoint of the straight line segment corresponding to the straight line equation is obtained. Therefore, the position information of each endpoint of the to-be-detected container can be obtained according to the coordinate information of the endpoint, the user can quickly locate the endpoint position of the container according to the position information of each endpoint, and the detection efficiency of the container is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of container measurement, in particular to a container endpoint detection method and device, a storage medium and equipment. BACKGROUND

[0002] A container is a tool that can load packaged or unpackaged goods for transportation and facilitate loading and unloading by mechanical equipment. The container is mainly composed of a bottom plate, a top plate, side plates, a door sill and various connecting parts. During production and manufacturing, the steel plates of different parts are punched and welded to form the required container.

[0003] In the prior art, the quality of a container can be evaluated by a laser ranging device. When the size of the container detected by the laser ranging device meets the requirements, the container is determined to be a qualified product. When the size of the container detected by the laser ranging device does not meet the requirements, the container is determined to be an unqualified product. However, for unqualified containers, it is often necessary to rely on human analysis of the abnormal reasons and abnormal points of the container, which is high in labor and material costs and low in detection efficiency. SUMMARY

[0004] Therefore, the purpose of the present application is to provide a container endpoint detection method and device, a storage medium and equipment, which can quickly locate the positions of the endpoints of the container and improve the detection efficiency of the container.

[0005] In a first aspect, the present application provides a container endpoint detection method, which comprises:

[0006] Obtaining laser scanning data of a container to be measured; wherein the laser scanning data comprises coordinate information of m sampling points in a first coordinate system, wherein the first coordinate system is constructed based on collection distance data and height data of the sampling points;

[0007] Obtaining coordinate information of the first n sampling points and constructing a straight line equation of the n sampling points by the least square method; wherein 2≤n

[0008] Starting from the n+1 sampling point, obtaining offset sampling points that do not belong to the straight line segment corresponding to the straight line equation based on the coordinate information of the m-n sampling points and the straight line equation;

[0009] Obtaining coordinate information of the endpoints of the straight line segment corresponding to the straight line equation according to the coordinate information of the first sampling point belonging to the straight line equation and having the smallest collection distance and the coordinate information of the offset sampling points;

[0010] obtain coordinate information of n sampling points after the offset sampling point, and repeat the above steps until construction of the straight line equation of all sampling points of the laser scanning data is completed, and coordinate information of endpoints of a straight line segment corresponding to at least one straight line equation is obtained;

[0011] obtain endpoint position information of the container to be measured based on the coordinate information of the endpoints.

[0012] In a second aspect, an embodiment of the present application provides a container endpoint detection device, and the device comprises:

[0013] a scanning data obtaining module, configured to obtain laser scanning data of a container to be measured, wherein the laser scanning data comprises coordinate information of m sampling points in a first coordinate system, and the first coordinate system is constructed based on collection distance data and height data of the sampling points;

[0014] a straight line equation constructing module, configured to obtain coordinate information of the first n sampling points, and construct a straight line equation of the n sampling points by using a least square method, wherein 2≤n

[0015] an offset sampling point obtaining module, configured to, starting from the (n+1)th sampling point, obtain an offset sampling point not belonging to a straight line segment corresponding to the straight line equation based on coordinate information of the m-n sampling points and the straight line equation;

[0016] a first endpoint obtaining module, configured to obtain coordinate information of an endpoint of the straight line segment corresponding to the straight line equation according to coordinate information of a first sampling point of the straight line equation and coordinate information of the offset sampling point, wherein the first sampling point is a sampling point belonging to the straight line equation and having the smallest collection distance;

[0017] a second endpoint obtaining module, configured to obtain coordinate information of n sampling points after the offset sampling point, and repeat the above steps until construction of the straight line equation of all sampling points of the laser scanning data is completed, and coordinate information of endpoints of a straight line segment corresponding to at least one straight line equation is obtained;

[0018] a container endpoint position obtaining module, configured to obtain endpoint position information of the container to be measured based on the coordinate information of the endpoints.

[0019] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and the computer program is adapted to be loaded and executed by the processor to implement the container endpoint detection method.

[0020] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the container endpoint detection method.

[0021] In the present application, the least square method is used to construct a straight line equation of n sampling points of the laser scanning data of the container to be tested, the offset sampling points are obtained by judging whether the sampling points after the nth sampling point belong to the same straight line equation, the coordinate information of the end points of the straight line is obtained according to the coordinate information of the first sampling point of the straight line equation and the coordinate information of the offset sampling points, and the coordinate information of the end points of the straight line segment corresponding to the straight line equation is obtained by reconstructing the corresponding straight line equation of the sampling points after the offset sampling points and obtaining the coordinate information of the end points of the straight line segment corresponding to the straight line equation, so that the position information of each end point of the container to be tested can be obtained according to the coordinate information of the end points, and the user can quickly locate the end point position of the container according to the position information of each end point, thereby improving the detection efficiency of the container.

[0022] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application.

[0023] In order to better understand and implement, the present application will be described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS

[0024] Figure 1 A flow chart of a container end point detection method provided by an embodiment of the present application is shown in the figure;

[0025] Figure 2 A schematic diagram of a display interface provided by an embodiment of the present application is shown in the figure;

[0026] Figure 3 A schematic diagram of a display interface provided by another embodiment of the present application is shown in the figure;

[0027] Figure 4 A structural schematic diagram of a container end point detection device provided by an embodiment of the present application is shown in the figure;

[0028] Figure 5 A structural schematic diagram of an electronic device provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical scheme and advantages of the present application clearer, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.

[0030] It should be clear that the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0031] The following description refers to the accompanying drawings. Unless otherwise noted, same or similar components in different drawings have same or similar reference numerals. The following exemplary embodiments described are not meant to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present application as detailed in the appended claims.

[0032] In the description of the present application, it needs to be understood that the terms "first", "second", "third" and the like are used only to distinguish similar objects, and do not necessarily indicate a specific order or sequence, nor can they be understood as indicating or implying relative importance. The above-mentioned terms can be understood according to the specific meaning in the present application by the person skilled in the art according to the specific circumstances. The singular forms "a", "an" and "the" used in the present application and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. The word "if" used herein can be interpreted as "when" or "when" or "in response to determining". In addition, in the description of the present application, "a plurality of" means two or more, unless otherwise specified. The "and / or" describes the relationship between the associated objects, which means that there can be three relationships, for example, A and / or B can represent the existence of A alone, the existence of A and B, and the existence of B alone. The character " / " generally represents that the associated objects before and after are in an "or" relationship.

[0033] The container end point detection method of the present application can be applied in the size detection and end point positioning of the container. By using the container end point detection method of the present application, the position information of each end point of the container can be quickly obtained, so that the positioning of each end point of the container is facilitated, and according to the position information of each end point, the size of each side of the container can also be quickly measured, thereby improving the detection efficiency of the container.

[0034] Please refer to Figure 1 The container end point detection method provided by the embodiment of the present application comprises the following steps:

[0035] S101: Obtain laser scanning data of a container to be measured;

[0036] The laser scanning data is point cloud data obtained by receiving and analyzing the reflected light returned from the surface of the container to be measured by using a laser scanning device to scan the container to be measured.

[0037] The laser scanning data may include the coordinate information of m sampling points in a first coordinate system, which is constructed based on the acquisition distance and height data of the sampling points. Specifically, the first coordinate system may use the acquisition distance as the horizontal axis and the height as the vertical axis, or it may use the height as the horizontal axis and the acquisition distance as the vertical axis. In this embodiment, the first coordinate system is constructed with the acquisition distance as the horizontal axis and the height as the vertical axis, and the coordinate information of each sampling point in the first coordinate system is obtained based on the acquisition distance and height data of each sampling point.

[0038] The sampling points can be detection points on the surface contour of the container to be tested. The position and spacing of each sampling point can be determined according to the structure of the container to be tested and the scanning parameters of the laser scanning equipment.

[0039] To facilitate subsequent data processing of the laser scanning data, the laser scanning data can be uploaded to a visualization device to visualize the collection distance and height data of each sampling point. The visualization device can be any electronic device with a display screen, including but not limited to smartphones, smart interactive whiteboards, and personal computers. The visualization device can use existing visualization technologies to present the laser scanning data in a visual form, such as graphs, charts, infographics, or similar materials.

[0040] like Figure 2 As shown, it is a schematic diagram of the display interface of a visualization device in one embodiment. The laser scanning data is displayed on the same coordinate system, with height as the vertical axis and acquisition distance as the horizontal axis. During visualization, each sampling point is marked on the coordinate system according to the acquisition distance data and height data of multiple sampling points.

[0041] S102: Obtain the coordinate information of the first n sampling points, and construct the linear equation of the n sampling points using the least squares method; where 2≤n<m;

[0042] n is the linear regression step size preset by the user. In this application, the coordinate information of n sampling points is obtained and the linear equation of n sampling points is constructed by the least squares method.

[0043] The least squares method finds the best function match for data by minimizing the sum of squares of the errors (differences between the true target object and the fitted target object). In this embodiment, the least squares method is used to fit a linear equation to n sampling points within the linear regression step size. When constructing the linear equation for the n sampling points, the linear equation that is currently fitted (total residual) is used as the linear equation for the n sampling points when the total fitting error (total residual) is minimized.

[0044] Specifically, in one embodiment, the step of constructing the linear equation for n sampling points using the least squares method includes:

[0045] The linear equation of n sampling points is constructed in the following manner:

[0046] Yi=A*Xi+B

[0047] wherein [Xi, Yi] represents the coordinate information of the i-th sampling point, A represents the first coefficient of the linear equation, and B represents the second coefficient of the linear equation.

[0048]

[0049]

[0050] wherein T1 represents a first intermediate variable, T2 represents a second intermediate variable, T3 represents a third intermediate variable, and T4 represents a fourth intermediate variable.

[0051]

[0052]

[0053]

[0054]

[0055] wherein k represents the k-th sampling point, P[k]. represents the x coordinate value of the k-th sampling point, and P[k]. represents the y coordinate value of the k-th sampling point.

[0056] S103: Starting from the (n+1)-th sampling point, an offset sampling point not belonging to the linear segment corresponding to the linear equation is obtained based on the coordinate information of the m-n sampling points and the linear equation.

[0057] Starting from the (n+1)-th sampling point, whether each sampling point belongs to the linear segment corresponding to the linear equation is determined according to the coordinate of each sampling point and the linear equation.

[0058] Specifically, whether each sampling point belongs to the linear segment corresponding to the linear equation can be determined by substituting each sampling point into the linear equation to obtain the fitting value of the linear equation for the current sampling point, comparing the fitting value with the actual coordinate value of the sampling point, and determining the error value. When the error value is within a set error range, it is determined that the sampling point belongs to the linear segment corresponding to the linear equation, otherwise, it is determined that the sampling point is an offset sampling point not belonging to the linear segment corresponding to the linear equation.

[0059] In one embodiment, it is assumed that the w-th sampling point is an offset sampling point not belonging to the linear segment corresponding to the linear equation, wherein w∈[i+n+1, m].

[0060] If the wth sampling point satisfies any one of the following conditions, the wth sampling point is determined as an offset sampling point not belonging to the straight line segment corresponding to the straight line equation:

[0061]

[0062]

[0063] wherein, δ represents a deviation threshold value, used for determining a maximum allowed deviation of linear regression single point of the straight line equation, in the embodiment of the present application, δ can be 100, represents a deviation value of the kth sampling point, k∈[i+n+1, w], P[k] represents an x coordinate value of the kth sampling point, P[k] represents a y coordinate value of the kth sampling point, A represents a first coefficient of the straight line equation, B represents a second coefficient of the straight line equation, and σ represents a variance threshold value, used for determining a regression allowed variance of the straight line equation, in the embodiment of the present application, σ can be 2000.

[0064] S104: Obtain coordinate information of an end point of the straight line segment corresponding to the straight line equation according to coordinate information of a first sampling point of the straight line equation and coordinate information of the offset sampling point; wherein, the first sampling point is a sampling point belonging to the straight line equation and having a minimum collection distance;

[0065] The end point of the straight line segment can include a starting point and an ending point of the straight line segment, and in the embodiment of the present application, the sampling point having the minimum collection distance in the straight line equation is taken as the starting point of the straight line segment, and the offset sampling point is taken as the ending point of the straight line segment.

[0066] Specifically, the starting points of the straight line segments corresponding to the respective straight line equations can be stored in a first array, and the ending points of the straight line segments corresponding to the respective straight line equations can be stored in a second array; or, the starting points and the ending points of the straight line segments corresponding to the respective straight line equations can also be stored in the same array to obtain an end point data set of the straight line segment corresponding to each straight line equation.

[0067] S105: Obtain coordinate information of n sampling points after the offset sampling point, and repeat the above steps until the construction of the straight line equation of all sampling points of the laser scanning data is completed, to obtain coordinate information of end points of the straight line segment corresponding to at least one straight line equation;

[0068] Specifically, coordinate information of n sampling points is obtained starting from the w+1th sampling point, and the steps S101-S104 are repeatedly executed to obtain the straight line equation, until the construction of the straight line equation of all sampling points of the laser scanning data is completed.

[0069] In the embodiment of the present application, the end condition can be i≥m-n. Wherein, i∈[1, m-n].

[0070] Each time a line equation is obtained, the first and second coefficients of the line equation can be stored in the form of an array, which facilitates the subsequent reading of the line equation.

[0071] S106: Based on the coordinate information of the endpoint, obtain the endpoint position information of the container to be tested.

[0072] Specifically, in one embodiment, after obtaining the endpoint location information of the container to be tested, the following steps are also included:

[0073] The endpoint location information of the container under test is displayed on a visualization device.

[0074] like Figure 3 As shown, it is a schematic diagram of the display interface of the visualization device in one embodiment. The container endpoint detection method of this application embodiment can identify the endpoints 201, 202, 203, 204 of each side of the container and their specific coordinate information, which makes it convenient for users to locate the position of each endpoint on the container and improves the detection efficiency of the container.

[0075] In this embodiment, the least squares method is used to construct the linear equation of n sampling points of the laser scanning data of the container under test. The offset sampling point is obtained by judging whether the sampling points after the nth sampling point belong to the same linear equation. The coordinate information of the endpoint of the line is obtained based on the coordinate information of the first sampling point of the linear equation and the coordinate information of the offset sampling point. The corresponding linear equation is reconstructed for the sampling points after the offset sampling point and the coordinate information of the endpoint of the line segment corresponding to the linear equation is obtained. Thus, the position information of each endpoint of the container under test can be obtained based on the coordinate information of the endpoint. When the container fails the inspection, the user can quickly locate the abnormal point of the container and repair or replace parts based on the position information of each endpoint, thereby improving the inspection and repair efficiency of the container.

[0076] In step S103, since the linear equation is constructed based on the coordinate information of the first n sampling points, as the number of sampling points increases, it is difficult to accurately fit the corresponding line segments of the subsequent sampling points. Therefore, in a preferred embodiment, the linear equation should be updated in real time according to the coordinate information of the subsequent sampling points to avoid misidentification of the offset sampling points.

[0077] Specifically, before determining that the w-th sampling point is an offset sampling point that does not belong to the line segment corresponding to the line equation, the following steps are also included:

[0078] If w=a*n, the coordinate information of w-n sampling points belonging to the straight line segment corresponding to the straight line equation is obtained, and the first coefficient and the second coefficient of the straight line equation are updated; wherein a is a natural number greater than 0;

[0079] According to the updated straight line equation, it is determined whether the wth sampling point is an offset sampling point not belonging to the straight line segment corresponding to the straight line equation.

[0080] In the embodiment of the application, when the wth sampling point is a multiple of the linear regression step n, the first coefficient and the second coefficient of the straight line equation are updated according to the coordinate information of the w-n sampling points, and then the offset sampling point is identified according to the updated straight line equation, thereby avoiding misidentification of the offset sampling point.

[0081] For a straight line segment with a too short length, it may be an abnormal line segment caused by an error point in the laser scanning process, and is irrelevant to the outer contour of the container. Therefore, in a preferred embodiment, before obtaining the included angle formed by the straight line segments corresponding to each two straight line equations, the following steps are further included:

[0082] The length of the straight line segment corresponding to the straight line equation is obtained.

[0083] If the length of the straight line segment corresponding to the straight line equation is greater than a preset length threshold, the included angle formed by the straight line segments corresponding to each two straight line equations is obtained.

[0084] Otherwise, it is determined that the straight line segment is an invalid line segment.

[0085] The length threshold can be set according to actual user needs. For example, in the embodiment of the application, the length threshold can be 200 mm.

[0086] Specifically, the step of obtaining the length of the straight line segment corresponding to the straight line equation specifically includes:

[0087]

[0088] Wherein, P[i].y represents the y coordinate value of the ith sampling point, P[w].y represents the y coordinate value of the wth sampling point, P[i].x represents the x coordinate value of the ith sampling point, P[w].x represents the x coordinate value of the wth sampling point, and L represents the length of the straight line segment corresponding to the straight line equation.

[0089] In the application, when the length of the straight line segment is greater than the preset length threshold, it is regarded as a valid line segment and the calculation of the included angle of two valid line segments is performed. For a straight line segment with a length less than the preset length threshold, it is determined as an invalid line segment and discarded, thereby reducing the amount of calculation data and improving the efficiency of container endpoint detection.

[0090] The embodiment provides a container endpoint detection device which can be used to execute the container endpoint detection method of the embodiment.

[0091] Please refer to Figure 4 , Figure 4 is a structural schematic diagram of a container endpoint detection device disclosed by the embodiment. The container endpoint detection device comprises:

[0092] The scanning data acquisition module 301 is configured to acquire laser scanning data of a container to be detected, wherein the laser scanning data comprises coordinate information of m sampling points in a first coordinate system, and the first coordinate system is constructed based on collection distance data and height data of the sampling points.

[0093] The straight line equation construction module 302 is configured to acquire coordinate information of the first n sampling points, and construct a straight line equation of the n sampling points by using the least square method, wherein 2≤n

[0094] The offset sampling point acquisition module 303 is configured to acquire offset sampling points which do not belong to a straight line segment corresponding to the straight line equation, based on coordinate information of the m-n sampling points and the straight line equation, starting from the n+1 sampling point.

[0095] The first endpoint acquisition module 304 is configured to acquire coordinate information of an endpoint of the straight line segment corresponding to the straight line equation, according to coordinate information of a first sampling point of the straight line equation and coordinate information of the offset sampling points, wherein the first sampling point is a sampling point which belongs to the straight line equation and has the smallest collection distance.

[0096] The second endpoint acquisition module 305 is configured to acquire coordinate information of n sampling points after the offset sampling points, and repeat the above steps until the construction of the straight line equation of all sampling points of the laser scanning data is completed, so as to acquire coordinate information of endpoints of straight line segments corresponding to at least one straight line equation.

[0097] The container endpoint position acquisition module 306 is configured to acquire endpoint position information of the container to be detected, based on the coordinate information of the endpoints.

[0098] It should be noted that the container end detection device provided by the above embodiment is only used as an example to illustrate the division of the above functional modules when the container end detection method is performed. In actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the container end detection device provided by the above embodiment and the container end detection method of the above embodiment belong to the same concept, and the implementation process is described in detail in the method embodiment. Here, it will not be repeated.

[0099] The electronic device provided by the embodiment can be used to execute all or part of the steps of the container end detection method of the embodiment. For details not disclosed in the embodiment, please refer to the method embodiment of the application.

[0100] Please refer to Figure 5 , Figure 5 The structure diagram of the electronic device provided by the embodiment of the application is shown. The electronic device 400 can be, but is not limited to, a combination of one or more of various servers, personal computers, notebook computers, smart phones, tablet computers and the like.

[0101] In the preferred embodiment of the application, the electronic device 400 includes a memory 401, at least one processor 402, at least one communication bus 403 and a transceiver 404.

[0102] Those skilled in the art should understand that Figure 5 The structure of the electronic device shown does not constitute a limitation of the embodiment of the application, and can be a bus structure or a star structure. The electronic device 400 can also include more or less other hardware or software than shown, or a different arrangement of components.

[0103] In some embodiments, the electronic device 400 is a device capable of automatically performing numerical calculation and / or information processing according to pre-set or stored instructions. Its hardware includes but is not limited to microprocessors, application specific integrated circuits, programmable gate arrays, digital processors and embedded devices. The electronic device 400 can also include a client device, which includes but is not limited to any electronic product that can interact with a client through a keyboard, mouse, remote control, touchpad or voice control device, such as a personal computer, tablet computer, smart phone, digital camera, etc.

[0104] It should be noted that the electronic device 400 is only an example, and other existing or future electronic products, such as those that can be adapted to the present application, should also be included within the scope of the present application and are hereby incorporated by reference.

[0105] In some embodiments, the memory 401 stores a computer program which, when executed by the at least one processor 402, implements all or part of the steps of the container endpoint detection method according to the embodiments. The memory 401 includes a Read-Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), a One-time Programmable Read-Only Memory (OTPROM), an Electrically-Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM), or other optical disk storage, magnetic disk storage, magnetic tape storage, or any other medium of computer readable storage.

[0106] In some embodiments, the at least one processor 402 is a control unit of the electronic device 400, which connects various components of the electronic device 400 through various interfaces and lines, and performs various functions of the electronic device 400 and processes data by running or executing programs or modules stored in the memory 401 and calling data stored in the memory 401. For example, the at least one processor 402 implements all or part of the steps of the container endpoint detection method according to the embodiments of the present application when executing the computer program stored in the memory, or implements all or part of the functions of the container endpoint detection apparatus. The at least one processor 402 can be composed of integrated circuits, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more combinations of a Central Processing Unit (CPU), a microprocessor, a digital processing chip, a graphics processor, and various control chips.

[0107] In some embodiments, the at least one communication bus 403 is configured to realize the connection and communication between the memory 401, the at least one processor 402, and the like.

[0108] The electronic device 400 can further include various sensors, a Bluetooth module, a Wi-Fi module, and the like, which are not described here.

[0109] The embodiment provides a computer readable storage medium, which stores a computer program. The instructions are suitable for being loaded by a processor and performing the container endpoint detection method of the embodiment. The specific implementation process can be referred to the specific description of the above embodiment, and details are not described herein.

[0110] For the device embodiment, since it basically corresponds to the method embodiment, the related part can be referred to the part of the method embodiment. The above described device embodiment is only schematic, wherein the components shown as separate components can or can not be physically separate, and the components shown as a unit can or can not be a physical unit, that is, can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the present application. Those skilled in the art can understand and implement without creative labor.

[0111] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program codes.

[0112] The present application is described with reference to flowcharts and / or block diagrams of the method, device (system), and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the computer or other programmable data processing devices produce a device for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 The function of one flow or multiple flows and / or blocks Figure 1 The device for implementing the function specified in one block or multiple blocks.

[0113] The above is only the embodiment of the present application, and is not used to limit the present application. The present application can have various changes and modifications for those skilled in the art. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application should be included in the scope of claims of the present application.

Claims

1. A method of container end point detection, characterized by, The method comprises: S101: acquiring laser scanning data of a container to be tested; wherein the laser scanning data comprises coordinate information of m sampling points in a first coordinate system, wherein the first coordinate system is constructed based on collection distance data and height data of the sampling points; S102: acquiring coordinate information of the first n sampling points, and constructing a straight line equation of the n sampling points by using a least square method; wherein 2≤n S103: starting from the (n+1)th sampling point, acquiring an offset sampling point not belonging to a straight line segment corresponding to the straight line equation based on coordinate information of the (m-n)th sampling point and the straight line equation; by substituting each sampling point into the straight line equation, a fitting value of the straight line equation for the current sampling point is acquired, the fitting value is compared with the coordinate information of the sampling point, an error value is determined, when the error value is within a set error range, it is determined that the sampling point belongs to the straight line segment corresponding to the straight line equation, otherwise, it is determined that the sampling point is an offset sampling point not belonging to the straight line segment corresponding to the straight line equation; S104: acquiring coordinate information of end points of the straight line segment corresponding to the straight line equation according to coordinate information of a first sampling point belonging to the straight line equation and having the smallest collection distance and coordinate information of the offset sampling point; wherein the end points of the straight line segment include a starting point and an ending point of the straight line segment, and the first sampling point is taken as the starting point of the straight line segment and the offset sampling point is taken as the ending point of the straight line segment; S105: acquiring coordinate information of n sampling points after the offset sampling point, and repeating the steps S101-S104 until the construction of the straight line equation of all the sampling points of the laser scanning data is completed, and coordinate information of end points of a straight line segment corresponding to at least one straight line equation is acquired; S106: acquiring end point position information of the container to be tested based on the coordinate information of the end points.

2. The container end point detection method of claim 1, wherein, Step S102: constructing a straight line equation of the n sampling points by using a least square method, specifically comprising: The straight line equation of the n sampling points is constructed in the following manner: Yi=A*Xi+B Wherein, [Xi, Yi] represents coordinate information of the ith sampling point, A represents a first coefficient of the straight line equation, and B represents a second coefficient of the straight line equation; Wherein, T1 represents a first intermediate variable, T2 represents a second intermediate variable, T3 represents a third intermediate variable, and T4 represents a fourth intermediate variable; wherein k represents the kth sampling point, represents an x-coordinate value of the kth sampling point, represents a y-coordinate value of the kth sampling point.

3. The container end point detection method of claim 1, wherein, Step S103: acquiring an offset sampling point not belonging to a straight line segment corresponding to the straight line equation, specifically comprising: If the wth sampling point satisfies any one of the following conditions, it is determined that the wth sampling point is an offset sampling point not belonging to the straight line segment corresponding to the straight line equation: wherein, denotes a deviation threshold value, denotes a deviation value of the kth sampling point, denotes an x-coordinate value of the kth sampling point, denotes a y-coordinate value of the kth sampling point, A denotes a first coefficient of a straight line equation, and B denotes a second coefficient of the straight line equation, denotes a variance threshold value.

4. The container end point detection method of claim 3, wherein, Before determining that the wth sampling point is an offset sampling point not belonging to the straight line segment corresponding to the straight line equation, the following steps are further included: If , the coordinate information of w-n sampling points belonging to the line segment corresponding to the linear equation is obtained, and the first coefficient and the second coefficient of the linear equation are updated; wherein a is a natural number greater than 0. According to the updated straight line equation, it is determined whether the wth sampling point is an offset sampling point not belonging to the straight line segment corresponding to the straight line equation.

5. The container end point detection method of claim 1, wherein, After step S106, the following steps are further included: Displaying the end point position information of the container to be tested on a visual device.

6. A container end point detection apparatus characterized by, The device comprises: The scanning data acquisition module is configured to acquire laser scanning data of a container to be measured, wherein the laser scanning data comprises coordinate information of m sampling points in a first coordinate system, and the first coordinate system is constructed based on collection distance data and height data of the sampling points. The linear equation construction module is configured to acquire coordinate information of the first n sampling points, and construct a linear equation of the n sampling points by using a least square method, wherein 2≤n The offset sampling point acquisition module is configured to acquire offset sampling points that do not belong to a straight line segment corresponding to the linear equation, starting from the (n+1)th sampling point, based on coordinate information of the m-n sampling points and the linear equation. The offset sampling points are acquired by substituting each sampling point into the linear equation to obtain a fitting value of the linear equation for the current sampling point, comparing the fitting value with coordinate information of the sampling point, determining an error value, and determining that the sampling point belongs to the straight line segment corresponding to the linear equation when the error value is within a set error range, or determining that the sampling point is an offset sampling point that does not belong to the straight line segment corresponding to the linear equation. The first endpoint acquisition module is configured to acquire coordinate information of endpoints of a straight line segment corresponding to the linear equation, according to coordinate information of a first sampling point of the linear equation and coordinate information of the offset sampling point, wherein the first sampling point is a sampling point that belongs to the linear equation and has the smallest collection distance, and the endpoints of the straight line segment include a starting point and an ending point of the straight line segment, with the first sampling point as the starting point and the offset sampling point as the ending point. The second endpoint acquisition module is configured to acquire coordinate information of n sampling points after the offset sampling point, and repeat the steps of the scanning data acquisition module, the linear equation construction module, the offset sampling point acquisition module, and the first endpoint acquisition module until construction of a linear equation of all sampling points of the laser scanning data is completed, to acquire coordinate information of endpoints of a straight line segment corresponding to at least one linear equation. The container endpoint position acquisition module is configured to acquire endpoint position information of the container to be measured based on the coordinate information of the endpoints.

7. An electronic device, comprising: The computer program is loaded and executed by the processor, and the container endpoint detection method according to any one of claims 1 to 5 is implemented. The computer program is loaded and executed by the processor, and the container endpoint detection method according to any one of claims 1 to 5 is implemented.

8. A computer readable storage medium having stored thereon a computer program, characterized in that, ​

Citation Information

Patent Citations

  • Mobile robot positioning method based on onsite field line features

    CN110044358A

  • Workpiece step detection method and device, storage medium and equipment

    CN114674224A