A method for detecting container truck spreader

Real-time monitoring of the position and posture of spreaders and containers through computer vision technology solves potential safety hazards caused by improper operation of container truck drivers and improves the controllability and safety of port loading and unloading operations.

CN112184800BActive Publication Date: 2024-09-13BEIJING TRUNK TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010916237.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-03
Publication Date
2024-09-13
Estimated Expiration
2040-09-03

AI Technical Summary

Technical Problem

In port container operations, the fatigue or improper operation of container truck drivers leads to improper spreader movements and improper placement of containers, causing safety hazards. The existing automation system cannot effectively control and manage the behavior of container trucks, leading to accidents.

Method used

Computer vision technology is used to monitor the position and attitude of the spreader and container in real time through the spreader detection camera and detection controller, and the world coordinate system is used to determine the relative position relationship between the two to ensure safe loading and unloading operations and reduce the risk of human operations. Hidden danger.

Benefits of technology

It realizes the real-time transmission of attitude and position information of spreaders and containers, avoids safety hazards in manual operations, improves the controllability and energy efficiency of port loading and unloading operations, and ensures safe and orderly loading and unloading operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112184800B
    Figure CN112184800B
Patent Text Reader

Abstract

The present invention provides a method for detecting a truck spreader, comprising the following steps: S1, issuing an operation task, and the truck moves to a bay according to the task; S2, the field bridge receives the instruction and moves to the corresponding bay; S3, after the field bridge arrives at the bay, it feeds back the arrival information to the port operation system, and the port operation system feeds back the field bridge status to the truck; S4, the truck receives the information, locks the truck, and the spreader detection controller is turned on; S5, the field bridge controls the spreader according to the instruction, and performs a loading task or an unloading task through real-time monitoring by the spreader detection controller; S6, the spreader detection controller receives a task completion signal, sends the operation completion information to the port operation system, and the port task system operation system confirms, unlocks the truck, and the truck leaves the operation area. The method detects the posture and position of the spreader and the container in real time, and interacts with the port operation system to ensure the safe operation of the spreader; the operation logic greatly improves the controllability, reliability and energy efficiency of the port's loading and unloading operations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of port automation, and in particular to a method for detecting a container truck spreader. Background Art

[0002] Port container operations mainly involve loading and unloading operations between various types of spreaders and container trucks. The main safety hazard in such operations lies in whether the container truck can correctly identify the movement and status of the spreader. In the traditional port environment, safety judgments are usually made by container truck drivers. When the safety officer is fatigued or operates improperly, safety accidents such as dragging the spreader and improper placement of containers may occur.

[0003] The spreader detection system uses computer technology to automatically determine the working status of the spreader and the position and posture of the container, so as to intelligently judge whether the container truck has safely completed the loading and unloading operation and accepted new task instructions. The current common method is based on the automated yard bridge, using the information equipment of the yard bridge to determine the safety of the spreader and loading and unloading operations. This method lacks control and management of the container truck behavior and cannot prevent accidents caused by improper operation of the container truck driver. Summary of the invention

[0004] The present invention aims to solve the problems in the prior art and provides a method and system for detecting a container truck spreader. The method adopts computer vision technology to obtain the working status of the spreader and the position and posture information of the container, thereby generating correct vehicle behavior and reducing safety hazards.

[0005] A container truck spreader detection method according to the present invention comprises the following steps:

[0006] S1. The port operation system issues operation tasks to the container trucks, and the container trucks move to the corresponding bays according to the operation tasks and wait for the yard crane to arrive;

[0007] S2. The yard crane receives the command from the port operation system and moves to the corresponding bay position;

[0008] S3. After the yard crane arrives at the corresponding bay, it feeds back the arrival information to the port operation system, and the port operation system feeds back the arrival status of the yard crane to the container truck;

[0009] S4: The container truck receives the arrival status information of the yard crane, locks the container and drives, and the spreader detection controller is turned on;

[0010] S5. The yard crane controls the spreader to perform loading or unloading tasks according to the instructions of the port operation system through real-time monitoring by the spreader detection controller;

[0011] S6. The spreader detection controller determines that the task is completed. The spreader detection controller sends a job completion message to the port operation system. The port operation system confirms and unlocks the container truck, and the container truck drives out of the operation area.

[0012] When the spreader grabs and transports the container, due to the positional relationship, the container will block the spreader. It can be seen that this does not affect the detection of the relative position between the two at this time. The detection system detects the relative position between the spreader and the container and calculates the distances of both from the origin of the world coordinate system. When the spatial positions of the spreader and the container are greater than the specified threshold of the world coordinate system, it indicates that the container is safely detached from the container truck. At this time, there will be no tug-of-war regarding the container between the container truck and the spreader.

[0013] A container truck spreader detection method according to the present invention, as a preferred mode, the container loading operation in step S5 specifically includes:

[0014] S511. For a container truck without a container, behind the container truck, with the center of the rear axle as the origin of the coordinate system, the center axis of the vehicle as the y-axis, pointing in the direction of the vehicle tail, the ground vertically upward as the z-axis, and x - y - z following the right-hand screw rule, a world coordinate system is established in the area where 1m < y < 20m and -5m < x < 5m. Under the world coordinate system, the spreader detection controller detects the spatial positions and relative position relationships of the spreader and the container.

