Grasping adjustment method, device, equipment and medium based on visual camera

Through the image information processing and deep learning model of the vision camera, adjustment instructions are generated to correct the pallet position, which solves the problem of difficult correction of the vision camera in the installation of the robot arm, and improves the accuracy of the grabbing task and the ease of installation.

CN116902586BActive Publication Date: 2024-08-23ZHIWEISHI (TIANJIN) TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310973666.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-03
Publication Date
2024-08-23
Estimated Expiration
2043-08-03

AI Technical Summary

Technical Problem

When the robotic arm is first installed, it is difficult for the vision camera to accurately correct the position of the pallet, resulting in inaccurate grabbing tasks and increasing the complexity of the installation process.

Method used

By obtaining the image information captured by the vision camera, the edge and corner positions of the pallet are determined, and adjustment instructions are generated to adjust the deflection angle and displacement of the vision camera to ensure that the pallet is at the preset position, simplifying the installation process and improving grabbing accuracy.

Benefits of technology

It achieves fast and accurate correction of vision cameras, simplifies the installation process of robotic arms, and improves the accuracy of grabbing tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116902586B
    Figure CN116902586B
Patent Text Reader

Abstract

The present application relates to a grasping adjustment method, device, equipment and medium based on a visual camera, belonging to the field of data processing, and the method includes: obtaining the current image information taken by the visual camera; determining the position information of the edge and corner points of the tray in the current image information; judging whether the tray is located at a preset position based on the position information of the edge and corner points of the tray; if not, generating an angle adjustment instruction for adjusting the deflection angle of the visual camera and a displacement adjustment instruction for adjusting the displacement of the visual camera based on the position information of the edge and corner points of the tray. In response to the angle adjustment instruction and the displacement adjustment instruction. The present application simplifies the installation process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data processing, and in particular to a grasping adjustment method, device, equipment and medium based on a visual camera. Background Art

[0002] As the manufacturing industry moves towards automation, robotic arms have been widely used to grasp targets. Robotic arms are guided and positioned by industrial vision cameras to grasp targets or load and unload materials.

[0003] In order to enable the visual camera to locate the target object, the position of the visual camera and the tray containing the target object needs to be relatively calibrated in advance. When the robotic arm completes the last grasping task and returns to the initial position, the visual camera recognizes the next target object on the tray again.

[0004] However, when installing the robot arm for the first time, it is necessary to accurately calibrate the position of the pallet. If the position of the pallet is not accurate, the visual camera may not be able to accurately locate the target object, which makes it difficult for the robot arm to accurately complete the grasping. Therefore, the installation process is difficult. Summary of the invention

[0005] In order to simplify the installation process, the present application provides a grasping and adjustment method, device, equipment and medium based on a visual camera.

[0006] In the first aspect, the present application provides a grasping adjustment method based on a visual camera, which adopts the following technical solution:

[0007] Get the current image information taken by the visual camera;

[0008] Determine the position information of the edge and corner points of the tray in the current image information;

[0009] Determining whether the tray is located at a preset position based on the position information of the edge and corner points of the tray;

[0010] If not, then based on the position information of the edge and the corner point of the tray, an angle adjustment instruction for adjusting the deflection angle of the visual camera and a displacement adjustment instruction for adjusting the displacement of the visual camera are generated;

[0011] In response to the angle adjustment instruction and the displacement adjustment instruction.

[0012] By adopting the above technical solution, the electronic device obtains the current image information taken by the visual camera, determines the position information of the edge and corner points of the pallet in the current image information, and then compares it with the preset position to determine whether the pallet is offset. If offset, an angle adjustment instruction and a displacement adjustment instruction are generated to adjust the position of the visual camera so that the pallet is located at the preset position of the image information, which simplifies the installation process and improves the grasping accuracy.

[0013] Furthermore, the determining of the position information of the edge and corner points of the tray in the current image information includes:

[0014] Input the current image information into the neural network model based on deep learning to determine the edge of the tray, and determine the intersection of two adjacent edges as the corner point;

[0015] Establish a coordinate system in the current image information;

[0016] Determine the position information of the pallet edges and corners in the coordinate system.

[0017] By adopting the above technical solution, the electronic device uses a deep learning neural network model to analyze the current image information, determine the edges and corners of the pallet, and then determine the position information of the edges and corners of the pallet in the coordinate system, thereby quickly determining the relevant information of the pallet.

