CN116222377A - Container endpoint detection method, device, storage medium and equipment - Google Patents

Container endpoint detection method, device, storage medium and equipment Download PDF

Info

Publication number
CN116222377A
CN116222377A CN202211726800.2A CN202211726800A CN116222377A CN 116222377 A CN116222377 A CN 116222377A CN 202211726800 A CN202211726800 A CN 202211726800A CN 116222377 A CN116222377 A CN 116222377A
Authority
CN
China
Prior art keywords
straight line
sampling point
container
coordinate information
equation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211726800.2A
Other languages
Chinese (zh)
Inventor
吴志强
容嘉杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Fuwa Equipment Manufacturing Co Ltd
Original Assignee
Guangdong Fuwa Equipment Manufacturing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Fuwa Equipment Manufacturing Co Ltd filed Critical Guangdong Fuwa Equipment Manufacturing Co Ltd
Priority to CN202211726800.2A priority Critical patent/CN116222377A/en
Publication of CN116222377A publication Critical patent/CN116222377A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/002Measuring arrangements characterised by the use of optical techniques for measuring two or more coordinates

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The utility model relates to a container endpoint detection method, device, storage medium and equipment, utilize least square method to construct the linear equation of n sampling points of the laser scanning data of container that awaits measuring, whether the sampling point after the nth sampling point belongs to the same linear equation through judging, obtain the offset sampling point, obtain the coordinate information of straight line endpoint according to the coordinate information of the first sampling point of linear equation and the coordinate information of offset sampling point, and through reconstructing its corresponding linear equation to the sampling point after the offset sampling point and obtain the coordinate information of the endpoint of straight line section that the linear equation corresponds, thereby can obtain the positional information of each endpoint of container that awaits measuring according to the coordinate information of endpoint, make the user can fix a position the endpoint of container according to the positional information of each endpoint fast, improve the detection efficiency of container.

Description

