Object measurement method and device and storage medium
Through laser point cloud acquisition and real-time data processing, the measurement range of low objects on the conveyor belt is determined, which solves the problem of difficulty in measuring low objects in the prior art, and realizes accurate volume measurement of these objects.
Patent Information
- Application Number
- CN202411501463.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-02-28
AI Technical Summary
It is difficult to accurately measure the volume of low objects (such as envelopes, paper) because these objects cannot be distinguished directly from the conveyor belt by height.
By collecting laser point clouds for conveyor belts without object transmission, calculate the average height and/or average grayscale of the conveyor belt, obtain real-time point cloud data, determine the time of height or grayscale change, extract the corresponding point cloud data, and identify the dimension information of the object to be measured.
Accurate volume measurement of low objects is achieved, avoiding the situation where low objects cannot be recognized and improving the accuracy of object measurement.
Smart Images

Figure CN119533273A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to an object measurement method, device and storage medium. Background Art
[0002] Laser measurement mechanisms mainly measure by emitting and receiving laser signals. The transmitting end sends out a signal, and when the signal encounters an obstacle, it will be reflected. After the receiving end receives the reflected signal, it determines the existence, position, shape and other information of the measured object based on the difference in the signal.
[0003] When measuring the volume of an object, the object can be moved forward along a conveyor belt and passed through a laser measuring mechanism, which will measure the length, width and height of the object, and then the volume of the object can be obtained.
[0004] However, when measuring the volume of low objects (such as envelopes and papers), it is impossible to distinguish them directly from the conveyor belt by their height, and thus it is impossible to measure the volume of low object packages. Summary of the invention
[0005] In order to solve the above technical problems, the present application at least provides an object measurement method, device and storage medium.
[0006] In a first aspect, the present application provides an object measurement method, the method comprising: performing laser point cloud acquisition on a conveyor belt without object transmission, and calculating the average height and / or average grayscale of the conveyor belt based on the acquired point cloud data; obtaining the real-time point cloud data of the conveyor belt currently acquired, and calculating the height value and / or grayscale value corresponding to the real-time point cloud data; comparing the average height of the conveyor belt with the height value corresponding to the real-time point cloud data to determine the time when the height changes, and / or comparing the average grayscale of the conveyor belt with the grayscale value corresponding to the real-time point cloud data to determine the time when the grayscale changes, and based on the time when the height changes and / or the time when the grayscale changes, obtaining the point cloud acquisition start time and point cloud acquisition end time corresponding to the object to be measured; extracting the point cloud data collected between the point cloud acquisition start time and the point cloud acquisition end time to obtain the point cloud data of the object to be measured; and identifying the size information of the object to be measured based on the point cloud data of the object to be measured.
[0007] In one embodiment, the average height of the conveyor belt is compared with the height value corresponding to the real-time point cloud data to determine the time when the height changes, and / or the average grayscale of the conveyor belt is compared with the grayscale value corresponding to the real-time point cloud data to determine the time when the grayscale is sent to change, and based on the time when the height changes and / or the time when the grayscale is sent to change, the point cloud acquisition start time and the point cloud acquisition end time corresponding to the object to be measured are obtained, including: comparing the average grayscale of the conveyor belt with the grayscale value corresponding to the real-time point cloud data, if the difference between the average grayscale of the conveyor belt and the grayscale value corresponding to the real-time point cloud data is greater than a preset grayscale difference, it is determined that the current grayscale has changed, and the current time is used as the point cloud acquisition start time corresponding to the object to be measured; in response to detecting the point cloud acquisition start time corresponding to the object to be measured, comparing the average height of the conveyor belt with the height value corresponding to the real-time point cloud data, if the difference between the average height of the conveyor belt and the height value corresponding to the real-time point cloud data becomes smaller and is less than the preset height difference, it is determined that the current height has changed, and the current time is used as the point cloud acquisition end time corresponding to the object to be measured.
[0008] In one embodiment, based on the point cloud data of the object to be measured, the size information of the object to be measured is identified, including: filtering the point cloud data of the object to be measured to obtain filtered point cloud data; segmenting the point cloud belonging to the object to be measured in the filtered point cloud data to obtain segmented point cloud data; generating a minimum external bounding box corresponding to the segmented point cloud data to obtain the size information of the object to be measured.
[0009] In one embodiment, the point cloud belonging to the object to be measured in the filtered point cloud data is segmented to obtain the segmented point cloud data, including: determining the position of the object to be measured on the conveyor belt to obtain the target position; extracting the conveyor belt point cloud data corresponding to the target position from the point cloud data corresponding to the conveyor belt without object transmission; and segmenting the point cloud data except the conveyor belt point cloud data corresponding to the target position in the filtered point cloud data to obtain the segmented point cloud data.
[0010] In one embodiment, the conveyor belt is composed of a plurality of conveyor belt sections; determining the position of the object to be measured on the conveyor belt to obtain the target position includes:
[0011] Based on the point cloud data collected when there is no object in each conveyor belt section, the plane height information corresponding to each conveyor belt section is obtained; and based on the real-time point cloud data corresponding to the object to be measured, the plane height information of the conveyor belt plane corresponding to the real-time point cloud data is obtained; the matching degree between the plane height information corresponding to the real-time point cloud data and the plane height information of each conveyor belt section is calculated; the conveyor belt section with the highest matching degree is selected as the matching section, and the position corresponding to the matching section is used as the target position.
[0012] In one embodiment, laser point cloud acquisition is performed on a conveyor belt without object transmission, and the average height and / or average grayscale of the conveyor belt is calculated based on the acquired point cloud data, including: dividing the conveyor belt into multiple conveyor belt sections along the direction of movement; laser point cloud acquisition is performed on each conveyor belt section without object transmission to obtain point cloud data corresponding to each conveyor belt section; and the average height and / or average grayscale of each conveyor belt section is calculated based on the point cloud data corresponding to each conveyor belt section.
[0013] In one embodiment, the conveyor belt is divided into a plurality of conveyor belt sections along the direction of movement, including: obtaining the length of the conveyor belt, the movement speed of the conveyor belt, the acquisition frame rate corresponding to the laser point cloud acquisition, and a preset interval step; calculating the number of sections corresponding to the conveyor belt based on the length of the conveyor belt, the movement speed of the conveyor belt, the acquisition frame rate corresponding to the laser point cloud acquisition, and the preset interval step; dividing the conveyor belt along the direction of movement into the number of sections, that is, conveyor belt sections, according to the number of sections and the interval step.
[0014] In one embodiment, the method also includes: collecting an identification code of the object to be measured, and collecting one or more information of the weight and movement direction of the object to be measured; and associating and storing the identification code of the object to be measured with one or more information of the start time of point cloud collection, the end time of point cloud collection, size information, weight, and movement direction.
[0015] According to a second aspect of the present application, there is provided an object measuring device, which includes: a conveyor belt calculation module, which is used to perform laser point cloud acquisition on a conveyor belt without object transmission, and calculate the average height and / or average grayscale of the conveyor belt based on the acquired point cloud data; a real-time point cloud computing module, which is used to obtain the real-time point cloud data of the conveyor belt currently acquired, and calculate the height value and / or grayscale value corresponding to the real-time point cloud data; a comparison module, which is used to compare the average height of the conveyor belt with the height value corresponding to the real-time point cloud data, determine the time when the height changes, and / or compare the average grayscale of the conveyor belt with the grayscale value corresponding to the real-time point cloud data, determine the time when the grayscale sends a change, and obtain the point cloud acquisition start time and point cloud acquisition end time corresponding to the object to be measured based on the time when the height changes and / or the time when the grayscale sends a change; a point cloud extraction module, which is used to extract the point cloud data collected between the point cloud acquisition start time and the point cloud acquisition end time, and obtain the point cloud data of the object to be measured; and a size recognition module, which is used to identify the size information of the object to be measured based on the point cloud data of the object to be measured.
[0016] A third aspect of the present application provides an electronic device, including a memory and a processor, wherein the processor is used to execute program instructions stored in the memory to implement the above-mentioned object measurement method.
[0017] A fourth aspect of the present application provides a computer-readable storage medium having program instructions stored thereon, which implement the above-mentioned object measurement method when the program instructions are executed by a processor.
[0018] The above scheme performs laser point cloud acquisition on a conveyor belt without object transmission, calculates the average height and / or average grayscale of the conveyor belt based on the acquired point cloud data; obtains the real-time point cloud data of the conveyor belt currently acquired, and calculates the height value and / or grayscale value corresponding to the real-time point cloud data; compares the average height of the conveyor belt with the height value corresponding to the real-time point cloud data to determine the time when the height changes, and / or compares the average grayscale of the conveyor belt with the grayscale value corresponding to the real-time point cloud data to determine the time when the grayscale is sent to change, and obtains the point cloud acquisition start time and point cloud acquisition end time corresponding to the object to be measured based on the time when the height changes and / or the time when the grayscale is sent to change; extracts the point cloud data collected between the point cloud acquisition start time and the point cloud acquisition end time to obtain the point cloud data of the object to be measured; identifies the size information of the object to be measured based on the point cloud data of the object to be measured, and can accurately extract the point cloud data belonging to the object to be measured, which is convenient for subsequent size recognition of the object to be measured, is compatible with the measurement of objects of different sizes, avoids the situation where low objects cannot be effectively identified, and improves the accuracy of object measurement.
[0019] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.
[0021] Figure 1 It is a schematic diagram of an implementation environment of a solution provided by an embodiment of the present application;
[0022] Figure 2 is a flow chart of an object measurement method shown in an exemplary embodiment of the present application;
[0023] Figure 3 is a schematic diagram of constructing a conveyor belt section model according to an exemplary embodiment of the present application;
[0024] Figure 4 is a block diagram of an object measuring device shown in an exemplary embodiment of the present application;
[0025] Figure 5 is a schematic structural diagram of an electronic device shown in an exemplary embodiment of the present application;
[0026] Figure 6It is a schematic diagram of the structure of a computer-readable storage medium shown in an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0027] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.
[0028] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.
[0029] The term "and / or" in this article is only an association information describing the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the previous and next associated objects are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of, for example, including at least one of A, B, and C, can mean including any one or more elements selected from the set consisting of A, B, and C.
[0030] The object measurement method provided in the embodiment of the present application is described below.
[0031] Please refer to Figure 1 , which shows a schematic diagram of a solution implementation environment provided by an embodiment of the present application. The solution implementation environment may include a conveyor belt 110 and a laser camera 120, and the laser camera 120 is arranged relative to the object conveying plane of the conveyor belt 110.
[0032] The object conveying plane of the conveyor belt 110 is used to place objects to be transported, and the placed objects are transported by driving the conveyor belt 110 to move.
[0033] The laser camera 120 is used for collecting laser point cloud data. For example, the laser camera 120 includes a three-dimensional (3D) line laser camera to collect laser point cloud data through the 3D line laser camera.
[0034] Optionally, the laser camera 120 is communicatively connected to a server 130 .
[0035] Server 130 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.
[0036] In one example, the laser camera 120 transmits the acquired point cloud data to the server 130, and the server 130 can perform object measurement processing on the received point cloud data to obtain size information of the object to be measured. Of course, the server 130 can store the size information of the object to be measured locally or transmit it to other terminals, and this application does not limit this.
[0037] See also Figure 2 , Figure 2 is a flowchart of an object measurement method shown in an exemplary embodiment of the present application. The object measurement method can be applied to Figure 1 It should be understood that the method can also be applied to other exemplary implementation environments and be specifically executed by devices in other implementation environments, and this embodiment does not limit the implementation environment to which the method is applicable.
[0038] like Figure 2 As shown, the object measurement method at least includes steps S210 to S250, which are described in detail as follows:
[0039] Step S210: performing laser point cloud acquisition on a conveyor belt without any object being transported, and calculating an average height and / or average grayscale of the conveyor belt based on the acquired point cloud data.
[0040] It should be noted that the laser line of the laser camera needs to cover at least the width surface of the conveyor belt. The laser camera of corresponding specifications can be selected and the deployment method of the laser camera can be determined according to the actual application situation. This application does not limit this.
[0041] When there is no object being transmitted on the conveyor belt, the conveyor belt is driven to run, so as to perform laser point cloud acquisition on the moving conveyor belt without any object being transmitted, and obtain point cloud data of the conveyor belt.
[0042] The average height and / or average grayscale of the conveyor belt is calculated based on the collected point cloud data.
[0043] Among them, the average height of the conveyor belt is calculated based on the three-dimensional coordinates (X, Y, Z) of each point in the point cloud data.
[0044] Among them, the grayscale value is a simplified way to represent color, where black represents 0 and white represents the maximum grayscale value (usually 255). The grayscale value of a point cloud usually refers to a representation method that associates the three-dimensional coordinates (X, Y, Z) in the point cloud data with the grayscale information. Each point in the point cloud data contains location information (X, Y, Z) and possible color or grayscale information. In the point cloud data, the grayscale value can be stored directly or calculated based on other information (such as color information).
[0045] The calculated average height and / or average grayscale of the conveyor belt is stored.
[0046] Step S220: Acquire the currently collected real-time point cloud data of the conveyor belt, and calculate the height value and / or grayscale value corresponding to the real-time point cloud data.
[0047] In the application scenario, objects to be measured (such as envelopes, paper, low packages, etc.) are placed on the conveyor belt, and the conveyor belt is driven to transport the objects to be measured. The laser camera collects point cloud data of the moving conveyor belt, obtains the real-time point cloud data of the conveyor belt currently collected, and calculates the height value and / or grayscale value corresponding to the real-time point cloud data.
[0048] It should be noted that the method of calculating the height value and / or grayscale value corresponding to the real-time point cloud data may be the same as the method of calculating the average height and / or average grayscale of the conveyor belt in step S220.
[0049] Step S230: Compare the average height of the conveyor belt with the height value corresponding to the real-time point cloud data to determine the time when the height changes, and / or compare the average grayscale of the conveyor belt with the grayscale value corresponding to the real-time point cloud data to determine the time when the grayscale changes, and based on the time when the height changes and / or the time when the grayscale changes, obtain the point cloud collection start time and point cloud collection end time corresponding to the object to be measured.
[0050] When there is an object to be measured in the collected real-time point cloud data, the height value and / or grayscale value corresponding to the real-time point cloud data will change relative to the average height and / or average grayscale of the conveyor belt. Therefore, the moment when the height changes or the moment when the grayscale changes is detected to obtain the entry moment of the object to be measured, that is, the start moment of the point cloud collection corresponding to the object to be measured, and the departure moment of the object to be measured, that is, the end moment of the point cloud collection corresponding to the object to be measured.
[0051] For example, the average grayscale of the conveyor belt is compared with the grayscale value corresponding to the real-time point cloud data. If the difference between the average grayscale of the conveyor belt and the grayscale value corresponding to the real-time point cloud data is greater than the preset grayscale difference, it is determined that the current grayscale has changed, and the current moment is used as the start time of point cloud acquisition corresponding to the object to be measured; in response to detecting the start time of point cloud acquisition corresponding to the object to be measured, the average height of the conveyor belt is compared with the height value corresponding to the real-time point cloud data. If the difference between the average height of the conveyor belt and the height value corresponding to the real-time point cloud data becomes smaller and is less than the preset height difference, it is determined that the current height has changed, and the current moment is used as the end time of point cloud acquisition corresponding to the object to be measured.
[0052] Among them, the preset grayscale difference and the preset height difference can be pre-set, and can also be flexibly set after analyzing the visual features, height features, etc. of the conveyor belt without object transmission. For example, the preset height difference is set based on the lowest height, the highest height, and the height value distribution of each conveyor belt interval obtained based on the point cloud data of the conveyor belt without object transmission, or the preset height difference corresponding to each conveyor belt interval is set separately. For example, the greater the difference between the lowest height and the highest height, the greater the preset height difference. The height value distribution shows that the greater the difference between the height of the middle part of the conveyor belt and the height of the edge part, the greater the preset height difference. Similarly, the preset grayscale difference is set based on the lowest grayscale, the highest grayscale, and the grayscale value distribution of each conveyor belt interval obtained based on the point cloud data of the conveyor belt without object transmission, or the preset grayscale difference corresponding to each conveyor belt interval is set separately.
[0053] Compare the average grayscale of the conveyor belt with the grayscale value corresponding to the real-time point cloud data. If the difference between the average grayscale of the conveyor belt and the grayscale value corresponding to the real-time point cloud data is greater than the preset grayscale difference, it is determined that the current grayscale has changed, and an object currently enters the perception range of the laser camera. The current moment is used as the start time of point cloud acquisition corresponding to the object to be measured; after detecting the start time of point cloud acquisition corresponding to the object to be measured, compare the average height of the conveyor belt with the height value corresponding to the real-time point cloud data. If the difference between the average height of the conveyor belt and the height value corresponding to the real-time point cloud data becomes smaller and is less than the preset height difference, it is determined that the current height has changed, and an object currently leaves the perception range of the laser camera. The current moment is used as the end time of point cloud acquisition corresponding to the object to be measured.
[0054] For another example, the average grayscale of the conveyor belt is compared with the grayscale value corresponding to the real-time point cloud data, and the average height of the conveyor belt is compared with the height value corresponding to the real-time point cloud data. If the difference between the average grayscale of the conveyor belt and the grayscale value corresponding to the real-time point cloud data is greater than the first preset grayscale difference, and the difference between the average height of the conveyor belt and the height value corresponding to the real-time point cloud data increases or the height difference is greater than the first preset height difference, it is determined that an object currently exists and enters the perception range of the laser camera, and the current moment is used as the start time of point cloud acquisition corresponding to the object to be measured; in response to detecting the start time of point cloud acquisition corresponding to the object to be measured, the average grayscale of the conveyor belt is compared with the grayscale value corresponding to the real-time point cloud data, and the average height of the conveyor belt is compared with the height value corresponding to the real-time point cloud data. If the difference between the average grayscale of the conveyor belt and the grayscale value corresponding to the real-time point cloud data is less than the second preset grayscale difference, and the difference between the average height of the conveyor belt and the height value corresponding to the real-time point cloud data decreases and the height difference is less than the second preset height difference, it is determined that an object currently exists and leaves the perception range of the laser camera, and the current moment is used as the start time of point cloud acquisition corresponding to the object to be measured.
[0055] For another example, the average grayscale of the conveyor belt is compared with the grayscale value corresponding to the real-time point cloud data. If the difference between the average grayscale of the conveyor belt and the grayscale value corresponding to the real-time point cloud data is greater than the preset grayscale difference, it is determined that the object currently exists has entered the sensing range of the laser camera, and the current moment is used as the start time of the point cloud acquisition corresponding to the object to be measured. After detecting the start time of the point cloud acquisition corresponding to the object to be measured, the average grayscale of the conveyor belt is compared with the grayscale value corresponding to the real-time point cloud data. If the difference between the average grayscale of the conveyor belt and the grayscale value corresponding to the real-time point cloud data becomes less than the preset grayscale difference, it is determined that the object currently exists has left the sensing range of the laser camera, and the current moment is used as the end time of the point cloud acquisition corresponding to the object to be measured.
[0056] For another example, the average height of the conveyor belt is compared with the height value corresponding to the real-time point cloud data. If the difference between the average height of the conveyor belt and the height value corresponding to the real-time point cloud data becomes larger and greater than the preset height difference, it is determined that there is an object that has entered the sensing range of the laser camera, and the current moment is used as the start time of the point cloud collection corresponding to the object to be measured. After detecting the start time of the point cloud collection corresponding to the object to be measured, the average height of the conveyor belt is compared with the height value corresponding to the real-time point cloud data. If the difference between the average height of the conveyor belt and the height value corresponding to the real-time point cloud data becomes smaller and less than the preset height difference, it is determined that there is an object that has left the sensing range of the laser camera, and the current moment is used as the end time of the point cloud collection corresponding to the object to be measured.
[0057] For example, the average height of the conveyor belt is compared with the height value corresponding to the real-time point cloud data. If the difference between the average height of the conveyor belt and the height value corresponding to the real-time point cloud data becomes larger and is greater than the preset height difference, it is judged that there is an object currently entering the perception range of the laser camera, and the current moment is used as the start time of point cloud collection corresponding to the object to be measured; after detecting the start time of point cloud collection corresponding to the object to be measured, the average grayscale of the conveyor belt is compared with the grayscale value corresponding to the real-time point cloud data. If the difference between the average grayscale of the conveyor belt and the grayscale value corresponding to the real-time point cloud data is less than the preset grayscale difference, it is judged that there is an object currently leaving the perception range of the laser camera, and the current moment is used as the end time of point cloud collection corresponding to the object to be measured.
[0058] The specific method for determining the start time and the end time of point cloud collection can be flexibly selected according to the actual application situation, and this application does not limit this.
[0059] Step S240: extracting the point cloud data collected between the point cloud collection start time and the point cloud collection end time to obtain the point cloud data of the object to be measured.
[0060] After determining the point cloud acquisition start time (the time when the object enters the perception range of the laser camera) and the point cloud acquisition end time (the time when the object leaves the perception range of the laser camera) corresponding to the object to be measured, the point cloud data collected between the point cloud acquisition start time and the point cloud acquisition end time is used as the point cloud data of the object to be measured.
[0061] Step S250: Identifying size information of the object to be measured based on the point cloud data of the object to be measured.
[0062] According to the obtained point cloud data of the object to be measured, the size information of the object to be measured is identified.
[0063] By detecting grayscale changes and / or height changes in real time, the moment when the object to be measured enters the perception range of the laser camera and the moment when it leaves the perception range of the laser camera can be accurately detected, thereby obtaining the start time and the end time of point cloud acquisition, and accurately extracting the point cloud data belonging to the object to be measured between the start time and the end time of point cloud acquisition, which is convenient for subsequent size recognition of the object to be measured. It can be compatible with the measurement of objects of different sizes, avoid the situation where low objects cannot be effectively identified, and improve the accuracy of object measurement.
[0064] Next, some embodiments of the present application are described in detail.
[0065] In some embodiments, step S210 performs laser point cloud acquisition on a conveyor belt where no objects are transmitted, and calculates the average height and / or average grayscale of the conveyor belt based on the acquired point cloud data, including: dividing the conveyor belt into multiple conveyor belt sections along the direction of movement; performing laser point cloud acquisition on each conveyor belt section where no objects are transmitted, and obtaining point cloud data corresponding to each conveyor belt section; and calculating the average height and / or average grayscale of each conveyor belt section based on the point cloud data corresponding to each conveyor belt section.
[0066] The conveyor belt can be evenly divided into multiple conveyor belt sections along the direction of movement. The corresponding average height and / or average grayscale of each conveyor belt section is calculated based on the point cloud data collected to obtain a conveyor belt section model, so as to realize subsequent height value or grayscale value comparison based on the conveyor belt section model.
[0067] Exemplarily, the length of the conveyor belt, the speed of the conveyor belt, the acquisition frame rate corresponding to the laser point cloud acquisition, and the preset interval step are obtained; based on the length of the conveyor belt, the speed of the conveyor belt, the acquisition frame rate corresponding to the laser point cloud acquisition, and the preset interval step, the number of intervals corresponding to the conveyor belt is calculated; according to the number of intervals and the interval step, the conveyor belt is divided into the number of conveyor belt intervals along the direction of movement.
[0068] For example, see Figure 3 , Figure 3 A schematic diagram of constructing a conveyor belt section model according to an exemplary embodiment of the present application is shown in FIG. Figure 3 As shown, the length of the conveyor belt is L, the moving speed of the conveyor belt is v, the acquisition frame rate corresponding to the point cloud acquisition by the laser camera is f, and the preset interval step size is s. The number of intervals n=Lf / (vs) is calculated to evenly divide the conveyor belt into n conveyor belt intervals, and based on the point cloud data corresponding to each conveyor belt interval, the average height and / or average grayscale corresponding to the n conveyor belt intervals are calculated respectively, and the calculated average height and / or average grayscale corresponding to the n conveyor belt intervals are used as the conveyor belt interval model.
[0069] In some embodiments, by comparing the height value and / or grayscale value corresponding to the real-time point cloud data with the average height and / or average grayscale corresponding to each conveyor belt interval of the conveyor belt interval model, the point cloud collection start time and the point cloud collection end time corresponding to the object to be measured are obtained, all point cloud data frames collected between the point cloud collection start time and the point cloud collection end time are recorded, and the point cloud data frames are spliced, and the splicing result is used as the point cloud data of the object to be measured.
[0070] Step S250 identifies the size information of the object to be measured based on the point cloud data of the object to be measured, including: filtering the point cloud data of the object to be measured to obtain filtered point cloud data; segmenting the point cloud belonging to the object to be measured in the filtered point cloud data to obtain segmented point cloud data; generating a minimum external bounding box corresponding to the segmented point cloud data to obtain the size information of the object to be measured.
[0071] The point cloud data of the object to be measured is filtered to remove noise points, outliers, etc., to obtain filtered point cloud data.
[0072] The filtered point cloud data contains not only points corresponding to the object to be measured, but also points corresponding to the conveyor belt. Therefore, it is necessary to segment the point cloud belonging to the object to be measured in the filtered point cloud data to obtain segmented point cloud data.
[0073] Exemplarily, the point cloud belonging to the object to be measured in the point cloud data after segmentation filtering is obtained to obtain the segmented point cloud data, including: determining the position of the object to be measured on the conveyor belt to obtain the target position; extracting the conveyor belt point cloud data corresponding to the target position from the point cloud data corresponding to the conveyor belt without object transmission; segmenting the point cloud data except the conveyor belt point cloud data corresponding to the target position in the point cloud data after segmentation filtering to obtain the segmented point cloud data.
[0074] The point cloud data corresponding to the conveyor belt with or without object transmission is stored in advance, the position of the object to be measured on the conveyor belt is taken as the target position, and the conveyor belt point cloud data corresponding to the target position is extracted from the point cloud data corresponding to the conveyor belt without object transmission. This part of the point cloud data is the point cloud data of the target position when there is no object transmission. Therefore, the point cloud data except the conveyor belt point cloud data corresponding to the target position in the point cloud data after segmentation and filtering is obtained to obtain the point cloud belonging to the object to be measured, that is, the segmented point cloud data is obtained.
[0075] For example, based on the point cloud data collected when there is no object transmitted in each conveyor belt section, the plane height information corresponding to each conveyor belt section is obtained; and based on the real-time point cloud data corresponding to the object to be measured, the plane height information of the conveyor belt plane corresponding to the real-time point cloud data is obtained; the matching degree between the plane height information corresponding to the real-time point cloud data and the plane height information of each conveyor belt section is calculated; the conveyor belt section with the highest matching degree is selected as the matching section, and the position corresponding to the matching section is used as the target position.
[0076] The conveyor belt section model not only stores the average height and / or average grayscale corresponding to each conveyor belt section, but also stores the plane height information corresponding to each conveyor belt section. The plane height information is used to record the height information of each area of the conveyor belt section.
[0077] By matching the plane height information of the conveyor belt plane corresponding to the real-time point cloud data with the plane height information of each conveyor belt section, the matching degree between the conveyor belt plane corresponding to the real-time point cloud data and the conveyor belt plane corresponding to each conveyor belt section is obtained, and the conveyor belt section with the highest matching degree is selected as the matching section, and the position corresponding to the matching section is used as the target position.
[0078] Optionally, in addition to determining the matching interval by plane height, similarly, the degree of matching between the conveyor belt plane corresponding to the real-time point cloud data and the conveyor belt plane corresponding to each conveyor belt interval can be calculated based on the plane grayscale information to determine the matching interval; of course, the degree of matching between the conveyor belt plane corresponding to the real-time point cloud data and the conveyor belt plane corresponding to each conveyor belt interval can also be calculated in combination with the plane height and plane grayscale to determine the matching interval, which is not limited in the present application.
[0079] The conveyor belt section with the highest matching degree is selected as the matching section, and the position corresponding to the matching section is taken as the target position, so as to extract the conveyor belt point cloud data corresponding to the target position from the point cloud data corresponding to the conveyor belt without object transmission, and segment the point cloud data except the conveyor belt point cloud data corresponding to the target position in the point cloud data after filtering to obtain the point cloud belonging to the object to be measured.
[0080] In addition to the above embodiments, other methods can also be used to segment the point cloud belonging to the object to be measured in the filtered point cloud data. For example, based on the average height corresponding to the conveyor belt, points whose height difference with the average height is less than a preset difference are regarded as points belonging to the conveyor belt, and the remaining points are regarded as points belonging to the object to be measured, so as to segment the point cloud belonging to the object to be measured in the filtered point cloud data.
[0081] After obtaining the segmented point cloud data, the minimum external bounding box corresponding to the segmented point cloud data is generated to obtain the size information of the object to be measured.
[0082] The size information includes but is not limited to the height, width, length, volume, etc. of the object. Of course, if the object is an irregular shape, the size information can be presented in other ways, and this application does not limit this.
[0083] In some embodiments, the method further includes: collecting an identification code of the object to be measured, and collecting one or more information of the weight and movement direction of the object to be measured; and associating and storing the identification code of the object to be measured with one or more information of the start time of point cloud collection, the end time of point cloud collection, size information, weight, and movement direction.
[0084] For example, a code reader device, a weighing device, a visual image acquisition device, etc. are deployed. An identification code is affixed to the object to be measured. The identification code is read by the code reader device to obtain the identification code of the object to be measured. In addition, the weight of the object to be measured is collected by the weighing device, and the image information of the object to be measured is collected by the visual image acquisition device to obtain the movement direction of the object to be measured.
[0085] The identification code of the object to be measured is associated and stored with one or more of the collected point cloud acquisition start time (the time when the object enters the perception range of the laser camera), the point cloud acquisition end time (the time when the object leaves the perception range of the laser camera), the target position of the object to be measured relative to the conveyor belt, the point cloud data belonging to the object to be measured, the weight of the object to be measured, and the direction of movement, so as to facilitate the subsequent tracing of the object information.
[0086] The object measurement method provided by the present application performs laser point cloud acquisition on a conveyor belt without object transmission, calculates the average height and / or average grayscale of the conveyor belt based on the acquired point cloud data; obtains the real-time point cloud data of the conveyor belt currently acquired, and calculates the height value and / or grayscale value corresponding to the real-time point cloud data; compares the average height of the conveyor belt with the height value corresponding to the real-time point cloud data to determine the time when the height changes, and / or compares the average grayscale of the conveyor belt with the grayscale value corresponding to the real-time point cloud data to determine the time when the grayscale changes, and obtains the point cloud acquisition start time and point cloud acquisition end time corresponding to the object to be measured based on the time when the height changes and / or the time when the grayscale changes; extracts the point cloud data collected between the point cloud acquisition start time and the point cloud acquisition end time to obtain the point cloud data of the object to be measured; identifies the size information of the object to be measured based on the point cloud data of the object to be measured, and can accurately extract the point cloud data belonging to the object to be measured, which is convenient for the subsequent size identification of the object to be measured, is compatible with the measurement of objects of different sizes, avoids the situation where low objects cannot be effectively identified, and improves the accuracy of object measurement.
[0087] Figure 4 FIG. 1 is a block diagram of an object measuring device shown in an exemplary embodiment of the present application. Figure 4 As shown, the exemplary object measuring device 400 includes: a conveyor belt calculation module 410, a real-time point cloud computing module 420, a comparison module 430, a point cloud extraction module 440 and a size recognition module 450. Specifically:
[0088] The conveyor belt calculation module 410 is used to collect laser point cloud data of the conveyor belt without any object being transported, and calculate the average height and / or average grayscale of the conveyor belt based on the collected point cloud data;
[0089] The real-time point cloud computing module 420 is used to obtain the real-time point cloud data of the conveyor belt currently collected, and calculate the height value and / or gray value corresponding to the real-time point cloud data;
[0090] The comparison module 430 is used to compare the average height of the conveyor belt with the height value corresponding to the real-time point cloud data to determine the time when the height changes, and / or compare the average grayscale of the conveyor belt with the grayscale value corresponding to the real-time point cloud data to determine the time when the grayscale changes, and obtain the point cloud collection start time and point cloud collection end time corresponding to the object to be measured based on the time when the height changes and / or the time when the grayscale changes;
[0091] The point cloud extraction module 440 is used to extract the point cloud data collected between the point cloud collection start time and the point cloud collection end time to obtain the point cloud data of the object to be measured;
[0092] The size recognition module 450 is used to recognize the size information of the object to be measured based on the point cloud data of the object to be measured.
[0093] It should be noted that the object measuring device provided in the above embodiment and the object measuring method provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment, and will not be repeated here. In practical applications, the object measuring device provided in the above embodiment can allocate the above functions to different functional modules as needed, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above, and this is not limited here.
[0094] See also Figure 5 , Figure 5 1 is a schematic diagram of the structure of an embodiment of an electronic device of the present application. The electronic device 500 includes a memory 501 and a processor 502, and the processor 502 is used to execute program instructions stored in the memory 501 to implement the steps in any of the above-mentioned object measurement method embodiments. In a specific implementation scenario, the electronic device 500 may include but is not limited to: a microcomputer, a server, and in addition, the electronic device 500 may also include a mobile device such as a laptop computer and a tablet computer, which is not limited here.
[0095] Specifically, the processor 502 is used to control itself and the memory 501 to implement the steps in any of the above-mentioned object measurement method embodiments. The processor 502 can also be called a central processing unit (CPU). The processor 502 may be an integrated circuit chip with signal processing capabilities. The processor 502 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 502 can be implemented by an integrated circuit chip.
[0096] See also Figure 6 , Figure 6 The computer-readable storage medium 600 stores program instructions 610 that can be executed by a processor, and the program instructions 610 are used to implement the steps in any of the above-mentioned object measurement method embodiments.
[0097] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0098] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0099] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0100] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program code.
Claims
1. A method for measuring an object, characterized in that: The method comprises: Performing laser point cloud acquisition on a conveyor belt without any object being transported, and calculating an average height and / or an average grayscale of the conveyor belt based on the acquired point cloud data; Acquire the currently collected real-time point cloud data of the conveyor belt, and calculate the height value and / or grayscale value corresponding to the real-time point cloud data; Compare the average height of the conveyor belt with the height value corresponding to the real-time point cloud data to determine the time when the height changes, and / or compare the average grayscale of the conveyor belt with the grayscale value corresponding to the real-time point cloud data to determine the time when the grayscale changes, and obtain the point cloud collection start time and point cloud collection end time corresponding to the object to be measured based on the time when the height changes and / or the time when the grayscale changes; Extracting point cloud data collected between the point cloud collection start time and the point cloud collection end time to obtain point cloud data of the object to be measured; Based on the point cloud data of the object to be measured, size information of the object to be measured is identified.
2. The method according to claim 1, characterized in that: The step of comparing the average height of the conveyor belt with the height value corresponding to the real-time point cloud data to determine the time when the height changes, and / or comparing the average grayscale of the conveyor belt with the grayscale value corresponding to the real-time point cloud data to determine the time when the grayscale changes, and obtaining the point cloud acquisition start time and point cloud acquisition end time corresponding to the object to be measured based on the time when the height changes and / or the time when the grayscale changes, includes: Comparing the average grayscale of the conveyor belt with the grayscale value corresponding to the real-time point cloud data, if the difference between the average grayscale of the conveyor belt and the grayscale value corresponding to the real-time point cloud data is greater than a preset grayscale difference, it is determined that the current grayscale has changed, and the current time is used as the start time of point cloud acquisition corresponding to the object to be measured; In response to detecting the start time of point cloud collection corresponding to the object to be measured, the average height of the conveyor belt is compared with the height value corresponding to the real-time point cloud data. If the difference between the average height of the conveyor belt and the height value corresponding to the real-time point cloud data becomes smaller and is less than the preset height difference, it is judged that the current height has changed, and the current time is used as the end time of point cloud collection corresponding to the object to be measured.
3. The method according to claim 1, characterized in that The step of identifying the size information of the object to be measured based on the point cloud data of the object to be measured includes: Performing filtering processing on the point cloud data of the object to be measured to obtain filtered point cloud data; Segmenting the point cloud belonging to the object to be measured in the filtered point cloud data to obtain segmented point cloud data; Generate a minimum external bounding box corresponding to the segmented point cloud data to obtain the size information of the object to be measured.
4. The method according to claim 3, characterized in that The step of segmenting the point cloud of the object to be measured in the filtered point cloud data to obtain segmented point cloud data includes: Determine the position of the object to be measured on the conveyor belt to obtain a target position; Extracting the conveyor belt point cloud data corresponding to the target position from the point cloud data corresponding to the conveyor belt without object transmission; The point cloud data after filtering except the conveyor belt point cloud data corresponding to the target position are segmented to obtain segmented point cloud data.
5. The method according to claim 4, characterized in that The conveyor belt is composed of a plurality of conveyor belt sections; the step of determining the position of the object to be measured on the conveyor belt to obtain the target position includes: Based on the point cloud data collected when no object is transmitted in each conveyor belt section, plane height information corresponding to each conveyor belt section is obtained; and based on the real-time point cloud data corresponding to the object to be measured, plane height information of the conveyor belt plane corresponding to the real-time point cloud data is obtained; Calculating the matching degree between the plane height information corresponding to the real-time point cloud data and the plane height information of each conveyor belt section; The conveyor belt section with the highest matching degree is selected as the matching section, and the position corresponding to the matching section is used as the target position.
6. The method according to claim 1, characterized in that The laser point cloud acquisition is performed on the conveyor belt without object transmission, and the average height and / or average grayscale of the conveyor belt is calculated based on the acquired point cloud data, including: Dividing the conveyor belt into a plurality of conveyor belt sections along the moving direction; Perform laser point cloud acquisition on each conveyor belt section where no object is transmitted, and obtain point cloud data corresponding to each conveyor belt section; Based on the point cloud data corresponding to each conveyor belt section, the average height and / or average grayscale of each conveyor belt section is calculated respectively.
7. The method according to claim 6, characterized in that The step of dividing the conveyor belt into a plurality of conveyor belt sections along the moving direction includes: Obtaining the length of the conveyor belt, the moving speed of the conveyor belt, the acquisition frame rate corresponding to the laser point cloud acquisition, and the preset interval step size; Calculate the number of intervals corresponding to the conveyor belt based on the length of the conveyor belt, the moving speed of the conveyor belt, the acquisition frame rate corresponding to the laser point cloud acquisition, and the preset interval step size; According to the number of intervals and the interval step length, the conveyor belt is divided into the number of conveyor belt intervals along the moving direction.
8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: Collecting the identification code of the object to be measured, and collecting one or more information of the weight and movement direction of the object to be measured; The identification code of the object to be measured is associated with one or more of the point cloud acquisition start time, the point cloud acquisition end time, the size information, the weight, and the movement direction and stored.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the processor is configured to execute program instructions stored in the memory to implement the steps in the method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program instructions, and the program instructions can be executed by a processor to implement the steps in the method according to any one of claims 1 to 8.