Cargo density measuring method and system and electronic equipment

文档序号:1829651 发布日期:2021-11-12 浏览:23次 中文

阅读说明:本技术 货物密度测量方法、系统以及电子设备 (Cargo density measuring method and system and electronic equipment ) 是由 肖喜中 魏溪含 陈伟璇 李珂 于 2021-06-29 设计创作,主要内容包括:本发明公开了一种货物密度测量方法、系统以及电子设备。其中,该系统包括:控制器、称重平台和至少一个成像装置;称重平台,用于获取第一重量和第二重量,其中,第一重量为目标车辆装载目标货物的重量,第二重量为目标车辆卸载目标货物的重量;至少一个成像装置,用于获取目标车辆装载目标货物的第一图像和第二图像;控制器,用于基于第一重量、第二重量、第一图像和第二图像对目标货物进行密度测量。本发明解决了现有技术中的废钢料型密度测量方法存在取样不均匀,对废钢破碎料型进行密度测量的效率低下的技术问题。(The invention discloses a cargo density measuring method, a cargo density measuring system and electronic equipment. Wherein, this system includes: a controller, a weighing platform and at least one imaging device; the weighing platform is used for acquiring a first weight and a second weight, wherein the first weight is the weight of the target cargo loaded on the target vehicle, and the second weight is the weight of the target cargo unloaded by the target vehicle; at least one imaging device for acquiring a first image and a second image of a target vehicle carrying a target cargo; a controller for making a density measurement of the target cargo based on the first weight, the second weight, the first image, and the second image. The invention solves the technical problems that the density measurement method for the steel scrap profile in the prior art has uneven sampling and low density measurement efficiency for the steel scrap broken profile.)

1. A cargo density measurement system, comprising: a controller, a weighing platform and at least one imaging device;

the weighing platform is used for acquiring a first weight and a second weight, wherein the first weight is the weight of a target vehicle loaded with target goods, and the second weight is the weight of the target vehicle;

the at least one imaging device is used for acquiring a first image and a second image of the target cargo loaded on the target vehicle;

the controller is configured to perform a density measurement on the target cargo based on the first weight, the second weight, the first image, and the second image.

2. The cargo density measurement system of claim 1, wherein the at least one imaging device comprises: the device comprises a first imaging device and a second imaging device, wherein the first imaging device and the second imaging device have the same line of sight direction, and the first imaging device and the second imaging device have the same focal length.

3. The cargo density measurement system of claim 2, wherein the controller is configured to obtain a target cargo mask from the first image or the second image using a semantic segmentation network model, wherein the target cargo mask is configured to distinguish a first image region containing the target cargo from a second image region not containing the target cargo.

4. The cargo density measurement system of claim 3, wherein the controller is configured to obtain the disparity between the first image and the second image for the pixels in the first image region using stereo matching.

5. The cargo density measurement system of claim 4, wherein the controller is configured to divide the first image area into a plurality of grids; acquiring the cross-sectional area of the unit grid by using the depth, the first coordinate and the second coordinate of the unit grid in the grids, wherein the first coordinate and the second coordinate are vertex image coordinates of the unit grid; calculating a unit volume corresponding to the unit grid by using a first height, a second height, the depth and the cross-sectional area, wherein the first height is an installation height of the at least one imaging device, and the second height is a height above the ground of a hopper bottom surface of the target vehicle; determining a total volume corresponding to the plurality of grids from the unit volume; and calculating a density measurement of the target cargo using the first weight, the second weight, and the total volume.

6. The cargo density measurement system of claim 5, wherein the controller is configured to calculate the depth using a focal length of the at least one imaging device, a distance between the first imaging device and the second imaging device, and the parallax.

7. The cargo density measurement system according to claim 5, wherein the controller is configured to determine a first correspondence between the first coordinate and a third coordinate using the depth and an internal reference of the at least one imaging device, wherein the third coordinate is an imaging device coordinate to which the first coordinate corresponds; determining a second corresponding relation between the second coordinate and a fourth coordinate by using the depth and the internal reference of the at least one imaging device, wherein the fourth coordinate is an imaging device coordinate corresponding to the second coordinate; and calculating the cross-sectional area by using the depth, the first corresponding relation and the second corresponding relation.

8. The cargo density measurement system of claim 1, wherein the at least one imaging device is distributed above the weighing platform with a line of sight of the at least one imaging device perpendicular to the weighing platform.

9. A cargo density measurement method, comprising:

acquiring a first weight and a second weight by using a weighing platform, wherein the first weight is the weight of a target vehicle for loading target cargos, and the second weight is the weight of the target vehicle for unloading the target cargos;

acquiring a first image and a second image of the target vehicle loaded with the target cargo by using at least one imaging device;

making a density measurement of the target cargo based on the first weight, the second weight, the first image, and the second image.

10. The cargo density measurement method according to claim 9, wherein the at least one imaging device comprises: the device comprises a first imaging device and a second imaging device, wherein the first imaging device and the second imaging device have the same line of sight direction, and the first imaging device and the second imaging device have the same focal length.

11. The cargo density measurement method of claim 10, wherein performing the density measurement of the target cargo based on the first weight, the second weight, the first image, and the second image comprises:

acquiring a target cargo mask from the first image or the second image by utilizing a semantic segmentation network model, wherein the target cargo mask is used for distinguishing a first image area containing the target cargo from a second image area not containing the target cargo;

acquiring the parallax of the pixels in the first image region between the first image and the second image by using a stereo matching mode;

performing a density measurement of the target cargo based on the first weight, the second weight, the first image region, and the parallax.

12. The cargo density measurement method of claim 11, wherein performing density measurement on the target cargo based on the first weight, the second weight, the first image region, and the parallax comprises:

dividing the first image area into a plurality of meshes;

determining a depth of a unit cell of the plurality of cells using the disparity;

acquiring the cross-sectional area of the unit mesh by using the depth, a first coordinate and a second coordinate, wherein the first coordinate and the second coordinate are vertex image coordinates of the unit mesh;

calculating a unit volume corresponding to the unit grid by using a first height, a second height, the depth and the cross-sectional area, wherein the first height is an installation height of the at least one imaging device, and the second height is a height above the ground of a hopper bottom surface of the target vehicle;

determining a total volume corresponding to the plurality of grids from the unit volume;