Container endpoint detection method, device, storage medium and equipment
Technical Field
The present disclosure relates to the field of container measurement technologies, and in particular, to a method, an apparatus, a storage medium, and a device for detecting an endpoint of a container.
Background
The container is a component tool which can be loaded and packaged or unpackaged for transportation and is convenient to load, unload and carry by mechanical equipment. The container is mainly composed of a bottom plate, a top plate, side plates, a threshold and various connecting pieces, and steel plates forming different parts are punched and welded in the production and manufacturing processes, so that the required container is finally formed.
In the prior art, the quality of the container can be evaluated through the laser ranging device, when the size of the container detected by the laser ranging device meets the requirement, the container is determined to be a qualified product, and when the size of the container detected by the laser ranging device does not meet the requirement, the container is determined to be a disqualified product, however, for detecting the disqualified container, the container is often required to be manually analyzed for abnormal reasons and abnormal point positions to find, the cost of manpower and material resources is high, and the detection efficiency is low.
Disclosure of Invention
Based on this, the purpose of the present application is to provide a method, a device, a storage medium and a device for detecting container end points, which can quickly locate the positions of the end points of the container, and improve the detection efficiency of the container.
In a first aspect, an embodiment of the present application provides a container endpoint detection method, where the container endpoint detection method includes:
acquiring laser scanning data of a container to be tested; the laser scanning data comprise coordinate information of m sampling points in a first coordinate system, wherein the first coordinate system is constructed based on acquisition distance data and height data of the sampling points;
coordinate information of the first n sampling points is obtained, and a linear equation of the n sampling points is constructed through a least square method; wherein n is more than or equal to 2 and less than m;
starting from the (n+1) th sampling point, acquiring offset sampling points which do not belong to straight line segments corresponding to the straight line equation based on coordinate information of m-n sampling points and the straight line equation;
acquiring coordinate information of an endpoint of a straight line segment corresponding to the straight line equation according to the coordinate information of a first sampling point of the straight line equation and the coordinate information of the offset sampling point; the first sampling point belongs to the linear equation and has the smallest acquisition distance;
acquiring coordinate information of n sampling points after the offset sampling points, repeating the steps until the construction of linear equations of all the sampling points of the laser scanning data is completed, and acquiring the coordinate information of the end points of the linear segments corresponding to at least one linear equation;
and acquiring the endpoint position information of the container to be detected based on the coordinate information of the endpoint.
In a second aspect, embodiments of the present application provide a container end point detection apparatus, the apparatus comprising:
the scanning data acquisition module is used for acquiring laser scanning data of the container to be tested; the laser scanning data comprise coordinate information of m sampling points in a first coordinate system, wherein the first coordinate system is constructed based on acquisition distance data and height data of the sampling points;
the linear equation construction module is used for acquiring coordinate information of the first n sampling points and constructing linear equations of the n sampling points through a least square method; wherein n is more than or equal to 2 and less than m;
the offset sampling point acquisition module is used for acquiring offset sampling points which do not belong to straight line segments corresponding to the straight line equation based on coordinate information of m-n sampling points and the straight line equation from the n+1th sampling point;
the first end point acquisition module is used for acquiring the coordinate information of the end point of the straight line segment corresponding to the straight line equation according to the coordinate information of the first sampling point of the straight line equation and the coordinate information of the offset sampling point; the first sampling point belongs to the linear equation and has the smallest acquisition distance;
the second endpoint obtaining module is used for obtaining the coordinate information of n sampling points after the offset sampling points, repeating the steps until the construction of the linear equation of all the sampling points of the laser scanning data is completed, and obtaining the coordinate information of the endpoint of the linear segment corresponding to at least one linear equation;
and the container endpoint position acquisition module is used for acquiring the endpoint position information of the container to be detected based on the coordinate information of the endpoint.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the container endpoint detection method of any one of the above.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the container endpoint detection method of any one of the above.
In the method, a least square method is utilized to construct a linear equation of n sampling points of laser scanning data of the container to be detected, whether sampling points after the nth sampling point belong to the same linear equation or not is judged to obtain offset sampling points, coordinate information of linear endpoints is obtained according to coordinate information of a first sampling point of the linear equation and coordinate information of the offset sampling points, the corresponding linear equation is reconstructed for the sampling points after the offset sampling points, and coordinate information of endpoints of linear segments corresponding to the linear equation is obtained, so that position information of all endpoints of the container to be detected can be obtained according to the coordinate information of the endpoints, and a user can quickly position endpoint positions of the container according to the position information of all the endpoints, so that detection efficiency of the container is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
For a better understanding and implementation, the present application is described in detail below with reference to the drawings.
Drawings
FIG. 1 is a flow chart of a method for detecting an end point of a container according to one embodiment of the present application;
FIG. 2 is a schematic diagram of a display interface according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a display interface according to another embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a container end point detecting device according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the following detailed description of the embodiments of the present application will be given with reference to the accompanying drawings.
It should be understood that the described embodiments are merely some, but not all, of the embodiments of the present application. All other embodiments, based on the embodiments herein, which would be apparent to one of ordinary skill in the art without making any inventive effort, are intended to be within the scope of the present application.
When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
In the description of this application, it should be understood that the terms "first," "second," "third," and the like are used merely to distinguish between similar objects and are not necessarily used to describe a particular order or sequence, nor should they be construed to indicate or imply relative importance. The specific meaning of the terms in this application will be understood by those of ordinary skill in the art as the case may be. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The word "if"/"if" as used herein may be interpreted as "at … …" or "at … …" or "in response to a determination". Furthermore, in the description of the present application, unless otherwise indicated, "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
The container end point detection method can be applied to size detection and end point positioning of the container, and position information of each end point of the container can be obtained quickly by using the container end point detection method, so that each end point of the container can be positioned conveniently, the size of each side of the container can be measured quickly according to the position information of each end point, and the detection efficiency of the container is improved.
Referring to fig. 1, an embodiment of the present application provides a container endpoint detection method, including the following steps:
s101: acquiring laser scanning data of a container to be tested;
the laser scanning data is point cloud data obtained by scanning the container to be detected by using laser scanning equipment and receiving and analyzing reflected light returned by the surface of the container to be detected.
The laser scanning data may include coordinate information of m sampling points in a first coordinate system, wherein the first coordinate system is constructed based on acquisition distance data and height data of the sampling points. Specifically, the first coordinate system may have the acquisition distance as the horizontal axis and the height as the vertical axis, or the first coordinate system may have the height as the horizontal axis and the acquisition distance as the vertical axis. In the embodiment of the application, the acquisition distance is taken as a horizontal axis, the height is taken as a vertical axis to construct a first coordinate system, and the coordinate information of each sampling point under the first coordinate system is obtained according to the acquisition distance data and the height data of each sampling point.
The sampling points can be detection points on the surface profile of the container to be detected, and the positions and the interval distances of the sampling points can be determined according to the structure of the container to be detected and the scanning parameters of the laser scanning equipment.
In order to facilitate the subsequent data processing of the laser scan data, the laser scan data may be uploaded to a visualization device to realize the visualization of the acquired distance data and the height data of each sampling point, where the visualization device may be various electronic devices with a display screen, including but not limited to a smart phone, a smart interactive tablet, a personal computer, etc., and the visualization device may use existing visualization technologies to present the laser scan data in a visual form, such as a graph, a chart, an information graph, or the like.
As shown in fig. 2, a schematic diagram of a display interface of a visualization device in an embodiment is shown, where laser scan data is displayed on the same coordinate system, the coordinate system uses a height as a vertical axis, uses an acquisition distance as a horizontal axis, and in the visualization, each sampling point is identified on the coordinate system according to acquisition distance data and height data of multiple sampling points.
S102: coordinate information of the first n sampling points is obtained, and a linear equation of the n sampling points is constructed through a least square method; wherein n is more than or equal to 2 and less than m;
n is a linear regression step preset by a user, and in the application, a linear equation of n sampling points is constructed by acquiring coordinate information of the n sampling points and using a least square method.
The least squares method finds the best functional match of the data by minimizing the sum of squares of the errors (the difference between the real target object and the fitted target object). In the embodiment of the application, the least square method is utilized to fit the linear equation to n sampling points in the linear regression step length, and when the linear equation of the n sampling points is constructed, when the total fitting error (total residual error) is minimum, the currently-fitted linear equation is taken as the linear equation of the n sampling points.
Specifically, in one embodiment, the step of constructing the linear equation of n sampling points by the least square method specifically includes:
the linear equation for n samples is constructed as follows:
Yi=A*Xi+B
wherein [ Xi, yi ] represents coordinate information of the i-th sampling point, A represents a first coefficient of the linear equation, and B represents a second coefficient of the linear equation;
Figure BDA0004030376470000041
Figure BDA0004030376470000051
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;
Figure BDA0004030376470000052
Figure BDA0004030376470000053
Figure BDA0004030376470000054
Figure BDA0004030376470000055
wherein k represents the kth sampling point, P [ k ] represents the x coordinate value of the kth sampling point, and P [ k ] represents the y coordinate value of the kth sampling point.
S103: starting from the (n+1) th sampling point, acquiring offset sampling points which do not belong to straight line segments corresponding to the straight line equation based on coordinate information of m-n sampling points and the straight line equation;
and starting from the (n+1) th sampling point, judging whether each sampling point belongs to a line segment corresponding to the linear equation according to the coordinates of each sampling point and the linear equation.
Specifically, whether each sampling point belongs to a line segment corresponding to a linear equation or not is judged by substituting each sampling point into the linear equation, obtaining a fitting value of the linear equation for the current sampling point, comparing the fitting value with an actual coordinate value of the sampling point, determining an error value, and determining that the sampling point belongs to a linear segment corresponding to the linear equation when the error value is within a set error range, otherwise, determining that the sampling point is an offset sampling point which does not belong to the linear segment corresponding to the linear equation.
In one embodiment, assume that the w-th sample point is an offset sample point that does not belong to the straight line segment corresponding to the straight line equation, where w ε [ i+n+1, m ].
If the w sampling point meets any one of the following conditions, determining that the w sampling point is an offset sampling point which does not belong to a straight line segment corresponding to the straight line equation:
Figure BDA0004030376470000056
Figure BDA0004030376470000057
where δ represents a deviation threshold, used to determine the maximum allowable deviation of the linear regression single point of the linear equation, in this embodiment of the present application, δ may be 100,
Figure BDA0004030376470000058
represents the offset value of the kth sampling point, k ε [ i+n+1, w],P[k]X coordinate value representing kth sampling point, P [ k ]]The y-coordinate value representing the kth sample point, a represents a first coefficient of the linear equation, B represents a second coefficient of the linear equation, σ represents a variance threshold, and is used to determine a regression-allowable variance of the linear equation, in this embodiment, σ may be 2000.
S104: acquiring coordinate information of an endpoint of a straight line segment corresponding to the straight line equation according to the coordinate information of a first sampling point of the straight line equation and the coordinate information of the offset sampling point; the first sampling point belongs to the linear equation and has the smallest acquisition distance;
the end point of the straight line segment may include a start point and an end point of the straight line segment, and in this embodiment, the sampling point with the smallest collection distance in the straight line equation is used as the start point of the straight line segment, and the offset sampling point is used as the end point of the straight line segment.
Specifically, the starting point of the straight line segment corresponding to each straight line equation may be stored in the first array, and the ending point of the straight line segment corresponding to each straight line equation may be stored in the second array; alternatively, the starting point and the ending point of the straight line segment corresponding to each straight line equation may be stored in the same array, so as to obtain the end point data set of the straight line segment corresponding to each straight line equation.
S105: acquiring coordinate information of n sampling points after the offset sampling points, repeating the steps until the construction of linear equations of all the sampling points of the laser scanning data is completed, and acquiring the coordinate information of the end points of the linear segments corresponding to at least one linear equation;
specifically, the coordinate information of n sampling points is acquired from the w+1th sampling point, and steps S101 to S104 are repeatedly executed to acquire the linear equation until the construction of the linear equation of all the sampling points of the laser scanning data.
In the embodiment of the application, the ending condition can be i.gtoreq.m-n. Wherein i is [1, m-n ].
When a linear equation is obtained each time, the first coefficient and the second coefficient of the linear equation can be stored in an array form, so that the subsequent reading of the linear equation is facilitated.
S106: and acquiring the endpoint position information of the container to be detected based on the coordinate information of the endpoint.
Specifically, in one embodiment, after the endpoint location information of the container to be tested is obtained, the method further includes the following steps:
and displaying the endpoint position information of the container to be tested on a visualization device.
As shown in fig. 3, which is a schematic diagram of a display interface of a visualization device in an embodiment, the container endpoint detection method in the embodiment of the present application may identify endpoints 201, 202, 203, 204 on each side of a container and specific coordinate information thereof, so that a user may conveniently locate positions of each endpoint on the container, and improve detection efficiency of the container.
In the embodiment of the application, the least square method is utilized to construct the linear equation of n sampling points of the laser scanning data of the container to be detected, whether the sampling points after the nth sampling point belong to the same linear equation or not is judged to obtain the offset sampling point, the coordinate information of the linear end point is obtained according to 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, the coordinate information of the end points of the linear segment corresponding to the linear equation is obtained, therefore, the position information of each end point of the container to be detected can be obtained according to the coordinate information of the end points, when the container is unqualified in detection, a user can quickly locate the abnormal point of the container according to the position information of each end point and maintain or replace parts, and the detection and maintenance efficiency of the container are improved.
In step S103, since the linear equation is constructed based on the coordinate information of the first n sampling points, as the sampling points increase, it is difficult to accurately fit the corresponding linear segment of the subsequent sampling point by constructing the linear equation based on the coordinate information of the first n sampling points, and therefore, in a preferred embodiment, the linear equation should be updated in real time according to the coordinate information of the subsequent sampling point, so as to avoid erroneous recognition of the offset sampling point.
Specifically, before determining that the w-th sampling point is an offset sampling point that does not belong to the straight line segment corresponding to the straight line equation, the method further includes the following steps:
if w=a×n, acquiring coordinate information of w-n sampling points belonging to a straight line segment corresponding to the straight line equation, and updating a first coefficient and a second coefficient of the straight line equation; wherein a is a natural number greater than 0;
and determining whether the w sampling point is an offset sampling point which does not belong to a straight line segment corresponding to the straight line equation according to the updated straight line equation.
In the embodiment of the application, when the w-th sampling point is a multiple of the linear regression step length n, the first coefficient and the second coefficient of the linear 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 linear equation, so that the erroneous identification of the offset sampling point is avoided.
For a straight line segment with too short a straight line length, which may be an abnormal line segment caused by an error point in the laser scanning process, the abnormal line segment is irrelevant to the appearance outline of the container, therefore, in a preferred embodiment, before acquiring an included angle formed by the straight line segments corresponding to each two straight line equations, the method further comprises the following steps:
acquiring the length of a line segment of the straight line segment corresponding to the straight line equation;
if the length of the line segment of the straight line segment corresponding to the straight line equation is larger than a preset threshold value of the length of the line segment, acquiring an included angle formed by the straight line segments corresponding to each two straight line equations;
otherwise, determining the straight line segment as an invalid line segment.
The threshold value of the length of the line segment may be set according to the actual requirement of the user, for example, in the embodiment of the present application, the threshold value of the length of the line segment may be 200mm.
Specifically, the step of obtaining the segment length of the straight line segment corresponding to the straight line equation specifically includes:
Figure BDA0004030376470000071
wherein, pi.y represents the y coordinate value of the ith sampling point, pw.y represents the y coordinate value of the w sampling point, pi.x represents the x coordinate value of the ith sampling point, pw.x represents the x coordinate value of the w sampling point, and L represents the length of the line segment of the straight line segment corresponding to the straight line equation.
In the method, when the length of the line segment is larger than the preset length threshold value of the line segment, the line segment is used as an effective line segment, the included angle of the two effective line segments is calculated, and the line segment with the length smaller than the preset length threshold value of the line segment is determined to be an invalid line segment and is discarded, so that the calculated data size is reduced, and the end point detection efficiency of the container is improved.
The present embodiment provides a container endpoint detection apparatus that may be used to perform the container endpoint detection method of the embodiments of the present application. For details not disclosed in the present embodiment, please refer to the method embodiment of the present application.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a container end point detection device according to an embodiment of the present disclosure. The container endpoint detection device comprises:
a scan data acquisition module 301, configured to acquire laser scan data of a container to be tested; the laser scanning data comprise coordinate information of m sampling points in a first coordinate system, wherein the first coordinate system is constructed based on acquisition distance data and height data of the sampling points;
the linear equation construction module 302 is configured to obtain 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 n is more than or equal to 2 and less than m;
an offset sampling point obtaining module 303, configured to obtain, from the n+1th sampling point, an offset sampling point that does 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;
a first endpoint obtaining module 304, configured to obtain coordinate information of an endpoint of a 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; the first sampling point belongs to the linear equation and has the smallest acquisition distance;
the second endpoint obtaining module 305 is configured to obtain coordinate information of n sampling points after the offset sampling points, repeat the above steps until the construction of the linear equations of all the sampling points of the laser scan data is completed, and obtain coordinate information of an endpoint of a linear segment corresponding to at least one linear equation;
and the container endpoint position obtaining module 306 is configured to obtain endpoint position information of the container to be tested based on the coordinate information of the endpoint.
It should be noted that, when the container endpoint detection apparatus provided in the foregoing embodiment performs the container endpoint detection method, only the division of the foregoing functional modules is used as an example, and in practical application, the foregoing functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the container endpoint detection apparatus provided in the foregoing embodiment belongs to the same concept as the container endpoint detection method in the foregoing embodiment, and the implementation process is shown in the detailed method embodiment, which is not repeated herein.
The present embodiment provides an electronic device that may be used to perform all or part of the steps of the container endpoint detection method of the embodiments of the present application. For details not disclosed in the present embodiment, please refer to the method embodiment of the present application.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device 400 may be, but is not limited to, a combination of one or more of a variety of servers, personal computers, notebook computers, smart phones, tablet computers, and the like.
In the preferred embodiment of the present application, the electronic device 400 includes a memory 401, at least one processor 402, at least one communication bus 403, and a transceiver 404.
It should be understood by those skilled in the art that the configuration of the electronic device shown in fig. 5 is not limiting of the embodiments of the present application, and may be a bus-type configuration, a star-type configuration, or other hardware or software, or a different arrangement of components, than those illustrated in the figures may be included in the electronic device 400.
In some embodiments, the electronic device 400 is a device capable of automatically performing numerical calculation and/or information processing according to preset or stored instructions, and the hardware includes, but is not limited to, a microprocessor, an application specific integrated circuit, a programmable gate array, a digital processor, an embedded device, and the like. The electronic device 400 may also include a client device, including but not limited to any electronic product that can interact with a client by way of a keyboard, mouse, remote control, touch pad, or voice-controlled device, such as a personal computer, tablet, smart phone, digital camera, etc.
It should be noted that the electronic device 400 is only used as an example, and other electronic products that may be present in the present application or may be present in the future are also included in the scope of the present application and are incorporated herein by reference.
In some embodiments, the memory 401 has stored therein 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 of the embodiments. The Memory 401 includes Read-Only Memory (ROM), programmable Read-Only Memory (PROM), erasable programmable Read-Only Memory (EPROM), one-time programmable Read-Only Memory (One-timeProgrammable Read-Only Memory, OTPROM), electrically erasable rewritable Read-Only Memory (EEPROM), compact disc Read-Only Memory (CD-ROM) or other optical disk Memory, magnetic disk Memory, tape Memory, or any other medium that can be used for carrying or storing data.
In some embodiments, the at least one processor 402 is a Control Unit (Control Unit) of the electronic device 400, connects various components of the entire electronic device 400 using 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 invoking data stored in the memory 401. For example, the at least one processor 402, when executing the computer program stored in the memory, implements all or part of the steps of the container endpoint detection method described in embodiments of the present application; or to implement all or part of the functionality of the container end point detection device. The at least one processor 402 may be comprised of integrated circuits, such as a single packaged integrated circuit, or may be comprised of multiple integrated circuits packaged with the same or different functionality, including one or more central processing units (CentralProcessing unit, CPU), microprocessors, digital processing chips, graphics processors, a combination of various control chips, and the like.
In some embodiments, the at least one communication bus 403 is arranged to enable a connected communication between the memory 401 and the at least one processor 402 etc.
The electronic device 400 may further include various sensors, bluetooth modules, wi-Fi modules, etc., which are not described herein.
The present embodiment provides a computer readable storage medium, on which a computer program is stored, where the instructions are adapted to be loaded by a processor and execute the container endpoint detection method of the present embodiment, and the specific execution process may refer to the specific description of the foregoing embodiment, which is not repeated herein.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The above-described apparatus embodiments are merely illustrative, wherein the components illustrated as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purposes of the present application. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (10)