[0018] Furthermore, the angle adjustment instruction for adjusting the deflection angle of the visual camera and the displacement adjustment instruction for adjusting the displacement of the visual camera are generated based on the position information of the edge and the corner point of the tray, including:

[0019] determining whether the tray is deflected according to the position information of the edge of the tray;

[0020] If deflected, determining the deflection angle of the tray according to the position information of the edge of the tray, and generating an angle adjustment instruction based on the deflection angle;

[0021] In response to the angle adjustment instruction, first image information captured by the visual camera after the angle adjustment is completed is acquired; and position information of the edge and corner points of the tray in the first image information is determined;

[0022] If there is no deflection or after determining the position information of the tray edge and the intersection in the first image information, it is determined whether the tray is offset according to the position information of the tray edge; if it is offset, a displacement adjustment instruction is generated according to the position information of the corner point.

[0023] By adopting the above technical solution, the electronic device first determines whether the tray is deflected in the current image information. If deflected, the angle of the visual camera is adjusted first to align the tray in the current image information, and then further determines whether the edge of the tray is located at the preset position in the re-acquired first image information. If not, it can be determined that there is an offset, and the electronic device generates a displacement adjustment instruction, so that the position of the visual camera can be adjusted as quickly as possible.

[0024] Further, determining the deflection angle of the tray according to the position information of the edge of the tray, and generating the angle adjustment instruction based on the deflection angle includes:

[0025] Generate a frame corresponding to a preset position on the current image information;

[0026] Select any edge of the tray as the comparison edge;

[0027] determining at least one edge of the frame that intersects a contrasting edge;

[0028] respectively determining the acute angle between each side and the comparison edge;

[0029] The smallest acute angle is determined as the deflection angle of the tray;

[0030] An angle adjustment command is generated so that the adjustment angle is equal to the negative value of the deflection angle.

[0031] By adopting the above technical solution, the electronic device displays a frame corresponding to a preset position on the current image information, thereby using the relative relationship between line segments to select any edge of the tray as a comparison edge, determine the edge on the frame that intersects with the comparison edge, and determine the deflection angle from the acute angle between the two sides, thereby obtaining an angle adjustment instruction and being able to quickly determine the adjustment angle.

[0032] Further, generating the displacement adjustment instruction according to the position information of the corner point includes:

[0033] Generate a frame corresponding to a preset position on the current image information;

[0034] Determine any corner point of the frame as a preset corner point;

[0035] Determine the corner point on the pallet corresponding to the preset corner point position as the comparison corner point;

[0036] Determine the displacement direction from the preset corner point to the comparison corner point according to the position information of the preset corner point and the comparison corner point;

[0037] Determining an image length between the preset corner point and the comparison corner point;

[0038] Determine an actual length corresponding to the image length, and determine the actual length as a displacement length;

[0039] A displacement adjustment instruction including a displacement direction and a displacement length is generated.

[0040] By adopting the above technical solution, the electronic device determines the direction and distance of displacement through the positions of the two corner points of the tray corresponding to the preset positions, and can quickly determine the shift adjustment instruction.

[0041] Furthermore, before generating an angle adjustment instruction for adjusting the deflection angle of the visual camera and a displacement adjustment instruction for adjusting the displacement of the visual camera, the method further includes:

[0042] Determine the pre-stored area based on the position information of the edge and corner points of the tray;

[0043] Determine whether there is historical information corresponding to the position information of the edge and corner point of the pallet in the database corresponding to the pre-stored area;

[0044] If so, the angle adjustment instruction and displacement adjustment instruction corresponding to the historical information are called.

[0045] By adopting the above technical solution, before adjusting, the electronic device first determines whether there is pre-stored historical information consistent with the position of the tray in the current image information, and then can directly adjust according to the pre-stored historical information without repeated calculations, thereby improving the adjustment speed and simplifying the adjustment process.

[0046] Further, the determining of the pre-stored area based on the position information of the edge and corner points of the tray includes:

[0047] Determining whether there are at least two adjacent complete tray edges;

[0048] If yes, the center of the pallet is determined based on the position information of the corner point between the edge of the complete pallet and two adjacent edges of the complete pallet;

[0049] Determine the pre-stored area to which the center belongs according to the location of the center; the pre-stored area is divided according to the location of the center;

[0050] Otherwise, the nearest pre-stored area is determined according to the position of the tray in the current image information.

[0051] By adopting the above technical solution, when the electronic device judges the pre-stored area described by the tray in the current image information, it first judges based on the center of the tray. If the center of the tray is not in the current image information, the pre-stored area closest to the tray is used as the pre-stored area. Therefore, the method of saving historical information in blocks is used to reduce the amount of calculation.