and calculating the density measurement result of the target cargo by using the first weight, the second weight and the total volume.

13. The cargo density measurement method according to claim 12, wherein obtaining the cross-sectional area of the unit cell using the depth, the first coordinate, and the second coordinate comprises:

determining a first corresponding relation between the first coordinate and a third coordinate by using the depth and the internal reference of the at least one imaging device, wherein the third coordinate is an imaging device coordinate corresponding to the first coordinate;

determining a second corresponding relation between the second coordinate and a fourth coordinate by using the depth and the internal reference of the at least one imaging device, wherein the fourth coordinate is an imaging device coordinate corresponding to the second coordinate;

and calculating the cross-sectional area by using the depth, the first corresponding relation and the second corresponding relation.

14. An electronic device, comprising:

a processor; and

a memory coupled to the processor for providing instructions to the processor for processing the following processing steps:

controlling a weighing platform to obtain a first weight and a second weight, wherein the first weight is the weight of a target vehicle for loading target cargos, and the second weight is the weight of the target vehicle for unloading the target cargos;

acquiring a first image and a second image of the target vehicle loaded with the target cargo by using at least one imaging device;

making, with a controller, a density measurement of the target cargo based on the first weight, the second weight, the first image, and the second image.

Technical Field

The invention relates to the technical field of density measurement, in particular to a cargo density measurement method and system and electronic equipment.

Background

In the prior art, the scrap can be classified into a plurality of grades, such as 15mm scrap, 10mm scrap, 8mm scrap, 6mm scrap, 4mm scrap, and even thinner and thinner grades, for example, scrap broken grade, according to the scrap grade and the thickness of the scrap section.

For the steel scrap transported by a truck, the steel scrap is generally classified according to the density of the steel scrap model, and the problem of density measurement of goods transported by the truck relates to two variables of mass and volume.

In view of the above problems, no effective solution has been proposed.

Disclosure of Invention

The embodiment of the invention provides a cargo density measuring method, a cargo density measuring system and electronic equipment, and at least solves the technical problems that in the prior art, a density measuring method for a scrap profile is uneven in sampling and low in density measuring efficiency of a scrap broken profile.

According to an aspect of an embodiment of the present invention, there is provided a cargo density measurement system including: a controller, a weighing platform and at least one imaging device; the weighing platform is used for acquiring a first weight and a second weight, wherein the first weight is the weight of a target vehicle for loading target cargos, and the second weight is the weight of the target vehicle for unloading the target cargos; the at least one imaging device is used for acquiring a first image and a second image of the target cargo loaded on the target vehicle; the controller is configured to measure a density of the target cargo based on the first weight, the second weight, the first image, and the second image.

According to another aspect of the embodiments of the present invention, there is also provided a cargo density measuring method, including: acquiring a first weight and a second weight by using a weighing platform, wherein the first weight is the weight of a target vehicle for loading target cargos, and the second weight is the weight of the target vehicle for unloading the target cargos; acquiring a first image and a second image of the target cargo loaded on the target vehicle by using at least one imaging device; density measurement of the target cargo is performed based on the first weight, the second weight, the first image, and the second image.

According to another aspect of the embodiments of the present invention, there is also provided a cargo density measuring apparatus including: the weighing module is used for acquiring a first weight and a second weight by using a weighing platform, wherein the first weight is the weight of a target cargo loaded on a target vehicle, and the second weight is the weight of the target cargo unloaded by the target vehicle; the acquisition module is used for acquiring a first image and a second image of the target cargo loaded on the target vehicle by utilizing at least one imaging device; a measuring module configured to measure a density of the target cargo based on the first weight, the second weight, the first image, and the second image.

According to another aspect of the embodiments of the present invention, there is also provided a non-volatile storage medium, where the non-volatile storage medium includes a stored program, and when the program runs, the method for measuring the cargo density is controlled in any one of the devices in which the non-volatile storage medium is located.

According to another aspect of the embodiments of the present invention, there is also provided a cargo density measurement system including: a processor; and a memory, connected to the processor, for providing instructions to the processor for processing the following processing steps: controlling a weighing platform to obtain a first weight and a second weight, wherein the first weight is the weight of a target vehicle for loading target cargos, and the second weight is the weight of the target vehicle for unloading the target cargos; acquiring a first image and a second image of the target cargo loaded on the target vehicle by using at least one imaging device; using a controller to measure a density of the target cargo based on the first weight, the second weight, the first image, and the second image.

In an embodiment of the present invention, a cargo density measurement scheme is provided, where taking the cargo density measurement system as an example, the cargo density measurement system includes: a controller, a weighing platform and at least one imaging device; the weighing platform is used for acquiring a first weight and a second weight, wherein the first weight is the weight of a target vehicle for loading target cargos, and the second weight is the weight of the target vehicle for unloading the target cargos; the at least one imaging device is used for acquiring a first image and a second image of the target cargo loaded on the target vehicle; the controller is configured to measure a density of the target cargo based on the first weight, the second weight, the first image, and the second image.

It is easy to note that in the embodiment of the present application, at least one imaging device is distributed above the weighing platform, and the line of sight of the at least one imaging device is perpendicular to the weighing platform; acquiring the weight of a target cargo loaded by a target vehicle and the weight of the target cargo unloaded by the target vehicle by using a weighing platform; acquiring a first image and a second image of the target cargo loaded on the target vehicle by adopting at least one imaging device; and measuring the density of the target cargo based on the first weight, the second weight, the first image and the second image to obtain a density measurement result of the target cargo.

Therefore, the embodiment of the invention achieves the purposes of carrying out non-invasive density measurement on the scrap steel shapes at low cost and high efficiency and avoiding the limitation and locality of manual sampling, thereby realizing the technical effect of accurately judging the classification grade of the scrap steel based on the density measurement result of the scrap steel shapes, and further solving the technical problems of non-uniform sampling and low density measurement efficiency on the scrap steel broken shapes in the density measurement method of the scrap steel shapes in the prior art.

Drawings

The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:

FIG. 1 is a schematic diagram of a cargo density measurement system according to an embodiment of the present invention;

FIG. 2 is a schematic diagram of an alternative dual-camera based crushed material density measurement apparatus in accordance with an embodiment of the present invention;

FIG. 3 is a schematic top plan view of an alternative truck according to an embodiment of the present invention;

