Container deformation detection method, device and equipment and storage medium

Through image recognition technology, the corner component area and external contour of the container are identified, and the edge distance of the external rectangle is combined to determine whether the container is deformed, which solves the problem of increasing detection costs in the prior art and realizes efficient container deformation detection.

CN119444681APending Publication Date: 2025-02-14SANY MARINE HEAVY INDUSTRY CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411456821.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The prior art requires the installation of depth sensors when detecting container deformation, which increases the detection cost, and the further away the container is from the sensor, the higher the cost. How to improve the efficiency of container deformation detection without increasing the detection cost is an urgent problem.

Method used

By acquiring the image of the container, identifying the corner component area and the external contour, determining the external contour of the external contour, and determining whether the container is deformed based on the distance between the corner component area and the edge line of the external rectangle. This method only relies on camera and visual calculation methods, does not require depth sensors, reducing detection costs.

Benefits of technology

It is achieved to improve the efficiency of container deformation detection without increasing the detection cost, and accurately detect whether the container is deformed through visual calculation methods, which is more efficient than artificial measurement methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119444681A_ABST
    Figure CN119444681A_ABST
Patent Text Reader

Abstract

The invention provides a container deformation detection method and device, equipment and a storage medium, and the method comprises the steps: obtaining a to-be-processed image which comprises a view of a to-be-detected container in at least one direction; identifying a corner component area and an external contour of the container to be detected from the image; determining an external rectangle of the external contour; and determining whether the to-be-detected container is deformed or not based on the distance between the corner component area and the side line of the external rectangle. Whether the container deforms or not can be accurately detected according to the distance between the boundary line of the external rectangle and the corner component area, the detection can be realized only through a camera and a visual calculation method, a depth sensor is not needed any more, and the deformation detection cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a method, device, equipment and storage medium for detecting container deformation. Background Art

[0002] Containers are the main carrier for cargo transportation. Container deformation may cause transportation accidents during loading, unloading, stacking and transportation, and may even cause the container to collapse or collapse. Therefore, it is necessary to perform deformation detection on containers.

[0003] At present, there is a method in the prior art to determine the degree of deformation of the container bulge through a depth map, but this method requires the installation of a depth sensor, which increases the detection cost, and the farther the container is from the sensor, the higher the cost to achieve this effect.

[0004] Therefore, how to improve the efficiency of container deformation detection without increasing the detection cost is an urgent problem to be solved. Summary of the invention

[0005] The present application provides a container deformation detection method, device, equipment and storage medium, which are used to improve the efficiency of container deformation detection without increasing the detection cost.

[0006] In a first aspect, the present application provides a method for detecting container deformation, comprising:

[0007] Acquire an image to be processed, wherein the image includes a view of the container to be inspected in at least one direction;

[0008] identifying the corner component area and the outer contour of the container to be inspected from the image;

[0009] Determine a circumscribed rectangle of the outer contour;

[0010] Whether the container to be inspected is deformed is determined based on the distance between the corner component area and the sideline of the circumscribed rectangle.

[0011] In some implementations, determining whether the container to be inspected is deformed based on the distance between the corner component area and the sideline of the circumscribed rectangle includes:

[0012] Determining the shortest distance between each side of the circumscribed rectangle and an adjacent corner component area;

[0013] If the shortest distance is greater than the preset distance, it is determined that the container to be detected is deformed.

[0014] In some implementations, determining the shortest distance between each side of the circumscribed rectangle and an adjacent corner component area includes:

[0015] For each side of the circumscribed rectangle, determining the coordinates of the tangent point between the circumscribed rectangle and the external contour in the image;

[0016] Determining the corner component coordinates of the adjacent corner component region in the image;

[0017] The shortest distance between the side of the circumscribed rectangle and the adjacent corner component area is determined according to the tangent point coordinates and the corner component coordinates.

[0018] In some implementations, determining the shortest distance between the side of the circumscribed rectangle and the adjacent corner component area according to the tangent point coordinates and the corner component coordinates includes:

[0019] The shortest distance is obtained by subtracting the value of the corner component coordinates in the direction perpendicular to the side lines of the circumscribed rectangle from the value of the tangent point coordinates in the direction perpendicular to the side lines of the circumscribed rectangle.

[0020] In some implementations, if the image includes three of the three views of the container to be inspected, the method further includes:

[0021] Acquire the coordinates of the deformation tangent point corresponding to the position where the shortest distance is greater than the preset distance in the image of each view;

[0022] The position of the deformation point of the container is determined according to the deformation tangent point coordinates.

[0023] In some implementations, the method further includes:

[0024] The degree of deformation corresponding to the shortest distance is determined according to a preset mapping relationship between the distance and the degree of deformation.

[0025] In some implementations, determining a circumscribed rectangle of the external contour includes:

[0026] Deleting the corner component area from the outer contour to obtain a processed outer contour area;

[0027] The bounding rectangle of the processed outer contour area is determined.

[0028] In a second aspect, the present application further provides a container deformation detection device, comprising:

[0029] An acquisition module, used for acquiring an image to be processed, wherein the image includes a view of the container to be detected in at least one direction;

[0030] A recognition module, used to recognize the corner component area and the outer contour of the container to be detected from the image;

[0031] A determination module, used to determine the circumscribed rectangle of the external contour;

[0032] The detection module is used to determine whether the container to be detected is deformed based on the distance between the corner component area and the edge line of the circumscribed rectangle.

[0033] In a third aspect, the present application further provides an electronic device, comprising: a memory, a processor;

[0034] The memory stores computer-executable instructions;

[0035] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.

[0036] In a fourth aspect, the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the above first aspect and / or various possible implementations of the first aspect.

[0037] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.

[0038] The container deformation detection method, device, equipment and storage medium provided in the embodiment of the present application include: obtaining an image to be processed, the image including a view of the container to be detected in at least one direction; identifying the corner component area and the external contour of the container to be detected from the image; determining the circumscribed rectangle of the external contour; and determining whether the container to be detected is deformed based on the distance between the corner component area and the edge of the circumscribed rectangle. Whether the container is deformed can be accurately detected based on the distance between the edge of the circumscribed rectangle and the corner component area, and this can be achieved only by a camera and a visual computing method, without the need for a depth sensor, thereby reducing the cost of deformation detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0040] Figure 1 A schematic diagram of the process of the container deformation detection method provided in this application;

[0041] Figure 2 A schematic diagram of the circumscribed rectangle of the outer contour of the container provided for this application;

[0042] Figure 3 Schematic diagram of the container provided for this application;

[0043] Figure 4 A schematic diagram of the container identification results provided for this application;

[0044] Figure 5 Schematic diagram of distance analysis provided for this application;

[0045] Figure 6 Another schematic diagram of distance analysis provided for this application;

[0046] Figure 7 Another schematic diagram of distance analysis provided for this application;

[0047] Figure 8 A schematic diagram for determining the shortest distance provided for this application;

[0048] Fig. 9 A schematic diagram of three views of the container provided for this application;

[0049] Fig.10 A schematic diagram of the structure of a container deformation detection device provided in this application;

[0050] Fig.11 A schematic diagram of the structure of the electronic device provided in this application.

[0051] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0052] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0053] In the actual production activities of the port, it is very important to conduct qualitative and quantitative analysis of container bulges, which determines the safety of the container operation process. At present, the box structure deformation analysis based on the depth map determines whether bulges or depressions occur by obtaining the depth at each position of the box structure. However, this method requires the installation of additional sensors on the existing yard crane equipment, which increases the cost. Moreover, the farther the container is from the sensor, the higher the cost of the sensor to achieve the same effect.

[0054] In view of the above problems, this application utilizes the existing camera equipment in the port and uses visual technology to implement container bulge analysis without adding additional hardware costs. Specifically, the image of at least one view of the container is obtained through the camera equipment, the circumscribed rectangle of the container in the image is identified, and whether the container is deformed is determined based on the distance from the circumscribed rectangle to the corner component area of ​​the container.