[0052] In a second aspect, the present application provides a grasping and adjusting device based on a visual camera, comprising:

[0053] A current image information acquisition module is used to acquire the current image information captured by the visual camera;

[0054] A position information determination module, used to determine the position information of the edge and corner points of the tray in the current image information;

[0055] A judging module, used for judging whether the tray is located at a preset position based on the position information of the edge and corner points of the tray;

[0056] An adjustment instruction generation module, used for generating an angle adjustment instruction for adjusting the deflection angle of the visual camera and a displacement adjustment instruction for adjusting the displacement of the visual camera based on the position information of the edge and the corner point of the tray when the judgment module judges that the result is yes;

[0057] A response module is used to respond to the angle adjustment instruction and the displacement adjustment instruction.

[0058] By adopting the above technical solution, the current image information acquisition module acquires the current image information taken by the visual camera, the position information determination module determines the position information of the edge and corner points of the pallet in the current image information, and then the judgment module compares it with the preset position to determine whether the pallet is offset. If offset, the adjustment instruction generation module generates angle adjustment instructions and displacement adjustment instructions, so that the response module adjusts the position of the visual camera so that the pallet is located at the preset position of the image information, which simplifies the installation process and improves the grasping accuracy.

[0059] In a third aspect, the present application provides an electronic device, which adopts the following technical solution:

[0060] An electronic device, comprising:

[0061] at least one processor;

[0062] Memory;

[0063] At least one computer program, wherein the at least one computer program is stored in the memory and configured to be executed by the at least one processor, the at least one computer program being configured to: execute the method as described in any one of the first aspects.

[0064] By adopting the above technical solution, the processor executes the computer program in the memory, obtains the current image information taken by the visual camera, determines the position information of the edge and corner points of the pallet in the current image information, and then compares it with the preset position to determine whether the pallet is offset. If offset, an angle adjustment instruction and a displacement adjustment instruction are generated to adjust the position of the visual camera so that the pallet is located at the preset position of the image information, which simplifies the installation process and improves the grasping accuracy.

[0065] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution:

[0066] A computer-readable storage medium stores a computer program that can be loaded by a processor and executes the method as described in any one of the first aspects.

[0067] By adopting the above technical solution, the processor executes the computer program in the computer-readable storage medium, obtains the current image information taken by the visual camera, determines the position information of the edge and corner points of the pallet in the current image information, and then compares it with the preset position to determine whether the pallet is offset. If offset, an angle adjustment instruction and a displacement adjustment instruction are generated to adjust the position of the visual camera so that the pallet is located at the preset position of the image information, which simplifies the installation process and improves the grasping accuracy.

[0068] In summary, the present application includes at least one of the following beneficial technical effects:

[0069] 1. The computer obtains the current image information taken by the visual camera, determines the position information of the edge and corner of the pallet in the current image information, and then compares it with the preset position to determine whether the pallet is offset. If offset, an angle adjustment instruction and a displacement adjustment instruction are generated to adjust the position of the visual camera so that the pallet is located at the preset position of the image information, which simplifies the installation process and improves the grasping accuracy;

[0070] 2. The electronic device first determines whether the tray is deflected in the current image information. If so, it first adjusts the angle of the visual camera to align the tray in the current image information, and then further determines whether the edge of the tray is located at the preset position in the re-acquired first image information. If not, it can be determined that there is an offset, and the electronic device generates a displacement adjustment instruction, so that the position of the visual camera can be adjusted as quickly as possible. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] Figure 1 It is a flow chart of the grasping adjustment method based on a visual camera in an embodiment of the present application.

[0072] Figure 2 It is a schematic diagram of determining the deflection angle in an embodiment of the present application.

[0073] Figure 3 It is a schematic diagram for determining the displacement direction and displacement distance in the embodiment of the present application.

[0074] Figure 4 It is a structural block diagram of a grasping and adjusting device based on a visual camera in an embodiment of the present application.

[0075] Figure 5 It is a structural block diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0076] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0077] In addition, the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article, unless otherwise specified, generally means that the associated objects before and after are in an "or" relationship.

[0078] The present application embodiment discloses a grasping adjustment method based on a visual camera. Figure 1 , executed by an electronic device, which can be a server or a terminal device, wherein the server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal device can be a smart phone, a tablet computer, a desktop computer, etc., but is not limited thereto. It includes the following process (steps S101 to S105):