FIG. 4 is a schematic structural diagram of an alternative semantic segmentation network according to an embodiment of the present invention;

FIG. 5 is a schematic illustration of an alternative mask for a hopper cargo area in accordance with an embodiment of the present invention;

fig. 6 is a block diagram of a hardware structure of a computer terminal (or mobile device) for implementing a cargo density measuring method according to an embodiment of the present invention;

FIG. 7 is a flow chart of an alternative cargo density measurement method according to an embodiment of the present invention;

FIG. 8 is a schematic view of an alternative cargo density measuring device according to an embodiment of the present invention;

fig. 9 is a block diagram of an alternative electronic device according to an embodiment of the invention.

Detailed Description

In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.

First, some terms or terms appearing in the description of the embodiments of the present application are applicable to the following explanations:

depth: the vertical distance between an imaged object and the image plane of the camera is defined;

stereo matching: the method refers to a process of giving a left image and a right image and finding out the difference of corresponding coordinate positions of the same object on the two images.

Example 1

According to an embodiment of the present invention, an embodiment of a cargo density measurement system is provided, and fig. 1 is a schematic structural diagram of a cargo density measurement system according to an embodiment of the present invention, as shown in fig. 1, the cargo density measurement system includes: a weigh platform 20, at least one imaging device 22, and a controller 24, wherein:

the at least one imaging device 22 is distributed above the weighing platform and the line of sight of the at least one imaging device 22 is perpendicular to the weighing platform 20; the weighing platform 20 is configured to obtain a first weight and a second weight, where the first weight is a weight of a target vehicle loaded with a target cargo, and the second weight is a weight of the target vehicle unloaded with the target cargo; the at least one imaging device 22 is configured to obtain a first image and a second image of the target cargo loaded on the target vehicle; the controller 24 is configured to measure the density of the target cargo based on the first weight, the second weight, the first image, and the second image.

It is easy to note that in the embodiment of the present application, at least one imaging device is distributed above the weighing platform, and the line of sight of the at least one imaging device is perpendicular to the weighing platform; acquiring the weight of a target cargo loaded by a target vehicle and the weight of the target cargo unloaded by the target vehicle by using a weighing platform; acquiring a first image and a second image of the target cargo loaded on the target vehicle by adopting at least one imaging device; and measuring the density of the target cargo based on the first weight, the second weight, the first image and the second image to obtain a density measurement result of the target cargo.

Therefore, the embodiment of the invention achieves the purposes of carrying out non-invasive density measurement on the scrap steel shapes at low cost and high efficiency and avoiding the limitation and locality of manual sampling, thereby realizing the technical effect of accurately judging the classification grade of the scrap steel based on the density measurement result of the scrap steel shapes, and further solving the technical problems of non-uniform sampling and low density measurement efficiency on the scrap steel broken shapes in the density measurement method of the scrap steel shapes in the prior art.

It should be noted that the embodiment of the present application can be applied to, but not limited to, a density measurement scenario of any type of goods, for example, a scenario of determining a classification level of scrap steel, a logistics or express delivery scenario of a centrally transported goods, a building material procurement scenario, a bulk commodity procurement scenario, a bulk crop procurement scenario, and the like.

Alternatively, as an alternative cargo density measuring system shown in fig. 2, the target vehicle may be a truck, and may also be other transportation vehicles capable of loading cargo, such as a concrete mixer truck, a trailer, etc. As shown in fig. 2, an upright is disposed above the weighing platform, a cross bar is fixed on the top of the upright, and the at least one imaging device 22 may be disposed on the cross bar, for example, the imaging device 22 may be a general camera, a ToF depth camera or a laser scanner.

As an alternative embodiment, a cargo density measuring system as shown in fig. 2 may be installed at the entrance/exit of a truck loaded with broken scrap steel, in fig. 2, the at least one imaging device 22 is distributed above the weighing platform, and the line of sight of the at least one imaging device 22 is perpendicular to the weighing platform 20; the at least one imaging device 22 is mounted on a cross bar 23 having a height H such that the line of sight of the at least one imaging device 22 is perpendicular to the weighing platform 20; the weighing platform 20 is provided with a weighing plane 21 for measuring the weight of the truck loaded or unloaded with the target cargo, and when the truck is driven into the weighing platform and the camera is close to the central position of the truck, the at least one imaging device 22 captures a first image ILAnd a second image IR. The controller 24 may be implemented in a weighing terminal, for example, a smart phone, a PC terminal, or other handheld terminal, for performing density measurement on the target cargo based on the first weight, the second weight, the first image, and the second image.

Optionally, in this embodiment of the present application, the first weight and the second weight obtained by the weighing platform are the first weight M1 obtained when the truck drives into the weighing platform and the second weight M2 obtained when the truck drives out of the weighing platform after unloading; after the weighing platform acquires the first weight and the second weight, the controller records the first weight and the second weight acquired by the weighing platform; in the process, the controller can also record the height h from the bottom surface of the truck hopper to the ground; optionally, the at least one imaging device is perpendicular to the weighing platform, the two cameras are calibrated, the directions of sight are the same, the distance (baseline) between the two cameras is b, and when the at least one imaging device approaches the center of the truck hopper, the truck hopper is captured to obtain the first image and the second image.

Optionally, in this embodiment of the application, for example, the weighing result, that is, the first weight and the second weight, of the truck loaded with the scrap steel crushed material entering and exiting the weighing platform may be recorded, and the first image and the second image of the target cargo loaded on the target vehicle may be obtained, and the controller may be further configured to perform density measurement on the target cargo by using the first weight, the second weight, the first image and the second image, so as to obtain a density measurement result.

In an alternative embodiment, as shown in FIG. 2, the at least one imaging device 22 comprises: a first imaging device 22a and a second imaging device 22b, wherein the first imaging device 22a and the second imaging device 22b have the same line of sight direction, and the first imaging device 22a and the second imaging device 22b have the same focal length.

As an alternative embodiment, as also shown in FIG. 2, the at least one imaging device 22 is distributed above the weigh platform 20 with the at least one imaging device 22 having a line of sight that is perpendicular to the weigh platform 20.