[0015] S512. The spreader and the container truck wait to receive the container loading instruction from the port operation system, and the spreader detection controller continuously detects the spatial positions of the spreader and the container relative to the world coordinate system. When the detection target appears in the world coordinate system, step S513 is performed; otherwise, the spreader and the container continue to be detected in the world coordinate system.

[0016] S513. The information transmission module feeds back the confirmation information to the quay crane operation system.

[0017] S514. The spreader detection camera detects the spreader and the container. The spreader detection controller calculates the position relationship between the spreader and the container by calculating the relative position distance and feeds this information back to the port operation system.

[0018] S515. The spatial positions of the spreader and the container in the world coordinate system are determined by two vertical points of the container. The visual detection module continuously calculates the spatial distance between the spreader and the container relative to the world coordinate system. The position where the spreader lifts the container gradually approaches the position where the container truck bears the container. When the spatial distance is zero compared to the origin of the world coordinate system, the container reaches the correct loading position.

[0019] S516. The spreader unloads the container and real-time detects the relative position between the spreader and the container. The distance between the spreader and the container gradually increases. When the position z of the spreader > 3m, the information transmission module sends a job completion message to the port operation system.

[0020] A container truck spreader detection method according to the present invention. As a preferred mode, in step S5, the container unloading task specifically includes:

[0021] S521. For a container truck loaded with a container, behind the container truck, with the center of the rear axle as the origin of the coordinate system, the center axis of the vehicle as the y-axis, pointing in the direction of the vehicle tail, and the ground vertically upward as the z-axis, and x - y - z following the right-hand screw rule, a world coordinate system is established in the region of 1m < y < 20m, -5m < x < 5m. Under the world coordinate system, the spreader detection controller detects the spatial position of the spreader.

[0022] S522. The spreader and the container truck wait to receive the container unloading instruction from the port operation system, and the spreader detection controller real-time detects the spatial positions of the spreader and the container relative to the world coordinate system. When the spreader reaches above the container loaded on the container truck and correctly locks the container, step S523 is performed; otherwise, the detection of the spreader and the container continues in the world coordinate system.

[0023] S523. The information transmission module feeds back the confirmation message to the gantry crane operation system.

[0024] S524. The spreader detection camera detects the spreader and the container. The spreader detection controller calculates the position relationship between the spreader and the container by calculating the relative position distance between them and feeds this information back to the port operation system.

[0025] S525. The vision detection module real-time calculates the relative spatial distance between the spreader and the container. The position of the spreader gradually approaches the position of the container carried by the container truck. During the movement of the spreader, the spreader detection controller sends a confirmation message to the gantry crane operation system to ensure that the container truck remains stationary. When the spatial distance is zero relative to the origin of the world coordinate system, the spreader locks the container.

[0026] S526. The spreader leaves the origin of the world coordinate system, detects the relative position between the spreader and the container and calculates the distance of both from the origin of the world coordinate system. When the spatial positions of the spreader and the container are in the region of z > 3m and x > 5m or x < -5m in the world coordinate system, the information transmission module sends a job completion message to the port operation system.

[0027] A container truck spreader detection method according to the present invention. As a preferred mode, the specific method for the vision detection module to detect the spreader and the container is:

[0028] The basic shapes of the spreader and container are regarded as cuboids. The spreader detection camera is used to obtain the circumscribed rectangular frame of the spreader and container. Within the rectangular frame, the segmentation algorithm is used to extract the faces of the container and spreader pointing to the front of the vehicle. The spatial positions of the container and spreader are estimated based on the two vertical corner points of the faces in the front of the vehicle in the image.

[0029] The corner point distance calculation method is as follows:

[0030] The mapping relationship from the world coordinate system to the camera coordinate system is established as follows:

[0031]

[0032] Where γ is the pitch angle of the crane detection camera;

[0033] According to the pinhole imaging principle, the mapping relationship between the camera coordinate system and the two-dimensional image coordinate system is established as follows:

[0034]

[0035] Where f is the focal length of the camera;

[0036] Construct the relationship between the image coordinate system and the world coordinate system. The formula is as follows:

[0037]

[0038] Construct data table T IW , each triplet (u, v, depth = y w ) is (x w , z w );

[0039] According to the point (u, v) on the image, and the depth value depth of the plane where the point is located relative to the world coordinate system XZ plane, where depth is added to the depth value scale step to get a new depth value, through the (u, v, depth) triplet, in the data table T IW A quick table lookup yields (x w , z w ), and then obtain the world coordinate position of the image point (x w ,y w =depth, z w );

[0040] Determine the world coordinates of points A and B obtained by looking up the table. The formula is as follows:

[0041]

[0042] Where d is the height of the container body, threshold is the fixed error value, and when the judgment is not satisfied, the depth value is adjusted upward and the judgment is repeated; otherwise, the depth value is adjusted downward, and a new scale is added to the original depth value until the minimum depth value scale is reached to obtain the optimal solution.

[0043] The basic shape of the spreader and container can be regarded as a cuboid. The 2D image detection algorithm obtains the circumscribed rectangular frame of the spreader and container. In the rectangular frame, the segmentation algorithm is used to extract the surface of the container and spreader pointing to the front of the vehicle. Then, the spatial position of the surface is estimated by two perpendicular points in the image.