[0055] The application scenarios of this application can be applied to: placing containers on a truck, adjusting container doors on a truck, grabbing containers on a truck, grabbing containers in a yard, placing containers in a yard, unloading containers in a yard, placing containers on a cargo ship, grabbing containers on a cargo ship, etc. In actual applications, you can choose whether to need three views to ensure safety, or only need a specific view, or two of the views can ensure safety based on the specific scenario.

[0056] The execution subject of the present application is an electronic device connected to a camera device, such as a computer dedicated to recognizing deformation.

[0057] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0058] Figure 1 A flow chart of the method for detecting container deformation provided in this application is shown as follows: Figure 1 As shown, the method includes:

[0059] S101. Acquire an image to be processed, where the image includes a view of a container to be inspected in at least one direction.

[0060] The camera is set in advance at the place where the container is to pass, and can capture the image of the container. The camera can be set in multiple places to capture the view images of the container in different directions, or only capture the view image in one direction. Among them, the view refers to one of the three views of the container, such as the front view, side view, top view, etc.

[0061] The detection device obtains the image to be processed taken by the camera for subsequent processing.

[0062] Optionally, view detection is performed on the image to be processed, a model is established in advance through normal three-view samples, and the image to be processed is input into the model to determine whether it is a three-view. If a view that is not in the three-view direction is detected, the image to be processed is re-acquired.

[0063] S102: Identify the corner component area and the outer contour of the container to be inspected from the image.

[0064] In this step, the outer contour and corner component areas of the container in the image are identified through a preset target detection algorithm (such as the YOLO algorithm and the Faster R-CNN algorithm).

[0065] S103: Determine the circumscribed rectangle of the external contour.

[0066] Draws a rectangle that encloses the outer contour in the image.

[0067] For example, Figure 2 The schematic diagram of the circumscribed rectangle of the container's outer contour provided for this application is as follows: Figure 2 The dotted line in the middle is the drawn circumscribed rectangle, and the four rectangular areas inside are the identified corner component areas.

[0068] S104: Determine whether the container to be inspected is deformed based on the distance between the corner component area and the sideline of the circumscribed rectangle.

[0069] The corner component area of ​​the container is located at the four corners in one viewing direction of the container. This area is not easily deformed, so the corner component area is used as a reference. If the container to be inspected is normal, the distance from the edge of the circumscribed rectangle to the adjacent corner component area is within the first preset distance, or the distance from the edge of the circumscribed rectangle to the distant corner component area is within the second preset distance. When the container to be inspected is a deformed container, the position of its bulge will make the circumscribed rectangle larger, resulting in a larger distance from the edge of the circumscribed rectangle to the corner component area. Therefore, based on the distance between the corner component area and the edge of the circumscribed rectangle, it can be determined whether the container to be inspected is deformed.

[0070] The container deformation detection method provided in the embodiment of the present application comprises: obtaining an image to be processed, the image including a view of the container to be detected in at least one direction; identifying the corner component area and the external contour of the container to be detected from the image; determining the circumscribed rectangle of the external contour; and determining whether the container to be detected is deformed based on the distance between the corner component area and the edge of the circumscribed rectangle. This method can accurately detect whether the container is deformed based on the distance between the edge of the circumscribed rectangle and the corner component area, and can be achieved only by a camera and a visual computing method, without the need for a depth sensor, thereby reducing costs. Compared with manual measurement, the detection efficiency is improved.

[0071] The following is an introduction to how to determine whether a container is deformed using a specific example.

[0072] Figure 3 The container diagram provided for this application is as follows: Figure 3 As shown, images of different views of the container to be detected can be obtained in different directions. In this example, the image of the front view or the rear view is taken as an example. Figure 4A schematic diagram of the container identification results provided for this application, such as Figure 4 As shown, the first picture on the left is a normal container, the middle picture is a bulging container, and the right picture is the recognition result of the bulging container.

[0073] For a normal container, the circumscribed rectangle coincides with the outer contour of the normal container (not shown in the figure). However, for a bulge on the side of the container, the edge line in the main view will protrude, thus producing the following Figure 4 The dotted line in the figure on the right draws the circumscribed rectangle.