Optionally, the visual line direction of the at least one imaging device is perpendicular to the weighing plane on the weighing platform, and since the at least one imaging device is uniformly corrected, the focal lengths are f, the visual line directions are the same, and the distance (baseline) between the at least one imaging device and the weighing platform is b; it should be noted that the above values of height, focal length, baseline, etc. can be set and changed according to actual situations. In the embodiment of the application, the first imaging device and the second imaging device are adopted to perform single image capture on the target cargo, so that the sampling is uniform, the efficiency is high, no moving part exists, and the implementation mode is more reliable.

In an optional embodiment, the controller is configured to obtain a target cargo mask from the first image or the second image by using a semantic segmentation network model, where the target cargo mask is used to distinguish a first image area containing the target cargo from a second image area not containing the target cargo.

As shown in fig. 3, fig. 3 is a top view of the hopper of a crushed material truck, in which the truck hopper 30 and crushed material cargo 30 can be seen. Optionally, as shown in fig. 4, a full volume network model FCN (semantic volume network model) is used to obtain a fractured material Mask, where the fractured material Mask includes a fractured material region value of 1 and a non-fractured material region value of 0, that is, a first image region value including the target cargo is 1 and a second image region value not including the target cargo is 0.

In an optional embodiment, the controller is configured to acquire a parallax between the first image and the second image of the pixels in the first image region by using a stereo matching method.

Optionally, in this embodiment of the application, the first images I acquired at the same time according to the at least one imaging device are acquiredLAnd the second image IRBy using a SGM (semi-global matching) algorithm in stereo matching, a line-of-sight difference (i.e., a parallax) between any point in the first image and a corresponding position of the point in the second image can be obtained. And obtaining the parallax d of any pixel with the value of 1 in the Mask area according to the Mask.

In an alternative embodiment, the controller is configured to divide the first image area into a plurality of grids; acquiring the cross-sectional area of the unit mesh by using the depth, a first coordinate and a second coordinate of a unit mesh in the plurality of meshes, wherein the first coordinate and the second coordinate are vertex image coordinates of the unit mesh; calculating a unit volume corresponding to the unit grid using a first height, which is an installation height of the at least one imaging device, a second height, which is a height above a ground of a bottom surface of a hopper of the target vehicle, the depth, and the cross-sectional area; determining a total volume corresponding to the plurality of grids according to the unit volume; and calculating a density measurement result of the target cargo by using the first weight, the second weight and the total volume.

In the embodiment of the present application, the controller divides the first image area into fine square meshes, and as shown in fig. 7, the real camera coordinates corresponding to the two vertices (Xi, Yi) and (Xj, Yj) are (Xi, Yi) and (Xj, Yj), where (Xi, Yi) and (Xj, Yj) are two vertex image coordinates of one of the meshes.

In an alternative embodiment, the controller is configured to calculate the depth by using a focal length of the at least one imaging device, a distance between the first imaging device and the second imaging device, and the parallax.

In the embodiment of the present application, when the mesh division is sufficiently small, it may be considered that the cargo corresponding to the mesh region is a plane, that is, the depth from the plane of the camera is equal, and the true depth is Z.

In an alternative embodiment, the controller is configured to determine a first corresponding relationship between the first coordinate and a third coordinate by using the depth and the internal reference of the at least one imaging device, where the third coordinate is an imaging device coordinate corresponding to the first coordinate; determining a second corresponding relation between the second coordinate and a fourth coordinate by using the depth and the internal reference of the at least one imaging device, wherein the fourth coordinate is an imaging device coordinate corresponding to the second coordinate; and calculating the cross-sectional area by using the depth, the first corresponding relation and the second corresponding relation.

Optionally, the controller may further calculate a total vehicle weight accumulated difference of the target vehicle by using the first weight and the second weight; and calculating to obtain the density measurement result by using the weight accumulation difference of the whole vehicle and the total volume.

In an embodiment of the present application, the depth is Z, and the internal parameter of the at least one imaging device is K; the third coordinate is an imaging device coordinate corresponding to the first coordinate, and the fourth coordinate is an imaging device coordinate corresponding to the second coordinate; then it is possible to obtain:

Z=b·f/d (1)

[Xi,Yi,Z]T=Z·K-1·[xi,yi,1]T (2)

[Xj,Yj,Z]T=Z·K-1·[xj,yj,1]T (3)

the following is derived from the above equations (1), (2) and (3):

[△X,△Y,0]T=Z·K-1·[△x,△y,0]T (4)

S=|△X·△Y| (5);

s in the formula (5) is the real cross-sectional area corresponding to the fine grid in FIG. 5, and the volume V of the crushed material corresponding to the fine grid can be known according to the height h from the bottom surface of the hopper of the corresponding vehicle type to the groundiComprises the following steps:

Vi=S·(H-h-Z) (6);

by traversing all fine grids in a Mask region, the corresponding volumes of all fine grids are obtained according to the same calculation process, and then the total volume V is obtained:

V=ΣVi (7);

calculating a total vehicle weight difference Δ M of the target vehicle from the first weight M1 and the second weight M2 entering and exiting twice, wherein the total vehicle weight difference Δ M is | M1-M2|, and the density measurement result is calculated by using the total vehicle weight difference and the total volume:

ρ=△M/V (8)。

in the embodiment of the application, based on double-camera imaging, by matching with an image segmentation algorithm of depth learning/background subtraction, the region where the target goods are located and the sight difference of the target goods on two camera image planes can be automatically determined under the condition of single image capture, so that the depth of the obtained image region can be obtained, and then the product of the depth and the number of pixels in the meshed small grids is used for accumulation, so that the quality of the goods which are dimensionless and have the characteristic volume attribute can be obtained, and the density measurement result can be calculated according to the camera internal parameters and the obtained quality of the goods.

Through the above description of the embodiments, those skilled in the art can clearly understand that the system according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.

Example 2

There is also provided, in accordance with an embodiment of the present invention, a method embodiment for cargo density measurement, including the steps illustrated in the flowchart of the figure as being executable by a computer system, such as a set of computer executable instructions, and wherein, although a logical ordering is illustrated in the flowchart, in some cases, the steps illustrated or described are executed in an order different than that illustrated or described herein.