[0044] After the detection camera captures the video frame, a two-dimensional image detection algorithm is used to obtain the circumscribed rectangular frame of the spreader and container. Within the rectangular frame, a segmentation algorithm is used to extract the faces of the container and spreader pointing in the direction of the vehicle head to determine the two vertical points in the image.

[0045] The present invention provides a container truck spreader detection system, comprising a container truck, a spreader detection camera, a spreader detection controller, a port operation system and a yard bridge, wherein the spreader detection camera is arranged on the container truck, the spreader detection controller is connected to the spreader detection camera signal, the port operation system is connected to the container truck signal, the yard bridge is connected to the port operation system signal, and the spreader detection controller is connected to the port operation system signal;

[0046] The container truck is used to transport containers, the spreader detection camera is used to detect the position images of the container and the yard crane, the spreader detection controller is used to calculate the position information based on the position image of the spreader detection camera and control the spreader of the yard crane to lift or release the container, and the port operation system is used to send and receive operation commands to the container truck.

[0047] A container truck spreader detection system described in the present invention, as a preferred embodiment, a spreader detection controller includes a visual detection module, a signal receiving module and an information transmission module. The visual detection module is used to detect the spreader and container status fed back in real time by a spreader detection camera, the signal receiving module receives the signal from the spreader detection camera and transmits it to the visual detection module, and the information transmission module is used to transmit the spreader and container status detected in the visual detection module to the port operation system.

[0048] The spreader detection controller uses the camera imaging principle to calculate the position and posture of the spreader and the position and posture of the container loaded and unloaded by the spreader. According to the spreader detection state machine, it determines the state of the spreader and then outputs the vehicle control information to ensure whether the vehicle can leave the work point and accept new work instructions.

[0049] The beneficial effects of the present invention are as follows:

[0050] (1) The system transmits the posture and position information of the spreader and container in real time, which can effectively avoid the hidden dangers caused by obstacles to information transmission during manual operation;

[0051] (2) The system operation logic has greatly improved the controllability and energy efficiency of the port's loading and unloading operations;

[0052] (3) Based on the target detection algorithm, the empty positions of the spreader and the container can be detected simultaneously, and the relative position relationship between the two can be detected when occlusion occurs, ensuring the safe and orderly progress of loading and unloading operations;

[0053] (4) Deploying the detection system on container trucks can reduce the cost of information transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 This is a flow chart of a container truck spreader detection method embodiment 1;

[0055] Figure 2 This is a flow chart of a container truck spreader detection method embodiment 2;

[0056] Figure 3 A triplet data table diagram of a container truck spreader detection method;

[0057] Figure 4 It is a schematic diagram of a container truck spreader detection system;

[0058] Figure 5 The present invention is a schematic diagram of a spreader detection controller of a container truck spreader detection system.

[0059] Reference numerals:

[0060] 1. Container truck; 2. Spreader detection camera; 3. Spreader detection controller; 31. Visual detection module; 32. Signal receiving module; 33. Information transmission module; 4. Port operation system; 5. Yard crane. DETAILED DESCRIPTION

[0061] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0062] Example 1

[0063] like Figure 1 As shown, a container truck spreader detection method, wherein the packing task includes the following steps:

[0064] S1. The port operation system 4 issues an operation task to the container truck 1. The container truck 1 moves to the corresponding bay (a fixed position, and its position information can be collected by GPS / Beidou positioning equipment) according to the operation task and waits for the yard crane 5 to arrive.

[0065] S2. The yard crane 5 receives the instruction from the port operation system 4 and moves to the corresponding bay.

[0066] S3. After the yard crane 5 arrives at the corresponding bay, it feeds back the arrival information to the port operation system 4. The port operation system 4 feeds back the arrival status of the yard crane 5 to the container truck 1.

[0067] S4. The container truck 1 receives the arrival status information of the yard crane 5, locks the container truck, and the spreader detection controller 3 is turned on.

[0068] S5. The container truck 1 without a container enters the Ready state. Behind the container truck 1, with the center of the rear axle as the origin of the coordinate system, the center axis of the vehicle as the y-axis, pointing in the direction of the vehicle tail, the ground vertically upward as the z-axis, and x - y - z following the right-hand screw rule, a world coordinate system is established in the area where 1m < y < 20m and -5m < x < 5m. In the world coordinate system, the spreader detection controller 3 detects the spatial position and relative position relationship between the spreader and the container.

[0069] S6. The spreader and the container truck 1 wait to receive the container loading instruction from the port operation system 4, and the spreader detection controller 3 continuously detects the spatial position of the spreader and the container relative to the world coordinate system. When the detection target appears in the world coordinate system, step S7 is performed; otherwise, the spreader and the container are continuously detected in the world coordinate system.

[0070] S7. At this time, the system enters the loading (LOAD) process and feeds back the ACK information to the yard crane operation system. When the detection system detects that only the spreader approaches the container truck, the system is forced to enter the Waiting state for manual handling.

[0071] S8. The spreader detection camera 2 detects the spreader and the container. The spreader detection controller 3 calculates the position relationship between the spreader and the container by calculating the relative position distance and feeds this information back to the port operation system 4.

[0072] S9. The spatial position of the spreader and the container in the world coordinate system is determined by two vertical points on the container body. The visual detection module 31 continuously calculates the spatial distance between the spreader and the container relative to the world coordinate system. The position where the spreader lifts the container gradually approaches the position where the container truck 1 bears the container. When the spatial distance is zero relative to the origin of the world coordinate system, the container reaches the correct loading position.