[0074] After drawing the bounding rectangle, determine the shortest distance from each side of the bounding rectangle to the corner widget area.

[0075] In one implementation, Figure 5 A schematic diagram of the distance analysis provided for this application, such as Figure 5 As shown, for the upper edge, the shortest distance between the upper edge and any corner component area adjacent to the two corner component areas is first determined. If the shortest distance between the upper edge and any corner component area adjacent to the two corner component areas is determined to be greater than the first preset distance, it indicates that the container to be detected is deformed. For other edges, similar detection is performed. As long as the shortest distance between one edge and any corner component area adjacent to the two corner component areas is greater than the first preset distance, it is determined that the container to be detected is deformed. In this way, the shortest distance from the circumscribed rectangle to the corner component can be accurately calculated.

[0076] In one implementation, Figure 6 Another schematic diagram of distance analysis provided by this application is as follows: Figure 6 As shown, for the upper edge, first determine the shortest distance between the upper edge and any of the two corner component areas away. If it is determined that the shortest distance between the upper edge and any of the two corner component areas of the principle is greater than the second preset distance, it means that the container to be detected is deformed. For other edge lines, similar detection is performed. As long as the shortest distance between one edge and any of the two corner component areas of the principle is greater than the second preset distance, it is determined that the container to be detected is deformed. In this way, the calculation error can be reduced. When the edge line and the adjacent corner component area are calculated, when the identified circumscribed rectangle or corner component area fluctuates, the error caused by the fluctuation plus the actual shortest distance exceeds the preset distance. For example, the preset distance is 10cm, the algorithm recognizes the error of the circumscribed rectangle by 2cm, and the error of the algorithm recognition accounts for 20%. It may be recognized as a deformed container due to the error. When this method is adopted, the preset distance is 260cm, and the algorithm recognizes the error of the circumscribed rectangle by 2cm, which accounts for a small proportion of the error.

[0077] In one implementation, Figure 7 Another schematic diagram of distance analysis provided by this application is as follows: Figure 7 As shown, according to the four corner component areas, the circumscribed rectangle of the corner component area is constructed, and whether the container to be detected is deformed is determined according to the circumscribed rectangle of the outer contour and the circumscribed rectangle of the corner component area. The shortest distance between two adjacent sides of the two rectangles is obtained and compared with the third preset distance. If the shortest distance corresponding to any side line is greater than the third preset distance, it is determined that the container to be detected is deformed. Two rectangles are identified and the distance between each two sides in the matrix is ​​calculated. Compared with the method of comparing with the corner component area, the calculation speed is improved.

[0078] In some cases, the corner component area may also be deformed, which may cause the above calculation method to produce misjudgment. First, how to determine whether the corner component area is deformed? Taking the upper edge of the circumscribed rectangle as an example, the shortest distance between the upper edge and the two corner component areas should be the same, or the difference between the two should not exceed the preset error, that is, the two upper corner component areas are on a straight line, or within the error range. Get the shortest distance from the upper edge to the upper left corner component area, and then get the shortest distance from the upper edge to the upper right corner component area. If the shortest distance between the two exceeds the preset error, it is considered that one of the corner component areas is deformed. At this time, the upper two corner component areas cannot be used, and the lower two corner component areas are used for container deformation analysis. Get the shortest distance from the upper line to the lower left corner component area and the shortest distance from the upper line to the lower right corner component area, and determine whether the difference between the two is less than the error of the alternative solution. If it is less than the error of the alternative solution, it means that any shortest distance can be compared with the preset distance of the alternative solution to determine whether the container is deformed.

[0079] If the difference between the shortest distance between the upper line and the lower left corner component area in the alternative solution and the shortest distance between the upper line and the lower right corner component area in the alternative solution is greater than the error of the alternative solution, it means that the lower corner component area is also deformed, and it is determined that the container to be inspected is deformed.

[0080] The following is an introduction on how to calculate the shortest distance.

[0081] In one implementation, the shortest distance is obtained in the image by image mapping.

[0082] In another implementation, the coordinates of the position points in the image may be identified to determine two points, and the shortest distance may be calculated by performing a coordinate difference.