The method provided by embodiment 2 of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Fig. 6 shows a hardware configuration block diagram of a computer terminal (or mobile device) for implementing the cargo density measurement method. As shown in fig. 6, computer terminal 60 (or mobile device 60) may include one or more (shown as 602a, 602b, … …, 602 n) processors 602 (processor 602 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA, etc.), memory 604 for storing data, and a transmission module 606 for communication functions. Besides, the method can also comprise the following steps: a display, an input/output interface (I/O interface), a Universal Serial BUS (USB) port (which may be included as one of the ports of the BUS), a network interface, a power source, and/or a camera. It will be understood by those skilled in the art that the structure shown in fig. 6 is only an illustration and is not intended to limit the structure of the electronic device. For example, the computer terminal 60 may also include more or fewer components than shown in FIG. 6, or have a different configuration than shown in FIG. 6.

It should be noted that the one or more processors 602 and/or other data processing circuitry described above may be referred to generally herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part in software, hardware, firmware, or any combination thereof. Further, the data processing circuit may be a single stand-alone processing module, or incorporated in whole or in part into any of the other elements in the computer terminal 60 (or mobile device). As referred to in the embodiments of the application, the data processing circuit acts as a processor control (e.g. selection of a variable resistance termination path connected to the interface).

The memory 604 may be used to store software programs and modules of application software, such as program instructions/data storage devices corresponding to a cargo density measurement method according to an embodiment of the present invention, and the processor 602 executes various functional applications and data processing by executing the software programs and modules stored in the memory 604, so as to implement the cargo density measurement method described above. The memory 604 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 604 may further include memory located remotely from the processor 602, which may be connected to the computer terminal 60 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.

The transmission means 606 is used for receiving or sending data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal 60. In one example, the transmission device 606 includes a Network adapter (NIC) that can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 606 can be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.

The display may be, for example, a touch screen type Liquid Crystal Display (LCD) that may enable a user to interact with a user interface of the computer terminal 60 (or mobile device).

According to an embodiment of the present invention, there is also provided a cargo density measurement method that can be implemented in the cargo density measurement system provided in embodiment 1 above, and fig. 7 is a flowchart of a cargo density measurement method according to the present invention, as shown in fig. 7, the method including the steps of:

step S802, a weighing platform is used for obtaining a first weight and a second weight, wherein the first weight is the weight of a target vehicle for loading target cargos, and the second weight is the weight of the target vehicle for unloading the target cargos;

step S804, acquiring a first image and a second image of the target cargo loaded on the target vehicle by using at least one imaging device;

step S806 of measuring a density of the target cargo based on the first weight, the second weight, the first image, and the second image.

It should be noted that the embodiment of the present application can be applied to, but not limited to, a density measurement scenario of any type of goods, for example, a scenario of determining a classification level of scrap steel, a logistics or express delivery scenario of a centrally transported goods, a building material procurement scenario, a bulk commodity procurement scenario, a bulk crop procurement scenario, and the like.

Alternatively, as an alternative cargo density measuring system shown in fig. 2, the target vehicle may be a truck, and may also be other transportation vehicles capable of loading cargo, such as a concrete mixer truck, a trailer, etc. As shown in fig. 2, an upright is disposed above the weighing platform, a cross bar is fixed on the top of the upright, and the at least one imaging device 22 may be disposed on the cross bar, for example, the imaging device 22 may be a general camera, a ToF depth camera or a laser scanner.

As an alternative embodiment, a cargo density measuring system as shown in fig. 2 may be installed at the entrance/exit of a truck loaded with broken scrap steel, in fig. 2, the at least one imaging device 22 is distributed above the weighing platform, and the line of sight of the at least one imaging device 22 is perpendicular to the weighing platform 20; as described aboveAt least one imaging device 22 is mounted on a cross bar 23 having a height H such that the line of sight of said at least one imaging device 22 is perpendicular to said weighing platform 20; the weighing platform 20 is provided with a weighing plane 21 for measuring the weight of the truck loaded or unloaded with the target cargo, and when the truck is driven into the weighing platform and the camera is close to the central position of the truck, the at least one imaging device 22 captures a first image ILAnd a second image IR. The controller 24 may be implemented in a weighing terminal, for example, a smart phone, a PC terminal, or other handheld terminal, for performing density measurement on the target cargo based on the first weight, the second weight, the first image, and the second image.

Optionally, in this embodiment of the present application, the first weight and the second weight obtained by the weighing platform are the first weight M1 obtained when the truck drives into the weighing platform and the second weight M2 obtained when the truck drives out of the weighing platform after unloading; after the weighing platform acquires the first weight and the second weight, the controller records the first weight and the second weight acquired by the weighing platform; in the process, the controller can also record the height h from the bottom surface of the truck hopper to the ground; optionally, the at least one imaging device is perpendicular to the weighing platform, the two cameras are calibrated, the directions of sight are the same, the distance (baseline) between the two cameras is b, and when the at least one imaging device approaches the center of the truck hopper, the truck hopper is captured to obtain the first image and the second image.

Optionally, in this embodiment of the application, for example, the weighing result, that is, the first weight and the second weight, of the truck loaded with the scrap steel crushed material entering and exiting the weighing platform may be recorded, and the first image and the second image of the target cargo loaded on the target vehicle may be obtained, and the controller may be further configured to perform density measurement on the target cargo by using the first weight, the second weight, the first image and the second image, so as to obtain a density measurement result.

In an alternative embodiment, as shown in FIG. 2, the at least one imaging device 22 comprises: a first imaging device 22a and a second imaging device 22b, wherein the first imaging device 22a and the second imaging device 22b have the same line of sight direction, and the first imaging device 22a and the second imaging device 22b have the same focal length.

As an alternative embodiment, as also shown in FIG. 2, the at least one imaging device 22 is distributed above the weigh platform 20 with the at least one imaging device 22 having a line of sight that is perpendicular to the weigh platform 20.

Optionally, the visual line direction of the at least one imaging device is perpendicular to the weighing plane on the weighing platform, and since the at least one imaging device is uniformly corrected, the focal lengths are f, the visual line directions are the same, and the distance (baseline) between the at least one imaging device and the weighing platform is b; it should be noted that the above values of height, focal length, baseline, etc. can be set and changed according to actual situations. In the embodiment of the application, the first imaging device and the second imaging device are adopted to perform single image capture on the target cargo, so that the sampling is uniform, the efficiency is high, no moving part exists, and the implementation mode is more reliable.

In an alternative embodiment, the performing the density measurement on the target cargo based on the first weight, the second weight, the first image and the second image includes:

step S902, obtaining a target goods mask from the first image or the second image by using a semantic segmentation network model;

step S904, obtaining a parallax between the first image and the second image of the pixels in the first image region by using a stereo matching method;

step S906 is performed to measure a density of the target cargo based on the first weight, the second weight, the first image area, and the parallax.

Optionally, the target cargo mask is used for distinguishing a first image area containing the target cargo from a second image area not containing the target cargo.

As shown in fig. 3, fig. 3 is a top view of the hopper of a crushed material truck, in which the truck hopper 30 and crushed material cargo 30 can be seen. Optionally, as shown in fig. 4, a full volume network model FCN (semantic volume network model) is used to obtain a fractured material Mask, where the fractured material Mask includes a fractured material region value of 1 and a non-fractured material region value of 0, that is, a first image region value including the target cargo is 1 and a second image region value not including the target cargo is 0.

Optionally, in this embodiment of the application, the first images I acquired at the same time according to the at least one imaging device are acquiredLAnd the second image IRBy using a SGM (semi-global matching) algorithm in stereo matching, a line-of-sight difference (i.e., a parallax) between any point in the first image and a corresponding position of the point in the second image can be obtained. And obtaining the parallax d of any pixel with the value of 1 in the Mask area according to the Mask.

In an alternative embodiment, the measuring the density of the target cargo based on the first weight, the second weight, the first image area, and the parallax includes:

step S1002, dividing the first image area into a plurality of grids;

step S1004 of determining a depth of a unit cell among the plurality of cells using the disparity;

step S1006, obtaining the cross-sectional area of the unit mesh by using the depth, the first coordinate and the second coordinate, wherein the first coordinate and the second coordinate are vertex image coordinates of the unit mesh;

step S1008, calculating a unit volume corresponding to the unit grid by using the first height, the second height, the depth and the cross-sectional area;

step S1010, determining the total volume corresponding to the grids according to the unit volume;

step S1012, calculating a density measurement result of the target cargo by using the first weight, the second weight and the total volume.

In the embodiment of the present application, the controller is adopted to divide the first image area into fine square grids, as shown in fig. 7, the real camera coordinates corresponding to the two vertices (Xi, Yi) and (Xj, Yj) are (Xi, Yi) and (Xj, Yj), where (Xi, Yi) and (Xj, Yj) are two vertex image coordinates of one of the grids.

Optionally, the first coordinate and the second coordinate are vertex image coordinates of the unit mesh; acquiring the cross-sectional area of the unit grid by using the depth, the first coordinate and the second coordinate; the first height is an installation height of the at least one imaging device, and the second height is a ground clearance of the bottom surface of the hopper of the target vehicle, that is, the ground clearance of the bottom surface of the hopper of the truck can be recorded as the second height in the weighing process of the weighing platform, and the unit volume corresponding to the unit grid can be calculated by using the first height, the second height, the depth and the cross-sectional area. In this embodiment of the application, the real cross section of the fine mesh and the height from the ground of the bottom surface of the hopper corresponding to the vehicle type are used to obtain the corresponding volume of all the fine meshes, and further obtain the total volume, and the density measurement result of the target cargo can be obtained by calculating the first weight, the second weight and the total volume.

In an alternative embodiment, determining the depth of a unit cell of the plurality of cells using the disparity includes:

step S1102 is to calculate the depth by using the focal length of the at least one imaging device, the distance between the first imaging device and the second imaging device, and the parallax.

In an alternative embodiment, the controller may be further configured to calculate the depth by using a focal length of the at least one imaging device, a distance between the first imaging device and the second imaging device, and the parallax. In the embodiment of the present application, when the mesh division is sufficiently small, the cargo corresponding to the mesh region may be considered as a plane, that is, the depth from the plane of the camera is equal, and the true depth is Z.

In an alternative embodiment, the obtaining the cross-sectional area of the unit cell using the depth, the first coordinate, and the second coordinate includes:

step S1202, determining a first corresponding relationship between the first coordinate and a third coordinate by using the depth and the internal reference of the at least one imaging device;

step S1204, determining a second corresponding relationship between the second coordinate and a fourth coordinate by using the depth and the internal reference of the at least one imaging device;

in step S1206, the cross-sectional area is calculated by using the depth, the first corresponding relationship, and the second corresponding relationship.

Optionally, the third coordinate is an imaging device coordinate corresponding to the first coordinate; the fourth coordinate is an imaging device coordinate corresponding to the second coordinate.

In an alternative embodiment, the controller may determine a first corresponding relationship between the first coordinate and a third coordinate using the depth and the internal reference of the at least one imaging device, determine a second corresponding relationship between the second coordinate and a fourth coordinate using the depth and the internal reference of the at least one imaging device, and calculate the cross-sectional area using the depth, the first corresponding relationship, and the second corresponding relationship.

In an embodiment of the present application, the depth is Z, and the internal parameter of the at least one imaging device is K; the third coordinate is an imaging device coordinate corresponding to the first coordinate, and the fourth coordinate is an imaging device coordinate corresponding to the second coordinate; then it is possible to obtain:

Z=b·f/d (1)

[Xi,Yi,Z]T=Z·K-1·[xi,yi,1]T (2)

[Xj,Yj,Z]T=Z·K-1·[xj,yj,1]T (3)

the following is derived from the above equations (1), (2) and (3):

[△X,△Y,0]T=Z·K-1·[△x,△y,0]T (4)

S=|△X·△Y| (5)

s in the above formula (5) is the real cross-sectional area corresponding to the fine mesh in fig. 5.

In an alternative embodiment, calculating the density measurement using the first weight, the second weight, and the total volume comprises:

step S1302, calculating a total vehicle weight accumulated difference of the target vehicle by using the first weight and the second weight;

step S1304, calculating the density measurement result using the vehicle weight accumulation difference and the total volume.

In an embodiment of the present application, a vehicle weight integrated difference Δ M ═ M1-M2| of the target vehicle is calculated from the first weight M1 and the second weight M2 which have entered and exited twice, and the density measurement result is calculated using the vehicle weight integrated difference and the total volume.

According to the height h from the bottom surface of the car hopper of the corresponding car type to the ground and the real cross-sectional area S corresponding to the fine grid, the volume of the crushed material corresponding to the fine grid is as follows:

