Compartment height measuring method and device, electronic product and computer program product

By acquiring image data of the side view of the carriage and reference columns, and using machine learning models and laser rangefinders, the height of the carriage is automatically calculated, solving the problem of time-consuming and labor-intensive manual measurement, and achieving efficient and accurate carriage height measurement.

CN120847814APending Publication Date: 2025-10-28INNER MONGOLIA HOHHOT LIXIN ELECTRICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511012610.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-22
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

In the current technology, power plants mainly rely on manual measurement to measure the height of vehicle compartments, which is time-consuming, labor-intensive, and highly repetitive, lacking intelligent and automated measurement methods.

Method used

By acquiring image data of the side view of the carriage and reference columns, a trained machine learning model (such as YOLOv11) is used to identify the carriage boundary and mark the position. Combined with the distance data measured by the laser rangefinder, the height of the carriage is calculated.

Benefits of technology

It enables efficient and automated measurement of carriage height, reducing repetitive work and improving measurement efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120847814A_ABST
    Figure CN120847814A_ABST
Patent Text Reader

Abstract

The invention discloses a carriage height measuring method and device, an electronic product and a computer program product, and belongs to the technical field of data processing. The method comprises the steps that image data and distance data are obtained, the image data comprise a compartment side view and a reference column, a set of marks are arranged on the reference column at intervals, and the marks are used for representing the reference height to determine height information of a compartment; the distance data is the distance between the carriage and the reference column; processing the image data based on the trained machine learning model to obtain an identification result, the identification result including the boundary position of the carriage and the position of the mark; and obtaining height data of the carriage according to the identification result and the distance data. The device comprises a data acquisition module, an identification result obtaining module and a height data obtaining module. According to the technical scheme, the efficiency of carriage height measurement is improved, the automation degree is high, and the repeated labor amount is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, electronic product, and computer program product for measuring the height of a vehicle compartment. Background Technology

[0002] Currently, most height measurements of vehicles by power plant sampling machines in China are done manually with rulers. This is not only costly and time-consuming, but also highly repetitive. Therefore, an intelligent and automated method is needed to measure the height of transport vehicles and transmit the data to the sampling machine for subsequent data processing. Summary of the Invention

[0003] To address the problems existing in the prior art, the present invention provides a method for measuring the height of a vehicle compartment, comprising:

[0004] Image data and distance data are acquired. The image data includes a side view of the carriage and a reference post. A set of markers is spaced apart on the reference post, and the markers are used to represent the reference height to determine the height information of the carriage. The distance data is the distance between the carriage and the reference post. The carriage image data is processed based on a trained machine learning model to obtain a recognition result. The recognition result includes the boundary position of the carriage and the position of the markers. The height data of the carriage is obtained based on the recognition result and the distance data.

[0005] In another aspect, the present invention provides a vehicle height measuring device, comprising:

[0006] The data acquisition module is used to acquire image data and distance data. The image data includes a side view of the carriage and a reference post. A set of markers is set at intervals on the reference post. The markers are used to characterize the reference height to determine the height information of the carriage. The distance data is the distance between the carriage and the reference post. The recognition result acquisition module is used to process the carriage image data based on a trained machine learning model to obtain a recognition result. The recognition result includes the boundary position of the vehicle and the position of the markers. The height data acquisition module is used to obtain the height data of the carriage based on the recognition result and the distance data.

[0007] In another aspect, the present invention provides an electronic product comprising: a processor and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the above-described method for measuring the height of a vehicle compartment.

[0008] In another aspect, the present invention provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement the above-described method for measuring the height of a carriage.

[0009] In another aspect, the present invention provides a computer program product that, when run on a computer, causes the method described above to be executed by the computer. In yet another aspect, the present invention provides a sampling machine having the above-described carriage height measuring device.

[0010] The beneficial effects of the technical solution provided by the embodiments of the present invention are as follows:

[0011] By acquiring image data and distance data, the image data includes a side view of the carriage and a reference post with a set of markers spaced at intervals on the reference post to characterize the reference height and determine the height information of the carriage; the distance data is the distance between the carriage and the reference post; the carriage image data is processed based on a trained machine learning model to obtain recognition results, including the boundary position of the carriage and the position of the markers; the height data of the carriage is obtained based on the recognition results and distance data, thereby improving the efficiency of carriage height measurement, achieving a high degree of automation, and reducing repetitive labor. Attached Figure Description

[0012] Figure 1 This is a flowchart illustrating a method for measuring the height of a carriage according to an embodiment of the present invention;

[0013] Figure 2 This is a schematic diagram of a sampling room provided in one embodiment of the present invention;

