Gateway-based truck image acquisition method, system, device and storage medium
By using laser point cloud acquisition devices and neural network recognition technology in container gates, the inaccuracy and inefficiency of existing container gate recognition and photography systems have been solved, achieving more efficient recognition of truck license plates and container numbers, and improving the reliability and efficiency of port management.
Patent Information
- Application Number
- CN202111403494.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-22
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2041-11-22
AI Technical Summary
Existing container gate identification and photography systems suffer from problems such as inconvenient maintenance of inductive loops, susceptibility of infrared beams to environmental influences, and susceptibility of millimeter-wave radars to electromagnetic interference, resulting in inaccurate identification and photography and low efficiency.
A gate-based truck image acquisition method is adopted. The transformation relationship between the intrinsic coordinate system and the world coordinate system is established through a laser point cloud acquisition device, which projects the image into a two-dimensional image. The image acquisition device is triggered at a preset trigger position to acquire truck images. The anti-interference and high resolution of the laser radar are utilized, combined with a neural network to identify the truck license plate and container number.
It has achieved more efficient and accurate identification of truck license plates and container numbers, improving the reliability and efficiency of port intelligent management and reducing the rate of false triggering and false identification.
Smart Images

Figure CN114092857B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of AI optical recognition, and more specifically, to a method, system, device, and storage medium for acquiring images of container trucks based on gates for unmanned terminals. Background Technology
[0002] Container gates are typically located at port entrances and exits. They need to be integrated with intelligent management systems to identify and photograph the license plates of passing trucks and the identification numbers of the transported containers, thereby helping ports improve management efficiency and reduce labor costs.
[0003] Barrier gates typically detect vehicle presence and trigger identification and photography through methods such as inductive loop detectors, infrared beam detectors, and millimeter-wave radar. However, each of these methods has the following problems: inductive loop detectors are buried underground, making maintenance and replacement inconvenient, and the long construction period can lead to the barrier gate being unusable for extended periods. Infrared beam detectors have high requirements for installation angle and position and are easily affected by factors such as temperature and light, resulting in a high false alarm rate. Millimeter-wave radar is easy to install, but it still suffers from drawbacks such as susceptibility to electromagnetic interference and relatively high power consumption.
[0004] Therefore, the present invention provides a method, system, device and storage medium for acquiring images of trucks based on gates. Summary of the Invention
[0005] To address the problems in the existing technology, the present invention aims to provide a method, system, device, and storage medium for acquiring images of container trucks based on gates. This overcomes the difficulties of the existing technology and enables the customization of a more efficient and accurate spatial perception method for container gates. Consequently, it provides more accurate trigger signals for container truck license plate and container number recognition systems and photography systems, thereby improving the reliability and efficiency of intelligent port management.
[0006] An embodiment of the present invention provides a method for acquiring images of trucks based on a gate, comprising the following steps:
[0007] S110. Collect laser point clouds within the gate area using at least one point cloud acquisition device, and establish the transformation relationship between the intrinsic coordinate system of the point cloud acquisition device and the world coordinate system. The X-axis, Y-axis, and Z-axis in the world coordinate system correspond to the length, width, and height of the gate, respectively.
[0008] S130. The laser point cloud to be detected is projected into a two-dimensional image to be tested and a planar coordinate system is established. The u-axis of the two-dimensional image to be tested is parallel to the X-axis and the v-axis is parallel to the Z-axis.
[0009] S140. Collect the laser point cloud when the truck passes through the gate area using the point cloud acquisition device, and project and convert it into the two-dimensional image to be measured.
[0010] S150. When the projection pattern of the truck in the two-dimensional image to be tested reaches the preset trigger position, the image acquisition device corresponding to the preset trigger position is triggered to acquire the image of the truck.
[0011] Preferably, in step S110, a laser point cloud is acquired within the gate area using a point cloud acquisition device. Plane fitting is then performed based on the laser point cloud to obtain the plane containing the ground of the gate area. A transformation relationship is established between the intrinsic coordinate system of the point cloud acquisition device and the world coordinate system. In the world coordinate system, the X-axis is parallel to the length direction of the gate, the Y-axis is parallel to the width direction of the gate, and the Z-axis is parallel to the height direction of the gate. The point cloud acquisition device is suspended above a gate and positioned parallel to the length direction of the gate (i.e., the acquisition direction of the device is set along the X-axis, with a preset X-axis direction). This allows the acquisition of a Y-axis perpendicular to the X-axis and a Z-axis perpendicular to the fitted plane.
[0012] Preferably, step S110 includes the following steps:
[0013] S111. Collect laser point clouds within the gate area using a point cloud acquisition device, perform plane fitting based on the laser point clouds to obtain the plane where the ground of the gate area is located, and establish the transformation relationship between the intrinsic coordinate system of the point cloud acquisition device and the world coordinate system.
[0014] S112. When the truck enters the gate area, point clouds below 3.5 meters below the ground are filtered out.
[0015] S113. Obtain the main direction of the point cloud distribution by using the PCA algorithm of the existing technology, and the main direction is used as the X-axis direction;
[0016] S114. Based on the fitted plane, obtain the Y-axis perpendicular to the X-axis and the Z-axis perpendicular to the fitted plane. In the world coordinate system, the X-axis is parallel to the length direction of the gate, the Y-axis is parallel to the width direction of the gate, and the Z-axis is parallel to the height direction of the gate. PCA (Principal Component Analysis) is a commonly used data analysis method. PCA transforms the original data into a set of linearly independent representations through linear transformation, which can be used to extract the main feature components of the data and is often used for dimensionality reduction of high-dimensional data. Point cloud normal vector estimation is used in many scenarios, such as ICP registration, surface reconstruction, and orientation prediction in point clouds.
[0017] Preferably, the method further includes the following steps after step S110 and before step S130:
[0018] S120. Filter the laser point cloud data based on the preset length, width and height data of the gate area, and retain only the laser point cloud to be detected within the spatial range of the gate area.
[0019] Preferably, step S130 includes the following steps:
[0020] S131. Establish a rectangular binary image with M rows and N columns. The u-axis of the rectangular binary image is parallel to the X-axis and the v-axis is parallel to the Z-axis. Based on the ratio of the length and height of the rectangular binary image to the actual gate, a preset trigger position is set in the rectangular binary image.
[0021] S132. Project the laser point cloud to be detected onto the rectangular binarized image;
[0022] S133. By binarization, each first type pixel of the laser point cloud projection to be detected and the second type pixel that did not obtain the laser point cloud projection to be detected are obtained from the rectangular binarized image;
[0023] S134. The image formed by the set of first-class pixels and second-class pixels is used as the two-dimensional image to be tested.
[0024] Preferably, in step S131, the first ratio of the length and width of the rectangular image is the same as the second ratio of the length and height of the gate area.
[0025] Preferably, in step S132, the three-dimensional points (X, Y, Z) in the laser point cloud are projected onto the rectangular binary image (X) using the following formula. u Y v )middle:
[0026] int(*) is the integer function;
[0027] Among them, X min The minimum value of the spatial range of the gate area in the X-axis coordinate of the world coordinate system;
[0028] X max The spatial extent of the gate area is the maximum value of the X-axis coordinate in the world coordinate system;
[0029] Y min The minimum value of the spatial range of the gate area in the Y-axis coordinate of the world coordinate system;
[0030] Y max The spatial extent of the gate area is the maximum value of the Y-axis coordinate in the world coordinate system;
[0031] Z minThe minimum value of the spatial range of the gate area in the Z-axis coordinate of the world coordinate system;
[0032] Z max The spatial extent of the gate area is the maximum value of the Z-axis coordinate in the world coordinate system.
[0033] Preferably, in step S133, the pixel value of each first type of pixel that has obtained the laser point cloud projection is marked as 1, and the pixel value of each first type of pixel that has not obtained the laser point cloud projection is marked as 0.
[0034] Preferably, step S140 includes the following steps:
[0035] S141. Collect laser point clouds when the truck passes through the gate area using a point cloud acquisition device;
[0036] S142. Project the laser point cloud onto the two-dimensional image to be tested;
[0037] S143. Based on the first neural network of the image recognition, obtain the image regions corresponding to the front of the vehicle, the rear of the vehicle, the front face of the container, and the rear face of the container, respectively. Each pixel of the image region has a label representing the category of the image region it belongs to.
[0038] Preferably, after step S143, the method further includes: when two truck heads or container front faces are identified on the same truck, obtaining the difference between the angle between the contour lines in the two image regions and 90°, wherein the image region with the smaller difference is the image region corresponding to the container front face, and the image region with the larger difference is the image region corresponding to the truck head.
[0039] Preferably, step S140 includes the following steps:
[0040] S146. Collect laser point clouds when the truck passes through the gate area using a point cloud acquisition device;
[0041] S147. Obtain point cloud clusters corresponding to the front and rear of the vehicle, the front face of the container, and the rear face of the container through a second neural network based on point cloud recognition. Each point cloud cluster has a label representing the category of the point cloud cluster it belongs to.
[0042] S148. Project the point cloud clusters onto the two-dimensional image to be tested, and take the label that appears most frequently in the label of the laser point cloud of the pixel projected onto the same two-dimensional image to be tested as the label of the pixel.
[0043] Preferably, the point cloud acquisition device, the front license plate image acquisition device, and the front cargo box surface image acquisition device are respectively located on the exit side of the gate, and the entrance side of the gate is provided with a vehicle body circumferential image acquisition device, a rear license plate image acquisition device, and a rear cargo box surface image acquisition device.
[0044] Preferably, a barrier gate is provided on the side of the gate exit opposite to the gate entrance. The image acquisition device captures the image of the truck, performs image and text recognition, obtains the truck and container number information, and authenticates it with preset data. When the authentication is successful, the barrier gate is opened.
[0045] Preferably, in step S150, the preset trigger position includes a vehicle body circumferential image acquisition trigger vertical line, a front license plate image acquisition trigger vertical line, a front box surface image acquisition trigger vertical line, a rear box surface image acquisition trigger vertical line, and a rear license plate image acquisition trigger vertical line arranged sequentially and at intervals from the gate inlet to the gate outlet.
[0046] When the point cloud cluster corresponding to the front of the vehicle reaches the trigger vertical line of the vehicle body circumferential image acquisition, the vehicle body circumferential image acquisition device is triggered to start and acquire the vehicle body circumferential image;
[0047] When the point cloud cluster corresponding to the front of the vehicle reaches the trigger vertical line for front license plate image acquisition, the front license plate image acquisition device is activated to acquire the front license plate image.
[0048] When the point cloud cluster corresponding to the front face of the container reaches the front face image acquisition trigger vertical line, the front face image acquisition device is triggered to start and acquire the front face image;
[0049] When the point cloud cluster corresponding to the rear end face of the container reaches the rear container face image acquisition trigger vertical line, the rear container face image acquisition device is triggered to start and acquire the rear container face image;
[0050] When the point cloud cluster corresponding to the rear end face of the container reaches the trigger vertical line for the rear license plate image acquisition, the rear license plate image acquisition device is activated to acquire the rear license plate image.
[0051] Preferably, the focal point of the objective lens of the vehicle body circumferential image acquisition device is located in the third vertical plane in the gate area corresponding to the trigger vertical line of the vehicle body circumferential image acquisition;
[0052] The focal point of the objective lens of the front license plate image acquisition device is located in the first vertical plane in the gate area corresponding to the trigger vertical line of the front license plate image acquisition;
[0053] The focal point of the objective lens of the front box surface image acquisition device is located in the second vertical plane in the gate area corresponding to the trigger vertical line of the front box surface image acquisition;
[0054] The focal point of the objective lens of the rear box surface image acquisition device is located in the fourth vertical plane in the gate area corresponding to the rear box surface image acquisition trigger vertical line;
[0055] The focal point of the objective lens of the rear license plate image acquisition device is located in the fifth vertical plane in the gate area corresponding to the trigger vertical line of the rear license plate image acquisition.
[0056] Embodiments of the present invention also provide a gate-based truck image acquisition system for implementing the above-described gate-based truck image acquisition method. The gate-based truck image acquisition system includes:
[0057] The laser point cloud acquisition module acquires laser point clouds within the gate area through at least one point cloud acquisition device, and establishes the transformation relationship between the intrinsic coordinate system of the point cloud acquisition device and the world coordinate system. The X-axis, Y-axis, and Z-axis in the world coordinate system correspond to the length, width, and height of the gate, respectively.
[0058] The laser point cloud projection module converts the laser point cloud projection to be detected into a two-dimensional image to be tested and establishes a planar coordinate system. The u-axis of the two-dimensional image to be tested is parallel to the X-axis and the v-axis is parallel to the Z-axis.
[0059] The two-dimensional image under test module acquires laser point clouds as the truck passes through the gate area using a point cloud acquisition device, and projects and converts these points onto the two-dimensional image under test; and
[0060] The image acquisition trigger module triggers the image acquisition device corresponding to the preset trigger position to acquire the image of the truck when the projection pattern of the truck in the two-dimensional image to be tested reaches the preset trigger position.
[0061] Embodiments of the present invention also provide a gate-based truck image acquisition device, comprising:
[0062] processor;
[0063] Memory, which stores the processor's executable instructions;
[0064] The processor is configured to execute the steps of the above-described gate-based truck image acquisition method by executing executable instructions.
[0065] Embodiments of the present invention also provide a computer-readable storage medium for storing a program that, when executed, implements the steps of the above-described gate-based truck image acquisition method.
[0066] The present invention provides a gate-based truck image acquisition method, system, device, and storage medium that can customize a more efficient and accurate spatial perception method for container gates, thereby providing more accurate trigger signals for truck license plate and container number recognition systems and photography systems, and improving the reliability and efficiency of port intelligent management. Attached Figure Description
[0067] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings.
[0068] Figure 1 This is a flowchart of the gate-based truck image acquisition method of the present invention.
[0069] Figures 2 to 8 This is a schematic diagram illustrating the implementation process of the gate-based truck image acquisition method of the present invention.
[0070] Figure 9 This is a schematic diagram of the structure of the gate-based truck image acquisition system of the present invention.
[0071] Figure 10 This is a schematic diagram of the structure of the gate-based truck image acquisition device of the present invention.
[0072] Figure 11 This is a schematic diagram of the structure of a computer-readable storage medium according to an embodiment of the present invention.
[0073] Figure Labels
[0074] 1 First monitoring bracket
[0075] 11. LiDAR
[0076] 12 Front panel image acquisition device
[0077] 13 Front license plate image acquisition device
[0078] 2 Second monitoring bracket
[0079] 21 Vehicle body circumferential image acquisition device
[0080] 22 Rear Box Front Image Acquisition Device
[0081] 23 Rear license plate image acquisition device
[0082] 3. Trucks carrying containers
[0083] 31 Locomotive
[0084] 32 containers
[0085] 321 Front end
[0086] 322 Rear End Face
[0087] 33 Front license plate
[0088] 34 Rear license plate
[0089] Z1 First vertical plane
[0090] Z2 Second vertical plane
[0091] Z3 Third vertical plane
[0092] Z4 Fourth vertical plane
[0093] Z5 Fifth Vertical Plane Detailed Implementation
[0094] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that the invention will be thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar structures, and therefore repeated descriptions of them will be omitted.
[0095] Figure 1 This is a flowchart of the gate-based truck image acquisition method of the present invention. Figure 1 As shown, an embodiment of the present invention provides a method for acquiring images of trucks based on a gate, comprising the following steps:
[0096] S110. Collect laser point clouds within the gate area using at least one point cloud acquisition device, and establish the transformation relationship between the intrinsic coordinate system of the point cloud acquisition device and the world coordinate system. The X-axis, Y-axis, and Z-axis in the world coordinate system correspond to the length, width, and height of the gate, respectively.
[0097] S130. The laser point cloud to be detected is projected into a two-dimensional image and a planar coordinate system is established. The u-axis of the two-dimensional image is parallel to the X-axis and the v-axis is parallel to the Z-axis.
[0098] S140. The laser point cloud of the truck passing through the gate area is collected by the point cloud acquisition device and projected into a two-dimensional image to be measured.
[0099] S150. When the projection pattern of the truck in the two-dimensional image to be tested reaches the preset trigger position, the image acquisition device corresponding to the preset trigger position is triggered to acquire the image of the truck.
[0100] This invention aims to propose a more accurate and stable triggering method and system for container gate identification and photography. It fully utilizes the anti-interference, high resolution, and low cost characteristics of lidar to customize a more efficient and accurate spatial perception method for container gates, thereby providing more accurate triggering signals for the truck license plate and container number identification system and the photography system, and improving the reliability and efficiency of port intelligent management.
[0101] In a preferred embodiment, in step S110, a laser point cloud is acquired within the gate area using a point cloud acquisition device. Plane fitting is then performed based on the laser point cloud to obtain the plane containing the ground of the gate area. A transformation relationship is established between the intrinsic coordinate system of the point cloud acquisition device and the world coordinate system. In the world coordinate system, the X-axis is parallel to the length direction of the gate, the Y-axis is parallel to the width direction of the gate, and the Z-axis is parallel to the height direction of the gate. In this method, by placing the point cloud acquisition device above a gate and parallel to its length (i.e., setting the acquisition direction of the device along the X-axis, and pre-setting the X-axis direction based on the intrinsic coordinate system of the point cloud acquisition device), a Y-axis perpendicular to the X-axis and a Z-axis perpendicular to the fitted plane can be obtained. This structure is more suitable for application scenarios where a single point cloud acquisition device manages one gate, and the calculation speed is faster.
[0102] Step S110 includes the following steps:
[0103] S111. Collect laser point clouds within the gate area using a point cloud acquisition device, perform plane fitting based on the laser point clouds to obtain the plane containing the ground in the gate area, and establish the transformation relationship between the intrinsic coordinate system of the point cloud acquisition device and the world coordinate system.
[0104] S112. When a truck enters the gate area, it filters point clouds below 3.5 meters below the ground.
[0105] S113. Obtain the main direction of the point cloud distribution by using the PCA algorithm, and use the main direction as the X-axis direction.
[0106] S114. Based on the fitted plane, obtain the Y-axis perpendicular to the X-axis and the Z-axis perpendicular to the fitted plane. In the world coordinate system, the X-axis is parallel to the length direction of the gate, the Y-axis is parallel to the width direction of the gate, and the Z-axis is parallel to the height direction of the gate.
[0107] In actual implementation: After determining the XOY plane, the transformation matrix is obtained according to the plane equation. The point cloud is then subjected to coordinate transformation so that the ground within the point cloud is parallel to the XOY plane in the new coordinate system. Then, the loaded container is driven into the gate area. At this point, the point cloud above 3.5m above the ground is mainly scattered on the top of the container, presenting a planar irregular polygon shape with the same length and width as the gate. The vertex cloud of the container is extracted, and the main direction of the point cloud distribution is determined using the PCA algorithm. This direction can be approximated as the X-axis direction, and the direction within the XOY plane that forms a 90° angle with the X-axis is taken as the Y-axis direction. This structure is more suitable for application scenarios where a single point cloud acquisition device manages multiple gates. It can make judgments based on the actual point cloud data of each gate, resulting in a wider range of equipment applications and higher overall economic benefits.
[0108] In a preferred embodiment, the method further includes the following steps after step S110 and before step S130:
[0109] S120. Filter the laser point cloud data based on the preset length, width and height data of the gate area, and retain only the laser point cloud to be detected within the spatial range of the gate area.
[0110] In a preferred embodiment, step S130 includes the following steps:
[0111] S131. Create a rectangular binary image with M rows and N columns. The u-axis of the rectangular binary image is parallel to the X-axis and the v-axis is parallel to the Z-axis. Based on the ratio of the length and height of the rectangular binary image to the actual gate, set a preset trigger position in the rectangular binary image.
[0112] S132. Project the laser point cloud to be detected onto a rectangular binarized image.
[0113] S133. By binarization, each first-class pixel of the laser point cloud projection to be detected and the second-class pixels of the laser point cloud projection not to be detected are obtained from the rectangular binarized image.
[0114] S134. The image formed by the set of first-class pixels and second-class pixels is used as the two-dimensional image to be tested.
[0115] In a preferred embodiment, in step S131, the first ratio of the length and width of the rectangular image is the same as the second ratio of the length and height of the gate area.
[0116] In a preferred embodiment, in step S132, the three-dimensional points (X, Y, Z) in the laser point cloud are projected onto the rectangular binary image (X) using the following formula. u Y v )middle:
[0117]
[0118] Where int(*) is the floor function, X min This represents the minimum value of the X-axis coordinate of the gate area in the world coordinate system.
[0119] X max This represents the maximum value of the X-axis coordinate of the gate area in the world coordinate system.
[0120] Y min This represents the minimum value of the Y-axis coordinate of the gate area in the world coordinate system.
[0121] Y max This represents the maximum value of the Y-axis coordinate of the gate area in the world coordinate system.
[0122] Z min It represents the minimum value of the spatial extent of the gate area in the Z-axis coordinate of the world coordinate system.
[0123] Z max This represents the maximum value of the Z-axis coordinate of the gate area in the world coordinate system. This operation transforms foreground detection in three-dimensional space into foreground detection on a two-dimensional image plane, further reducing computational complexity.
[0124] This invention uses a set threshold X min X max Y min Y max Z min Z max This filter is used to limit the point cloud to the area of the gate. After the filter is applied, the remaining point cloud after coordinate transformation is located in the middle of the gate area. This reduces the number of point clouds involved in subsequent calculations and also avoids false triggering caused by other objects in the gate, thus reducing the computational load of the detection process and improving detection accuracy.
[0125] In a preferred embodiment, in step S133, the pixel value of each first type of pixel that has obtained laser point cloud projection is marked as 1, and the pixel value of each first type of pixel that has not obtained laser point cloud projection is marked as 0.
[0126] In a preferred embodiment, step S140 includes the following steps:
[0127] S141. Collect laser point clouds when the truck passes through the gate area using a point cloud acquisition device.
[0128] S142. Project the laser point cloud onto the two-dimensional image to be measured.
[0129] S143. The first neural network based on image recognition obtains the image regions corresponding to the front, rear, front face of the container, and rear face of the container, respectively. Each pixel in the image region has a label representing the category of the image region it belongs to. In this scheme, since the first neural network is used for planar image recognition (the first neural network has been trained on a large number of truck side contour lines, so it can obtain the various parts of the truck based on planar images with less computation).
[0130] In a preferred embodiment, after step S143, the method further includes: when two truck heads or container front faces are identified on the same truck, the difference between the angle between the contour lines in the two image regions and 90° is obtained respectively. The image region with the smaller difference is the image region of the corresponding container front face, and the image region with the larger difference is the image region of the corresponding truck head.
[0131] In a preferred embodiment, step S140 includes the following steps:
[0132] S146. Collect laser point clouds when the truck passes through the gate area using a point cloud acquisition device.
[0133] S147. Obtain point cloud clusters corresponding to the front and rear of the vehicle, the front face of the container, and the rear face of the container through a second neural network based on point cloud recognition. The point clouds in each point cloud cluster have labels representing the category of the point cloud cluster.
[0134] S148. Project the point cloud clusters separately into the two-dimensional image to be tested, and use the label that appears most frequently in the laser point cloud labels of the pixels projected into the same two-dimensional image to be tested as the pixel label. In this step, since the original three-dimensional point cloud is used to separate each part of the card, and then each part is projected into the two-dimensional image to be tested, the local accuracy of the card is higher, but there is a problem of excessive computation.
[0135] In a preferred embodiment, the point cloud acquisition device, the front license plate image acquisition device, and the front cargo box image acquisition device are respectively located on the exit side of the gate, while the entrance side of the gate is equipped with a vehicle body circumferential image acquisition device, a rear license plate image acquisition device, and a rear cargo box image acquisition device.
[0136] In a preferred embodiment, a barrier gate is provided on the side of the gate exit away from the gate entrance. The image acquisition device captures images of the truck, performs image and text recognition, obtains the truck and container number information, and authenticates it with preset data. When the authentication is successful, the barrier gate is opened.
[0137] In a preferred embodiment, in step S150, the preset trigger positions include a vehicle body circumferential image acquisition trigger vertical line, a front license plate image acquisition trigger vertical line, a front box surface image acquisition trigger vertical line, a rear box surface image acquisition trigger vertical line, and a rear license plate image acquisition trigger vertical line arranged sequentially at intervals from the gate entrance to the gate exit.
[0138] When the point cloud cluster corresponding to the front of the vehicle reaches the trigger vertical line for the circumferential image acquisition of the vehicle body, the circumferential image acquisition device is activated to acquire the circumferential image of the vehicle body.
[0139] When the point cloud cluster corresponding to the front of the vehicle reaches the vertical line triggering the front license plate image acquisition, the front license plate image acquisition device is activated to acquire the front license plate image.
[0140] When the point cloud cluster of the corresponding container front face reaches the front face image acquisition trigger vertical line, the front face image acquisition device is triggered to start and acquire the front face image.
[0141] When the point cloud cluster of the corresponding container rear end reaches the vertical line of the rear container image acquisition trigger, the rear container image acquisition device is activated to acquire the rear container image.
[0142] When the point cloud cluster on the rear face of the corresponding container reaches the vertical line triggered by the rear license plate image acquisition, the rear license plate image acquisition device is activated to acquire the rear license plate image.
[0143] In a preferred embodiment, the objective lens of the vehicle body circumferential image acquisition device is focused in the third vertical plane of the gate area corresponding to the trigger vertical line of the vehicle body circumferential image acquisition. The objective lens of the front license plate image acquisition device is focused in the first vertical plane of the gate area corresponding to the trigger vertical line of the front license plate image acquisition. The objective lens of the front cargo box image acquisition device is focused in the second vertical plane of the gate area corresponding to the trigger vertical line of the front cargo box image acquisition. The objective lens of the rear cargo box image acquisition device is focused in the fourth vertical plane of the gate area corresponding to the trigger vertical line of the rear cargo box image acquisition. The objective lens of the rear license plate image acquisition device is focused in the fifth vertical plane of the gate area corresponding to the trigger vertical line of the rear license plate image acquisition.
[0144] In a preferred embodiment, the plane detection employs the RANSAC method. Road surfaces include shoulders and other objects, and the front and top surfaces of containers contain grooves; none of these are perfectly flat. Using the RANSAC method is more effective at eliminating the influence of outliers at non-planar locations. RANSAC, short for Random Sample Consensus, is an algorithm that calculates the mathematical model parameters of a dataset containing outliers to obtain valid sample data. The RANSAC algorithm is frequently used in computer vision. For example, in stereo vision, it simultaneously solves the problem of matching points between a pair of cameras and calculating the fundamental matrix. The basic assumption of the RANSAC algorithm is that the samples contain both inliers (data that can be described by the model) and outliers (data that deviates significantly from the normal range and cannot fit into the mathematical model), i.e., the dataset contains noise. These outliers may be caused by incorrect measurements, incorrect assumptions, incorrect calculations, etc. RANSAC also assumes that, given a set of correct data, there exists a method to calculate model parameters that fit this data.
[0145] In a preferred embodiment, the top beam where the front box surface intersects with the top surface is represented as a right angle in the binary image. Using the right angle area as the foreground to trigger the front box surface photography, this operation can more accurately locate the position of the front box surface and avoid the front box surface being obscured by the front of the vehicle in the camera image, resulting in incomplete shooting.
[0146] In a preferred embodiment, a partial right-angle image is captured as a template. If a region in the binary image matches this template, that region represents the right angle corresponding to the intersection of the front box surface and the top surface of the top beam in the binary image. Figure 3 As shown, when the truck moves at a right angle to a set horizontal coordinate during its journey, a photo of the front of the truck bed is triggered.
[0147] In a preferred embodiment, when a right angle moves to a set horizontal coordinate in the binary image, a plane is detected in the lidar point cloud. If two planes can be detected simultaneously, and the angle between the two planes is within the range of 85° to 95°, and the intersection of the planes is converted into the binary image and included within the right angle range, then the trigger is determined to be a front-side image capture trigger signal; otherwise, it is filtered out. For example, some container trucks have high cabs, and both the windshield and the top of the cab can be approximated as planes. Using the angle between the planes can avoid false triggers caused by the container truck cab.
[0148] Figures 2 to 8 This is a schematic diagram illustrating the implementation process of the gate-based truck image acquisition method of the present invention. Figure 2As shown, an embodiment of the present invention provides a truck image acquisition method based on a gate, employing a first monitoring bracket 1 and a second monitoring bracket 2 installed at both ends of the gate. The first monitoring bracket 1, located on the gate exit side, is equipped with a lidar 1, a front license plate image acquisition device 13, and a front truck bed image acquisition device 12. The lidar 1 is mounted on a gantry frame approximately 6m high in the middle of the gate, facing the direction of truck entry, with its field of view center line forming a 45-degree angle with the horizontal plane. The second monitoring bracket 2, located on the gate entrance side, is equipped with a vehicle body circumferential image acquisition device 21, a rear license plate image acquisition device 23, and a rear truck bed image acquisition device 22. The focal point of the objective lens of the vehicle body circumferential image acquisition device 21 is located in the third vertical plane Z3 within the gate area corresponding to the trigger vertical line for vehicle body circumferential image acquisition. The focal point of the objective lens of the front license plate image acquisition device 13 is located in the first vertical plane Z1 within the gate area corresponding to the trigger vertical line for front license plate image acquisition. The objective lens of the front gate image acquisition device 12 is focused in the second vertical plane Z2 in the gate area corresponding to the trigger vertical line of the front gate image acquisition. The objective lens of the rear gate image acquisition device 22 is focused in the fourth vertical plane Z4 in the gate area corresponding to the trigger vertical line of the rear gate image acquisition. The objective lens of the rear license plate image acquisition device 23 is focused in the fifth vertical plane Z5 in the gate area corresponding to the trigger vertical line of the rear license plate image acquisition. Laser point clouds within the gate area are acquired by at least one lidar 1, establishing a transformation relationship between the intrinsic coordinate system of lidar 1 and the world coordinate system. The X-axis, Y-axis, and Z-axis in the world coordinate system correspond to the length, width, and height directions of the gate, respectively. Laser point clouds within the gate area are acquired by lidar 1, and plane fitting is performed based on the laser point clouds to obtain the plane containing the ground in the gate area. A transformation relationship between the intrinsic coordinate system of lidar 1 and the world coordinate system is established, with the X-axis in the world coordinate system parallel to the length direction of the gate, the Y-axis parallel to the width direction of the gate, and the Z-axis parallel to the height direction of the gate. The distance between the first monitoring bracket 1 and the fifth vertical plane Z5 ranges from 2.5 to 3.5 m; the distance between the fifth vertical plane Z5 and the second vertical plane Z2 ranges from 0.2 to 0.7 m; the distance between the second vertical plane Z2 and the fourth vertical plane Z4 ranges from 0.7 to 1.5 m; the distance between the fourth vertical plane Z4 and the first vertical plane Z1 ranges from 0.2 to 0.7 m; and the distance between the first vertical plane Z1 and the third vertical plane Z3 ranges from 3 to 8 m. In this embodiment, the distance between the first monitoring bracket 1 and the fifth vertical plane Z5 is approximately 3 m; the distance between the fifth vertical plane Z5 and the second vertical plane Z2 is approximately 0.5 m; the distance between the second vertical plane Z2 and the fourth vertical plane Z4 is approximately 1 m; the distance between the fourth vertical plane Z4 and the first vertical plane Z1 is approximately 0.5 m; and the distance between the first vertical plane Z1 and the third vertical plane Z3 is approximately 5 m.
[0149] Based on the preset length, width, and height data of the gate area, the laser point cloud data is filtered, retaining only the laser point cloud to be detected within the spatial range of the gate area. A rectangular binary image with M rows and N columns is constructed. In this embodiment, M is 640 and N is 360. The u-axis of the rectangular binarized image is parallel to the X-axis, and the v-axis is parallel to the Z-axis. Based on the ratio of the rectangular binarized image to the actual length and height of the gate, preset trigger positions are set in the rectangular binarized image (i.e., the first vertical plane Z1, the second vertical plane Z2, the third vertical plane Z3, the fourth vertical plane Z4, and the fifth vertical plane Z5. The rectangular binarized image obtained when the container truck enters the gate at low speed is used to establish the corresponding preset trigger positions. The distance ratio between the first vertical plane Z1, the second vertical plane Z2, the third vertical plane Z3, the fourth vertical plane Z4, and the fifth vertical plane Z5 is projected onto the rectangular binarized image, or the corresponding preset trigger positions are set in the rectangular binarized image using preset data). The trigger relationship between each preset trigger position and the corresponding image acquisition device is established.
[0150] The first ratio of the length and width of the rectangular image is the same as the second ratio of the length and height of the gate area. The laser point cloud to be detected is projected onto the rectangular binary image, and the three-dimensional points (X, Y, Z) in the laser point cloud are projected onto the rectangular binary image (X... u Y v )middle:
[0151]
[0152]
[0153] Where int(*) is the floor function, X min This represents the minimum value of the X-axis coordinate of the gate area in the world coordinate system.
[0154] X max This represents the maximum value of the X-axis coordinate of the gate area in the world coordinate system.
[0155] Y min This represents the minimum value of the Y-axis coordinate of the gate area in the world coordinate system.
[0156] Y max This represents the maximum value of the Y-axis coordinate of the gate area in the world coordinate system.
[0157] Z min It represents the minimum value of the spatial extent of the gate area in the Z-axis coordinate of the world coordinate system.
[0158] Z max This represents the maximum value of the spatial extent of the gate area in the Z-axis coordinate system of the world coordinate system.
[0159] By binarization, each first-class pixel of the laser point cloud projection to be detected and the second-class pixels of the laser point cloud without the laser point cloud projection to be detected are obtained from the rectangular binarized image.
[0160] The image formed by the set of first-class pixels and second-class pixels is used as the two-dimensional test image. The u-axis of the two-dimensional test image is parallel to the X-axis, and the v-axis is parallel to the Z-axis. The pixel value of each first-class pixel that has obtained laser point cloud projection is marked as 1, and the pixel value of the second-class pixels that have not obtained laser point cloud projection is marked as 0.
[0161] The laser point cloud is collected by lidar 1 as the truck passes through the gate area. The three-dimensional points (X, Y, Z) in the laser point cloud are projected in real time onto a rectangular binary image (X... u Y v )middle:
[0162]
[0163]
[0164] Where int(*) is the floor function, X min This represents the minimum value of the X-axis coordinate of the gate area in the world coordinate system.
[0165] X max This represents the maximum value of the X-axis coordinate of the gate area in the world coordinate system.
[0166] Y min This represents the minimum value of the Y-axis coordinate of the gate area in the world coordinate system.
[0167] Y max This represents the maximum value of the Y-axis coordinate of the gate area in the world coordinate system.
[0168] Z min It represents the minimum value of the spatial extent of the gate area in the Z-axis coordinate of the world coordinate system.
[0169] Z max This represents the maximum value of the spatial extent of the gate area in the Z-axis coordinate system of the world coordinate system.
[0170] In this embodiment, a first neural network based on image recognition obtains image regions corresponding to the front 31, rear 31, front face 321 of the container 32, and rear face 322 of the container 32. Each pixel in the image region has a label representing the category of that region. In this invention, the use of a first neural network based on planar image recognition significantly reduces the computational load (the computational load of a point cloud-based neural network is much greater than that of a first neural network based on planar image recognition, and it also significantly reduces computational speed).
[0171] When the projected pattern of the truck in the two-dimensional image to be measured reaches the preset trigger position, the image acquisition device corresponding to the preset trigger position is triggered to acquire the image of the truck. The preset trigger positions include the vehicle body circumferential image acquisition trigger trigger vertical line, the front license plate 33 image acquisition trigger trigger vertical line, the front box surface image acquisition trigger vertical line, the rear box surface image acquisition trigger vertical line, and the rear license plate 34 image acquisition trigger vertical line, which are arranged at intervals from the gate inlet to the gate outlet.
[0172] By monitoring the projection patterns of various parts of the truck onto the two-dimensional image under test in real time, the corresponding acquisition devices can be triggered in a timely manner.
[0173] like Figure 3 As shown, when the point cloud cluster corresponding to the front of the vehicle 31 reaches the trigger vertical line for the vehicle body circumferential image acquisition, the vehicle body circumferential image acquisition device 21 is triggered to start and acquire the vehicle body circumferential image.
[0174] like Figure 4 As shown, when the point cloud cluster corresponding to the front of the vehicle 31 reaches the trigger vertical line for image acquisition of the front license plate 33, the front license plate image acquisition device 13 is triggered to start and acquire the front license plate image.
[0175] like Figure 5 As shown, when the point cloud cluster of the corresponding front face 321 of container 32 reaches the front face image acquisition trigger vertical line, the front face image acquisition device 12 is triggered to start and acquire the front face image.
[0176] In actual inspection, not only is the front face of the container a part of a cube, but the cab of some trucks also closely resembles a part of a cube, making confusion easy to occur during identification. To further improve accuracy, when two cabs 31 or two container front faces 321 are identified on the same truck, the difference between the angle between the contour lines in the two image regions and 90° is obtained. The image region with the smaller difference is the image region corresponding to the front face 321 of the container 32, and the image region with the larger difference is the image region corresponding to the cab 31. Figure 6 This is a rectangular binary image in this embodiment, where there are M pixels in the row direction and N pixels in the column direction, and the M / N ratio is the same as the ratio of the actual gate's length and height. Figure 6 As shown, in this embodiment, corresponding Figure 5At the indicated moment, the front of the vehicle and the front face of the container are projected onto the two-dimensional coordinate system of the image to be measured (o is the origin, and the u-axis and v-axis are the length and width directions, respectively). The image region of the container has two contour lines 41 and 42, based on the angle A (angle A is 90°) between contour lines 41 and 42 in the image. The image region of the front of the vehicle has two contour lines 43 and 44, based on the angle B (angle B is 110°) between contour lines 43 and 44 in the image. The difference between angle A and 90° is 0, and the difference between angle B and 90° is 20°. Therefore, the image region with angle A corresponds to the image region of the front face 321 of the container 32, and the image region with angle B corresponds to the image region of the front of the vehicle 31.
[0177] like Figure 7 As shown, when the point cloud cluster of the corresponding rear end face 322 of container 32 reaches the rear container face image acquisition trigger vertical line, the rear container face image acquisition device 22 is triggered to start and acquire the rear container face image.
[0178] like Figure 8 As shown, when the point cloud cluster of the corresponding rear end face 322 of container 32 reaches the rear license plate image acquisition trigger vertical line, the rear license plate image acquisition device 23 is triggered to start and acquire the rear license plate image.
[0179] Through the above process, images of the vehicle body, front license plate, front cargo box, rear cargo box, and rear license plate can be clearly obtained. Image recognition is then used to obtain the truck's license plate code and the container's code. A barrier gate is installed on the side of the gate exit opposite to the gate entrance. This gate can perform image and text recognition on the images of the trucks captured by the image acquisition device, obtaining the truck and container number information 32 and authenticating it against preset data. When the truck 3 carrying the container passes through the authentication, the barrier gate opens.
[0180] Figure 9 This is a schematic diagram of the structure of the gate-based truck image acquisition system of the present invention. Figure 9 As shown, the gate-based truck image acquisition system of the present invention includes:
[0181] The laser point cloud acquisition module 51 acquires laser point clouds within the gate area through at least one point cloud acquisition device, and establishes the transformation relationship between the intrinsic coordinate system of the point cloud acquisition device and the world coordinate system. The X-axis, Y-axis, and Z-axis in the world coordinate system correspond to the length, width, and height of the gate, respectively.
[0182] The point cloud filtering module 52 filters laser point cloud data based on the preset length, width and height data of the gate area, and retains only the laser point cloud to be detected within the spatial range of the gate area.
[0183] The laser point cloud projection module 53 transforms the laser point cloud projection to be detected into a one- or two-dimensional image to be tested and establishes a planar coordinate system. The u-axis of the two-dimensional image to be tested is parallel to the X-axis and the v-axis is parallel to the Z-axis.
[0184] The two-dimensional image under test module 54 collects the laser point cloud when the truck passes through the gate area through the point cloud acquisition device, and projects and converts it into a two-dimensional image under test.
[0185] The image acquisition trigger module 55 triggers the image acquisition device corresponding to the preset trigger position to acquire the image of the truck when the projection pattern of the truck in the two-dimensional image to be tested reaches the preset trigger position.
[0186] The container gate-based truck image acquisition system of the present invention can customize a more efficient and accurate spatial perception method for container gates, thereby providing more accurate trigger signals for truck license plate and container number recognition systems and photography systems, and improving the reliability and efficiency of port intelligent management.
[0187] This invention also provides a gate-based truck image acquisition device, including a processor and a memory storing executable instructions for the processor. The processor is configured to execute steps of a gate-based truck image acquisition method via the executable instructions.
[0188] As described above, the gate-based truck image acquisition device of the present invention can customize a more efficient and accurate spatial perception method for container gates, thereby providing more accurate trigger signals for truck license plate and container number recognition systems and photography systems, and improving the reliability and efficiency of port intelligent management.
[0189] Those skilled in the art will understand that various aspects of the present invention can be implemented as systems, methods, or program products. Therefore, various aspects of the present invention can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "platform."
[0190] Figure 10 This is a schematic diagram of the structure of the gate-based truck image acquisition device of the present invention. See below for reference. Figure 10 To describe an electronic device 600 according to this embodiment of the present invention. Figure 10 The electronic device 600 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0191] like Figure 10As shown, the electronic device 600 is presented in the form of a general-purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including storage unit 620 and processing unit 610), a display unit 640, etc.
[0192] The storage unit stores program code, which can be executed by the processing unit 610 to perform the steps described in the above-described section on the electronic prescription transfer processing method according to various exemplary embodiments of the present invention. For example, the processing unit 610 can perform actions such as... Figure 1 The steps are shown in the figure.
[0193] Storage unit 620 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 6201 and / or cache memory 6202, and may further include a read-only memory (ROM) 6203.
[0194] Storage unit 620 may also include a program / utility 6204 having a set (at least one) program module 6205, such program module 6205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0195] Bus 630 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0196] Electronic device 600 can also communicate with one or more external devices 700 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 600, and / or with any device that enables electronic device 600 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 650. Furthermore, electronic device 600 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 660. Network adapter 660 can communicate with other modules of electronic device 600 via bus 630. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.
[0197] This invention also provides a computer-readable storage medium for storing a program that, when executed, implements the steps of a gate-based truck image acquisition method. In some possible implementations, various aspects of the invention can also be implemented as a program product comprising program code that, when run on a terminal device, causes the terminal device to perform the steps described in the above-described electronic prescription processing method section of this specification according to various exemplary embodiments of the invention.
[0198] As shown above, when the program of the computer-readable storage medium of this embodiment is executed, it can customize a more efficient and accurate spatial perception method for container gates, thereby providing more accurate trigger signals for the truck license plate, container number recognition system and the photography system, and improving the reliability and efficiency of port intelligent management.
[0199] Figure 11 This is a schematic diagram of the structure of the computer-readable storage medium of the present invention. (Reference) Figure 11 As shown, a program product 800 for implementing the above-described method according to an embodiment of the present invention is described. This product may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0200] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0201] Computer-readable storage media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable storage medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0202] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0203] In summary, the container gate-based truck image acquisition method, system, equipment, and storage medium of the present invention can provide a more efficient and accurate spatial perception method for container gates, thereby providing more accurate trigger signals for truck license plate and container number recognition systems and photography systems, and improving the reliability and efficiency of port intelligent management.
[0204] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the scope of protection of the present invention.
Claims
1. A method for acquiring images of container trucks based on gates, characterized in that, Includes the following steps: S110. Collect laser point clouds within the gate area using at least one point cloud acquisition device, and establish the transformation relationship between the intrinsic coordinate system of the point cloud acquisition device and the world coordinate system. The X-axis, Y-axis, and Z-axis in the world coordinate system correspond to the length, width, and height of the gate, respectively. S130. The laser point cloud projection to be detected is converted into a two-dimensional image to be tested and a planar coordinate system is established. The u-axis of the two-dimensional image to be tested is parallel to the X-axis and the v-axis is parallel to the Z-axis. S140. A laser point cloud is collected when the truck passes through the gate area using a point cloud acquisition device; the laser point cloud is projected and converted into the two-dimensional image to be measured; based on the first neural network for image recognition, image regions corresponding to the truck front, truck rear, container front face, and container rear face are obtained, and the pixels of each image region have a label representing the category of the image region; when two truck fronts or container front faces are identified on the same truck, the difference between the angle between the contour lines in the two image regions and 90° is obtained respectively, and the image region with the smaller difference is the image region corresponding to the container front face, and the image region with the larger difference is the image region corresponding to the truck front; S150. When the projected pattern of the truck in the two-dimensional image to be measured reaches a preset trigger position, the image acquisition device corresponding to the preset trigger position is triggered to acquire the image of the truck. The preset trigger position includes a vehicle body circumferential image acquisition trigger vertical line, a front license plate image acquisition trigger vertical line, a front box surface image acquisition trigger vertical line, a rear box surface image acquisition trigger vertical line, and a rear license plate image acquisition trigger vertical line arranged sequentially from the gate inlet to the gate outlet. When the point cloud cluster corresponding to the front of the truck reaches the vehicle body circumferential image acquisition trigger vertical line, the vehicle body circumferential image acquisition device is triggered to start and acquire the vehicle body circumferential image. When the point cloud clusters at the front of the vehicle reach the trigger vertical line for front license plate image acquisition, the front license plate image acquisition device is activated to acquire the front license plate image. When the point cloud clusters corresponding to the front face of the container reach the trigger vertical line for front container face image acquisition, the front container face image acquisition device is activated to acquire the front container face image. When the point cloud clusters corresponding to the rear face of the container reach the trigger vertical line for rear container face image acquisition, the rear container face image acquisition device is activated to acquire the rear container face image. When the point cloud clusters corresponding to the rear face of the container reach the trigger vertical line for rear license plate image acquisition, the rear license plate image acquisition device is activated to acquire the rear license plate image.
2. The method for acquiring images of container trucks based on gates as described in claim 1, characterized in that, In step S110, laser point clouds within the gate area are collected by a point cloud acquisition device. Plane fitting is performed based on the laser point clouds to obtain the plane where the ground of the gate area is located. The transformation relationship between the intrinsic coordinate system of the point cloud acquisition device and the world coordinate system is established. In the world coordinate system, the X-axis is parallel to the length direction of the gate, the Y-axis is parallel to the width direction of the gate, and the Z-axis is parallel to the height direction of the gate.
3. The method for acquiring images of container trucks based on gates as described in claim 1, characterized in that, Step S110 includes the following steps: S111. Collect laser point clouds within the gate area using a point cloud acquisition device, perform plane fitting based on the laser point clouds to obtain the plane where the ground of the gate area is located, and establish the transformation relationship between the intrinsic coordinate system of the point cloud acquisition device and the world coordinate system. S112. When the truck enters the gate area, point clouds below 3.5 meters below the ground are filtered out. S113. Obtain the main direction of the point cloud distribution by using the PCA algorithm on the remaining point cloud, and the main direction is used as the X-axis direction; S114. Based on the fitted plane, obtain the Y-axis perpendicular to the X-axis and the Z-axis perpendicular to the fitted plane. In the world coordinate system, the X-axis is parallel to the length direction of the gate, the Y-axis is parallel to the width direction of the gate, and the Z-axis is parallel to the height direction of the gate.
4. The method for acquiring images of container trucks based on gates as described in claim 1, characterized in that, The process after step S110 and before step S130 also includes: S120. Filter the laser point cloud data based on the preset length, width and height data of the gate area, and retain only the laser point cloud to be detected within the spatial range of the gate area.
5. The method for acquiring images of container trucks based on gates as described in claim 1, characterized in that, Step S130 includes the following steps: S131. Establish a rectangular binary image with M rows and N columns, wherein the u-axis of the rectangular binary image is parallel to the X-axis and the v-axis is parallel to the Z-axis, and a preset trigger position is set in the rectangular binary image according to the ratio of the length and height of the rectangular binary image to the actual gate. S132. Project the laser point cloud to be detected onto the rectangular binarized image; S133. By binarization, each first type of pixel of the laser point cloud projection to be detected and the second type of pixel that did not obtain the laser point cloud projection to be detected are obtained from the rectangular binarized image; S134. The image formed by the set of the first type of pixels and the second type of pixels is used as the two-dimensional image to be tested.
6. The method for acquiring images of container trucks based on gates as described in claim 5, characterized in that, In step S131, the first ratio of the length and width of the rectangular image is the same as the second ratio of the length and height of the gate area.
7. The method for acquiring images of container trucks based on gates as described in claim 5, characterized in that, In step S132, the three-dimensional points (X, Y, Z) in the laser point cloud are projected onto the rectangular binary image (X) using the following formula. u Y v )middle: Among them, X min The minimum value of the spatial range of the gate area in the X-axis coordinate of the world coordinate system; X max The spatial extent of the gate area is the maximum value of the X-axis coordinate in the world coordinate system; Z min The minimum value of the spatial range of the gate area in the Z-axis coordinate of the world coordinate system; Z max The spatial extent of the gate area is the maximum value of the Z-axis coordinate in the world coordinate system.
8. The method for acquiring images of container trucks based on gates as described in claim 5, characterized in that, In step S133, the pixel value of each first type of pixel that has obtained the laser point cloud projection is marked as 1, and the pixel value of each first type of pixel that has not obtained the laser point cloud projection is marked as 0.
9. The method for acquiring images of trucks based on gates as described in claim 1, characterized in that, The point cloud acquisition device, the front license plate image acquisition device, and the front cargo box image acquisition device are respectively installed on the exit side of the gate, and the entrance side of the gate is equipped with a vehicle body circumferential image acquisition device, a rear license plate image acquisition device, and a rear cargo box image acquisition device.
10. The method for acquiring images of container trucks based on gates as described in claim 9, characterized in that, A barrier gate is installed on the side of the gate exit opposite to the gate entrance. The image acquisition device captures the image of the truck, performs image and text recognition, obtains the truck and container number information, and authenticates it with preset data. When the authentication is successful, the barrier gate is opened.
11. The method for acquiring images of container trucks based on gates as described in claim 9, characterized in that, The focal point of the objective lens of the vehicle body circumferential image acquisition device is located in the third vertical plane in the gate area corresponding to the trigger vertical line of the vehicle body circumferential image acquisition. The focal point of the objective lens of the front license plate image acquisition device is located in the first vertical plane in the gate area corresponding to the trigger vertical line of the front license plate image acquisition; The focal point of the objective lens of the front box surface image acquisition device is located in the second vertical plane in the gate area corresponding to the trigger vertical line of the front box surface image acquisition; The focal point of the objective lens of the rear box surface image acquisition device is located in the fourth vertical plane in the gate area corresponding to the rear box surface image acquisition trigger vertical line; The focal point of the objective lens of the rear license plate image acquisition device is located in the fifth vertical plane in the gate area corresponding to the trigger vertical line of the rear license plate image acquisition.
12. A truck image acquisition system based on a gate, characterized in that, The method for acquiring images of trucks based on gates as described in claim 1 includes: The laser point cloud acquisition module acquires laser point clouds within the gate area through at least one point cloud acquisition device, and establishes the transformation relationship between the intrinsic coordinate system of the point cloud acquisition device and the world coordinate system. The X-axis, Y-axis, and Z-axis in the world coordinate system correspond to the length, width, and height of the gate, respectively. The laser point cloud projection module converts the laser point cloud projection to be detected into a two-dimensional image to be tested and establishes a planar coordinate system. The u-axis of the two-dimensional image to be tested is parallel to the X-axis and the v-axis is parallel to the Z-axis. A two-dimensional image module acquires laser point clouds as the truck passes through the gate area using a point cloud acquisition device; projects these laser point clouds onto the two-dimensional image module; obtains image regions corresponding to the truck's front, rear, container front, and container rear faces based on a first neural network for image recognition, with each pixel in each image region having a label representing the category of that region; when two truck fronts or container front faces are identified on the same truck, the difference between the angle between the contour lines in the two image regions and 90° is obtained, with the image region having a smaller difference corresponding to the container front face, and the image region having a larger difference corresponding to the truck front face; and The image acquisition trigger module, when the projection pattern of the truck in the two-dimensional image to be tested reaches a preset trigger position, triggers the image acquisition device corresponding to the preset trigger position to acquire the image of the truck. The preset trigger position includes a series of vertical lines arranged sequentially from the gate inlet to the gate outlet: a circumferential image acquisition trigger line for the truck body, a front license plate image acquisition trigger line, a front cargo box surface image acquisition trigger line, a rear cargo box surface image acquisition trigger line, and a rear license plate image acquisition trigger line. When the point cloud cluster corresponding to the front of the truck reaches the circumferential image acquisition trigger line for the truck body, the circumferential image acquisition device for the truck body is activated to acquire the circumferential image of the truck body. When the point cloud cluster corresponding to the front of the vehicle reaches the trigger vertical line for front license plate image acquisition, the front license plate image acquisition device is activated to acquire the front license plate image; when the point cloud cluster corresponding to the front face of the container reaches the trigger vertical line for front container face image acquisition, the front container face image acquisition device is activated to acquire the front container face image; when the point cloud cluster corresponding to the rear face of the container reaches the trigger vertical line for rear container face image acquisition, the rear container face image acquisition device is activated to acquire the rear container face image; when the point cloud cluster corresponding to the rear face of the container reaches the trigger vertical line for rear license plate image acquisition, the rear license plate image acquisition device is activated to acquire the rear license plate image.
13. A truck image acquisition device based on a gate, characterized in that, include: processor; Memory, which stores the processor's executable instructions; The processor is configured to execute the steps of the gate-based truck image acquisition method according to any one of claims 1 to 11 by executing executable instructions.
14. A computer-readable storage medium for storing a program, characterized in that, When the program is executed, it implements the steps of the gate-based truck image acquisition method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Access barrier gate detection method based on 3D ToF camera
CN109696667A
Container truck anti-hoisting detection method and device based on three-dimensional laser and computer equipment
CN113376651A