[0073] S10, the spreader unloads the container, and the relative position of the spreader and the container is detected in real time. After the spreader unloads the container, the detection system enters the DetCrane state, and the distance between the spreader and the container gradually increases. When the spreader position z>3m, the information transmission module 33 sends the operation completion information to the port operation system 4;

[0074] S11, the spreader detection controller 3 determines that the task is completed, and the spreader detection controller 3 sends a task completion message to the port operation system 4. The port operation system confirms and unlocks the Ready state of the container truck 1, and the container truck 1 leaves the operation area.

[0075] The specific method of the visual inspection module 31 to inspect the spreader and the container is as follows:

[0076] The basic shapes of the spreader and container are regarded as cuboids, and the circumscribed rectangular frame of the spreader and container is obtained through the spreader detection camera 2. Within the rectangular frame, the surface of the container and spreader pointing to the front of the vehicle is extracted using a segmentation algorithm, and the spatial position of the container and spreader is estimated based on the two vertical corner points of the surface in the front of the vehicle in the image;

[0077] The corner point distance calculation method is as follows:

[0078] The mapping relationship from the world coordinate system to the camera coordinate system is established as follows:

[0079]

[0080] Where γ is the pitch angle of the sling detection camera 2;

[0081] According to the pinhole imaging principle, the mapping relationship between the camera coordinate system and the two-dimensional image coordinate system is established as follows:

[0082]

[0083] Where f is the focal length of the camera;

[0084] Construct the relationship between the image coordinate system and the world coordinate system. The formula is as follows:

[0085]

[0086] Construct data table T IW ,The content of each triple in the table is;

[0087] According to the point (u, v) on the image, and the depth value of the plane where the point is located relative to the world coordinate system XZ plane, the new depth value is obtained by adding the depth value scale step, through the (u, v, depth) triplet, in the data table T IW A quick table lookup yields (x w , z w), and then obtain the world coordinate position of the image point (x w ,y w =depth, z w );

[0088] Determine the world coordinates of points A and B obtained by looking up the table. The formula is as follows:

[0089] |x Aw -x Bw |<threshold

[0090] |z Aw -z Bw -d<threshold,

[0091] Where d is the height of the container body, threshold is the fixed error value, and when the judgment is not satisfied, the depth value is adjusted upward and the judgment is repeated; otherwise, the depth value is adjusted downward, and a new scale is added to the original depth value until the minimum depth value scale is reached to obtain the optimal solution.

[0092] like Figure 3 As shown in the figure, since the container and the spreader are in regular translational motion relative to the detection camera, there is no rotation. The camera coordinate system can be connected to the image coordinate system and the world coordinate system through the above formula. A , v A ) and B(u B , v B ) is obtained through the image coordinate system. It is known that the following relationship exists between points A and B in the world coordinate system:

[0093] x Aw =x Bw ,y Aw =y Bw ,z Aw -z Bw =d

[0094] Where d is the height of the box. To find the optimal solution (x Aw ,y Aw , z Aw ) T , establish a triplet data table TIW based on the image coordinate system, the content of each triplet (u, v, depth) is (x w , z w ), the depth scale steps are 2m, 1m, 0.5m, 0.1m respectively. The range is between 0 and 20m.

[0095] After detecting the two vertical corners A and B of the box, use the image coordinate system A(u A , v A) and B(u B , v B ) and depth = y w Query in the multi-scale triple data table to get the corresponding (x Aw , z Aw ) and (x Bw , z Bw ) is then put into the judgment formula for judgment. If the judgment is satisfied, a smaller scale is selected under the depth. For example, there is a set of vertical observation points M(u M , v M ),N(u N , v N ), when depth = 1, step = 1, the two sets of triplet data tables are in the form of (u M , v M , depth = 1), (u N , v N , depth = 1) and then look up the table to get the world coordinates (x Mw , z Mw ), (x Nw , z Nw ), substitute the world coordinates of the two points into the judgment, if it does not meet the conditions, update depth = depth + step = 2, and repeat the above table lookup and judgment process; if it meets the conditions, update step = 0.5, depth = depth + step = 1.5, repeat the above table lookup and judgment process until step = 0.1m to obtain the optimal solution that meets the conditions.