1. A method of container endpoint detection, the method comprising:
acquiring laser scanning data of a container to be tested; the laser scanning data comprise coordinate information of m sampling points in a first coordinate system, wherein the first coordinate system is constructed based on acquisition distance data and height data of the sampling points;
coordinate information of the first n sampling points is obtained, and a linear equation of the n sampling points is constructed through a least square method; wherein n is more than or equal to 2 and less than m;
starting from the (n+1) th sampling point, acquiring offset sampling points which do not belong to straight line segments corresponding to the straight line equation based on coordinate information of m-n sampling points and the straight line equation;
acquiring coordinate information of an endpoint of a straight line segment corresponding to the straight line equation according to the coordinate information of a first sampling point of the straight line equation and the coordinate information of the offset sampling point; the first sampling point belongs to the linear equation and has the smallest acquisition distance;
acquiring coordinate information of n sampling points after the offset sampling points, repeating the steps until the construction of linear equations of all the sampling points of the laser scanning data is completed, and acquiring the coordinate information of the end points of the linear segments corresponding to at least one linear equation;
and acquiring the endpoint position information of the container to be detected based on the coordinate information of the endpoint.
2. The container end point detection method according to claim 1, wherein the step of constructing a linear equation of n sampling points by a least square method specifically comprises:
the linear equation for n samples is constructed as follows:
Yi=A*Xi+B
wherein [ Xi, yi ] represents coordinate information of the i-th sampling point, A represents a first coefficient of the linear equation, and B represents a second coefficient of the linear equation;
Figure FDA0004030376460000011
Figure FDA0004030376460000012
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;
Figure FDA0004030376460000013
Figure FDA0004030376460000014
Figure FDA0004030376460000021
Figure FDA0004030376460000022
wherein k represents a kth sampling point, pk.x represents an x coordinate value of the kth sampling point, and Pk.y represents a y coordinate value of the kth sampling point.
3. The method for detecting the end point of a container according to claim 1, wherein the step of obtaining offset sampling points not belonging to a straight line segment corresponding to the straight line equation specifically comprises:
if the w sampling point meets any one of the following conditions, determining that the w sampling point is an offset sampling point which does not belong to a straight line segment corresponding to the straight line equation:
Figure FDA0004030376460000023
Figure FDA0004030376460000024
wherein delta represents the deviation threshold value,
Figure FDA0004030376460000025
representing the offset value, P [ k ], of the kth sample point]X represents the x coordinate value of the kth sampling point, P [ k ]]Y represents the y coordinate value of the kth sampling point, a represents the first coefficient of the linear equation, B represents the second coefficient of the linear equation, and σ represents the variance threshold.
4. A container end point detection method according to claim 3, further comprising, before determining that the w-th sampling point is an offset sampling point that does not belong to a straight line segment corresponding to the straight line equation, the steps of:
if w=a×n, acquiring coordinate information of w-n sampling points belonging to a straight line segment corresponding to the straight line equation, and updating a first coefficient and a second coefficient of the straight line equation; wherein a is a natural number greater than 0;
and determining whether the w sampling point is an offset sampling point which does not belong to a straight line segment corresponding to the straight line equation according to the updated straight line equation.
5. The container end point detection method according to claim 1, further comprising the steps of, before acquiring the included angle formed by the straight line segments corresponding to each two straight line equations:
acquiring the length of a line segment of the straight line segment corresponding to the straight line equation;
if the length of the line segment of the straight line segment corresponding to the straight line equation is larger than a preset threshold value of the length of the line segment, acquiring an included angle formed by the straight line segments corresponding to each two straight line equations;
otherwise, determining the straight line segment as an invalid line segment.
6. The method for detecting the end point of a container according to claim 5, wherein the step of obtaining the segment length of the straight line segment corresponding to the straight line equation specifically comprises:
Figure FDA0004030376460000031
wherein, pi.y represents the y coordinate value of the ith sampling point, pw.y represents the y coordinate value of the w sampling point, pi.x represents the x coordinate value of the ith sampling point, pw.x represents the x coordinate value of the w sampling point, and L represents the length of the line segment of the straight line segment corresponding to the straight line equation.
7. The container end point detection method according to claim 1, further comprising the steps of:
and displaying the endpoint position information of the container to be tested on a visualization device.
8. A container end point detection device, the device comprising:
the scanning data acquisition module is used for acquiring laser scanning data of the container to be tested; the laser scanning data comprise coordinate information of m sampling points in a first coordinate system, wherein the first coordinate system is constructed based on acquisition distance data and height data of the sampling points;
the linear equation construction module is used for acquiring coordinate information of the first n sampling points and constructing linear equations of the n sampling points through a least square method; wherein n is more than or equal to 2 and less than m;
the offset sampling point acquisition module is used for acquiring offset sampling points which do not belong to straight line segments corresponding to the straight line equation based on coordinate information of m-n sampling points and the straight line equation from the n+1th sampling point;
the first end point acquisition module is used for acquiring the coordinate information of the end point of the straight line segment corresponding to the straight line equation according to the coordinate information of the first sampling point of the straight line equation and the coordinate information of the offset sampling point; the first sampling point belongs to the linear equation and has the smallest acquisition distance;
the second endpoint obtaining module is used for obtaining the coordinate information of n sampling points after the offset sampling points, repeating the steps until the construction of the linear equation of all the sampling points of the laser scanning data is completed, and obtaining the coordinate information of the endpoint of the linear segment corresponding to at least one linear equation;
and the container endpoint position acquisition module is used for acquiring the endpoint position information of the container to be detected based on the coordinate information of the endpoint.
9. An electronic device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the container end point detection method according to any of claims 1 to 7.
10. A computer readable storage medium having stored thereon a computer program which when executed by a processor implements the container end point detection method according to any of claims 1 to 7.
CN202211726800.2A 2022-12-30 2022-12-30 Container endpoint detection method, device, storage medium and equipment Pending CN116222377A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211726800.2A CN116222377A (en) 2022-12-30 2022-12-30 Container endpoint detection method, device, storage medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211726800.2A CN116222377A (en) 2022-12-30 2022-12-30 Container endpoint detection method, device, storage medium and equipment

