A method, device and robot arm for fine control of robot arm based on image processing

By converting the pixel trajectory of the dynamic GIF image into the base coordinate system trajectory of the robotic arm, the problem of a single function of the robotic arm writing device is solved, and fine control of calligraphy and the expression of force art are achieved, with strong adaptability and accurate writing. Effect.

CN117863182BActive Publication Date: 2024-10-11REALMAN INTELLIGENT TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410090412.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-22
Publication Date
2024-10-11
Estimated Expiration
2044-01-22

AI Technical Summary

Technical Problem

When writing traditional Chinese calligraphy art, the existing robotic arm writing equipment has a single function and cannot realize unique calligraphy creations, cannot meet aesthetic needs, and cannot effectively consider the art of force in calligraphy.

Method used

By obtaining the pixel coordinate system trajectory of the dynamic GIF image in the sample library to be executed and converting it into the base coordinate system trajectory of the robotic arm, fine control of the action execution carrier is achieved, allowing any combination of basic actions, strong adaptability, and reproducibility precise.

Benefits of technology

It achieves accurate reproduction and strength control of Chinese character strokes, can form any Chinese character, is not subject to the constraints of the preset library, and has the advantages of strong adaptability, neat and accurate writing, etc.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117863182B_ABST
    Figure CN117863182B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device and robot for fine control of a robot arm based on image processing, wherein the method comprises the following steps: obtaining a dynamic image in a sample library to be executed; based on the dynamic image, obtaining a pixel coordinate system trajectory of an action execution carrier moving in the dynamic image; converting the pixel coordinate system trajectory into a base coordinate system trajectory of the robot arm, and obtaining trajectory parameters for controlling the robot arm; controlling the robot arm to move according to the base coordinate system trajectory, and driving the action execution carrier at the end of the robot arm to reproduce the action in the dynamic image. By obtaining the pixel coordinate system trajectory of a dynamic GIF image of a corresponding basic action in a sample library to be executed, and converting it into a base coordinate system trajectory of the robot arm, and then obtaining control parameters for reproducing the action through the action execution carrier, it is not constrained by the preset library material, and can realize any combination of basic actions, and has many advantages such as strong adaptability and accurate reproduction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of robot arm control, and in particular to a robot arm fine control method and device based on image processing, and a robot arm. Background Art

[0002] With the booming development of the robotics industry in recent years, people have higher and higher requirements for the refined control of collaborative robotic arms. Since the brush is a flexible medium, writing calligraphy with a robotic arm requires comprehensive consideration of factors such as the softness of the brush, the amount of ink absorbed when dipping ink, and the writing resistance on media such as rice paper. This places high demands on the trajectory planning, force control, speed control, displacement control, and computer vision feedback and servo control of the robotic arm. In the existing solution, any Chinese character is selected from the Kaiti character library and then the stroke trajectory, force, and pen angle of the Chinese character are generated by image processing of the Chinese character.

[0003] Although there are several writing robots on the market, the application of these robots in writing is limited to the position control of the end of the robot arm at the technical level, without considering the art of strength in calligraphy. Simply drawing the outline of Chinese characters obviously cannot meet everyone's aesthetic needs.

[0004] At present, in the robotic arm application market, there are also some products that use robotic arm writing devices to simulate traditional Chinese calligraphy art. Although existing robotic arm writing devices can write calligraphy in many fonts, most robotic arm writing devices use teaching or pre-entering specific text to write. If the above control strategy is used for writing, the robotic arm can only write fixed text according to the debugged text database. The function is too single at the usage level, which is not convenient for creating unique calligraphy. Summary of the invention

[0005] The purpose of the embodiments of the present invention is to provide a method, device and robot for fine control of a robot arm based on image processing. The method obtains the pixel coordinate system trajectory of a dynamic GIF image of a corresponding basic action in a sample library to be executed, and converts it into a base coordinate system trajectory of the robot arm, thereby obtaining control parameters for reproducing the action through an action execution carrier. The method is not constrained by preset library materials, and any combination of basic actions can be realized. The method has many advantages such as strong adaptability and accurate reproduction.