[0096] Triple data table: {"image_width":1080,"image_height":720,"max_depth":20} represents the length and width of the image coordinates, and the estimated maximum depth is 20 meters, {"step":"2","depth":"4","world_coord":[[1.38,10.94],[1.38,10.89],[1.38,10.84],[1.38,10.79],[1.38,10.74],[1.38,10.7],[1.38,10.65],...} represent the current depth change step value of step, depth represents the current depth, and world_coord represents the conversion of the image coordinate system into the world coordinate system (x,z) coordinates.

[0097] like Figure 4As shown, a container truck spreader detection system includes a container truck 1, a spreader detection camera 2, a spreader detection controller 3, a port operation system 4 and a yard bridge 5. The spreader detection camera 2 is arranged on the container truck 1, the spreader detection controller 3 is connected to the spreader detection camera 2 by signal, the port operation system 4 is connected to the container truck 1 by signal, the yard bridge 5 is connected to the port operation system 4 by signal, and the spreader detection controller 3 is connected to the port operation system 4 by signal;

[0098] The container truck 1 is used to transport containers, the spreader detection camera 2 is used to detect the position images of the container and the yard crane 5, the spreader detection controller 3 is used to calculate the position information based on the position image of the spreader detection camera 2 and control the spreader of the yard crane 5 to lift or release the container, and the port operation system 4 is used to send and receive operation commands to the container truck 1.

[0099] like Figure 5 As shown, the spreader detection controller 3 includes a visual detection module 31, a signal receiving module 32 and an information transmission module 33. The visual detection module 31 is used to detect the spreader and container status fed back in real time by the spreader detection camera 2. The signal receiving module 32 receives the signal from the spreader detection camera 2 and transmits it to the visual detection module 31. The information transmission module 33 is used to transmit the spreader and container status detected in the visual detection module 31 to the port operation system 4.

[0100] The spreader detection camera 2 uses an automotive-grade camera with an LVDS interface, a focal length of 6 mm, and a FOV of 120 degrees. The spreader detection controller 3 is based on the NVIDIA TX2 board, with an additional LVDS decoding chip and a CAN bus communication module. The spreader detection camera 2 is installed on the top of the vehicle head, with the camera optical axis pointing in the opposite direction of the vehicle's travel, and an angle of 20 degrees with the plane on the top of the vehicle head. The spreader detection camera 2 collects images of the spreader operating the container truck and transmits them to the spreader detection controller 3 through the LVDS interface. The spreader detection controller 3 uses a deep learning algorithm to detect the position of the spreader and the container to be operated in the image, and uses the projection imaging principle to estimate the three-dimensional position and posture of the spreader and container in the camera coordinate system. According to the spreader detection state machine, the state of the spreader and container is determined. If the spreader and container are confirmed to be safe, the vehicle lock is released through the CAN bus, the vehicle accepts new operation tasks, and the driver can operate the vehicle to drive.

[0101] Example 2

[0102] like Figure 2 As shown, a container truck spreader detection method, wherein the unloading task includes the following steps:

[0103] S1. The port operation system 4 issues an operation task to the container truck 1. The container truck 1 moves to the corresponding bay (a fixed position, and its position information can be collected by a GPS / Beidou positioning device) according to the operation task and waits for the yard crane 5 to arrive.

[0104] S2. The yard crane 5 receives the instruction from the port operation system 4 and moves to the corresponding bay.

[0105] S3. After the yard crane 5 arrives at the corresponding bay, it feeds back the arrival information to the port operation system 4, and the port operation system 4 feeds back the arrival status of the yard crane 5 to the container truck 1.

[0106] S4. The container truck 1 receives the arrival status information of the yard crane 5, locks the container and starts the spreader detection controller 3.

[0107] S5. For the container truck 1 loaded with a container, with the center of the rear axle as the origin of the coordinate system behind the container truck 1, the vehicle's central axis as the y-axis, pointing in the direction of the vehicle's tail, the ground vertically upward as the z-axis, and x - y - z following the right-hand screw rule, a world coordinate system is established in the area where 1m < y < 20m and -5m < x < 5m. The container truck (with a container) stops in the operation area and maintains the Ready state. At this time, the detection system turns on the vision sensor, receives instructions from the yard crane system and returns ACK simultaneously, and the spreader detection controller 3 detects the spatial position of the spreader in the world coordinate system.

[0108] S6. The spreader and the container truck 1 wait to receive the container unloading instruction from the port operation system 4, and the spreader detection controller 3 continuously detects the spatial positions of the spreader and the container relative to the world coordinate system. When the spreader reaches above the container loaded on the container truck 1 and correctly locks the container, the detection system issues a warning to force the system to enter the Waiting state for manual processing, and then proceeds to step S7; otherwise, it continues to detect the spreader and the container in the world coordinate system.

[0109] S7. When the spreader reaches the specified safety threshold in the world coordinate system, the system enters the (UNLOAD) state.

[0110] S8. The spreader detection camera 2 detects the spreader and the container, the detection system enters the DetCrane state, and the spreader detection controller 3 calculates the positional relationship between the spreader and the container by calculating the relative position distance and feeds this information back to the port operation system 4.

[0111] S9, the visual inspection module 31 calculates the relative spatial distance between the spreader and the container in real time. The spreader position gradually approaches the position of the container truck 1 carrying the container. During the movement of the spreader, the spreader detection controller 3 sends ARK information to the yard crane 5 operation system to ensure that the container truck 1 remains in the Ready state. When the spatial distance is zero compared to the origin of the world coordinate system, the spreader locks the container;

[0112] S10, the spreader leaves the origin of the world coordinate system, and the container truck 1 remains in the Ready state. The detection system enters the DetBox state, detects the relative position of the spreader and the container and calculates the distance between the two and the origin of the world coordinate system. When the spatial position of the spreader and the container is in the area of ​​z>3m and x>5m or x<-5m of the world coordinate system, the information transmission module 33 sends the operation completion information to the port operation system 4.

[0113] S11, the spreader detection controller 3 determines that the task is completed, and the spreader detection controller 3 sends a task completion message to the port operation system 4. The port operation system confirms and unlocks the container truck 1, and the container truck 1 leaves the operation area.

[0114] The specific method of the visual inspection module 31 to inspect the spreader and the container is as follows:

[0115] The basic shapes of the spreader and container are regarded as cuboids, and the circumscribed rectangular frame of the spreader and container is obtained through the spreader detection camera 2. Within the rectangular frame, the surface of the container and spreader pointing to the front of the vehicle is extracted using a segmentation algorithm, and the spatial position of the container and spreader is estimated based on the two vertical corner points of the surface in the front of the vehicle in the image;

[0116] The corner point distance calculation method is as follows:

[0117] The mapping relationship from the world coordinate system to the camera coordinate system is established as follows:

[0118]

[0119] Where γ is the pitch angle of the sling detection camera 2;

[0120] According to the pinhole imaging principle, the mapping relationship between the camera coordinate system and the two-dimensional image coordinate system is established as follows:

[0121]

[0122] Where f is the focal length of the camera;

[0123] Construct the relationship between the image coordinate system and the world coordinate system. The formula is as follows:

[0124]

[0125] Construct data table TIW ,The content of each triple in the table is;

[0126] According to the point (u, v) on the image, and the depth value of the plane where the point is located relative to the world coordinate system XZ plane, the new depth value is obtained by adding the depth value scale step, through the (u, v, depth) triplet, in the data table T IW A quick table lookup yields (x w , z w ), and then obtain the world coordinate position of the image point (x w ,y w =deoth, z w );

[0127] Determine the world coordinates of points A and B obtained by looking up the table. The formula is as follows:

[0128] |x Aw -x Bw |<threshold

[0129] |z Aw -z Bw -d<threshold,

[0130] Where d is the height of the container body, threshold is the fixed error value, and when the judgment is not satisfied, the depth value is adjusted upward and the judgment is repeated; otherwise, the depth value is adjusted downward, and a new scale is added to the original depth value until the minimum depth value scale is reached to obtain the optimal solution.

[0131] like Figure 3 As shown in the figure, since the container and the spreader are in regular translational motion relative to the detection camera, there is no rotation. The camera coordinate system can be connected to the image coordinate system and the world coordinate system through the above formula. A , v A ) and B(u B , v B ) is obtained through the image coordinate system. It is known that the following relationship exists between points A and B in the world coordinate system:

[0132] x Aw =x Bw ,y Aw =y Bw ,z Aw -z Bw =d

[0133] Where d is the height of the box. To find the optimal solution (x Aw ,y Aw z Aw ) T, establish a triplet data table TIW based on the image coordinate system, the content of each triplet (u, v, depth) is (x w , z w ), the depth scale steps are 2m, 1m, 0.5m, 0.1m respectively. The range is between 0 and 20m.

[0134] After detecting the two vertical corners A and B of the box, use the image coordinate system A(u A ,v A ) and B(u B ,v B ) and depth = y w Query in the multi-scale triple data table to get the corresponding (x Aw ,z Aw ) and (x Bw ,z Bw ) is then put into the judgment formula for judgment. If the judgment is satisfied, a smaller scale is selected under the depth. For example, there is a set of vertical observation points M(u M ,v M ),N(u N , v N ), when depth = 1, step = 1, the two sets of triplet data tables are in the form of (u M ,v M ,depth=1),(u M ,v M , depth = 1) After looking up the table, the world coordinates are obtained (x Mw ,z Mw ), (x Nw , z Nw ), substitute the world coordinates of the two points into the judgment, if it does not meet the conditions, update depth = depth + step = 2, and repeat the above table lookup and judgment process; if it meets the conditions, update step = 0.5, depth = depth + step = 1.5, repeat the above table lookup and judgment process until step = 0.1m to obtain the optimal solution that meets the conditions.