[0014] Figure 3 This is a schematic diagram of a training image dataset provided in an embodiment of the present invention;

[0015] Figure 4 This is a schematic diagram illustrating the statistical characteristics of a training image dataset according to an embodiment of the present invention;

[0016] Figure 5 This is an image feature map provided in one embodiment of the present invention;

[0017] Figure 6 This is a schematic diagram of the recognition result of the outer boundary of a carriage provided in an embodiment of the present invention;

[0018] Figure 7 This is a schematic diagram of the boundary recognition result inside a carriage provided by an embodiment of the present invention;

[0019] Figure 8This is a contour line diagram provided in one embodiment of the present invention;

[0020] Figure 9 This is a schematic diagram of the structure of a carriage height measuring device provided in another embodiment of the present invention; Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.

[0022] See Figure 1 This invention provides a method for measuring the height of a transport vehicle's cargo compartment, used by a sampling machine in a power plant to measure the height of the cargo compartment, which typically carries coal. An image acquisition device, such as a camera, is installed in the sampling room to acquire a side view of the cargo compartment, including its long side; for example... Figure 2 As shown, a cylindrical reference object, called a reference column, is set between the image acquisition device and the vehicle under test. A set of markers is evenly spaced on the reference column; the number of markers in a set can be multiple, such as 4, 5, or 6, and can be painted at 1-meter intervals. The markers are used to characterize the reference height to determine the height of the vehicle. The reference columns are symmetrically arranged along the left and right sides of the vehicle under test. The distance between the symmetrical reference columns on the left and right sides should be sufficient to allow passage for transport vehicles, and the markers on the two symmetrical reference columns are symmetrically arranged at the same height. For example, along the length of the vehicle, two reference columns are spaced apart, both located on one side of the vehicle under test. Each reference column has a symmetrical reference column on the other side of the vehicle under test, resulting in a total of four symmetrical reference columns along the left and right sides of the vehicle under test. Two reference columns are located on one side of the vehicle under test (e.g., the left side), and the other two are located on the other side (e.g., the right side). A distance measuring device, such as a laser rangefinder, is installed on the reference column to measure the actual distance between the vehicle (or vehicle) and the reference column. This method includes the following steps:

[0023] Step S101: Acquire image data and distance data. The image data includes a side view of the carriage and a reference post. A set of markers is set at intervals on the reference post. The markers are used to represent the reference height to determine the height information of the carriage. The distance data is the distance between the carriage and the reference post.

[0024] Image data is acquired through an image acquisition device in the sampling room. This image data includes a side view of the carriage and a reference post, as well as markings spaced evenly on the reference post. These markings characterize the reference height to determine the carriage's height. Distance data is measured by a laser rangefinder, representing the actual distance between the carriage and the reference post.

[0025] Step S102: Process the image data based on the trained machine learning model to obtain the recognition results, which include the boundary position of the carriage and the position of the marker.

[0026] Before processing image data and obtaining recognition results based on the trained machine learning model, the machine learning model needs to be trained to obtain a trained machine learning model. The machine learning model adopts the YOLOv11 (You Only Look Once) S-model. The YOLOv11 model uses an improved backbone and neck architecture, which enhances feature extraction capabilities, thereby achieving more accurate object detection. Different versions of YOLOv11 (such as n, s, m, l, x) provide diverse choices for different application scenarios, from small models to large models, to meet the accuracy and speed requirements under different needs. This application prefers the smaller-scale YOLOv11 S-model.

[0027] Training a machine learning model involves the following steps:

[0028] Construct an image dataset, such as Figure 3 The image dataset shown includes training image data with multiple annotations, including annotations for carriages and markers. For each type of annotation, the carriage annotation includes the location of the outer boundary and the location of the inner boundary, where the outer boundary of the carriage surrounds the lower edge of the carriage top and bottom; the inner boundary of the carriage surrounds the upper edge of the carriage top and bottom; the marker annotation includes the location of the marker.

[0029] Because the lighting conditions in a train carriage vary greatly in real-world environments, the captured images of the actual carriage differ significantly. To mimic the image effects captured by the camera, data augmentation processing can be applied to the images in the dataset. Processing methods can include one or more of the following: mosaic, random occlusion, mirroring, grayscale, HSV (HueSaturationValue) color transformation, and contrast enhancement. For example, each method can be set with a preset threshold range and usage probability to make the image data in the dataset closely resemble the image effects of the actual scene.

[0030] After obtaining the aforementioned image dataset, the machine learning model is trained through steps such as forward propagation, loss calculation, backpropagation, and parameter update. During the training process, hyperparameters such as learning rate and batch size are adjusted to optimize model performance.

[0031] In one embodiment of the present invention, the image data used for training has a resolution of 1280*1280, thus the machine learning model is more accurate in feature extraction, and the statistical characteristics of the image dataset used for training are as follows: Figure 4As shown, the top left bar chart represents the number of instances in two categories, both related to the carriage. One category represents the height of the carriage itself, the distance from the chassis to the top, while the other represents the floor height, the minimum height at which goods can be placed inside the carriage. In practical applications, the carriage has a bottom edge. The top right box plot shows the distribution of the height and width of the target boxes, which is relatively even. The bottom left scatter plot shows the coordinate distribution of the center points of the target boxes, which is relatively concentrated. The bottom right scatter plot shows the distribution of the height and width of the target boxes, indicating a certain correlation between the two. In conclusion, the image dataset used for training is of high quality. Figure 5 As shown, the machine learning model obtains a feature map after 32x downsampling and a series of feature fusions in the feature extraction network. Through different convolution kernels and pooling operations, the machine learning model captures local features such as edges, textures, and shapes in the image data based on the feature map, which are then used for subsequent target classification and localization.

[0032] The recognition result can be obtained by processing the image data of the carriage through a trained machine learning model, such as... Figure 6-7 As shown, the recognition results include the boundary position of the carriage and the position of the marker, wherein the carriage boundary includes the outer boundary of the carriage and the inner boundary of the carriage.

[0033] Step S103: Obtain the height data of the carriage based on the recognition results and distance data.

[0034] After obtaining the identification results, a set of contour lines is first obtained based on the markings on the identified reference pillars, such as... Figure 8 As shown, by connecting the markers of equal height on the symmetrical reference columns, a set of contour lines can be obtained. Due to the principle of perspective, the contour lines in the figure appear as oblique lines.

[0035] Based on the distance between the carriage and the reference pillars measured by the distance measuring device, and the distance between two symmetrical reference pillars, the intersection points of the contour lines and the side plane of the carriage can be determined according to the ratio between the two. These are called contour line intersection points. Connecting the contour line intersection points yields a vertical auxiliary line. The auxiliary line intersects the upper and lower boundaries of the carriage at one point each. The distance between the two intersection points is the height of the carriage. Since the distance between the intersection points of two adjacent contour lines on the auxiliary line is the actual distance between two adjacent markers, the height of the carriage can be determined according to the ratio.

[0036] For example, a first physical distance L1 between two reference columns set before and after can be obtained in advance. The first physical distance L1 can be obtained by a ranging device, which can be a laser rangefinder.

[0037] Acquire a background image, captured before the vehicle enters. This image should display two reference posts positioned in front and behind the vehicle, as well as height markers placed on the reference posts, such as... Figure 2 As shown. Two reference pillars are used: a front reference pillar and a rear reference pillar. Markers with red and white coatings are connected to the marks on the front and rear reference pillars at the same height to form virtual contour lines. Multiple virtual contour lines can be used, such as four or five. The height of the marks on the reference pillars is measured beforehand to obtain their actual height. The actual height of the marks corresponds to the height of the virtual contour lines, thus establishing a height correspondence.

[0038] After the vehicle enters the area, distance measurement is performed to obtain the second physical distance L2 between the vehicle and the front reference post. Distance measurement can be achieved using a distance measuring device, such as a laser rangefinder.

[0039] After the vehicle enters the area, it will be photographed to obtain a vehicle image. The imaging device captures both the vehicle image and the background image from the same position and angle. In the vehicle image, the distance between the front and rear reference pillars is the first image distance L3, and the distance between the vehicle and the front reference pillar is the second image distance L4. The ratio of L3 to L4 and the ratio of L2 to L1 have a distance correspondence.

[0040] In the background image, a first virtual reference vertical line is determined based on the distance correspondence and the relative positional relationship between the two reference pillars set in front and behind. This first virtual reference vertical line corresponds to the vehicle's actual reference vertical line, which is parallel to the reference pillars and passes through the measuring point position on the vehicle corresponding to the rangefinder. The first virtual reference vertical line has virtual elevation points corresponding to virtual contour lines. Based on the height of the virtual contour lines, the height of the virtual contour points can be obtained.

[0041] Then, based on the reference position of the first virtual reference vertical line in the background image, the second virtual reference vertical line corresponding to that position is found in the vehicle image. Accordingly, the height of the virtual contour points on the second virtual reference vertical line can also be obtained. Furthermore, the height of each point on the second virtual reference vertical line can be obtained. The method of obtaining the height can be a second-order function fitting method. This embodiment does not limit the specific method of obtaining the height.

[0042] The second virtual reference vertical line will intersect with the boundary of the vehicle in the vehicle image. When the boundary is the boundary of the vehicle body, such as... Figure 6 The area bordered in blue has two intersection points: the upper intersection point and the lower intersection point. Figure 6The distance between the upper and lower intersection points of the two purple dots represents the height of the carriage, which is the distance from the chassis to the roof. When the boundary is the vehicle floor height boundary, only one intersection point is needed. Figure 7 The purple dot at the bottom indicates the minimum height of the cargo compartment that can be placed inside. In reality, the lower part of the cargo compartment has an edge, such as... Figure 7 The lower edge of the blue frame corresponds to the vehicle's ground clearance, and a lock is usually installed along this edge.

[0043] For example, both reference posts have markings, and there can be multiple markings, such as 1m, 2m, 3m, 4m, and 5m respectively. For ease of description, we will use 1-5m below. Connecting the markings at the same height will form a contour line representing that height. The laser rangefinder can obtain a distance value by measurement, which is the distance between the vehicle and the outermost reference post (or front reference post).

[0044] When the distance between the vehicle and the outer reference pillar is different, its position on the captured vehicle image will also be different, which can be specifically reflected by different positions on the contour lines.

[0045] The marking on the front reference post is 1-5m (0m from the reference post), and the marking on the innermost reference post (or rear reference post) is 1-5m (7m from the outermost post of the front reference post). Figure 6 The five yellow dots marked from top to bottom are also 1-5m (in reality, the distance from the front reference post is 3m). The position of the vehicle on the contour line will be different depending on the distance between the vehicle and the reference post.

[0046] If the distance measured by the laser rangefinder is, for example, 3m, then the intersection of the carriage and the contour line is to be found at the yellow point. Connect the yellow points with a line, and use a second-order function to calculate the height of each point on this line. Then each position on this yellow line will have the true height information.

[0047] When a vehicle enters, the edge of the carriage and the line will intersect at a point. The height information of the intersection point is the height information of the vehicle. The height information of the intersection point at the upper edge gives the vehicle height, and the height information of the intersection point at the lower edge gives the vehicle undercarriage height.

[0048] The height of the carriage can be obtained through the above calculations. The carriage height includes the external height and the internal height. The external height is the distance between the top and bottom of the carriage; the internal height is the distance between the top and bottom of the carriage. The external boundary of the carriage corresponds to the external height, and the internal boundary corresponds to the internal height.

[0049] In one embodiment of the present invention, the response time for calculating the height of the carriage is 1 second; the accuracy rate for detecting the outer boundary of the carriage is 100%, and the accuracy rate for detecting the inner boundary of the carriage is 99.9%; the error between the fitting result of the outer height of the carriage and the actual height is ±3cm, and the error between the fitting result of the inner height of the carriage and the actual height is ±2.5cm.

[0050] This invention improves the efficiency of carriage height measurement, achieves a high degree of automation, and reduces repetitive labor by acquiring image data and distance data. The image data includes a side view of the carriage and a reference post, with a set of markers spaced at intervals on the reference post to determine the height information of the carriage. The distance data is the distance between the carriage and the reference post. The carriage image data is processed based on a trained machine learning model to obtain recognition results, which include the boundary position of the carriage and the position of the markers. The height data of the carriage is obtained based on the recognition results.

[0051] See Figure 8 An embodiment of the present invention provides a vehicle height measuring device, which includes: a data acquisition module 201, an identification result acquisition module 202, and a height data acquisition module 203.

[0052] The data acquisition module 201 is used to acquire image data and distance data. The image data includes a side view of the carriage and a reference column. A set of markers is set at intervals on the reference column. The markers are used to determine the height information of the carriage. The distance data is the distance between the carriage and the reference column. The recognition result acquisition module 202 is used to process the carriage image data based on the trained machine learning model to obtain the recognition result. The recognition result includes the boundary position of the vehicle and the position of the markers. The height data acquisition module 203 is used to obtain the height data of the carriage based on the recognition result.

[0053] Optionally, before the recognition result obtaining module 202 processes the image data based on the trained machine learning model to obtain the recognition result, it further includes:

[0054] The model training unit is used to construct an image dataset, which includes multiple labeled image data, including annotations for carriages and markers; the machine learning model is trained using the image dataset to obtain the trained machine learning model.

[0055] Optionally, the machine learning model is YOLOv11.

[0056] Optionally, before training the machine learning model using the image dataset to obtain the trained machine learning model, the model training unit is also used for:

[0057] Data augmentation processing is performed on the image data in the image dataset. Data augmentation methods include: mosaic, random occlusion, mirroring, grayscale, HSV color transformation, and contrast enhancement.

[0058] Optionally, the height data acquisition module 203 is used to: determine contour lines based on the location of the markers; determine the intersection points of the contour lines and the boundary locations of the carriage based on the distance data; and determine the height data of the carriage based on the intersection points.

[0059] Optionally, the location of the car boundary includes the location of the outer boundary of the car and the location of the inner boundary of the car.

[0060] Optionally, the height data of the carriage includes: the external height value and the internal height value. The external height value is the distance between the top and bottom of the carriage outside the carriage; the internal height value is the distance between the top and bottom of the carriage inside the carriage.

[0061] It should be noted that the above embodiments of the carriage height measuring device are only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the carriage height measuring device and the carriage height measuring method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0062] This invention provides an electronic product comprising a memory and a processor. The processor is connected to the memory and configured to execute the aforementioned carriage height measurement method based on instructions stored in the memory. The number of processors can be one or more, and the processor can be single-core or multi-core. The memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and includes at least one memory chip. Examples of computer-readable media described below are possible examples of such memory.

[0063] This invention provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement the aforementioned carriage height measurement method. The computer-readable storage medium includes both permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to: phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transfer medium, which can be used to store information accessible by a computing device.

[0064] This invention provides a computer program product that, when run on a computer, causes the method described above to be executed by the computer.

[0065] This invention provides a sampling machine that includes the aforementioned vehicle height measuring device.

[0066] As is known from common technical knowledge, this invention can be implemented through other embodiments that do not depart from its spirit or essential characteristics. Therefore, the disclosed embodiments described above are merely illustrative in all respects and are not the only ones. All modifications within the scope of this invention or its equivalents are included in this invention.

Claims

1. A method for measuring the height of a carriage, characterized in that, The method includes: Acquire image data and distance data. The image data includes a side view of the carriage and a reference post. The reference post has a set of markers spaced apart on it. The markers are used to represent the reference height to determine the height information of the carriage. The distance data is the distance between the carriage and the reference post. The image data is processed based on the trained machine learning model to obtain recognition results, which include the boundary position of the carriage and the position of the mark. The height data of the carriage is obtained based on the recognition results and the distance data.

2. The method according to claim 1, characterized in that, Before processing the image data based on the trained machine learning model to obtain the recognition result, the process further includes: Construct an image dataset, which includes training image data with multiple annotations, the annotations including annotations for the carriage and the marker; The machine learning model is trained using the image dataset to obtain a trained machine learning model.

3. The method according to claim 1, characterized in that, The machine learning model is YOLOv11.

4. The method according to claim 2, characterized in that, Before training the machine learning model using the image dataset to obtain the trained machine learning model, the method further includes: The training image data in the image dataset is subjected to data augmentation processing, and the data augmentation methods include one or more of the following: mosaic, random occlusion, mirroring, grayscale, HSV color transformation, and contrast enhancement.

5. The method according to claim 1, characterized in that, The step of obtaining the height data of the carriage based on the recognition result and the distance data includes: Determine the contour lines based on the location of the marks; The intersection point of the contour line and the boundary of the carriage is determined based on the distance data; The height data of the carriage is determined based on the intersection point.

6. The method according to claim 1, characterized in that, The boundary positions of the carriage include the outer boundary position and the inner boundary position.

7. The method according to claim 1, characterized in that, The height data of the carriage includes: the external height value and the internal height value. The external height value is the distance between the top and bottom of the carriage outside the carriage; the internal height value is the distance between the top and bottom of the carriage inside the carriage.

8. A carriage height measuring device, characterized in that, The device includes: The data acquisition module is used to acquire image data and distance data. The image data includes a side view of the carriage and a reference post. A set of markers is set at intervals on the reference post. The markers are used to determine the height information of the carriage. The distance data is the distance between the carriage and the reference post. The recognition result acquisition module is used to process the carriage image data based on the trained machine learning model to obtain the recognition result, which includes the boundary position of the vehicle and the position of the marker; The height data acquisition module is used to obtain the height data of the carriage based on the recognition result.

9. An electronic product, characterized in that, The electronic product includes: a processor and a memory for storing executable instructions of the processor; The processor is configured to perform the carriage height measurement method according to any one of claims 1-7.

10. A computer program product, characterized in that, When the computer program product is run on a computer, the method as described in any one of claims 1-7 is executed by the computer.