Vi=S·(H-h-Z) (6);

by traversing all the fine grids in the Mask region, the corresponding volumes of all the fine grids are obtained according to the same calculation process, and then the total volume is obtained:

V=ΣVi (7);

calculating a total vehicle weight difference Δ M of the target vehicle from the first weight M1 and the second weight M2 entering and exiting twice, wherein the total vehicle weight difference Δ M is | M1-M2|, and the density measurement result is calculated by using the total vehicle weight difference and the total volume:

ρ=△M/V (8)。

it should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.

Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.

Example 3

According to an embodiment of the present invention, there is further provided an embodiment of an apparatus for implementing the cargo density measurement method, and fig. 8 is a schematic structural diagram of an apparatus for measuring cargo density according to an embodiment of the present invention, as shown in fig. 8, the apparatus includes: a weighing module 80, an acquisition module 82, and a measurement module 84, wherein:

a weighing module 80, configured to obtain a first weight and a second weight by using a weighing platform, where the first weight is a weight of a target vehicle loaded with a target cargo, and the second weight is a weight of the target vehicle unloaded with the target cargo; an acquiring module 82, configured to acquire a first image and a second image of the target cargo loaded on the target vehicle by using at least one imaging device; a measuring module 84 configured to measure a density of the target cargo based on the first weight, the second weight, the first image, and the second image.

It is easy to note that in the embodiment of the present application, at least one imaging device is distributed above the weighing platform, and the line of sight of the at least one imaging device is perpendicular to the weighing platform; acquiring the weight of a target cargo loaded by a target vehicle and the weight of the target cargo unloaded by the target vehicle by using a weighing platform; acquiring a first image and a second image of the target cargo loaded on the target vehicle by adopting at least one imaging device; and measuring the density of the target cargo based on the first weight, the second weight, the first image and the second image to obtain a density measurement result of the target cargo.

Therefore, the embodiment of the invention achieves the purposes of carrying out non-invasive density measurement on the scrap steel shapes at low cost and high efficiency and avoiding the limitation and locality of manual sampling, thereby realizing the technical effect of accurately judging the classification grade of the scrap steel based on the density measurement result of the scrap steel shapes, and further solving the technical problems of non-uniform sampling and low density measurement efficiency on the scrap steel broken shapes in the density measurement method of the scrap steel shapes in the prior art.

It should be noted here that the weighing module 80, the obtaining module 82 and the measuring module 84 correspond to steps S802 to S806 in embodiment 2, and the three modules are the same as the corresponding steps in the implementation example and the application scenario, but are not limited to the disclosure in embodiment 1. It should be noted that the above modules may be operated in the computer terminal 70 provided in embodiment 2 as a part of the apparatus.

It should be noted that, for the preferred implementation of this embodiment, reference may be made to the relevant description in method embodiment 1, and details are not described here again.

Example 4

According to the embodiment of the application, the embodiment of the computer terminal is also provided, and the computer terminal can be any one computer terminal device in a computer terminal group. Optionally, in the embodiment of the present invention, the computer terminal may also be replaced with a terminal device such as a mobile terminal.

Optionally, in the embodiment of the present invention, the computer terminal may be located in at least one network device of a plurality of network devices of a computer network.

In an embodiment of the present invention, the computer terminal may execute program codes of the following steps in the cargo density measuring method: acquiring a first weight and a second weight by using a weighing platform, wherein the first weight is the weight of a target vehicle for loading target cargos, and the second weight is the weight of the target vehicle for unloading the target cargos; acquiring a first image and a second image of the target cargo loaded on the target vehicle by using at least one imaging device; density measurement of the target cargo is performed based on the first weight, the second weight, the first image, and the second image.

Optionally, fig. 9 is a block diagram of an electronic device according to an embodiment of the present application, and as shown in fig. 9, the electronic device may include: one or more processors 902 (only one of which is shown in the figure), a memory 904, and programs stored on the memory and executable on the processor, and may further include a peripheral interface 906, where the memory 904 is connected to the processor 902 and is used for providing the processor with instructions for processing the following processing steps: acquiring a first weight and a second weight by using a weighing platform, wherein the first weight is the weight of a target vehicle for loading target cargos, and the second weight is the weight of the target vehicle for unloading the target cargos; acquiring a first image and a second image of the target cargo loaded on the target vehicle by using at least one imaging device; density measurement of the target cargo is performed based on the first weight, the second weight, the first image, and the second image.

The memory may be configured to store software programs and modules, such as program instructions/modules corresponding to the cargo density measurement method and apparatus in the embodiments of the present invention, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory, so as to implement the cargo density measurement method. The memory may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include memory located remotely from the processor, and these remote memories may be connected to the computer terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.

The processor can call the information and application program stored in the memory through the transmission device to execute the following steps: acquiring a first weight and a second weight by using a weighing platform, wherein the first weight is the weight of a target vehicle for loading target cargos, and the second weight is the weight of the target vehicle for unloading the target cargos; acquiring a first image and a second image of the target cargo loaded on the target vehicle by using at least one imaging device; density measurement of the target cargo is performed based on the first weight, the second weight, the first image, and the second image.

Optionally, the processor may further execute the program code of the following steps: acquiring a target cargo mask from the first image or the second image by using a semantic segmentation network model, wherein the target cargo mask is used for distinguishing a first image area containing the target cargo from a second image area not containing the target cargo; acquiring the parallax of the pixels in the first image area between the first image and the second image by using a stereo matching mode; and measuring a density of the target cargo based on the first weight, the second weight, the first image area, and the parallax.

Optionally, the processor may further execute the program code of the following steps: dividing the first image area into a plurality of grids; determining a depth of a unit cell among the plurality of cells using the disparity; acquiring the cross-sectional area of the unit mesh by using the depth, a first coordinate and a second coordinate, wherein the first coordinate and the second coordinate are vertex image coordinates of the unit mesh; calculating a unit volume corresponding to the unit grid using a first height, which is an installation height of the at least one imaging device, a second height, which is a height above a ground of a bottom surface of a hopper of the target vehicle, the depth, and the cross-sectional area; determining a total volume corresponding to the plurality of grids according to the unit volume; and calculating the density measurement result of the target cargo by using the first weight, the second weight and the total volume.