[0135] Triple data table: {"image_width":1080,"image_height":720,"max_depth":20} represents the length and width of the image coordinates, and the estimated maximum depth is 20 meters, {"step":"2","depth":"4","world_coord":[[1.38,10.94],[1.38,10.89],[1.38,10.84],[1.38,10.79],[1.38,10.74],[1.38,10.7],[1.38,10.65],...} represent the current depth change step value of step, depth represents the current depth, and world_coord represents the conversion of the image coordinate system into the world coordinate system (x,z) coordinates.

[0136] like Figure 4 As shown, a container truck spreader detection system includes a container truck 1, a spreader detection camera 2, a spreader detection controller 3, a port operation system 4 and a yard bridge 5. The spreader detection camera 2 is arranged on the container truck 1, the spreader detection controller 3 is connected to the spreader detection camera 2 by signal, the port operation system 4 is connected to the container truck 1 by signal, the yard bridge 5 is connected to the port operation system 4 by signal, and the spreader detection controller 3 is connected to the port operation system 4 by signal;

[0137] The container truck 1 is used to transport containers, the spreader detection camera 2 is used to detect the position images of the container and the yard crane 5, the spreader detection controller 3 is used to calculate the position information based on the position image of the spreader detection camera 2 and control the spreader of the yard crane 5 to lift or release the container, and the port operation system 4 is used to send and receive operation commands to the container truck 1.

[0138] like Figure 5 As shown, the spreader detection controller 3 includes a visual detection module 31, a signal receiving module 32 and an information transmission module 33. The visual detection module 31 is used to detect the spreader and container status fed back in real time by the spreader detection camera 2. The signal receiving module 32 receives the signal from the spreader detection camera 2 and transmits it to the visual detection module 31. The information transmission module 33 is used to transmit the spreader and container status detected in the visual detection module 31 to the port operation system 4.

[0139] The spreader detection camera 2 uses an automotive-grade camera with an LVDS interface, a focal length of 6 mm, and a FOV of 120 degrees. The spreader detection controller 3 is based on the NVIDIA TX2 board, with an additional LVDS decoding chip and a CAN bus communication module. The spreader detection camera 2 is installed on the top of the vehicle head, with the camera optical axis pointing in the opposite direction of the vehicle's travel, and an angle of 20 degrees with the plane on the top of the vehicle head. The spreader detection camera 2 collects images of the spreader operating the container truck and transmits them to the spreader detection controller 3 through the LVDS interface. The spreader detection controller 3 uses a deep learning algorithm to detect the position of the spreader and the container to be operated in the image, and uses the projection imaging principle to estimate the three-dimensional position and posture of the spreader and container in the camera coordinate system. According to the spreader detection state machine, the state of the spreader and container is determined. If the spreader and container are confirmed to be safe, the vehicle lock is released through the CAN bus, the vehicle accepts new operation tasks, and the driver can operate the vehicle to drive.

[0140] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A container truck spreader detection method, characterized in that: Including the following steps: S1. The port operation system (4) issues an operation task to the container truck (1), and the container truck (1) moves to the corresponding bay according to the operation task and waits for the yard crane (5) to arrive; S2. The yard crane (5) receives the instruction from the port operation system (4) and moves to the corresponding bay; S3. After the yard crane (5) arrives at the corresponding bay, it feeds back the arrival information to the port operation system (4), and the port operation system (4) feeds back the arrival status of the yard crane (5) to the container truck (1); S4. After receiving the arrival status information of the yard crane (5), the container truck (1) locks the container truck (1), and the spreader detection controller (3) is turned on; S5. The yard crane (5) controls the spreader to perform the container loading task or the container unloading task according to the instruction of the port operation system (4) and monitors it in real time through the spreader detection controller (3); S6. The spreader detection controller (3) receives the task completion signal, and the spreader detection controller (3) sends the operation completion information to the port operation system (4). After the port operation system (4) confirms, it unlocks the container truck (1), and the container truck (1) drives out of the operation area; The spreader detection controller (3) includes a visual detection module (31), a signal receiving module (32), and an information transmission module (33). The visual detection module (31) is used to detect the status of the spreader and the container in real time fed back by the spreader detection camera (2). The signal receiving module (32) receives the signal of the spreader detection camera (2) and transmits it to the visual detection module (31). The information transmission module (33) is used to transmit the status of the spreader and the container detected in the visual detection module (31) to the port operation system (4); The container unloading task in the step S5 specifically includes: S511. For the container truck (1) without the container, behind the container truck (1), with the center of the rear axle as the origin of the coordinate system, the vehicle center axis as the y-axis, pointing in the direction of the vehicle tail, and the ground vertically upward as the z-axis, and x-y-z following the right-hand screw rule, a world coordinate system is established in the area where 1m < y < 20m and -5m < x < 5m. In the world coordinate system, the spreader detection controller (3) detects the spatial position and relative position relationship between the spreader and the container; S512. The spreader and the container truck (1) wait to receive the container loading instruction from the port operation system (4), and the spreader detection controller (3) detects the spatial position of the spreader and the container relative to the world coordinate system in real time. When the detection target appears in the world coordinate system, step S513 is performed; otherwise, the spreader and the container are continuously detected in the world coordinate system; S513. The information transmission module (33) of the spreader detection controller (3) feeds back the confirmation information to the yard crane (5) operation system; S514. The spreader detection camera (2) detects the spreader and the container, and the spreader detection controller (3) obtains the positional relationship between the two by calculating the relative positional distance between the spreader and the container and feeds this information back to the port operation system (4); S515. Determine the spatial positions of the spreader and the container in the world coordinate system through two vertical points of the container body. The vision detection module (31) calculates the spatial distance between the spreader and the container relative to the world coordinate system in real time. As the position where the spreader lifts the container gradually approaches the position where the container truck (1) carries the container, when the spatial distance is zero relative to the origin of the world coordinate system, the container reaches the correct loading position; S516. The spreader unloads the container and detects the relative position between the spreader and the container in real time. The distance between the spreader and the container gradually increases. When the position z of the spreader > 3m, the information transmission module (33) sends a job completion message to the port operation system (4); Or the container unloading task in step S5 specifically includes: S521. For the container truck (1) loaded with the container, behind the container truck (1), with the center of the rear axle as the origin of the coordinate system, the center axis of the vehicle as the y-axis, pointing in the direction of the vehicle tail, and the ground vertically upward as the z-axis, where x - y - z follows the right-hand screw rule, establish a world coordinate system in the area of 1m < y < 20m and -5m < x < 5m. In the world coordinate system, the spreader detection controller (3) detects the spatial position of the spreader; S522. The spreader and the container truck (1) wait to receive the container unloading instruction from the port operation system (4), and the spreader detection controller (3) detects the spatial positions of the spreader and the container relative to the world coordinate system in real time. When the spreader reaches above the container loaded on the container truck (1) and correctly locks the container, proceed to step S523; otherwise, continue to detect the position of the spreader in the world coordinate system; S523. The information transmission module (33) feeds back the confirmation information to the quay crane (5) operation system; S524. The spreader detection camera (2) detects the spreader and the container, and the spreader detection controller (3) obtains the positional relationship between the two by calculating the relative positional distance between the spreader and the container and feeds this information back to the port operation system (4); S525. The vision detection module (31) calculates the relative spatial distance between the spreader and the container in real time. As the position of the spreader gradually approaches the position where the container truck (1) carries the container, during the movement of the spreader, the spreader detection controller (3) sends a confirmation message to the quay crane (5) operation system to ensure that the container truck (1) remains stationary. When the spatial distance is zero relative to the origin of the world coordinate system, the spreader locks the container; S526, the spreader leaves the origin of the world coordinate system, detects the relative position of the spreader and the container and calculates the distance between the two and the origin of the world coordinate system, and when the spatial position of the spreader and the container is in the area of ​​z>3m and x>5m or x<-5m of the world coordinate system, the information transmission module (33) sends the operation completion information to the port operation system (4); The container truck spreader detection system of the container truck spreader detection method comprises the container truck (1), the spreader detection camera (2), the spreader detection controller (3), the port operation system (4) and the yard bridge (5), wherein the spreader detection camera (2) is arranged on the container truck (1), the spreader detection controller (3) is connected to the spreader detection camera (2) by signal, the port operation system (4) is connected to the container truck (1) by signal, the yard bridge (5) is connected to the port operation system (4) by signal, and the spreader detection controller (3) is connected to the port operation system (4) by signal; The container truck (1) is used to transport containers, the spreader detection camera (2) is used to detect position images of the container and the yard crane (5), the spreader detection controller (3) is used to calculate position information based on the position image of the spreader detection camera (2) and control the spreader of the yard crane (5) to lift or release the container, and the port operation system (4) is used to send and receive operation commands to the container truck (1).

2. A container truck spreader detection method according to claim 1, characterized in that: In step S511 to step S516, the specific method of the visual inspection module (31) inspecting the spreader and the container is: The basic shapes of the spreader and the container are regarded as rectangular parallelepiped, and the circumscribed rectangular frames of the spreader and the container are obtained by the spreader detection camera (2). Within the rectangular frame, the faces of the container and the spreader pointing in the direction of the vehicle head are extracted using a segmentation algorithm, and the spatial positions of the container and the spreader are estimated using the two vertical corner points of the faces in the direction of the vehicle head in the image; The corner point distance calculation method is as follows: The mapping relationship from the world coordinate system to the camera coordinate system is established as follows: Wherein γ is the pitch angle of the sling detection camera (2); According to the pinhole imaging principle, the mapping relationship between the camera coordinate system and the two-dimensional image coordinate system is established as follows: Where f is the focal length of the camera; Construct the relationship between the image coordinate system and the world coordinate system. The formula is as follows: Construct data table T IW , each triplet (u, v, depth = y w ) is (x w , z w ); According to the point (u, v) on the image, and the depth value of the plane where the point is located relative to the world coordinate system XZ plane, the new depth value is obtained by adding the depth value scale step, through the (u, v, depth) triplet, in the data table T IW A quick table lookup yields (x w , z w ), and then obtain the world coordinate position of the image point (x w ,y w =depth,z w ); Determine the world coordinates of points A and B obtained by looking up the table. The formula is as follows: |x Aw -x Bw |<threshold |z Aw -z Bw -d|<threshold, Where d is the height of the container body, threshold is the fixed error value, and when the judgment is not satisfied, the depth value is adjusted upward and the judgment is repeated; otherwise, the depth value is adjusted downward, and a new scale is added to the original depth value until the minimum depth value scale is reached to obtain the optimal solution.

3. A container truck spreader detection method according to claim 1, characterized in that: In step S521 to step S526, the specific method of the visual inspection module (31) inspecting the spreader and the container is: The basic shapes of the spreader and the container are regarded as rectangular parallelepiped, and the circumscribed rectangular frames of the spreader and the container are obtained by the spreader detection camera (2). Within the rectangular frame, the faces of the container and the spreader pointing in the direction of the vehicle head are extracted using a segmentation algorithm, and the spatial positions of the container and the spreader are estimated using the two vertical corner points of the faces in the direction of the vehicle head in the image; The corner point distance calculation method is as follows: The mapping relationship from the world coordinate system to the camera coordinate system is established as follows: Wherein γ is the pitch angle of the sling detection camera (2); According to the pinhole imaging principle, the mapping relationship between the camera coordinate system and the two-dimensional image coordinate system is established as follows: Where f is the focal length of the camera; Construct the relationship between the image coordinate system and the world coordinate system. The formula is as follows: Construct data table T IW , each triplet (u, v, depth = y w ) is (x w , z w ); According to the point (u, v) on the image, and the depth value of the plane where the point is located relative to the world coordinate system XZ plane, the new depth value is obtained by adding the depth value scale step, through the (u, v, depth) triplet, in the data table T IW A quick table lookup yields (x w , z w ), and then obtain the world coordinate position of the image point (x w ,y w =depth,z w ); Determine the world coordinates of points A and B obtained by looking up the table. The formula is as follows: |x Aw -x Bw |<threshold |z Aw -z Bw -d|<threshold, Where d is the height of the container body, threshold is the fixed error value, and when the judgment is not satisfied, the depth value is adjusted upward and the judgment is repeated; otherwise, the depth value is adjusted downward, and a new scale is added to the original depth value until the minimum depth value scale is reached to obtain the optimal solution.