[0079] Step S101: Acquire current image information captured by a visual camera.

[0080] Specifically, the electronic device communicates with the visual camera to obtain current image information captured by the visual camera.

[0081] Step S102: Determine the position information of the edge and corner points of the tray in the current image information.

[0082] Specifically, the process includes the following steps (step S1021 to step S1023):

[0083] Step S1021: input the current image information into a neural network model based on deep learning, determine the edge of the tray, and determine the intersection of two adjacent edges as a corner point.

[0084] Specifically, the electronic device establishes a neural network model and a sample database, the sample database includes a large amount of image information of pallets and the edges of pallets, and the electronic device uses the data in the sample database to train the neural network model based on deep learning, thereby obtaining a neural network model based on deep learning. After the electronic device inputs the current image information into the neural network model based on deep learning, it outputs the edge of the pallet, thereby determining the intersection.

[0085] Step S1022: Establish a coordinate system in the current image information.

[0086] Step S1023: Determine the position information of the edge and corner points of the tray in the coordinate system.

[0087] Specifically, after the electronic device establishes a coordinate system in the current image information, the position information of the edge and corner points of the tray can be determined by means of coordinate points.

[0088] Step S103: Determine whether the tray is located at a preset position based on the position information of the tray edge and corner points; if so, perform a grabbing step; otherwise, perform step S104.

[0089] Furthermore, the electronic device presets the correct position of the tray in the image information, sets the size of the preset position according to the size of the tray, and the preset position is an area consistent with the size of the tray, and the preset position is set in the center of the image information. When the position of the edge and corner point of the tray is not at the preset position, the position of the visual camera is adjusted.

[0090] Step S104: Based on the position information of the edge and corner point of the tray, an angle adjustment instruction for adjusting the deflection angle of the visual camera and a displacement adjustment instruction for adjusting the displacement of the visual camera are generated, including (steps S1041 to S1044):

[0091] Step S1041: determine whether the tray is deflected according to the position information of the tray edge; if it is deflected, execute step S1042: determine the deflection angle of the tray according to the position information of the tray edge, and generate an angle adjustment instruction based on the deflection angle. If it is not deflected, execute step S1044.

[0092] Specifically, when the edge of the tray is not parallel to the edge of the frame corresponding to the preset position, it is determined that the tray is in a deflected state, so an angle adjustment instruction is generated so that after the visual camera is adjusted, the edge of the tray is parallel to the edge of the frame at the preset position.

[0093] Further, the electronic device executes step S1042, including (steps S11 to S16):

[0094] Step S11: generating a frame corresponding to a preset position on the current image information.

[0095] Specifically, the electronic device generates a frame according to a preset position and displays it on the current image information.

[0096] Step S12: Select any edge of the tray as a comparison edge.

[0097] Step S13: Determine at least one edge of the frame intersecting with the comparison edge.

[0098] Specifically, when the tray position is deflected, the contrasting edge may intersect with one edge of the frame or both edges. When the frame does not intersect with the contrasting edge, each edge of the frame is extended until an extended edge that can intersect with the contrasting edge is obtained.

[0099] Step S14: respectively determine the acute angle between each edge and the comparison edge.

[0100] Step S15: Determine the minimum acute angle as the deflection angle of the tray.

[0101] Specifically, when there is one side intersecting with the contrast edge, the intersecting diagonal angle is determined as the deflection angle; when there are at least two sides intersecting with the contrast edge, the side corresponding to the smallest acute angle is closer to the contrast edge.

[0102] Reference Figure 2 , where M is the current image information, m is the preset position, N is the edge of the tray, and q is the deflection angle.

[0103] Step S16: Generate an angle adjustment instruction whose adjustment angle is equal to the negative value of the deflection angle.

[0104] Specifically, the adjustment angle is opposite to the deflection angle, so that after the visual camera is rotated, the edge of the tray photographed is parallel to the edge of the frame.

[0105] Step S1043: in response to the angle adjustment instruction, obtaining first image information captured by the visual camera after the angle adjustment is completed; and determining position information of the edge and corner points of the tray in the first image information.

[0106] Specifically, after the electronic device completes the angle adjustment, the first image information is re-acquired, the positions of the tray edge and the corner points in the first image information are acquired, and it is further analyzed whether the tray is offset after the angle adjustment, and step S1044 is executed.

[0107] Step S1044: determining whether the tray is offset according to the position information of the edge of the tray; if offset, generating a displacement adjustment instruction according to the position information of the corner point.

[0108] Specifically, the electronic device determines whether the tray edge is consistent with the preset position to determine whether the tray is offset; if the tray edge coincides with the preset position, there is no offset; if not, the position needs to be adjusted.

[0109] Step S1044, including (steps S21 to S27):

[0110] Step S21: generating a frame corresponding to a preset position on the current image information.

[0111] Step S22: Determine any corner point of the frame as a preset corner point.

[0112] Specifically, the electronic device preferentially selects any corner point closest to the frame as the preset corner point.

[0113] Step S23: determining a corner point on the tray corresponding to the preset corner point position as a comparison corner point.

[0114] Specifically, if the preset corner point is the upper right corner point on the frame, the upper right intersection point of the tray is the comparison corner point. Figure 3 , where M is the current image information, m is the preset position, N is the edge of the tray, B is the preset corner point, and b is the comparison corner point.

[0115] Step S24: determining the displacement direction from the preset corner point to the comparison corner point according to the position information of the preset corner point and the comparison corner point.

[0116] Step S25: Determine the image length between the preset corner point and the comparison corner point.

[0117] Step S26: Determine the actual length corresponding to the image length, and determine the actual length as the displacement length.

[0118] Specifically, the electronic device connects the preset corner point with the comparison corner point, and the direction indicated by the obtained line segment is the displacement direction. The length of the obtained line segment is the image length. There is a ratio between the image length and the actual moving length of the visual camera, so the displacement length can be determined according to the ratio.

[0119] Step S27: Generate a displacement adjustment instruction including a displacement direction and a displacement length.

[0120] Step S105: responding to the angle adjustment instruction and the displacement adjustment instruction.

[0121] Specifically, the visual camera is fixed on a grasping robot arm, which can drive the rotation and movement of the platform on which the visual camera is fixed. Therefore, the electronic equipment enables the grasping robot arm to rotate the platform where the visual camera is located according to the angle adjustment instruction, and moves the platform to the corresponding direction and the corresponding distance according to the displacement adjustment instruction.

[0122] After the position of the visual camera is adjusted, the tray can be adjusted to a preset position. Then, the electronic device adjusts the mapping relationship between the grasping robot arm and the visual camera according to the preset rules and makes corresponding changes.

[0123] In another possible implementation, after the electronic device completes each adjustment, the adjustment process can be recorded and saved in a database. Therefore, before the electronic device executes step S104, the above method can also include (steps S31 to S32):

[0124] Step S31: Determine the pre-stored area based on the position information of the edge and corner points of the tray.

[0125] Specifically, the electronic device divides the image information into a plurality of pre-stored areas, for example, divides the image information into four pre-stored areas in the shape of a field, and establishes a database for each pre-stored area.

[0126] In historical adjustment, if the center of the pallet can be determined by the edge and corner points of the pallet, the pallet is determined to belong to the corresponding pre-stored area based on the position of the center. If the pallet is greatly deflected and the center cannot be determined in the image information, the pallet is determined to belong to a pre-stored area that is closer in position, and the database is gradually established.

[0127] After obtaining the current information of the edge and corner position of the tray, the electronic device performs the following steps (step Sa to step Sd):

[0128] Step Sa: determine whether there are at least two adjacent complete pallet edges; if so, execute step Sb: determine the center of the pallet based on the position information of the corner point between the complete pallet edge and the two adjacent complete pallet edges; step Sc: determine the pre-stored area to which the center belongs based on the position of the center; the pre-stored area is divided according to the position of the center;

[0129] Otherwise, execute step Sd: determine the nearest pre-stored area according to the position of the tray in the current image information.

[0130] Step S32: determine whether there is historical information corresponding to the position information of the edge and corner point of the tray in the database corresponding to the pre-stored area; if so, execute step S33: call the angle adjustment instruction and displacement adjustment instruction corresponding to the historical information.

[0131] Specifically, the electronic device searches the database corresponding to the pre-stored area to see whether there is historical information consistent with the position information of the edge and corner points of the tray. If so, the corresponding angle adjustment instructions and displacement adjustment instructions can be directly called to reduce the amount of calculation and complete the adjustment as quickly as possible.

[0132] In order to better implement the above method, the present application embodiment also provides a grasping adjustment device based on a visual camera, referring to Figure 4 , the grasping and adjusting device 200 based on the visual camera includes:

[0133] The current image information acquisition module 201 is used to acquire the current image information captured by the visual camera;

[0134] A position information determination module 202 is used to determine the position information of the edge and corner points of the tray in the current image information;

[0135] A determination module 203, configured to determine whether the tray is located at a preset position based on the position information of the tray edge and the corner points;

[0136] The adjustment instruction generating module 204 is used to generate an angle adjustment instruction for adjusting the deflection angle of the visual camera and a displacement adjustment instruction for adjusting the displacement of the visual camera based on the position information of the edge and the corner point of the tray when the judging module 203 judges to be yes.

[0137] The response module 205 is used to respond to the angle adjustment instruction and the displacement adjustment instruction.

[0138] Furthermore, the location information determination module 202 is specifically configured to:

[0139] Input the current image information into the neural network model based on deep learning to determine the edge of the tray, and determine the intersection of two adjacent edges as the corner point;

[0140] Establish a coordinate system in the current image information;

[0141] Determine the position information of the pallet edges and corners in the coordinate system.

[0142] Furthermore, the adjustment instruction generating module 204 is specifically used for:

[0143] Determine whether the pallet is deflected based on the position information of the pallet edge;

[0144] If deflected, the deflection angle of the pallet is determined according to the position information of the edge of the pallet, and an angle adjustment instruction is generated based on the deflection angle;

[0145] In response to the angle adjustment instruction, first image information captured by the visual camera after the angle adjustment is completed is acquired; and position information of the edge and corner point of the tray in the first image information is determined;

[0146] If there is no deflection or after determining the position information of the tray edge and the intersection in the first image information, it is determined whether the tray is offset according to the position information of the tray edge; if it is offset, a displacement adjustment instruction is generated according to the position information of the corner point.

[0147] Furthermore, when the adjustment instruction generating module 204 determines the deflection angle of the tray according to the position information of the edge of the tray and generates the angle adjustment instruction based on the deflection angle, it is specifically used to:

[0148] Generate a frame corresponding to a preset position on the current image information;

[0149] Select any edge of the tray as the comparison edge;

[0150] determining at least one edge of the frame that intersects the contrasting edge;

[0151] Determine the acute angle between each edge and the contrast edge;

[0152] The smallest acute angle is determined as the deflection angle of the tray;

[0153] An angle adjustment command is generated so that the adjustment angle is equal to the negative value of the deflection angle.

[0154] Furthermore, when the adjustment instruction generating module 204 generates the displacement adjustment instruction according to the position information of the corner point, it is specifically used to:

[0155] Generate a frame corresponding to a preset position on the current image information;

[0156] Determine any corner point of the frame as a preset corner point;

[0157] Determine the corner point on the pallet corresponding to the preset corner point position as the comparison corner point;

[0158] Determine the displacement direction from the preset corner point to the comparison corner point according to the position information of the preset corner point and the comparison corner point;

[0159] Determine the image length between the preset corner point and the comparison corner point;

[0160] Determine the actual length corresponding to the image length, and determine the actual length as the displacement length;

[0161] A displacement adjustment instruction including a displacement direction and a displacement length is generated.

[0162] In another possible implementation, the visual camera-based grasping and adjusting device 200 further includes:

[0163] A pre-stored area determination module, used to determine the pre-stored area to which the tray belongs based on the position information of the edge and corner points of the tray;

[0164] A historical information determination module, used to determine whether there is historical information corresponding to the position information of the edge and corner point of the pallet in the database corresponding to the pre-stored area;

[0165] The calling module is used to call the angle adjustment instruction and the displacement adjustment instruction corresponding to the historical information when the historical information judgment module judges that the historical information is yes.

[0166] Furthermore, the pre-stored area determination module is specifically used for:

[0167] Determining whether there are at least two adjacent complete tray edges;

[0168] If yes, the center of the pallet is determined based on the position information of the corner point between the edge of the complete pallet and two adjacent edges of the complete pallet;

[0169] The pre-stored area to which the center belongs is determined according to the location of the center; the pre-stored area is divided according to the location of the center;

[0170] Otherwise, the nearest pre-stored area is determined according to the position of the tray in the current image information.

[0171] The various variations and specific examples of the methods in the aforementioned embodiments are also applicable to the visual camera-based grasping and adjustment device of the present embodiment. Through the aforementioned detailed description of the visual camera-based grasping and adjustment method, those skilled in the art can clearly know the implementation method of the visual camera-based grasping and adjustment device in the present embodiment. Therefore, for the sake of brevity of the specification, it will not be described in detail here.

[0172] In order to better implement the above method, the present application embodiment provides an electronic device, referring to Figure 4 , the electronic device 300 includes: a processor 301, a memory 303 and a display screen 305. Among them, the memory 303 and the display screen 305 are connected to the processor 301, such as through a bus 302. Optionally, the electronic device 300 may also include a transceiver 304. It should be noted that in actual applications, the transceiver 304 is not limited to one, and the structure of the electronic device 300 does not constitute a limitation on the embodiments of the present application.

[0173] The processor 301 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor 301 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0174] The bus 302 may include a path to transmit information between the above components. The bus 302 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 302 may be divided into an address bus, a data bus, a control bus, etc.

[0175] The memory 303 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0176] The memory 303 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 301. The processor 301 is used to execute the application code stored in the memory 303 to implement the contents shown in the above method embodiment.

[0177] Figure 5 The electronic device 300 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0178] An embodiment of the present application also provides a computer-readable storage medium storing a computer program, which implements the method provided in the above embodiment when executed by a processor. The processor executes the computer program in the computer-readable storage medium, obtains current image information taken by a visual camera, determines the position information of the edge and corner points of the pallet in the current image information, and then compares it with a preset position to determine whether the pallet is offset. If offset, an angle adjustment instruction and a displacement adjustment instruction are generated to adjust the position of the visual camera so that the pallet is located at the preset position of the image information, thereby simplifying the installation process and improving the grasping accuracy.

[0179] In this embodiment, the computer-readable storage medium may be a tangible device that holds and stores instructions used by the instruction execution device. The computer-readable storage medium may be, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any combination thereof. Specifically, the computer-readable storage medium may be a portable computer disk, a hard disk, a USB flash drive, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a podium random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, an optical disk, a magnetic disk, a mechanical encoding device, and any combination thereof.

[0180] The computer program in this embodiment includes program codes for executing all the aforementioned methods, and the program codes may include instructions corresponding to the steps of the methods provided in the above embodiments. The computer program can be downloaded from a computer-readable storage medium to various computing / processing devices, or downloaded to an external computer or external storage device via a network (such as the Internet, a local area network, a wide area network, and / or a wireless network). The computer program can be executed completely on the user's computer or as an independent software package.

[0181] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.

[0182] In addition, it is to be understood that relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "comprises," "comprising," or any other variation thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device that includes a series of elements includes not only those elements, but also other elements that are not explicitly listed, or elements that are inherent to such process, method, article, or device.

Claims

1. A grasping adjustment method based on a visual camera, characterized in that: include: Get the current image information taken by the visual camera; Determine the position information of the edge and corner points of the tray in the current image information; Determining whether the tray is located at a preset position based on the position information of the edge and corner points of the tray; If not, then based on the position information of the edge and the corner point of the tray, an angle adjustment instruction for adjusting the deflection angle of the visual camera and a displacement adjustment instruction for adjusting the displacement of the visual camera are generated; responding to the angle adjustment instruction and the displacement adjustment instruction; The method of generating an angle adjustment instruction for adjusting the deflection angle of the visual camera and a displacement adjustment instruction for adjusting the displacement of the visual camera based on the position information of the edge and the corner point of the tray includes: determining whether the tray is deflected according to the position information of the edge of the tray; If deflected, determining the deflection angle of the tray according to the position information of the edge of the tray, and generating an angle adjustment instruction based on the deflection angle; In response to the angle adjustment instruction, first image information captured by the visual camera after the angle adjustment is completed is acquired; and position information of the edge and corner points of the tray in the first image information is determined; If the tray is not deflected or the position information of the tray edge and the intersection in the first image information is determined, whether the tray is offset is determined according to the position information of the tray edge; if the tray is offset, a displacement adjustment instruction is generated according to the position information of the corner point; The step of determining the deflection angle of the tray according to the position information of the edge of the tray, and generating an angle adjustment instruction based on the deflection angle includes: Generate a frame corresponding to a preset position on the current image information; Select any edge of the tray as the comparison edge; determining at least one edge of the frame that intersects a contrasting edge; respectively determining the acute angle between each side and the comparison edge; The smallest acute angle is determined as the deflection angle of the tray; Generate an angle adjustment instruction whose adjustment angle is equal to the negative value of the deflection angle; The step of generating a displacement adjustment instruction according to the position information of the corner point comprises: Generate a frame corresponding to a preset position on the current image information; Determine any corner point of the frame as a preset corner point; Determine the corner point on the pallet corresponding to the preset corner point position as the comparison corner point; Determine the displacement direction from the preset corner point to the comparison corner point according to the position information of the preset corner point and the comparison corner point; Determining an image length between the preset corner point and the comparison corner point; Determine an actual length corresponding to the image length, and determine the actual length as a displacement length; A displacement adjustment instruction including a displacement direction and a displacement length is generated.

2. The method according to claim 1, characterized in that The step of determining the position information of the edge and corner points of the tray in the current image information includes: Input the current image information into the neural network model based on deep learning to determine the edge of the tray, and determine the intersection of two adjacent edges as the corner point; Establish a coordinate system in the current image information; Determine the position information of the pallet edges and corners in the coordinate system.

3. The method according to claim 1, characterized in that: Before generating an angle adjustment instruction for adjusting the deflection angle of the visual camera and a displacement adjustment instruction for adjusting the displacement of the visual camera, the method further includes: Determine the pre-stored area based on the position information of the edge and corner points of the tray; Determine whether there is historical information corresponding to the position information of the edge and corner point of the pallet in the database corresponding to the pre-stored area; If so, the angle adjustment instruction and displacement adjustment instruction corresponding to the historical information are called.

4. The method according to claim 3, characterized in that The determining of the pre-stored area based on the position information of the edge and corner points of the tray includes: Determining whether there are at least two adjacent complete tray edges; If yes, the center of the pallet is determined based on the position information of the corner point between the edge of the complete pallet and two adjacent edges of the complete pallet; Determine the pre-stored area to which the center belongs according to the location of the center; the pre-stored area is divided according to the location of the center; Otherwise, the nearest pre-stored area is determined according to the position of the tray in the current image information.

5. A grasping and adjusting device based on a visual camera, characterized in that: The method according to any one of claims 1 to 4 comprises: A current image information acquisition module is used to acquire the current image information captured by the visual camera; A position information determination module, used to determine the position information of the edge and corner points of the tray in the current image information; A judging module, used for judging whether the tray is located at a preset position based on the position information of the edge and corner points of the tray; An adjustment instruction generation module, used for generating an angle adjustment instruction for adjusting the deflection angle of the visual camera and a displacement adjustment instruction for adjusting the displacement of the visual camera based on the position information of the edge and the corner point of the tray when the judgment module judges that the result is yes; A response module, used for responding to the angle adjustment instruction and the displacement adjustment instruction; When the adjustment instruction generation module generates an angle adjustment instruction for adjusting the deflection angle of the visual camera and a displacement adjustment instruction for adjusting the displacement of the visual camera based on the position information of the edge and the corner point of the tray, it is specifically used to: determining whether the tray is deflected according to the position information of the edge of the tray; If deflected, determining the deflection angle of the tray according to the position information of the edge of the tray, and generating an angle adjustment instruction based on the deflection angle; In response to the angle adjustment instruction, first image information captured by the visual camera after the angle adjustment is completed is acquired; and position information of the edge and corner points of the tray in the first image information is determined; If the tray is not deflected or the position information of the tray edge and the intersection in the first image information is determined, whether the tray is offset is determined according to the position information of the tray edge; if the tray is offset, a displacement adjustment instruction is generated according to the position information of the corner point; The step of determining the deflection angle of the tray according to the position information of the edge of the tray, and generating an angle adjustment instruction based on the deflection angle includes: Generate a frame corresponding to a preset position on the current image information; Select any edge of the tray as the comparison edge; determining at least one edge of the frame that intersects a contrasting edge; respectively determining the acute angle between each side and the comparison edge; The smallest acute angle is determined as the deflection angle of the tray; Generate an angle adjustment instruction whose adjustment angle is equal to the negative value of the deflection angle; The step of generating a displacement adjustment instruction according to the position information of the corner point comprises: Generate a frame corresponding to a preset position on the current image information; Determine any corner point of the frame as a preset corner point; Determine the corner point on the pallet corresponding to the preset corner point position as the comparison corner point; Determine the displacement direction from the preset corner point to the comparison corner point according to the position information of the preset corner point and the comparison corner point; Determining an image length between the preset corner point and the comparison corner point; Determine an actual length corresponding to the image length, and determine the actual length as a displacement length; A displacement adjustment instruction including a displacement direction and a displacement length is generated.

6. An electronic device, characterized in that: at least one processor; Memory; At least one computer program, wherein the at least one computer program is stored in the memory and configured to be executed by the at least one processor, the at least one computer program being configured to: execute the method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that: A computer program is stored which can be loaded by a processor and execute the method according to any one of claims 1 to 4.