[0083] Figure 8 The schematic diagram for determining the shortest distance provided for this application is as follows: Figure 8As shown, the bounding rectangle and corner component areas (LOCK-1, LOCK-2, LOCK-3, LOCK-4) are identified in the image. Taking any point in the image as the origin, it can be seen that the position coordinates of the upper left corner of the bounding rectangle are (container_x, container_y) and the length and width of the bounding rectangle are (container_w, container_h). The lock hole (i.e., the corner component area) identified by the target detection is also a rectangular outline. It can be seen that the position coordinates of its upper left corner in the image are (lock_x, lock_y) and the length and width (lock_w, lock_h).

[0084] The coordinates of the four tangent points (P1, P2, P3, P4) of the circumscribed rectangle and the outer contour of the container are identified, and thus the shortest distance from each tangent point to the corner component area can be calculated.

[0085] Deformation analysis of point p1:

[0086] The shortest distance of the front view of p1 = lock_1_y-container_y

[0087] Deformation analysis of point p2:

[0088] The shortest distance of the front view of p2 = lock_1_x-container_x

[0089] Deformation analysis of point p3:

[0090] The shortest distance of the front side viewing angle of p3 = container_x + container_w-lock_2_x-lock_2_w. Deformation analysis of point p4:

[0091] The shortest distance of the front view of p4 = container_y + container_h - lock_3_y - lock_3_h

[0092] According to the coordinates of the four tangent points and the coordinates of the upper left corner of the corner component area, the vertical distance from the tangent point to the adjacent corner component area can be determined, which means the shortest distance from the edge line where the tangent point is located to the corner component area. It should be noted that the upper right corner coordinates or the center point coordinates of the corner component area can also be selected, and the coordinate calculation method changes.

[0093] After determining that the container has been deformed, the level of deformation can be determined based on the shortest distance, and deformation levels corresponding to different distances are predefined, such as no bulge, slight bulge, severe bulge, safe bulge, dangerous bulge, etc. The level of container deformation can be determined based on the shortest distance.

[0094] The above only introduces the main view as an example. The calculation method for determining the shortest distance in the side view and the top view is similar and will not be repeated here.

[0095] In practical applications, it is not only necessary to determine whether the container has been deformed and the degree of deformation, but also to determine the specific location of the deformed area in the container. Clarifying the deformation location can effectively avoid accidents such as container tipping over or cargo damage.

[0096] To determine the deformation position on the container, it is necessary to obtain views of the container in three directions, such as a front view, a side view, and a top view.

[0097] Obtaining the bird's-eye view: A camera can be installed on the spreader, or under the trolley, or under the crossbeam of the yard bridge, or on the top of the yard entrance, or on the top of the port lane entrance.

[0098] machine

[0099] Acquisition of front view or rear view: Cameras can be installed at both ends of the yard crane, or at the front and rear of the yard entrance, or at the front and rear of the port lane entrance.

[0100] Acquisition of side view: Cameras can be installed on the side of the container truck, on the pillars of the yard bridge, or on the left and right sides of the yard entrance, or on the left and right sides of the port lane entrance.

[0101] It is also possible to build a separate place where every container truck must pass through, where cameras can be installed in the front, back, left, right, up and down directions to take three-view images of the container.

[0102] To ensure safety, the camera installation location can be freely selected based on actual business and processes. When judging whether the container is deformed, one view, two views, or three views are required. When determining the deformation position, three views are required.

[0103] Fig. 9 The schematic diagram of the three views of the container provided for this application is as follows: Fig. 9 As shown, the tangent point coordinates of each view in the three views are obtained. In the main view, the tangent point coordinates of P1, P2, P3, and P4 are obtained; in the right view, the tangent point coordinates of P1, P4, P5, and P6 are obtained; in the top view, the tangent point coordinates of P2, P3, P5, and P6 are obtained. Therefore, the three-dimensional coordinates of the six points can be determined. In each view, the shortest distance from each edge line to the corner component area is calculated to determine the deformed edge, and then the tangent point on the deformed edge (i.e., the coordinates of the deformed tangent point) can be determined. The three-dimensional coordinates of the deformed tangent point can be obtained through three views, and then the coordinate positions of all bulge points in the container can be obtained.

