Container rubbing prevention method and yard crane
By installing an image acquisition device and an image detection model on the spreader, calculating the relative distance between the container and the adjacent container and generating an alarm message, the problem of the spreader being difficult to prevent collisions when grabbing and releasing containers is solved, and an efficient anti-scratch container function is achieved.
Patent Information
- Application Number
- CN202510875062.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-09-12
AI Technical Summary
It is difficult for the spreader to provide anti-collision warning for the container when it moves up and down to perform the operation of grabbing and releasing the container. The existing technology is difficult to effectively prevent the collision between the spreader and the container.
An image acquisition device is installed on the spreader to capture images of target locations below the spreader. An image detection model processes multiple target location images and outputs the pixel coordinates of the container and keyhole. Based on these coordinates, the relative distance between the container and its neighbors is calculated, and an alarm is generated when the distance falls below a preset threshold.
It realizes anti-collision warning of containers when the spreader moves up and down during the grab and release operation, improves operation efficiency, and avoids the risk of damage to the container surface and displacement of internal cargo.
Smart Images

Figure CN120622322A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of anti-collision technology, and in particular to a container anti-scratch method and a container yard crane. Background Art
[0002] During the lifting process, containers can experience collisions and wobbling similar to bowling balls. When crane operators control the spreader to lift a container, if the operation is imprecise, the spreader may not be properly connected to the container's corner fittings, or the crane's lifting speed may be too fast, causing the container to sway in the air, similar to the unstable trajectory of a bowling ball. This wobbling can cause the container to collide with other containers, warehouse walls, or loading and unloading equipment, just like a bowling ball hitting pins. This can damage the container's surface and shift or damage the cargo inside, posing safety risks and financial losses to cargo transportation and loading and unloading operations.
[0003] In order to prevent the occurrence of the "bowling" problem, the existing technology uses an anti-bowling function that integrates vision and laser for the lateral movement of the spreader to prevent the spreader from colliding with containers placed on its travel path. However, the above-mentioned method only realizes the anti-bowling function for the lateral movement of the spreader, and it is difficult to provide anti-collision warning for the longitudinal movement. As a result, it is difficult for the spreader to provide anti-collision warning for the container when moving up and down to perform the operation of grabbing and releasing the box. Summary of the Invention
[0004] In view of this, the present application provides a container anti-collision method and a yard crane, which solves the technical problem that it is difficult to provide anti-collision warning for the container when the spreader moves up and down to perform the grab and release operation.
[0005] As a first aspect of the present application, the present application provides a method for preventing containers from being scratched, comprising: when a sling performs a lifting operation on a container, controlling an image acquisition device on the sling to acquire images of a target position below the sling, and obtaining a plurality of target position images of the target position at different orientations; inputting the plurality of target position images at different orientations into an image detection model for processing, and outputting pixel coordinates of a plurality of containers and pixel coordinates of a plurality of key holes, wherein the plurality of containers are sequentially located at a plurality of preset orientations of the target position, and the plurality of containers are adjacent to the target position respectively; obtaining target edge pixel coordinates of a plurality of containers according to the pixel coordinates of the plurality of containers, and calculating the target edge pixel coordinates of the plurality of containers and the pixel coordinates of the target box corner points at the target position, and obtaining a first set of relative distances, wherein the first set of relative distances includes a plurality of first relative distances, and the first relative distances are used to characterize the target at the target position. The relative distance between the pixel coordinates of the box corner point and the target edge pixel coordinates of the container at any preset position in multiple preset positions, the target edge pixel coordinates are used to represent the pixel coordinates of the contact edge of the container with the ground; the edge pixel coordinates of the top surface lock holes of multiple containers are obtained according to the pixel coordinates of multiple lock holes, and the edge pixel coordinates of the top surface lock holes of multiple containers and the target box corner pixel coordinates at the target position are calculated to obtain a second set of relative distances, wherein the second set of relative distances includes multiple second relative distances, and the second relative distances are used to represent the relative distance between the target box corner pixel coordinates at the target position and the top surface lock hole edge pixel coordinates of the container at any preset position in multiple preset positions; when the first relative distance is less than the first preset threshold, and / or the second relative distance is less than the second preset threshold, an alarm information is generated based on the first relative distance and / or the second relative distance to perform an anti-scratch box alarm.
[0006] In a possible implementation of the present application, multiple target position images at different orientations are input into an image detection model for processing, and pixel coordinates of multiple containers and pixel coordinates of multiple keyholes are output, including: segmenting the multiple target position images at different orientations to obtain a set of areas where the multiple containers are located and a set of areas where the multiple keyholes are located; matching the set of areas where the multiple containers are located with the set of areas where the multiple keyholes are located to obtain multiple groups of keyhole containers, wherein each group of keyhole containers in the multiple groups has containers corresponding to keyholes; and dividing the multiple groups of keyhole containers based on multiple preset orientations of the target positions to obtain pixel coordinates of the multiple containers and pixel coordinates of the multiple keyholes.
[0007] In a possible implementation of the present application, multiple groups of keyhole containers are obtained by matching a set of areas where multiple containers are located with a set of areas where multiple keyholes are located, including: obtaining a coordinate range of an area where a first container is located in the set of areas where multiple containers are located; obtaining coordinate data of an area where a first lockhole is located in the set of areas where multiple lockholes are located; determining whether the coordinate data of the area where the first lockhole is located is within the coordinate range of the area where the first container is located; if the coordinate data of the area where the first lockhole is located is within the coordinate range of the area where the first container is located, matching the first lockhole with the first container to obtain a group of keyhole containers; wherein the multiple groups of keyhole containers include multiple groups of keyhole containers.
[0008] In a possible implementation of the present application, when the hoisting operation is a box grabbing operation, the pixel coordinates of the target box corner point are determined as the pixel coordinates of the virtual box corner point at the target position.
[0009] In a possible implementation of the present application, when the hoisting operation is a box placing operation, the pixel coordinates of the target box corner points are determined as the pixel coordinates of the box corner points of the hoisting box.
[0010] In a possible implementation of the present application, when the second relative distance is less than a second preset threshold, an alarm message is generated based on the second relative distance, including: obtaining a first preset orientation relative distance based on the second relative distance, wherein the first preset orientation relative distance is used to characterize the relative distance between the pixel coordinates of the target box corner point and the pixel coordinates of the edge of the top lock hole of the container at the first preset orientation; obtaining a second preset orientation relative distance based on the second relative distance, wherein the second preset orientation relative distance is used to characterize the relative distance between the pixel coordinates of the target box corner point and the pixel coordinates of the edge of the top lock hole of the container at the second preset orientation; when the first preset orientation relative distance, and / or the second preset orientation relative distance is less than a preset alarm threshold, an alarm message is generated.
[0011] In a possible implementation of the present application, when the relative distance of the first preset orientation and / or the relative distance of the second preset orientation is less than a preset alarm threshold, an alarm message is generated, including: obtaining a first preset deviation distance on the first preset orientation and a second preset deviation distance on the second preset orientation; subtracting the first preset deviation distance from the first preset orientation relative distance to obtain a first actual relative distance on the first preset orientation; subtracting the second preset deviation distance from the second preset orientation relative distance to obtain a second actual relative distance on the second preset orientation; when the first actual relative distance and / or the second actual relative distance is less than the preset alarm threshold, an alarm message is generated.
[0012] In a possible implementation of the present application, if the target edge pixel coordinates of multiple containers are within a preset intrusion area, an alarm message is generated to perform an anti-scratch container alarm.
[0013] In a possible implementation of the present application, when the pixel size of the lock hole on the top surface of the container is smaller than the first preset size, or the pixel size of the container is smaller than the second preset size, it is determined that the container will not be scratched when the spreader performs the lifting operation of the container.
[0014] As a second aspect of the present application, the present application further provides an anti-scratch box controller, which is used to execute any one of the above-mentioned anti-scratch box methods for containers.
[0015] As the third aspect of the present application, the present application also provides a yard crane, including: a sling, which is installed on the trolley of the yard crane and is used to lift containers; an image acquisition device, which is installed on the sling and is used to capture images of the target position under the sling; an anti-scratch box controller, which is communicatively connected to the image acquisition device, and is used to execute the anti-scratch box method for containers described in any one of the above.
[0016] As a fourth aspect of the present application, the present application further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute any of the above-mentioned methods for preventing containers from being scratched.
[0017] The present application provides a method for preventing containers from being scratched, which obtains a first relative distance, i.e., the relative distance between the pixel coordinates of the target box corner point at the target position and the target edge pixel coordinates of the neighboring box at any one of a plurality of preset positions, by calculating the pixel coordinates of the target box corner point at the target position and the target edge pixel coordinates of the neighboring box at any one of a plurality of preset positions. At the same time, the pixel coordinates of the target box corner point and the edge pixel coordinates of the lock hole on the top surface of the neighboring box are calculated to obtain a second relative distance, i.e., the relative distance between the pixel coordinates of the target box corner point at the target position and the edge pixel coordinates of the lock hole on the top surface of the neighboring box at any one of a plurality of preset positions. When the first relative distance is less than a first preset threshold value, and / or the second relative distance is less than a second preset threshold value, an alarm message is generated to perform an anti-scratch alarm. It can be seen that in the present application, when the spreader moves up and down to perform the operation of grabbing and releasing boxes, the relative distance between the pixel coordinates of the corner points of the standard box at the target position and the edge of the adjacent box and the edge of the top surface of the lock hole in different preset orientations is calculated. An alarm can be issued when the relative distance is less than a threshold value, thereby realizing the anti-scratching function of the spreader when moving up and down due to grabbing and releasing boxes, and thus achieving the technical effect of providing anti-collision warnings for containers when the spreader moves up and down to perform the operation of grabbing and releasing boxes, thereby improving the working efficiency. In this way, the technical problem of difficulty in providing anti-collision warnings for containers when the spreader moves up and down to perform the operation of grabbing and releasing boxes is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The above and other purposes, features, and advantages of the present application will become more apparent through a more detailed description of the embodiments of the present application in conjunction with the accompanying drawings. The accompanying drawings are intended to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the drawings, the same reference numerals generally represent the same components or steps.
[0019] Figure 1 Shown is a flow chart of a method for preventing a container from being scratched, provided in one embodiment of the present application.
[0020] Figure 2 The figure shows a bird's-eye view of the target position under the up and down movement condition of the sling provided by one embodiment of the present application.
[0021] Figure 3 The figure shows a device block diagram of a field bridge provided in one embodiment of the present application. DETAILED DESCRIPTION
[0022] In the description of the application, the meaning of "multiple" is at least two, for example two, three, etc., unless otherwise clearly and specifically limited. In the embodiments of the present application, all directional indications (such as up, down, left, right, front, back, top, bottom ...) are only used to explain the relative position relationship, motion situation, etc. between each component under a certain specific posture (as shown in the drawings). If this specific posture changes, this directional indication also changes accordingly. In addition, the terms "comprise" and "have" and any deformation thereof are intended to cover non-exclusive inclusion. For example, the process, method, system, product or equipment comprising a series of steps or units is not limited to the steps or units listed, but optionally also includes the steps or units not listed, or optionally also includes other steps or units inherent to these processes, methods, products or equipment.
[0023] In addition, references to "embodiments" herein mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of such phrases in various places in the specification does not necessarily refer to the same embodiment, nor does it necessarily refer to independent or alternative embodiments that are mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0024] Exemplary Methods
[0025] As a first aspect of the present application, the present application provides a method for preventing a container from being scratched. Figure 1 The flowchart of a method for preventing a container from being scratched is shown in FIG. Figure 1 As shown, the anti-scratch box method includes the following steps:
[0026] Step S101, when the spreader performs a container lifting operation, controlling an image acquisition device on the spreader to acquire images of a target position below the spreader, thereby obtaining multiple target position images at different positions of the target position;
[0027] Specifically, the image acquisition devices are distributed at the four corners of the spreader, wherein the image acquisition devices at each corner capture a target position at a different viewing angle.
[0028] For example, image acquisition device 1 captures an image of the upper right corner of the target position, image acquisition device 2 captures an image of the upper left corner of the target position, image acquisition device 3 captures an image of the lower left corner of the target position, image acquisition device 4 captures an image of the lower right corner of the target position, and so on.
[0029] The target position described above can be used to indicate the location where a box needs to be placed or lifted during the vertical movement of the spreader during a lifting operation. Generally, if there are adjacent boxes at the target position, the relative distance between the pixel coordinates of the target box's corner at the target position and the pixel coordinates of the adjacent box's edge or the pixel coordinates of the edge of the keyhole on the adjacent box's top surface needs to be calculated. This relative distance can be used to determine whether there is a risk of the spreader rubbing against the box during vertical movement.
[0030] The above-mentioned different orientations correspond to the orientations of the images captured by the image acquisition devices installed at the four corners of the spreader. Generally, the target position images at the four orientations can be spliced together to obtain a four-in-one image. By processing this four-in-one image, image processing efficiency is improved.
[0031] In an optional embodiment, when providing an anti-scratch warning for a container, an image acquisition device installed on the spreader can be used to capture images of a target position below the spreader, and multiple images of the target position at different orientations can be obtained. By subsequently processing the multiple images of the target position at different orientations, the relative distance between the pixel coordinates of the target box corner point at the target position and the pixel coordinates of the edge of the adjacent box or the pixel coordinates of the edge of the keyhole on the top surface of the adjacent box can be calculated.
[0032] Step S102: Inputting multiple target location images at different orientations into an image detection model for processing, and outputting pixel coordinates of multiple containers and pixel coordinates of multiple keyholes, wherein the multiple containers are sequentially located at multiple preset orientations of the target location, and the multiple containers are respectively adjacent to the target location;
[0033] Specifically, the above-mentioned image detection model is used to perform segmentation, location division and other processing on multiple target location images.
[0034] The above-mentioned multiple containers can be used to represent containers adjacent to the target location at multiple preset positions of the target location, hereinafter referred to as "neighboring containers".
[0035] The pixel coordinates of the above-mentioned multiple containers can be used to represent the pixel coordinates of neighboring containers acquired by the image acquisition device.
[0036] The pixel coordinates of the plurality of keyholes mentioned above can be used to represent the pixel coordinates of the keyholes on the top surface of the adjacent box acquired by the image acquisition device.
[0037] The above-mentioned multiple preset directions can be directly above or below the target position, directly to the left or right of the target position, directly to the upper right or lower left of the target position, or directly to the upper left or lower right of the target position, etc. The preset directions are not specifically limited here and can be adjusted according to actual conditions.
[0038] Applied in an optional embodiment, after obtaining multiple target position images of the target position at different orientations, the multiple target position images can be processed by an image detection model, that is, the multiple target position images are segmented respectively to obtain the area where the neighboring box is located and the area where the keyhole is located. Further, the area where the neighboring box is located and the area where the keyhole is located are matched, that is, the keyhole is matched to the corresponding container to obtain multiple groups of keyhole-containers consisting of a group of keyhole-containers, and then the multiple groups of keyhole-containers are divided into locations based on the above-mentioned multiple preset orientations to obtain the pixel coordinates of the above-mentioned multiple containers and the pixel coordinates of the multiple keyholes.
[0039] Step S103: Obtain target edge pixel coordinates of the multiple containers based on the pixel coordinates of the multiple containers, and calculate the target edge pixel coordinates of the multiple containers and the target container corner pixel coordinates at the target position to obtain a first set of relative distances, wherein the first set of relative distances includes multiple first relative distances, each of which is used to represent the relative distance between the target container corner pixel coordinates at the target position and the target edge pixel coordinates of the container at any one of the multiple preset positions, and the target edge pixel coordinates are used to represent the pixel coordinates of the contact edge between the container and the ground.
[0040] Specifically, the target edge pixel coordinates mentioned above may be used to represent the pixel coordinates of the contact edge between the neighboring box and the ground.
[0041] The above-mentioned target box corner pixel coordinates can be used to represent the (virtual) box corner pixel coordinates at the target position.
[0042] It should be noted that the above-mentioned target box corner pixel coordinates change based on different working conditions of the lifting operation. Specifically, when the spreader performs a box lifting operation, during the process of the spreader being lowered, since the spreader does not grab any container, that is, the current spreader is empty, in order to prevent the lock pin from hooking the lock hole of the adjacent box when the spreader is lowered, it can be assumed that the empty spreader has grabbed a virtual container. The box corner of the virtual container is the pixel coordinate of the virtual box corner. The pixel coordinate of the virtual box corner can be calibrated according to historical data. By calculating the pixel coordinate of the virtual box corner and the pixel coordinate of the edge of the adjacent box, the occurrence of the box rubbing problem can be avoided; conversely, when the spreader performs a box releasing operation, during the process of the spreader being lowered, since the spreader has already grabbed a container, the pixel coordinate of the target box corner can be determined as the pixel coordinate of the box corner of the lifting box. Then, based on the relative distance between the pixel coordinate of the box corner of the lifting box and the pixel coordinate of the edge of the adjacent box, the occurrence of the box rubbing problem can be avoided.
[0043] Applied in an optional embodiment, after obtaining the pixel coordinates of the neighboring box, the pixel coordinates of the contact edge of the neighboring box with the ground can be further obtained based on the pixel coordinates of the neighboring box to obtain the above-mentioned target edge pixel coordinates, and then the relative distance between the target box corner pixel coordinates at the target position and the target edge pixel coordinates of the neighboring box at any preset position in multiple preset directions is calculated to obtain the first relative distance at any preset direction, and so on, a first group of relative distances consisting of multiple first relative distances can be obtained, that is, the first group of relative distances includes the relative distance between the target edge pixel coordinates of the neighboring box at each preset position in multiple preset positions and the target box corner pixel coordinates.
[0044] Exemplarily, the first relative distance a1 can be used to represent the relative distance between the target edge pixel coordinates of the neighboring box at position 1 and the target box corner pixel coordinates, the first relative distance a2 can be used to represent the relative distance between the target edge pixel coordinates of the neighboring box at position 2 and the target box corner pixel coordinates, the first relative distance a3 can be used to represent the relative distance between the target edge pixel coordinates of the neighboring box at position 3 and the target box corner pixel coordinates, and so on. Multiple first relative distances (a1, a2, a3, ...) constitute the above-mentioned first group of relative distances A.
[0045] Step S104: Obtain edge pixel coordinates of the top surface lock holes of the plurality of containers based on the pixel coordinates of the plurality of lock holes, and calculate the edge pixel coordinates of the top surface lock holes of the plurality of containers and the pixel coordinates of the target container corner points at the target position to obtain a second set of relative distances, wherein the second set of relative distances includes a plurality of second relative distances, each of which is used to represent the relative distance between the pixel coordinates of the target container corner points at the target position and the edge pixel coordinates of the top surface lock hole of the container at any one of the plurality of preset positions.
[0046] Specifically, after obtaining the pixel coordinates of the keyhole of the neighboring box, the pixel coordinates of the keyhole edge of the top surface of the neighboring box can be further obtained based on the pixel coordinates of the keyhole of the neighboring box, and then the relative distance between the pixel coordinates of the corner point of the target box at the target position and the pixel coordinates of the keyhole edge of the top surface of the neighboring box at any preset position in multiple preset orientations is calculated to obtain the second relative distance at any preset orientation. Similarly, a second group of relative distances consisting of multiple second relative distances can be obtained, that is, the second group of relative distances includes the relative distance between the pixel coordinates of the keyhole edge of the top surface of the neighboring box at each preset position in multiple preset orientations and the pixel coordinates of the corner point of the target box.
[0047] Exemplarily, the first relative distance b1 can be used to represent the relative distance between the pixel coordinates of the top surface keyhole edge of the neighboring box at position 1 and the pixel coordinates of the corner point of the target box, the first relative distance b2 can be used to represent the relative distance between the pixel coordinates of the top surface keyhole edge of the neighboring box at position 2 and the pixel coordinates of the corner point of the target box, the first relative distance b3 can be used to represent the relative distance between the pixel coordinates of the top surface keyhole edge of the neighboring box at position 3 and the pixel coordinates of the corner point of the target box, and so on. Multiple first relative distances (b1, b2, b3, ...) constitute the above-mentioned first group of relative distances B.
[0048] Step S105: When the first relative distance is less than the first preset threshold and / or the second relative distance is less than the second preset threshold, an alarm message is generated based on the first relative distance and / or the second relative distance to perform an anti-scratch box alarm.
[0049] Specifically, the above-mentioned first preset threshold can be used to represent the danger alarm distance between the pixel coordinates of the target box corner point at the preset target position and the target edge pixel coordinates of the container at any preset position in multiple preset directions. Generally, it can be 3 cm or 4 cm. The first preset threshold is not specifically limited here and can be adjusted according to actual conditions.
[0050] The above-mentioned second preset threshold can be used to represent the danger alarm distance between the pixel coordinates of the target box corner point at the preset target position and the pixel coordinates of the edge of the top lock hole of the container at any preset position in multiple preset directions. Generally, it can be 5 cm or 6 cm. The second preset threshold is not specifically limited here and can be adjusted according to actual conditions.
[0051] In an optional embodiment, after obtaining the first and second sets of relative distances, a determination can be made based on the first and / or second sets of relative distances whether the spreader will encounter a risk of scraping a container during its vertical movement during the lifting operation. Specifically, if the first relative distance is less than a first preset threshold, and / or the second relative distance is less than a second preset threshold, this indicates that the spreader's locking pin may scrape against a neighboring container when grasping the container, or that the corner of the container grasped by the spreader may scrape against a neighboring container when releasing the container. In this case, an alarm can be generated to prevent scraping of the container.
[0052] By calculating the pixel coordinates of the target box corner point at the target position and the target edge pixel coordinates of the neighboring box, a first relative distance is obtained, that is, the relative distance between the pixel coordinates of the target box corner point at the target position and the target edge pixel coordinates of the neighboring box at any preset position in multiple preset orientations. At the same time, by calculating the pixel coordinates of the target box corner point and the edge pixel coordinates of the top surface keyhole of the neighboring box, a second relative distance can be obtained, that is, the relative distance between the pixel coordinates of the target box corner point at the target position and the edge pixel coordinates of the top surface keyhole of the neighboring box at any preset position in multiple preset orientations. When the first relative distance is less than the first preset threshold, and / or the second relative distance is less than the second preset threshold, an alarm message is generated to perform an anti-scratch box alarm. It can be seen that in the present application, when the spreader moves up and down to perform the operation of grabbing and releasing boxes, the relative distance between the pixel coordinates of the corner points of the standard box at the target position and the edge of the adjacent box and the edge of the top surface of the lock hole in different preset orientations is calculated. An alarm can be issued when the relative distance is less than a threshold value, thereby realizing the anti-scratching function of the spreader when moving up and down due to grabbing and releasing boxes, and thus achieving the technical effect of providing anti-collision warnings for containers when the spreader moves up and down to perform the operation of grabbing and releasing boxes, thereby improving the working efficiency. In this way, the technical problem of difficulty in providing anti-collision warnings for containers when the spreader moves up and down to perform the operation of grabbing and releasing boxes is solved.
[0053] In a possible implementation of the present application, multiple target position images at different orientations are input into an image detection model for processing, and pixel coordinates of multiple containers and pixel coordinates of multiple keyholes are output, including: segmenting the multiple target position images at different orientations to obtain a set of areas where the multiple containers are located and a set of areas where the multiple keyholes are located; matching the set of areas where the multiple containers are located with the set of areas where the multiple keyholes are located to obtain multiple groups of keyhole containers, wherein each group of keyhole containers in the multiple groups has containers corresponding to keyholes; and dividing the multiple groups of keyhole containers based on multiple preset orientations of the target positions to obtain pixel coordinates of the multiple containers and pixel coordinates of the multiple keyholes.
[0054] Specifically, the plurality of groups of keyhole containers are composed of a plurality of groups of keyhole containers, wherein any group of keyhole containers has a keyhole that matches the container.
[0055] In an optional embodiment, when inputting multiple target position images at different orientations into an image detection model for processing and outputting pixel coordinates of multiple containers and pixel coordinates of multiple keyholes, the multiple target position images at different orientations can be first segmented to obtain multiple areas where neighboring containers are located and multiple areas where keyholes are located. The obtained multiple areas where neighboring containers are located and multiple areas where keyholes are located can then be matched, that is, the keyholes are matched to corresponding containers, and the above-mentioned multiple groups of keyhole containers can be obtained. Based on the above-mentioned multiple preset orientations, the multiple groups of keyhole containers can be divided into locations, and the pixel coordinates of the neighboring containers and the pixel coordinates of the keyholes under any preset orientation can be obtained.
[0056] Figure 2 The figure shows a bird's-eye view of the target position under the condition of the lifting device moving up and down provided by one embodiment of the present application. Figure 2 As shown, the target position includes four target box corner pixel coordinates A, B, C, and D. Boxes 1 to 8 are the neighboring boxes of the target position at multiple preset directions, and 1-12 are the above-mentioned multiple preset directions, among which directions 1, 2, 5, and 6 can be the moving directions of the large vehicle, directions 3, 4, 7, and 8 can be the moving directions of the small vehicle, and directions 9, 10, 11, and 12 can be the diagonal directions of the target position.
[0057] In the process of dividing the locations of multiple groups of keyhole containers, if Figure 2 As shown, multiple groups of lock hole containers can be divided into four areas based on the x-axis of the large vehicle movement direction and the y-axis of the small vehicle movement direction. For example, Figure 2 The upper right corner area in is taken as the first quadrant area after division. Figure 2 The upper left corner area in is used as the second quadrant area after division. Figure 2 The sitting angle area in the middle is taken as the third quadrant area after division. Figure 2 The lower right corner area in is taken as the fourth quadrant area after division. Based on this, the four quadrant areas are further divided to obtain the pixel coordinates of the neighboring boxes and the pixel coordinates of the keyhole in the 1-12 directions.
[0058] Specifically, the four quadrants after division can be divided by the relative position of the adjacent box and the four-in-one image obtained above, still based on Figure 2Take the second quadrant in the image as an example to illustrate, if the left edges of box No. 3 and box No. 4 are infinitely close to the leftmost side of the four-in-one image, box No. 3 and box No. 4 can be divided into position No. 6. If the upper edge of box No. 2 is infinitely close to the uppermost side of the four-in-one image, box No. 2 can be divided into positions No. 7 and No. 8, and so on. The location division is performed through the relative position of the adjacent box and the above four-in-one image, thereby realizing fast and efficient location division of the adjacent box.
[0059] In a possible implementation of the present application, multiple groups of keyhole containers are obtained by matching a set of areas where multiple containers are located with a set of areas where multiple keyholes are located, including: obtaining a coordinate range of an area where a first container is located in the set of areas where multiple containers are located; obtaining coordinate data of an area where a first lockhole is located in the set of areas where multiple lockholes are located; determining whether the coordinate data of the area where the first lockhole is located is within the coordinate range of the area where the first container is located; if the coordinate data of the area where the first lockhole is located is within the coordinate range of the area where the first container is located, matching the first lockhole with the first container to obtain a group of keyhole containers; wherein the multiple groups of keyhole containers include multiple groups of keyhole containers.
[0060] Specifically, in the process of obtaining multiple groups of lockhole containers by matching the set of areas where multiple containers are located and the set of areas where multiple keyholes are located, the coordinate range of the area where the first container is located in the set of areas where multiple neighboring containers are located can be obtained, that is, the coordinate range of any neighboring container can be obtained, and at the same time, the coordinate data of the area where the first lockhole is located in the set of areas where multiple lockholes are located can be obtained, that is, the coordinate information of any lockhole can be obtained. By judging whether the coordinate information of any lockhole falls within the coordinate range of any neighboring container, it is judged whether the lockhole and the neighboring container match each other. If the coordinate data of the area where the first lockhole is located is within the coordinate range of the area where the first container is located, it means that the coordinate information of the first lockhole falls within the coordinate range of the first container. The first lockhole is matched with the first container to obtain a group of lockhole containers. Similarly, multiple groups of lockhole containers can be obtained.
[0061] In a possible implementation of the present application, when the hoisting operation is a box grabbing operation, the pixel coordinates of the target box corner point are determined as the pixel coordinates of the virtual box corner point at the target position.
[0062] Specifically, when a spreader performs a container grabbing operation, since the spreader is empty and not holding a container, to determine whether the spreader will rub against a neighboring container during the lowering process, a virtual container can be created. This is assumed to be a virtual container held by the empty spreader. The corner points of this virtual container are the pixel coordinates of the aforementioned virtual container corner points. Generally, the pixel coordinates of the virtual container corner points can be calibrated based on historical data. In the subsequent relative distance calculation process, the pixel coordinates of the virtual container corner points at the target location can be used as landmarks to compare with the pixel coordinates of the neighboring container edge or the pixel coordinates of the keyhole edge of the neighboring container top surface.
[0063] In a possible implementation of the present application, when the hoisting operation is a box placing operation, the pixel coordinates of the target box corner points are determined as the pixel coordinates of the box corner points of the hoisting box.
[0064] Specifically, when the spreader is releasing a container, since it has already grasped the container, the corners of the container being grasped can be used directly as the pixel coordinates of the container corners. In the subsequent relative distance calculation process, the pixel coordinates of the container corners at the target location can be used as landmarks to compare with the pixel coordinates of the edge of the adjacent container or the edge of the keyhole on the top of the adjacent container.
[0065] In a possible implementation of the present application, when the second relative distance is less than a second preset threshold, an alarm message is generated based on the second relative distance, including: obtaining a first preset orientation relative distance based on the second relative distance, wherein the first preset orientation relative distance is used to characterize the relative distance between the pixel coordinates of the target box corner point and the pixel coordinates of the edge of the top lock hole of the container at the first preset orientation; obtaining a second preset orientation relative distance based on the second relative distance, wherein the second preset orientation relative distance is used to characterize the relative distance between the pixel coordinates of the target box corner point and the pixel coordinates of the edge of the top lock hole of the container at the second preset orientation; when the first preset orientation relative distance, and / or the second preset orientation relative distance is less than a preset alarm threshold, an alarm message is generated.
[0066] Specifically, the above-mentioned first preset orientation is different from the second preset orientation. For example, if the first preset orientation represents the moving direction of the large vehicle, then the second preset orientation represents the moving direction of the small vehicle; conversely, if the first preset orientation represents the moving direction of the small vehicle, then the second preset orientation represents the moving direction of the large vehicle.
[0067] The above-mentioned preset alarm threshold can be used to indicate the danger alarm distance between the corner point of the target box at the preset target position and the edge of the lock hole on the top surface of the adjacent box. Generally, it can be 3 cm or 4 cm. The preset alarm threshold is not specifically limited here and can be adjusted according to actual conditions.
[0068] Applied in an optional embodiment, when the second relative distance is less than the second preset threshold, in the process of generating an alarm message based on the second relative distance, it is necessary to consider the distance between the corner point of the target box at the target position and the edge of the top lock hole of the adjacent box, and further consider the distance between the corner point of the target box at the target position and the edge of the top lock hole of the adjacent box in the moving direction of the cart, as well as the distance between the corner point of the target box at the target position and the edge of the top lock hole of the adjacent box in the moving direction of the cart. After obtaining the first preset orientation relative distance and the second preset orientation relative distance, it can be determined whether an alarm is needed based on the preset alarm threshold, that is, when the first preset orientation relative distance, and / or the second preset orientation relative distance is less than the preset alarm threshold, an alarm message is generated and a box cleaning alarm is performed.
[0069] For example, Figure 2 As shown, positions 1, 2, 5, and 6 may correspond to the first preset position, and positions 3, 4, 7, and 8 may correspond to the second preset position. There are lock holes in boxes 1 to 8, that is, Figure 2 For each container's corner box, take the second quadrant as an example. The relative distance between the pixel coordinates of the target corner point B and the pixel coordinates of the edge of the keyhole on the fourth container can be calculated to obtain the first preset relative distance. Similarly, the relative distance between the pixel coordinates of the target corner point B and the pixel coordinates of the edge of the keyhole on the second container can be calculated to obtain the second preset relative distance. By determining whether the first preset relative distance and / or the second preset relative distance are less than the preset alarm threshold, it is determined whether to generate an alarm message. Similarly, the same calculation can be performed on the other three corner points A, C, and D at the target location. In this way, the relative distance between each corner point at the target location and the edge of the keyhole on the top surface of the adjacent container in the first preset location and the second preset location can be obtained.
[0070] Furthermore, the first preset relative distance can be calculated using the following formula (1):
[0071]
[0072] Among them, 17.8cm is the length of the keyhole, S width is the pixel size of the short side of the keyhole in the direction of the vehicle, P gantry L is the distance in pixels from the keyhole in the direction of the vehicle. gantry It is the relative distance between the pixel coordinates of the corner point of the target box and the pixel coordinates of the edge of the keyhole on the top surface of the adjacent box in the direction of the vehicle.
[0073] The second preset relative distance can be calculated using the following formula (2):
[0074]
[0075] Among them, 17.8cm is the length of the keyhole, S length is the pixel size of the long side of the keyhole in the direction of the car, P trolly is the pixel distance of the keyhole in the direction of the car, L trolly It is the relative distance between the pixel coordinates of the corner point of the target box and the pixel coordinates of the keyhole edge of the top surface of the adjacent box in the direction of the car.
[0076] It should be noted that the distance between the top surface keyhole edge of the diagonally adjacent box at the target position is not calculated for the time being, because the distance between the target box corner point at the target position and the top surface keyhole edge of the diagonally adjacent box is relatively far, and the probability of box rubbing is extremely low. However, if the distance between the top surface keyhole edge of the diagonally adjacent box at the target position needs to be considered, the distance between the target box corner point and the top surface keyhole edge of the adjacent box in the direction of movement of the large vehicle, and the distance between the target box corner point and the top surface keyhole edge of the adjacent box in the direction of movement of the small vehicle can be used to calculate the Pythagorean theorem to obtain the relative distance between the target box corner point at the target position and the top surface keyhole edge of the diagonally adjacent box, thereby judging whether there is a risk of box rubbing between the target box corner point at the target position and the top surface keyhole edge of the diagonally adjacent box by the preset alarm distance.
[0077] In a possible implementation of the present application, when the relative distance of the first preset orientation and / or the relative distance of the second preset orientation is less than a preset alarm threshold, an alarm message is generated, including: obtaining a first preset deviation distance on the first preset orientation and a second preset deviation distance on the second preset orientation; subtracting the first preset deviation distance from the first preset orientation relative distance to obtain a first actual relative distance on the first preset orientation; subtracting the second preset deviation distance from the second preset orientation relative distance to obtain a second actual relative distance on the second preset orientation; when the first actual relative distance and / or the second actual relative distance is less than the preset alarm threshold, an alarm message is generated.
[0078] Specifically, since the sling itself will protrude further than the corner point of the target box, in order to ensure the accuracy of the first preset relative distance in the orientation and the second preset relative distance in the orientation, the protruding part of the sling needs to be corrected, that is, by subtracting the preset deviation value in the corresponding orientation from the first preset relative distance in the orientation and the second preset relative distance in the orientation, the actual relative distance in the orientation can be obtained.
[0079] The above-mentioned first preset deviation distance can be used to represent the deviation value between the preset sling corner point and the target box corner point in the first orientation. For example, the first preset deviation distance can be used as the deviation value of the trolley moving direction, which can be 12 cm or 13 cm. The first preset deviation distance is not specifically set here and can be adjusted according to actual conditions.
[0080] The above-mentioned second preset deviation distance can be used to represent the deviation value between the preset sling corner point and the target box corner point in the second orientation. For example, the second preset deviation distance can be used as the deviation value of the trolley moving direction, which can be 10 cm or 11 cm. The second preset deviation distance is not specifically set here and can be adjusted according to actual conditions.
[0081] Applied in an optional embodiment, when the relative distance of the first preset orientation and / or the relative distance of the second preset orientation is less than the preset alarm threshold, it is necessary to correct the protruding part of the sling during the process of generating the alarm information, and the first preset deviation distance on the first preset orientation and the second preset deviation distance on the second preset orientation can be obtained respectively. The first actual relative distance on the first preset orientation can be obtained by subtracting the first preset deviation distance from the above-mentioned first preset orientation relative distance; similarly, the second actual relative distance on the second preset orientation can be obtained by subtracting the second preset deviation distance from the above-mentioned second preset orientation relative distance, thereby achieving the deviation correction of the protruding part of the sling, thereby improving the accuracy of the first actual relative distance and the second actual relative distance, so that when the first actual relative distance and / or the second actual relative distance are less than the preset alarm threshold, an alarm information is generated to perform a box cleaning alarm.
[0082] In a possible implementation of the present application, if the target edge pixel coordinates of multiple containers are within a preset intrusion area, an alarm message is generated to perform an anti-scratch container alarm.
[0083] Specifically, the preset intrusion area can be used to represent a pre-set danger range based on the target position. If the target edge pixel coordinates of the neighboring box are within the preset intrusion area, an alarm message is generated.
[0084] In an optional embodiment, when placing a box, there is a situation where the spreader grabs the box and blocks the lock hole of the adjacent box. At this time, it can be directly judged based on the container, that is, whether the target edge pixel coordinates of the container are within the preset intrusion area. If the target edge pixel coordinates of the container are within the preset intrusion area, it means that the edge of the adjacent box falls into the danger range, and there is a risk of scratching the box when the spreader places the box. An alarm message can be generated to prevent the box from being scratched.
[0085] In a possible implementation of the present application, when the pixel size of the lock hole on the top surface of the container is smaller than the first preset size, or the pixel size of the container is smaller than the second preset size, it is determined that the container will not be scratched when the spreader performs the lifting operation of the container.
[0086] Specifically, the first preset size is used to represent a preset lock hole size.
[0087] The second preset size mentioned above is used to represent a preset size of the container.
[0088] In an optional embodiment, the risk of container damage during a lifting operation can be determined by the size of the container's keyhole and the container's dimensions. Specifically, if the pixel size of the keyhole on the top surface of the container is smaller than a first preset size, the current spreader is relatively far from the adjacent container, and there is no risk of damage to the container, so the lifting operation can be determined to be safe. Similarly, if the pixel size of the container is smaller than a second preset size, the current spreader is relatively far from the adjacent container, and there is no risk of damage to the container, so the lifting operation can be determined to be safe.
[0089] Exemplary Controller
[0090] As a second aspect of the present application, the present application further provides an anti-scratch box controller. The anti-scratch box controller can be used to perform the following steps:
[0091] S1, when the spreader performs a container lifting operation, controlling an image acquisition device on the spreader to acquire images of a target position below the spreader, thereby obtaining multiple target position images at different positions of the target position;
[0092] S2: Inputting multiple target location images at different orientations into an image detection model for processing, and outputting pixel coordinates of multiple containers and pixel coordinates of multiple keyholes, wherein the multiple containers are sequentially located at multiple preset orientations of the target location, and the multiple containers are respectively adjacent to the target location;
[0093] S3, obtaining target edge pixel coordinates of the multiple containers based on the pixel coordinates of the multiple containers, and calculating the target edge pixel coordinates of the multiple containers and the target container corner pixel coordinates at the target position to obtain a first set of relative distances, wherein the first set of relative distances includes multiple first relative distances, each of which is used to represent the relative distance between the target container corner pixel coordinates at the target position and the target edge pixel coordinates of the container at any one of the multiple preset positions, and the target edge pixel coordinates are used to represent the pixel coordinates of the contact edge of the container with the ground;
[0094] S4, obtaining edge pixel coordinates of the top surface lock holes of the multiple containers based on the pixel coordinates of the multiple lock holes, and calculating the edge pixel coordinates of the top surface lock holes of the multiple containers and the pixel coordinates of the target container corner points at the target position to obtain a second set of relative distances, wherein the second set of relative distances includes a plurality of second relative distances, each of which is used to represent the relative distance between the pixel coordinates of the target container corner points at the target position and the edge pixel coordinates of the top surface lock hole of the container at any one of the plurality of preset positions;
[0095] S5, when the first relative distance is less than the first preset threshold, and / or the second relative distance is less than the second preset threshold, an alarm message is generated based on the first relative distance and / or the second relative distance to perform an anti-scratch box alarm.
[0096] The present embodiment provides an anti-scratch box controller, which calculates the pixel coordinates of the target box corner point at the target position and the target edge pixel coordinates of the adjacent box at any preset position in a plurality of preset orientations to obtain a first relative distance, that is, the relative distance between the pixel coordinates of the target box corner point at the target position and the target edge pixel coordinates of the adjacent box at any preset position in a plurality of preset orientations. At the same time, the pixel coordinates of the target box corner point and the edge pixel coordinates of the top surface keyhole of the adjacent box are calculated to obtain a second relative distance, that is, the relative distance between the pixel coordinates of the target box corner point at the target position and the edge pixel coordinates of the top surface keyhole of the adjacent box at any preset position in a plurality of preset orientations. When the first relative distance is less than a first preset threshold value, and / or the second relative distance is less than a second preset threshold value, an alarm message is generated to perform an anti-scratch box alarm. It can be seen that in the present application, when the spreader moves up and down to perform the operation of grabbing and releasing boxes, the relative distance between the pixel coordinates of the corner points of the standard box at the target position and the edge of the adjacent box and the edge of the top surface of the lock hole in different preset orientations is calculated. An alarm can be issued when the relative distance is less than a threshold value, thereby realizing the anti-scratching function of the spreader when moving up and down due to grabbing and releasing boxes, and thus achieving the technical effect of providing anti-collision warnings for containers when the spreader moves up and down to perform the operation of grabbing and releasing boxes, thereby improving the working efficiency. In this way, the technical problem of difficulty in providing anti-collision warnings for containers when the spreader moves up and down to perform the operation of grabbing and releasing boxes is solved.
[0097] Exemplary field bridge
[0098] As the third aspect of the present application, the present application also provides a yard crane, including: a sling, which is installed on the trolley of the yard crane and is used to lift containers; an image acquisition device, which is installed on the sling and is used to capture images of the target position under the sling; an anti-scratch box controller, which is communicatively connected to the image acquisition device, and is used to execute the anti-scratch box method for containers described in any one of the above.
[0099] Figure 3 The figure shows a device block diagram of a field bridge provided in one embodiment of the present application.
[0100] like Figure 3 As shown, the field bridge 3 includes one or more processors 31 and a memory 32 .
[0101] The processor 31 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the field bridge to perform desired functions.
[0102] The memory 32 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), a hard disk, or flash memory. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 31 may execute the program instructions to implement the container anti-scratch methods of the various embodiments of the present application described above and / or other desired functions. The computer-readable storage medium may also store various contents, such as input signals, signal components, and noise components.
[0103] In one example, the field bridge 3 may further include an input device 33 and an output device 34 , and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0104] When the field bridge 3 is a stand-alone device, the input device 33 may be a communication network connector, configured to receive collected input signals from the first device and the second device.
[0105] In addition, the input device 33 may also include, for example, a keyboard, a mouse, and the like.
[0106] The output device 34 can output various information to the outside, including determined distance information, direction information, etc. The output device 34 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.
[0107] Of course, to simplify, Figure 3 Only some of the components of the field bridge 3 that are relevant to the present application are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, the field bridge 3 may also include any other appropriate components depending on the specific application.
[0108] Exemplary computer-readable storage media
[0109] As a fourth aspect of the present application, the present application provides a computer-readable storage medium, the storage medium storing a computer program, the computer program being configured to perform the following steps:
[0110] S1, when the spreader performs a container lifting operation, controlling an image acquisition device on the spreader to acquire images of a target position below the spreader, thereby obtaining multiple target position images at different positions of the target position;
[0111] S2: Inputting multiple target location images at different orientations into an image detection model for processing, and outputting pixel coordinates of multiple containers and pixel coordinates of multiple keyholes, wherein the multiple containers are sequentially located at multiple preset orientations of the target location, and the multiple containers are respectively adjacent to the target location;
[0112] S3, obtaining target edge pixel coordinates of the multiple containers based on the pixel coordinates of the multiple containers, and calculating the target edge pixel coordinates of the multiple containers and the target container corner pixel coordinates at the target position to obtain a first set of relative distances, wherein the first set of relative distances includes multiple first relative distances, each of which is used to represent the relative distance between the target container corner pixel coordinates at the target position and the target edge pixel coordinates of the container at any one of the multiple preset positions, and the target edge pixel coordinates are used to represent the pixel coordinates of the contact edge of the container with the ground;
[0113] S4, obtaining edge pixel coordinates of the top surface lock holes of the multiple containers based on the pixel coordinates of the multiple lock holes, and calculating the edge pixel coordinates of the top surface lock holes of the multiple containers and the pixel coordinates of the target container corner points at the target position to obtain a second set of relative distances, wherein the second set of relative distances includes a plurality of second relative distances, each of which is used to represent the relative distance between the pixel coordinates of the target container corner points at the target position and the edge pixel coordinates of the top surface lock hole of the container at any one of the plurality of preset positions;
[0114] S5, when the first relative distance is less than the first preset threshold, and / or the second relative distance is less than the second preset threshold, an alarm message is generated based on the first relative distance and / or the second relative distance to perform an anti-scratch box alarm.
[0115] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program information. When the computer program information is executed by a processor, the processor executes the steps of the anti-scratch box method for containers according to various embodiments of the present application described in this specification.
[0116] The computer program product may be written in any combination of one or more programming languages to implement the program code for performing the operations of the embodiments of the present application, including object-oriented programming languages such as Java, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed 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.
[0117] In addition, the embodiments of the present application may also be a computer-readable storage medium having computer program information stored thereon. When the computer program information is executed by a processor, the processor executes the steps of the anti-scratch box method for containers according to various embodiments of the present application described in this specification.
[0118] Computer readable storage media can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can, for example, include but is not limited to a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0119] The basic principles of the present application have been described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, and effects mentioned in this application are merely illustrative and not restrictive, and it should not be assumed that these advantages, strengths, and effects are required of each embodiment of this application. In addition, the specific details disclosed above are merely illustrative and facilitating understanding, and are not restrictive. The above details do not limit this application to necessarily being implemented using the above specific details.
[0120] The block diagrams of the devices, devices, equipment, and systems involved in this application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, devices, equipment, and systems can be connected, arranged, or configured in any manner. Words such as "include," "comprise," "have," and the like are open-ended words, meaning "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or" and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.
[0121] It should also be noted that in the apparatus, device, and method of the present application, each component or each step can be decomposed and / or recombined, and such decomposition and / or recombination should be regarded as equivalent solutions of the present application.
Claims
1. A method for preventing a container from being scratched, characterized in that: include: When the spreader performs a container lifting operation, controlling an image acquisition device on the spreader to acquire an image of a target position below the spreader to obtain a plurality of target position images of the target position at different orientations; Inputting multiple target location images at different orientations into an image detection model for processing, and outputting pixel coordinates of multiple containers and pixel coordinates of multiple keyholes, wherein the multiple containers are sequentially located at multiple preset orientations of the target location and are respectively adjacent to the target location; Obtaining target edge pixel coordinates of the multiple containers based on the pixel coordinates of the multiple containers, and calculating the target edge pixel coordinates of the multiple containers and the target container corner pixel coordinates at the target position to obtain a first set of relative distances, wherein the first set of relative distances includes a plurality of first relative distances, each of which is used to represent the relative distance between the target container corner pixel coordinates at the target position and the target edge pixel coordinates of the container at any one of the multiple preset positions, and the target edge pixel coordinates are used to represent the pixel coordinates of the contact edge of the container with the ground; Obtaining edge pixel coordinates of the top surface lock holes of the multiple containers based on the pixel coordinates of the multiple lock holes, and calculating the edge pixel coordinates of the top surface lock holes of the multiple containers and the pixel coordinates of the target box corner points at the target position to obtain a second set of relative distances, wherein the second set of relative distances includes a plurality of second relative distances, and the second relative distances are used to represent the relative distance between the pixel coordinates of the target box corner points at the target position and the edge pixel coordinates of the top surface lock hole of the container at any preset position of the multiple preset positions; When the first relative distance is less than a first preset threshold, and / or the second relative distance is less than a second preset threshold, an alarm message is generated based on the first relative distance and / or the second relative distance to perform an anti-scratch box alarm.
2. The anti-scratch method for a container according to claim 1, characterized in that: The inputting of multiple target position images at different orientations into the image detection model for processing, and outputting pixel coordinates of multiple containers and pixel coordinates of multiple keyholes, includes: Segmenting the multiple target location images at different orientations to obtain a set of regions where multiple containers are located and a set of regions where multiple keyholes are located; A plurality of groups of lockhole containers are obtained by matching the set of areas where the plurality of containers are located with the set of areas where the plurality of lockholes are located, wherein each group of lockhole containers in the plurality of groups of lockhole containers has a container corresponding to a lockhole; Based on the multiple preset positions of the target location, the multiple groups of keyhole containers are divided into regions to obtain pixel coordinates of the multiple containers and pixel coordinates of the multiple keyholes.
3. The anti-scratch method for a container according to claim 2, characterized in that: The method of obtaining a plurality of groups of lockhole containers by matching the set of areas where the plurality of containers are located with the set of areas where the plurality of lockholes are located includes: Obtaining a coordinate range of an area where a first container is located in the set of areas where the multiple containers are located; Obtaining coordinate data of a first keyhole region in the set of keyhole regions; Determining whether the coordinate data of the area where the first keyhole is located is within the coordinate range of the area where the first container is located; If the coordinate data of the area where the first keyhole is located is within the coordinate range of the area where the first container is located, the first keyhole is matched with the first container to obtain a group of keyhole containers; The multiple groups of keyhole containers include multiple groups of keyhole containers.
4. The method for preventing a container from being scratched according to claim 1, characterized in that: When the hoisting operation is a box grabbing operation, the pixel coordinates of the target box corner point are determined as the pixel coordinates of the virtual box corner point at the target position.
5. The method for preventing a container from being scratched according to claim 1, characterized in that: When the hoisting operation is a box placing operation, the pixel coordinates of the target box corner points are determined as the pixel coordinates of the hoisting box corner points.
6. The method for preventing a container from being scratched according to claim 1, characterized in that: When the second relative distance is less than a second preset threshold, generating alarm information based on the second relative distance includes: Obtaining a first preset orientation relative distance based on the second relative distance, wherein the first preset orientation relative distance is used to represent the relative distance between the pixel coordinates of the target container corner point and the pixel coordinates of the edge of the keyhole on the top surface of the container at the first preset orientation; Obtaining a second preset orientation relative distance based on the second relative distance, wherein the second preset orientation relative distance is used to represent the relative distance between the pixel coordinates of the target container corner point and the pixel coordinates of the edge of the keyhole on the top surface of the container at the second preset orientation; When the first preset relative distance of the orientation and / or the second preset relative distance of the orientation is less than a preset alarm threshold, an alarm message is generated.
7. The method for preventing a container from being scratched according to claim 6, characterized in that: When the first preset relative distance and / or the second preset relative distance are less than a preset alarm threshold, generating an alarm message includes: Obtaining a first preset deviation distance at the first preset orientation and a second preset deviation distance at the second preset orientation; Subtracting the first preset deviation distance from the first preset relative distance to obtain a first actual relative distance at the first preset orientation; Subtracting the second preset deviation distance from the second preset relative distance to obtain a second actual relative distance at the second preset orientation; When the first actual relative distance and / or the second actual relative distance is smaller than a preset alarm threshold, an alarm message is generated.
8. The method for preventing a container from being scratched according to claim 1, characterized in that: The anti-scratch container method further includes: if the target edge pixel coordinates of the plurality of containers are within a preset intrusion area, generating the alarm information to perform an anti-scratch container alarm.
9. The method for preventing a container from being scratched according to claim 1, characterized in that: The anti-scratch box method also includes: When the pixel size of the lock hole on the top surface of the container is smaller than the first preset size, or the pixel size of the container is smaller than the second preset size, it is determined that no container scratching will occur when the spreader performs the container lifting operation.
10. A field bridge, characterized in that: include: A spreader, which is installed on the trolley of the yard crane and is used to lift containers; An image acquisition device, the image acquisition device being mounted on the spreader and configured to acquire an image of a target position below the spreader; An anti-scratch box controller is communicatively connected to the image acquisition device, and is used to execute the anti-scratch box method for a container as described in any one of claims 1 to 9.