[0006] To solve the above technical problems, a first aspect of an embodiment of the present invention provides a method for fine control of a robotic arm based on image processing, comprising the following steps:

[0007] Get the dynamic image of the sample library to be executed;

[0008] Based on the dynamic image, obtaining a pixel coordinate system trajectory of the action execution carrier moving in the dynamic image;

[0009] Convert the pixel coordinate system trajectory into a base coordinate system trajectory of the robotic arm to obtain trajectory parameters for controlling the robotic arm;

[0010] The robot arm is controlled to move according to the trajectory of the base coordinate system, and the action execution carrier at the end of the robot arm is driven to reproduce the action in the dynamic image.

[0011] Furthermore, based on the dynamic image, obtaining a pixel coordinate system trajectory of the action execution carrier moving in the dynamic image includes:

[0012] Splitting the dynamic image into a plurality of static image frames;

[0013] Based on the plurality of static image frames, image matrix difference calculation is performed to obtain a difference between two preceding and succeeding static image frames, and a new difference picture is generated;

[0014] Obtaining the contour of the difference image, and saving the contour and its centroid and coordinate values;

[0015] Based on the centroids of all the difference image contours, obtaining the pixel coordinate system trajectory;

[0016] Based on the slope change of the pixel coordinate system trajectory, the trajectory angle change rate and the slope bending angle of the action execution carrier at the trajectory are obtained;

[0017] The standard cross-sectional area of ​​the action execution carrier is calculated according to the contour coordinate value and the negative inverse of the slope of the pixel coordinate system trajectory, and the standard cross-sectional area is proportional to the strength of the robot arm holding the action execution carrier.

[0018] Furthermore, the step of converting the pixel coordinate system trajectory into a base coordinate system trajectory of the robotic arm to obtain trajectory parameters for controlling the robotic arm includes:

[0019] Convert the pixel coordinate system trajectory into the robot base coordinate system trajectory;

[0020] Through moveit path planning, a trajectory point including time information, acceleration information and velocity information is obtained according to the trajectory of the robot base coordinate system;

[0021] The trajectory points including time information, acceleration information and speed information are subjected to spline interpolation for a preset number of times to obtain trajectory parameters for controlling the movement of the robotic arm.

[0022] Furthermore, an image acquisition component is also provided at the end of the robotic arm, and the action execution carrier is a writing brush;

[0023] After obtaining the trajectory parameter value for the movement of the robot arm, the method further includes:

[0024] Acquire, by the image acquisition component, an image of the strokes written by the brush when the mechanical arm drives the brush to move;

[0025] Obtain the stroke cross-sectional area corresponding to the stroke image and calculate the real-time force value of the mechanical arm controlling the brush according to the stroke cross-sectional area;

[0026] Comparing the implemented force value with a preset force value of the mechanical arm controlling the writing brush;

[0027] According to the comparison result, the force with which the end of the robotic arm drives the brush is adjusted.

[0028] Accordingly, a second aspect of an embodiment of the present invention provides a robotic arm fine control device based on image processing, which controls the robotic arm by any of the above-mentioned robotic arm fine control methods, including:

[0029] A dynamic image acquisition module, which is used to acquire dynamic images of a sample library to be executed;

[0030] An image trajectory acquisition module, which is used to acquire, based on the dynamic image, a pixel coordinate system trajectory of the action execution carrier moving in the dynamic image;

[0031] An image trajectory conversion module, which is used to convert the pixel coordinate system trajectory into a base coordinate system trajectory of the robot arm to obtain trajectory parameters for controlling the robot arm;

[0032] The action execution control module is used to control the robot arm to move according to the base coordinate system trajectory, and drive the action execution carrier at the end of the robot arm to reproduce the action in the dynamic image.

[0033] Furthermore, the image trajectory acquisition module includes:

[0034] An image splitting unit, used for splitting the dynamic image into a plurality of static image frames;

[0035] A picture generating unit, which is used to perform image matrix difference calculation based on the plurality of static image frames, obtain the difference between the two preceding and succeeding static image frames, and generate a new difference picture;

[0036] A contour acquisition unit, which is used to acquire the contour of the difference image and save the contour and its centroid and coordinate values;

[0037] A trajectory generating unit, which is used to obtain the pixel coordinate system trajectory based on the centroid of all the difference image contours;

[0038] A slope calculation unit, which is used to obtain the trajectory angle change rate and the slope bending angle of the action execution carrier at the trajectory based on the slope change of the pixel coordinate system trajectory;

[0039] An area calculation unit is used to calculate the standard cross-sectional area of ​​the action execution carrier according to the contour coordinate value and the negative inverse of the slope of the pixel coordinate system trajectory, and the standard cross-sectional area is proportional to the strength of the robot arm holding the action execution carrier.

[0040] Furthermore, the image trajectory conversion module includes:

[0041] A trajectory conversion unit, used for converting the pixel coordinate system trajectory into the robot arm base coordinate system trajectory;

[0042] A trajectory point generating unit, which is used to obtain a trajectory point including time information, acceleration information and velocity information according to the robot base coordinate system trajectory through Moveit path planning;

[0043] A control parameter calculation unit is used to perform a preset number of spline interpolations on the trajectory points containing time information, acceleration information and speed information to obtain trajectory parameters for controlling the movement of the robotic arm.

[0044] Furthermore, an image acquisition component is also provided at the end of the robotic arm, and the action execution carrier is a writing brush;

[0045] The image trajectory conversion module also includes:

[0046] A real-time image acquisition unit, which is used to acquire, through the image acquisition component, an image of the strokes written by the brush when the mechanical arm drives the brush to move;

[0047] A stroke area comparison unit, which is used to obtain the stroke cross-sectional area corresponding to the stroke image, and calculate the real-time force value of the mechanical arm controlling the brush according to the stroke cross-sectional area;

[0048] A force value comparison unit, used for comparing the implemented force value with a preset force value of the mechanical arm controlling the writing brush;

[0049] The force value adjustment unit is used to adjust the real-time force value of the brush driven by the end of the mechanical arm according to the comparison result, so that the real-time force value is equal to the preset force value.

[0050] Correspondingly, a third aspect of an embodiment of the present invention provides a robotic arm, comprising any of the above-mentioned image processing-based robotic arm fine control devices.

[0051] Correspondingly, a fourth aspect of an embodiment of the present invention provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor executes any of the above-mentioned image processing-based robotic arm fine control methods.

[0052] Accordingly, a fifth aspect of an embodiment of the present invention provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the above-mentioned image processing-based robotic arm fine control method.

[0053] The above technical solution of the embodiment of the present invention has the following beneficial technical effects:

[0054] By obtaining the pixel coordinate system trajectory of the dynamic GIF image of the strokes in the Chinese calligraphy font library and converting it into the base coordinate system trajectory of the robotic arm, the control parameters of the Chinese calligraphy writing are obtained. Since the basic strokes in the font library can be accurately reproduced, any Chinese character can be formed by combining the strokes. It is not restricted by the preset number of characters in the library, and the writing of any Chinese character can be realized. It has many advantages such as strong adaptability to various fonts and neat and accurate writing. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 is a flow chart of a method for fine control of a robotic arm based on image processing provided by an embodiment of the present invention;

[0056] Figure 2 is a logic diagram of a robotic arm control method provided by an embodiment of the present invention;

[0057] Figure 3 It is a schematic diagram of a static image frame of a dynamic image of a brush font library provided by an embodiment of the present invention;

[0058] Figure 4 is a schematic diagram of a difference picture provided by an embodiment of the present invention;

[0059] Figure 5 It is a pixel coordinate system trajectory diagram generated based on the difference image provided by an embodiment of the present invention;

[0060] Figure 6 is a schematic diagram of a coordinate system conversion control process provided by an embodiment of the present invention;

[0061] Figure 7 This is an example diagram of a Chinese calligraphy written by a brush controlled by a robotic arm provided by an embodiment of the present invention;

[0062] Figure 8 It is a module block diagram of a mechanical arm fine control device based on image processing provided by an embodiment of the present invention;

[0063] Fig. 9 is a block diagram of an image trajectory acquisition module provided by an embodiment of the present invention;

[0064] Fig.10 It is a block diagram of an image trajectory conversion module provided by an embodiment of the present invention.

[0065] Reference numerals:

[0066] 1. Dynamic image acquisition module, 2. Image trajectory acquisition module, 21. Image splitting unit, 22. Picture generation unit, 23. Contour acquisition unit, 24. Trajectory generation unit, 25. Slope calculation unit, 26. Area calculation unit, 3. Image trajectory conversion module, 31. Trajectory conversion unit, 32. Trajectory point generation unit, 33. Control parameter calculation unit, 34. Real-time image acquisition unit, 35. Force value calculation unit, 36. Force value comparison unit, 37. Force value adjustment unit, 4. Brush writing control module. DETAILED DESCRIPTION

[0067] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. In addition, in the following description, the description of well-known structures and technologies is omitted to avoid unnecessary confusion of the concept of the present invention.

[0068] Please refer to Figure 1 A first aspect of an embodiment of the present invention provides a method for fine control of a robotic arm based on image processing, comprising the following steps:

[0069] Step S100, obtaining a dynamic image of a sample library to be executed, which may be a GIF animation.

[0070] Step S200: based on the dynamic image, obtaining the pixel coordinate system trajectory of the action execution carrier moving in the dynamic image.

[0071] Step S300, converting the pixel coordinate system trajectory into the base coordinate system trajectory of the robot arm to obtain the trajectory parameters for controlling the robot arm.

[0072] Step S400, controlling the robot arm to move according to the trajectory of the base coordinate system, driving the action execution carrier at the end of the robot arm to reproduce the action in the dynamic image.

[0073] In the above technical solution, by obtaining the pixel coordinate system trajectory of the corresponding basic action in the to-be-executed sample library and converting it into the base coordinate system trajectory of the robotic arm, the control parameters for reproducing the action through the action execution carrier are obtained. It is not restricted by the preset library materials, can achieve arbitrary combinations of basic actions, and has many advantages such as strong adaptability and accurate reproduction.

[0074] Specifically, please refer to Figure 2 , obtaining the pixel coordinate system trajectory of the action execution carrier moving in the dynamic image based on the dynamic image in step S200 includes:

[0075] Step S210, splitting the dynamic image into several static image frames. As Figure 3 shown, taking the character '心' in Chinese calligraphy as an example, by splitting the dynamic stroke image of the character '心', 46 static images are obtained.

[0076] Step S220, based on several static image frames, performing image matrix difference calculation to obtain the difference between two consecutive static image frames and generating a new difference picture. As Figure 4 shown, by calculating the 46 static images of the dynamic stroke image of the character '心' and performing image matrix difference calculation, 45 difference pictures are obtained.

[0077] Step S230, obtaining the contour of the difference picture, and saving the contour, its centroid and coordinate values.

[0078] Step S240, based on the centroids of all the difference picture contours, obtaining the pixel coordinate system trajectory. As Figure 5 shown, based on the above 45 difference pictures, the pixel coordinate system trajectory diagram of the character '心' can be obtained; the centroids of the difference pictures form the above pixel coordinate system trajectory diagram of the character '心'.

[0079] Step S250, based on the slope change of the pixel coordinate system trajectory, obtaining the trajectory angle change rate and the slope bending angle of the action execution carrier at the trajectory.

[0080] The change in the trajectory slope can be directly calculated by calculating the connection line of all the centroids in the image contour. Then, according to the change in the trajectory slope, the trajectory angle change rate can be calculated, and thus the slope bending angle of the action execution carrier at the trajectory can be obtained, thereby inferring the posture of the action execution carrier. Among them, the trajectory slope is the slope along the traveling direction of the trajectory.

[0081] Step S260, calculating the standard cross-sectional area of the action execution carrier based on the contour coordinate values and the negative reciprocal of the slope of the pixel coordinate system trajectory. The standard cross-sectional area is proportional to the force with which the robotic arm holds the action execution carrier.

[0082] Among them, the negative reciprocal of the above trajectory slope K is the phase rate in the cross-sectional direction.

[0083] The above process is explained below with a specific embodiment: 1. The trajectory slope k can be calculated through two adjacent centroids in the contour; 2. The slope perpendicular to the centroid, that is, the negative reciprocal of the slope, is calculated; 3. Based on the centroid point and the slope k, the straight line (y=kx+b) can be determined; 4. The number of all pixel points passing through this straight line, that is, the cross-sectional area, is calculated.

[0084] For details, please refer to Figure 6 , the pixel coordinate system trajectory is converted into the base coordinate system trajectory of the robot in step S300 to obtain the trajectory parameters for controlling the robot, including:

[0085] Step S310, converting the pixel coordinate system trajectory into the robot base coordinate system trajectory.

[0086] In the above process, the pixel coordinate system trajectory is converted into the trajectory of the camera coordinate system, and then converted into the trajectory of the base coordinate system of the robot.

[0087] Specifically, the relationship between the pixel coordinate system and the camera coordinate system in the camera intrinsic parameters is as follows.

[0088]

[0089] μ,υ are the coordinates of the centroid in the pixel coordinate system, x c ,y c 、z c is the base coordinate system, μ 0 and 0 is the pixel coordinate system of the center point of the image (the image is 480*480), μ 0 and 0 Both are 240. f / d x and f / d y In the camera intrinsic parameters, it is expressed as the width of the unit pixel, which is similar to the font size of Chinese characters and is obtained based on experience.

[0090] The above formula has three unknown quantities x c ,y c 、z c , and z c The value is determined by the height of the paper, x c ,y c It can be calculated directly.

[0091] Step S320, through moveit path planning, the trajectory points containing time information, acceleration information and speed information are obtained according to the trajectory of the robot base coordinate system.

[0092] Step S330, performing a preset number of spline interpolations on the trajectory points including time information, acceleration information and velocity information to obtain trajectory parameters for controlling the motion of the robot arm.

[0093] Through the above process, the robot base coordinate system trajectory can be obtained from the pixel coordinate system trajectory, and then the robot base coordinate system trajectory points are interpolated multiple times to interpolate the generated small number of trajectory points into a trajectory that can be directly used by the robot joints.

[0094] The sample library to be executed includes: a calligraphy sample library, a fountain pen sample library or other font sample libraries with stroke thickness variations, and the action execution carrier may correspondingly include: a calligraphy sample library, a fountain pen or other font sample libraries with stroke thickness variations. Below, the technical solution is described using a calligraphy sample library with the most obvious stroke thickness variations.

[0095] Furthermore, an image acquisition component is also provided at the end of the mechanical arm, which is optionally a high-definition camera or a high-definition camera. The action execution carrier is a writing brush.

[0096] Therefore, after obtaining the trajectory parameter value for the robot arm movement in step S330, the method further includes:

[0097] Step S340, obtaining, through the image acquisition component, an image of the strokes written by the brush when the robotic arm drives the brush to move.

[0098] Step S350, obtaining the stroke cross-sectional area corresponding to the stroke image, and calculating the real-time force value of the robotic arm controlling the brush based on the stroke cross-sectional area.

[0099] Specifically, the specific process of calculating the real-time force value of the brush based on the cross-sectional area of ​​the strokes is: from the time when the brush tip just touches the writing medium to the time when the brush tip contacts the writing medium at half the depth, the relationship between the two is: y=a*x2+b*x+c, wherein x is the cross-sectional area, y is the real-time force value of the brush, a, b, c are constants, and a≠0; the values ​​of a, b, c are related to the number of degrees of freedom of the robotic arm, the structure of the end clamping tool, and the brush model, and can usually be obtained through prototype calibration combined with a curve fitting algorithm.

[0100] Step S360, comparing the implemented force value with the preset force value of the brush controlled by the robotic arm.

[0101] Step S370, based on the comparison result, adjust the real-time force value of the brush driven by the end of the robotic arm so that the real-time force value approaches or is equal to the preset force value.

[0102] By setting a camera at the end of the robotic arm, the completed part is photographed in real time while writing, and the real-time cross-sectional area of ​​the written part of the font is compared with the known standard cross-sectional area. Based on the comparison result, the robotic arm is controlled to adjust the force of the brush writing, forming a closed-loop control to achieve perfect writing of brush calligraphy.

[0103] Please refer to Figure 7 The brush fixed at the end of the robotic arm can realize effective writing of Chinese calligraphy based on the above control method. The force of the brush is accurately controlled, which is basically consistent with the writing force in the dynamic diagram of the Chinese calligraphy strokes.

[0104] Accordingly, please refer to Figure 8 A second aspect of an embodiment of the present invention provides a robotic arm fine control device based on image processing, which controls the robotic arm through any of the above-mentioned robotic arm fine control methods, including:

[0105] A dynamic image acquisition module 1 is used to acquire dynamic images of a sample library to be executed;

[0106] An image trajectory acquisition module 2 is used to acquire a pixel coordinate system trajectory of the action execution carrier moving in the dynamic image based on the dynamic image;

[0107] An image trajectory conversion module 3 is used to convert the pixel coordinate system trajectory into the base coordinate system trajectory of the robot arm to obtain the trajectory parameters for controlling the robot arm;

[0108] The action execution control module 4 is used to control the robot arm to move according to the trajectory of the base coordinate system, and drive the action execution carrier at the end of the robot arm to reproduce the action in the dynamic image.

[0109] For further information, please refer to Fig. 9 , the image trajectory acquisition module 2 includes:

[0110] An image splitting unit 21, which is used to split the dynamic image into a plurality of static image frames;

[0111] The picture generation unit 22 is used to perform image matrix difference calculation based on a plurality of static image frames, obtain the difference between the two previous and next static image frames, and generate a new difference picture;

[0112] A contour acquisition unit 23, which is used to acquire the contour of the difference image and save the contour and its centroid and coordinate values;

[0113] A trajectory generating unit 24, which is used to obtain a pixel coordinate system trajectory based on the centroid of all difference image contours;

[0114] A slope calculation unit 25, which is used to obtain the trajectory angle change rate and the slope bending angle of the action performed at the trajectory based on the slope change of the pixel coordinate system trajectory;

[0115] The area calculation unit 26 is used to calculate the standard cross-sectional area of ​​the action execution carrier according to the contour coordinate value and the negative inverse of the slope of the pixel coordinate system trajectory. The standard cross-sectional area is proportional to the force of the robot arm holding the action execution carrier.

[0116] For further information, please refer to Fig.10 , the image trajectory conversion module 3 includes:

[0117] A trajectory conversion unit 31, which is used to convert the pixel coordinate system trajectory into the robot arm base coordinate system trajectory;

[0118] A trajectory point generating unit 32, which is used to obtain a trajectory point including time information, acceleration information and speed information according to the robot base coordinate system trajectory through moveit path planning;

[0119] The control parameter calculation unit 33 is used to perform a preset number of spline interpolations on the trajectory points containing time information, acceleration information and speed information to obtain trajectory parameters for controlling the movement of the robot arm.

[0120] Furthermore, an image acquisition component is also provided at the end of the robot arm, and the action execution carrier is a writing brush; the image trajectory conversion module 3 also includes:

[0121] A real-time image acquisition unit 34, which is used to acquire, through an image acquisition component, an image of the strokes written by the brush when the mechanical arm drives the brush to move;

[0122] A force value calculation unit 35, which is used to obtain the stroke cross-sectional area corresponding to the stroke image, and calculate the real-time force value of the robot arm controlling the brush according to the stroke cross-sectional area;

[0123] A force value comparison unit 36, which is used to compare the implemented force value with a preset force value of the brush controlled by the robot arm;

[0124] The force value adjustment unit 37 is used to adjust the force with which the end of the robot arm drives the brush according to the comparison result.

[0125] The above-mentioned robot arm fine control device corresponds to the process of the above-mentioned robot arm fine control method.

[0126] Correspondingly, a third aspect of an embodiment of the present invention provides a robotic arm, comprising any of the above-mentioned image processing-based robotic arm fine control devices.

[0127] Accordingly, a fourth aspect of an embodiment of the present invention provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor executes any of the above-mentioned image processing-based robotic arm fine control methods.

[0128] Accordingly, a fifth aspect of an embodiment of the present invention provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the above-mentioned image processing-based robotic arm fine control method.

[0129] The embodiment of the present invention aims to protect a method, device and robot for fine control of a robot arm based on image processing, wherein the method comprises the following steps: obtaining a dynamic image in a sample library to be executed; based on the dynamic image, obtaining a pixel coordinate system trajectory of the movement of an action execution carrier in the dynamic image; converting the pixel coordinate system trajectory into a base coordinate system trajectory of the robot arm to obtain trajectory parameters for controlling the robot arm; controlling the robot arm to move according to the base coordinate system trajectory, driving the action execution carrier at the end of the robot arm to reproduce the action in the dynamic image. The above technical solution has the following effects:

[0130] By obtaining the pixel coordinate system trajectory of the dynamic GIF image of the strokes in the Chinese calligraphy font library and converting it into the base coordinate system trajectory of the robotic arm, the control parameters of the Chinese calligraphy writing are obtained. Since the basic strokes in the font library can be accurately reproduced, any Chinese character can be formed by combining the strokes. It is not restricted by the preset number of characters in the library, and the writing of any Chinese character can be realized. It has many advantages such as strong adaptability to various fonts and neat and accurate writing.

[0131] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0132] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0133] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0134] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for fine control of a robotic arm based on image processing, It is characterized in that The steps include: Get the dynamic image in the sample library to be executed; Based on the dynamic image, obtaining a pixel coordinate system trajectory of the action execution carrier moving in the dynamic image; Convert the pixel coordinate system trajectory into a base coordinate system trajectory of the robotic arm to obtain trajectory parameters for controlling the robotic arm; Controlling the robot arm to move according to the trajectory of the base coordinate system, driving the action execution carrier at the end of the robot arm to reproduce the action in the dynamic image; Based on the dynamic image, obtaining a pixel coordinate system trajectory of the action execution carrier moving in the dynamic image includes: Splitting the dynamic image into a plurality of static image frames; Based on the plurality of static image frames, image matrix difference calculation is performed to obtain a difference between two preceding and succeeding static image frames, and a new difference picture is generated; Obtaining the contour of the difference image, and saving the coordinate values ​​of the contour and its centroid; Based on the centroids of all the difference image contours, obtaining the pixel coordinate system trajectory; Based on the slope change of the pixel coordinate system trajectory, the trajectory angle change rate and the slope bending angle of the action execution carrier at the trajectory are obtained; The standard cross-sectional area of ​​the action execution carrier is calculated according to the contour coordinate value and the negative inverse of the slope of the pixel coordinate system trajectory, and the standard cross-sectional area is proportional to the force with which the robot arm controls the action execution carrier.

2. The method for fine control of a robotic arm based on image processing according to claim 1, It is characterized in that The step of converting the pixel coordinate system trajectory into a base coordinate system trajectory of the robotic arm to obtain trajectory parameters for controlling the robotic arm includes: Convert the pixel coordinate system trajectory into the robot base coordinate system trajectory; Through moveit path planning, a trajectory point including time information, acceleration information and velocity information is obtained according to the trajectory of the robot base coordinate system; The trajectory points including time information, acceleration information and speed information are subjected to spline interpolation for a preset number of times to obtain trajectory parameters for controlling the movement of the robotic arm.

3. The method for fine control of a robotic arm based on image processing according to claim 2, It is characterized in that The end of the mechanical arm is also provided with an image acquisition component, and the action execution carrier is a writing brush; After obtaining the trajectory parameter value for the movement of the robot arm, the method further includes: Acquire, by the image acquisition component, an image of the strokes written by the brush when the mechanical arm drives the brush to move; Acquire the stroke cross-sectional area corresponding to the stroke image, and calculate the real-time force value of the mechanical arm controlling the brush according to the stroke cross-sectional area; Comparing the real-time force value with a preset force value of the brush controlled by the robotic arm; According to the comparison result, the real-time force value of the brush driven by the end of the robotic arm is adjusted so that the real-time force value is equal to the preset force value.

4. A precise control device for a robotic arm based on image processing, It is characterized in that Controlling a robotic arm by the robotic arm fine control method according to any one of claims 1 to 3 comprises: A dynamic image acquisition module, which is used to acquire dynamic images of the sample library to be executed; An image trajectory acquisition module, which is used to acquire, based on the dynamic image, a pixel coordinate system trajectory of the action execution carrier moving in the dynamic image; An image trajectory conversion module, which is used to convert the pixel coordinate system trajectory into a base coordinate system trajectory of the robot arm to obtain trajectory parameters for controlling the robot arm; An action execution control module, which is used to control the robot arm to move according to the base coordinate system trajectory, and drive the action execution carrier at the end of the robot arm to reproduce the action in the dynamic image; The image trajectory acquisition module comprises: An image splitting unit, used for splitting the dynamic image into a plurality of static image frames; A picture generating unit, which is used to perform image matrix difference calculation based on the plurality of static image frames, obtain the difference between the two preceding and succeeding static image frames, and generate a new difference picture; A contour acquisition unit, which is used to acquire the contour of the difference image and save the coordinate values ​​of the contour and its centroid; A trajectory generating unit, which is used to obtain the pixel coordinate system trajectory based on the centroid of all the difference image contours; A slope calculation unit, which is used to obtain the trajectory angle change rate and the slope bending angle of the action execution carrier at the trajectory based on the slope change of the pixel coordinate system trajectory; An area calculation unit is used to calculate the standard cross-sectional area of ​​the action execution carrier according to the contour coordinate value and the negative inverse of the slope of the pixel coordinate system trajectory, and the standard cross-sectional area is proportional to the force with which the robot arm controls the action execution carrier.

5. The image processing-based fine control device for a robotic arm according to claim 4, It is characterized in that The image trajectory conversion module comprises: A trajectory conversion unit, used for converting the pixel coordinate system trajectory into the robot arm base coordinate system trajectory; A trajectory point generating unit, which is used to obtain a trajectory point including time information, acceleration information and velocity information according to the robot base coordinate system trajectory through Moveit path planning; A control parameter calculation unit is used to perform a preset number of spline interpolations on the trajectory points containing time information, acceleration information and speed information to obtain trajectory parameters for controlling the movement of the robotic arm.

6. The image processing-based fine control device for a robotic arm according to claim 5, It is characterized in that The end of the mechanical arm is also provided with an image acquisition component, and the action execution carrier is a writing brush; The image trajectory conversion module also includes: A real-time image acquisition unit, which is used to acquire, through the image acquisition component, an image of the strokes written by the brush when the mechanical arm drives the brush to move; A force value calculation unit, which is used to obtain the stroke cross-sectional area corresponding to the stroke image, and calculate the real-time force value of the mechanical arm controlling the brush according to the stroke cross-sectional area; A force value comparison unit, used to compare the real-time force value with a preset force value of the brush controlled by the robotic arm; The force value adjustment unit is used to adjust the real-time force value of the brush driven by the end of the mechanical arm according to the comparison result, so that the real-time force value is equal to the preset force value.

7. A robotic arm, It is characterized in that It comprises a robotic arm fine control device based on image processing as described in any one of claims 4-6.

8. An electronic device, It is characterized in that include: at least one processor; And a memory connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor executes the image processing-based robotic arm fine control method as described in any one of claims 1-3.