[0104] In this way, qualitative analysis of container deformation and quantitative analysis of deformation position can be achieved. The analysis results can be used for container information collection, risk management and related tasks when grabbing and releasing containers (such as anti-collision boxes and anti-smashing vehicles).

[0105] In some container shapes, the corner widget areas are located further out than the normal edges, such as Fig. 9 As shown in the top view in , in this case, if the circumscribed rectangle of the container outline is directly drawn, the drawn circumscribed rectangle may be determined by the corner component area, and the deformation point P6 cannot be identified. After obtaining the top view image, it is identified that the container outline edge line is inside the rectangle formed by the corner component area, and the face is determined to be the front of the container, which requires special judgment. First, the corner component area is removed from the outer contour of the container, and then the circumscribed rectangle is drawn for the outer contour after the corner component area is removed, and finally each edge is analyzed. The preset distance from point P6 to the corner component area is different from the preset distance from other edge lines to the corner component area.

[0106] The above method can be applied to bulge detection of most containers on the market.

[0107] In some cases, the container may be dented. Using the above-mentioned distance method between the circumscribed rectangle and the corner component area will cause the circumscribed rectangle to be drawn incorrectly, and the dented deformation of the container cannot be identified. Therefore, it is necessary to first determine whether the deformation type of the container may be dented or bulged. First, connect the corner point coordinates of the external contour to determine whether most of the position points in the edge line of the external contour are on the inside or outside of the connecting line. The inside means inside the contour, and the outside means outside the contour. If some of the position points are on the outside of the connecting line, it means that the container is not dented, and the method in the above embodiment is executed to determine whether a bulge occurs. If some of the position points are on the inside of the connecting line, it means that the container may be dented. When determining that the container may be dented, obtain the maximum distance between the corner point coordinates and the edge line of the external contour; compare the maximum distance with the preset dent distance, and if it is greater than the preset dent distance, it is determined that the container is dented and deformed.

[0108] Fig.10 The structural diagram of the container deformation detection device provided in this application is as follows: Fig.10 As shown, the container deformation detection device 1000 provided in this embodiment includes:

[0109] An acquisition module 1001 is used to acquire an image to be processed, wherein the image includes a view of the container to be detected in at least one direction;

[0110] An identification module 1002 is used to identify the corner component area and the outer contour of the container to be detected from the image;

[0111] A determination module 1003 is used to determine a circumscribed rectangle of the external contour;

[0112] The detection module 1004 is used to determine whether the container to be detected is deformed based on the distance between the corner component area and the edge line of the circumscribed rectangle.

[0113] Optionally, the detection module 1004 is specifically used for:

[0114] Determining the shortest distance between each side of the circumscribed rectangle and an adjacent corner component area;

[0115] If the shortest distance is greater than the preset distance, it is determined that the container to be detected is deformed.

[0116] Optionally, the detection module 1004 is further used for:

[0117] For each side of the circumscribed rectangle, determining the coordinates of the tangent point between the circumscribed rectangle and the external contour in the image;

[0118] Determining the corner component coordinates of the adjacent corner component region in the image;

[0119] The shortest distance between the side of the circumscribed rectangle and the adjacent corner component area is determined according to the tangent point coordinates and the corner component coordinates.

[0120] Optionally, the detection module 1004 is further used for:

[0121] The shortest distance is obtained by subtracting the value of the corner component coordinates in the direction perpendicular to the side lines of the circumscribed rectangle from the value of the tangent point coordinates in the direction perpendicular to the side lines of the circumscribed rectangle.

[0122] Optionally, if the image includes three of the three views of the container to be inspected, the inspection module 1004 is further configured to:

[0123] Acquire the coordinates of the deformation tangent point corresponding to the position where the shortest distance is greater than the preset distance in the image of each view;

[0124] The position of the deformation point of the container is determined according to the deformation tangent point coordinates.

[0125] Optionally, the determining module 1003 is further configured to:

[0126] The degree of deformation corresponding to the shortest distance is determined according to a preset mapping relationship between the distance and the degree of deformation.

[0127] Optionally, the determining module 1003 is further configured to:

[0128] Deleting the corner component area from the outer contour to obtain a processed outer contour area;

[0129] The bounding rectangle of the processed outer contour area is determined.

[0130] The container deformation detection device provided in this embodiment can execute the method provided in the above method embodiment, and its implementation principle and technical effect are similar, which will not be described in detail in this embodiment.

[0131] Fig.11 This is a schematic diagram of the structure of the electronic device provided in this application. Fig.11 As shown, the electronic device 50 provided in this embodiment includes: at least one processor 501 and a memory 502. Optionally, the device 50 also includes a communication component 503. The processor 501, the memory 502 and the communication component 503 are connected via a bus 504.

[0132] In a specific implementation process, at least one processor 501 executes the computer-executable instructions stored in the memory 502, so that at least one processor 501 executes the above method.

[0133] The specific implementation process of the processor 501 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

[0134] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0135] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.

[0136] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0137] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.

[0138] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.

[0139] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.

[0140] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0141] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

[0142] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0143] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0144] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0145] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0146] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. A method for detecting container deformation, characterized in that: include: Acquire an image to be processed, wherein the image includes a view of the container to be inspected in at least one direction; identifying the corner component area and the outer contour of the container to be inspected from the image; Determine a circumscribed rectangle of the outer contour; Whether the container to be inspected is deformed is determined based on the distance between the corner component area and the sideline of the circumscribed rectangle.

2. The method according to claim 1, characterized in that The step of determining whether the container to be inspected is deformed based on the distance between the corner component area and the sideline of the circumscribed rectangle includes: Determining the shortest distance between each side of the circumscribed rectangle and an adjacent corner component area; If the shortest distance is greater than the preset distance, it is determined that the container to be detected is deformed.

3. The method according to claim 2, characterized in that Determining the shortest distance between each side of the circumscribed rectangle and the adjacent corner component area includes: For each side of the circumscribed rectangle, determining the coordinates of the tangent point between the circumscribed rectangle and the external contour in the image; Determining the corner component coordinates of the adjacent corner component region in the image; The shortest distance between the side of the circumscribed rectangle and the adjacent corner component area is determined according to the tangent point coordinates and the corner component coordinates.

4. The method according to claim 3, characterized in that The step of determining the shortest distance between the side of the circumscribed rectangle and the adjacent corner component area according to the tangent point coordinates and the corner component coordinates includes: The shortest distance is obtained by subtracting the value of the corner component coordinates in the direction perpendicular to the side lines of the circumscribed rectangle from the value of the tangent point coordinates in the direction perpendicular to the side lines of the circumscribed rectangle.

5. The method according to claim 3 or 4, characterized in that: If the image includes three of the three views of the container to be inspected, the method further includes: Acquire the coordinates of the deformation tangent point corresponding to the position where the shortest distance is greater than the preset distance in the image of each view; The position of the deformation point of the container is determined according to the deformation tangent point coordinates.

6. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: The degree of deformation corresponding to the shortest distance is determined according to a preset mapping relationship between the distance and the degree of deformation.

7. The method according to any one of claims 1 to 4, characterized in that: The step of determining the circumscribed rectangle of the external contour comprises: Deleting the corner component area from the outer contour to obtain a processed outer contour area; The bounding rectangle of the processed outer contour area is determined.

8. A container deformation detection device, characterized in that: include: An acquisition module, used for acquiring an image to be processed, wherein the image includes a view of the container to be detected in at least one direction; A recognition module, used to recognize the corner component area and the outer contour of the container to be detected from the image; A determination module, used to determine the circumscribed rectangle of the external contour; The detection module is used to determine whether the container to be detected is deformed based on the distance between the corner component area and the edge line of the circumscribed rectangle.

9. An electronic device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.

Citation Information

Cited By

  • Container door detection method and system, field bridge and electronic equipment

    CN120808000A

  • Container shape correction detection system and method

    CN121304574A