Optionally, the processor may further execute the program code of the following steps: and calculating the depth by using the focal length of the at least one imaging device, the distance between the first imaging device and the second imaging device and the parallax.

Optionally, the processor may further execute the program code of the following steps: determining a first corresponding relation between the first coordinate and a third coordinate by using the depth and the internal reference of the at least one imaging device, wherein the third coordinate is an imaging device coordinate corresponding to the first coordinate; determining a second corresponding relation between the second coordinate and a fourth coordinate by using the depth and the internal reference of the at least one imaging device, wherein the fourth coordinate is an imaging device coordinate corresponding to the second coordinate; and calculating the cross-sectional area by using the depth, the first corresponding relation and the second corresponding relation.

Optionally, the processor may further execute the program code of the following steps: determining a first corresponding relation between the first coordinate and a third coordinate by using the depth and the internal reference of the at least one imaging device, wherein the third coordinate is an imaging device coordinate corresponding to the first coordinate; determining a second corresponding relation between the second coordinate and a fourth coordinate by using the depth and the internal reference of the at least one imaging device, wherein the fourth coordinate is an imaging device coordinate corresponding to the second coordinate; and calculating the cross-sectional area by using the depth, the first corresponding relation and the second corresponding relation.

The embodiment of the invention provides a cargo density measurement scheme. Acquiring a first weight and a second weight by using a weighing platform, wherein the first weight is the weight of a target vehicle for loading target cargos, and the second weight is the weight of the target vehicle for unloading the target cargos; acquiring a first image and a second image of the target cargo loaded on the target vehicle by using at least one imaging device; density measurement of the target cargo is performed based on the first weight, the second weight, the first image, and the second image.

It is easy to note that in the embodiment of the present application, at least one imaging device is distributed above the weighing platform, and the line of sight of the at least one imaging device is perpendicular to the weighing platform; acquiring the weight of a target cargo loaded by a target vehicle and the weight of the target cargo unloaded by the target vehicle by using a weighing platform; acquiring a first image and a second image of the target cargo loaded on the target vehicle by adopting at least one imaging device; and measuring the density of the target cargo based on the first weight, the second weight, the first image and the second image to obtain a density measurement result of the target cargo.

Therefore, the embodiment of the invention achieves the purposes of carrying out non-invasive density measurement on the scrap steel shapes at low cost and high efficiency and avoiding the limitation and locality of manual sampling, thereby realizing the technical effect of accurately judging the classification grade of the scrap steel based on the density measurement result of the scrap steel shapes, and further solving the technical problems of non-uniform sampling and low density measurement efficiency on the scrap steel broken shapes in the density measurement method of the scrap steel shapes in the prior art.

It can be understood by those skilled in the art that the structure shown in fig. 9 is only an illustration, and the computer terminal may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palmtop computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 9 is a diagram illustrating a structure of the electronic device. For example, the computer terminal 9 may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 9, or have a different configuration than shown in FIG. 9.

Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.

Example 5

According to an embodiment of the present application, there is also provided an embodiment of a non-volatile storage medium. Optionally, in an embodiment of the present invention, the nonvolatile storage medium may be configured to store a program code executed by the cargo density measurement method provided in embodiment 2.

Optionally, in this embodiment of the present invention, the nonvolatile storage medium may be located in any one of computer terminals in a computer terminal group in a computer network, or in any one of mobile terminals in a mobile terminal group.

Optionally, in an embodiment of the present invention, the nonvolatile storage medium is configured to store program code for performing the following steps: acquiring a first weight and a second weight by using a weighing platform, wherein the first weight is the weight of a target vehicle for loading target cargos, and the second weight is the weight of the target vehicle for unloading the target cargos; acquiring a first image and a second image of the target cargo loaded on the target vehicle by using at least one imaging device; density measurement of the target cargo is performed based on the first weight, the second weight, the first image, and the second image.

Optionally, in an embodiment of the present invention, the nonvolatile storage medium is configured to store program code for performing the following steps: acquiring a target cargo mask from the first image or the second image by using a semantic segmentation network model, wherein the target cargo mask is used for distinguishing a first image area containing the target cargo from a second image area not containing the target cargo; acquiring the parallax of the pixels in the first image area between the first image and the second image by using a stereo matching mode; and measuring a density of the target cargo based on the first weight, the second weight, the first image area, and the parallax.

Optionally, in an embodiment of the present invention, the nonvolatile storage medium is configured to store program code for performing the following steps: dividing the first image area into a plurality of grids; determining a depth of a unit cell among the plurality of cells using the disparity; acquiring the cross-sectional area of the unit mesh by using the depth, a first coordinate and a second coordinate, wherein the first coordinate and the second coordinate are vertex image coordinates of the unit mesh; calculating a unit volume corresponding to the unit grid using a first height, which is an installation height of the at least one imaging device, a second height, which is a height above a ground of a bottom surface of a hopper of the target vehicle, the depth, and the cross-sectional area; determining a total volume corresponding to the plurality of grids according to the unit volume; and calculating the density measurement result of the target cargo by using the first weight, the second weight and the total volume.

Optionally, in an embodiment of the present invention, the nonvolatile storage medium is configured to store program code for performing the following steps: and calculating the depth by using the focal length of the at least one imaging device, the distance between the first imaging device and the second imaging device and the parallax.

Optionally, in an embodiment of the present invention, the nonvolatile storage medium is configured to store program code for performing the following steps: determining a first corresponding relation between the first coordinate and a third coordinate by using the depth and the internal reference of the at least one imaging device, wherein the third coordinate is an imaging device coordinate corresponding to the first coordinate; determining a second corresponding relation between the second coordinate and a fourth coordinate by using the depth and the internal reference of the at least one imaging device, wherein the fourth coordinate is an imaging device coordinate corresponding to the second coordinate; and calculating the cross-sectional area by using the depth, the first corresponding relation and the second corresponding relation.

Optionally, in an embodiment of the present invention, the nonvolatile storage medium is configured to store program code for performing the following steps: calculating the total vehicle weight accumulated difference of the target vehicle by using the first weight and the second weight; and calculating to obtain the density measurement result by using the weight accumulation difference of the whole vehicle and the total volume.

The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.

In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.

In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.

The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.

In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.

The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.

The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

23页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:地层水类型识别方法、污染率确定方法及计算设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!