Publications (1)

Publication Number Publication Date
CN116222377A true CN116222377A (en) 2023-06-06

Family

ID=86577748

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211726800.2A Pending CN116222377A (en) 2022-12-30 2022-12-30 Container endpoint detection method, device, storage medium and equipment

Country Status (1)

Country Link
CN (1) CN116222377A (en)

Similar Documents

Publication Publication Date Title
JP6083091B2 (en) Reinforcing bar inspection support device and program
CN112735094B (en) Geological disaster prediction method and device based on machine learning and electronic equipment
US20240036658A1 (en) Pointer positioning method and apparatus, and instrument
CN111814740B (en) Pointer instrument reading identification method, device, computer equipment and storage medium
CN115077425B (en) Product detection equipment and method based on structured light three-dimensional vision
CN108955901B (en) Infrared temperature measurement method and system and terminal equipment
CN109633529B (en) Detection equipment, method and device for positioning accuracy of positioning system
CN113065538A (en) Pressure sensor detection method, device and equipment based on image recognition
CN111400067A (en) Remote detection method and terminal
CN114494274A (en) Building construction evaluation method, building construction evaluation device, electronic equipment and storage medium
CN115656989A (en) External parameter calibration method and device, electronic equipment and storage medium
CN108875184B (en) Shale organic carbon content prediction method and device based on digital outcrop model
CN112985867A (en) Steering engine test method, device, equipment and storage medium
CN116222377A (en) Container endpoint detection method, device, storage medium and equipment
CN111950553A (en) Automatic alignment method and device for pointer instrument
CN110751141A (en) Meter reading identification method and device, terminal equipment and storage medium
CN116067280B (en) Container welding position detection method, device, storage medium and equipment
CN111815552A (en) Workpiece detection method and device, readable storage medium and terminal equipment
CN114674224B (en) Workpiece step detection method, device, storage medium and equipment
CN107315664A (en) Video card automatic checkout system and method
CN115643231A (en) Method and device for detecting vehicle-mounted terminal equipment, electronic equipment and storage medium
CN116164665A (en) Container special-shaped object position detection method, device, storage medium and equipment
US20200240767A1 (en) Coordinate measurement validation
KR101945450B1 (en) Position determination system and method
KR101475742B1 (en) Apparatus and method for performing photogrammetry

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination