A motion control method and apparatus

By combining industrial vision modules and servo motion modules, the system accurately identifies the extreme points of the object's contour edge and calculates the clamping path, solving the accuracy and efficiency problems of object clamping in traditional industrial control systems and achieving high-precision and stable object clamping operations.

CN119567247BActive Publication Date: 2025-11-11GUANGDONG IND TECHN COLLEGE +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411637566.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-11-11
Estimated Expiration
2044-11-15

AI Technical Summary

Technical Problem

Traditional industrial control systems suffer from insufficient precision, low efficiency, and difficulty in adapting to complex environments during object clamping. Servo modules cannot independently perform precise grasping and clamping of objects.

Method used

The industrial vision module acquires real-time images of the object to be clamped, extracts the initial object contour edge poles, identifies feature points, determines the actual object contour edge poles based on spatial distribution relationships, calculates the clamping position and motion path, and uses a servo motion module to execute the object clamping motion.

Benefits of technology

It achieves high-precision object detection, improves the accuracy, flexibility and efficiency of the clamping process, reduces problems caused by mechanical errors and human intervention, and ensures the stability and reliability of the clamping action.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119567247B_ABST
    Figure CN119567247B_ABST
Patent Text Reader

Abstract

This invention relates to the field of image processing technology and provides a motion control method and apparatus. The motion control method includes: acquiring a real-time image of an object to be clamped through an industrial vision module; extracting the initial object contour edge poles corresponding to the object to be clamped from the real-time image; identifying feature points located around the object to be clamped; determining the actual object contour edge poles based on the spatial distribution relationship between the feature points and the initial object contour edge poles; calculating the clamping position and motion path based on the position information of the actual object contour edge poles; and controlling the servo motion module to perform object clamping motion based on the clamping position and the motion path. The motion control method provided by this invention effectively improves the accuracy, flexibility, and efficiency of the clamping process through precise object contour recognition, path planning, and servo control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of image processing, and particularly relates to a motion control method and device. Background Technology

[0002] With the continuous development of industrial automation technology, industrial control systems have been widely used in various production and manufacturing processes. Traditional industrial control systems mostly rely on robotic arms and manual operation to complete the tasks of grasping and holding objects. However, with the diversification of industrial demands and the increasing requirements for precision, traditional control methods have gradually revealed problems such as insufficient precision, low efficiency, and difficulty in adapting to complex environments. Therefore, how to improve the intelligence and automation level of industrial control systems in the object gripping process has become a research hotspot in the current industrial field.

[0003] In modern industrial control systems, servo motion modules play a crucial role as a core component. Servo modules can precisely control the speed, position, and acceleration of moving parts based on signals input from the control system, and are widely used in scenarios requiring high precision and high responsiveness. However, servo modules face the problem of dependence on object position perception in practical applications. Due to changes in the object's posture, position, and external environment, servo modules cannot independently achieve precise grasping and clamping of objects. Therefore, how to improve the accuracy and flexibility of object clamping by effectively combining visual recognition technology with servo module control has become a key research direction. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a motion control method and apparatus to solve the technical problem of improving the accuracy and flexibility of object clamping.

[0005] A first aspect of this invention provides a motion control method applied to an industrial control system, the industrial control system including an industrial vision module and a servo motion module, the motion control method comprising:

[0006] The industrial vision module acquires real-time images of the object to be clamped.

[0007] Extract the initial object contour edge extremes corresponding to the object to be clamped in the real-time image;

[0008] Identify feature points located around the object to be clamped;

[0009] Based on the spatial distribution relationship between the feature points and the edge poles of the initial object contour, the actual object contour edge poles are determined;

[0010] The clamping position and motion path are calculated based on the position information of the extreme points of the actual object's contour edge.

[0011] Based on the clamping position and the motion path, the servo motion module is controlled to perform object clamping motion.

[0012] Further, the step of extracting the initial object contour edge extremes corresponding to the object to be clamped in the real-time image includes:

[0013] The real-time image is binarized to obtain a binarized image;

[0014] Extract the first pixel corresponding to the first pixel value and the second pixel corresponding to the second pixel value from the binarized image; the first pixel value refers to the pixel value corresponding to the object to be clamped; the second pixel value refers to the pixel value corresponding to the object not to be clamped.

[0015] Based on each of the first pixels, obtain a fixed-size pixel region centered on the first pixel;

[0016] Calculate the ratio between the number of second pixel values ​​and the number of first pixel values ​​in the fixed-size pixel region;

[0017] If the ratio is within a preset range, then the first pixel corresponding to the ratio is taken as the first edge pole.

[0018] The initial object contour edge poles are extracted based on the pixel features of the pixel regions surrounding the multiple first edge poles.

[0019] Further, the step of extracting the initial object contour edge poles based on the pixel features of the pixel regions surrounding the plurality of first edge poles includes:

[0020] Sort the ratios corresponding to multiple first marginal poles from largest to smallest, and extract the top four first marginal poles as the current poles;

[0021] Obtain the four adjacent pixel regions of the fixed-size pixel region corresponding to the current pole; the adjacent pixel region refers to the four pixel regions that are adjacent to the four sides of the fixed-size pixel region, and the number of pixels in the adjacent pixel region is the same as that in the fixed-size pixel region;

[0022] Extract target adjacent pixel regions from the four adjacent pixel regions where the number of second pixel values ​​is greater than a preset number;

[0023] If the number of adjacent pixel regions of the target is two, then the current pole is determined to be the initial object contour edge pole;

[0024] If the number of current adjacent pixel regions is not two, then the subsequent first edge poles are extracted according to the sorting and matched with the initial object contour edge poles.

[0025] Furthermore, the step of identifying feature points located around the object to be clamped includes:

[0026] By identifying preset marker points or QR codes located around the object to be clamped, the midpoint of the preset marker points or the QR codes is taken as the feature point.

[0027] Further, the step of determining the actual object contour edge poles based on the spatial distribution relationship between the feature points and the initial object contour edge poles includes:

[0028] Calculate the distances between the feature points and the multiple initial object contour edge poles respectively;

[0029] The lengths of opposite sides are calculated based on the triangles formed between the feature points and the multiple initial object contour edge poles and the cosine function.

[0030] The lengths of the multiple opposite sides are sorted from largest to smallest, and the extreme points of the actual object contour edge are determined based on the difference relationship between the lengths of the multiple opposite sides.

[0031] Further, the step of sorting the lengths of the multiple opposite sides from largest to smallest and determining the extreme points of the actual object contour edge based on the difference relationship between the lengths of the multiple opposite sides includes:

[0032] Based on the sorting, extract the lengths of the opposite sides of the fifth, sixth, seventh, eighth, ninth, tenth, eleventh, and twelfth positions.

[0033] Calculate the first difference between the lengths of the fifth and sixth opposite sides;

[0034] Calculate the second difference between the lengths of the seventh and eighth opposite sides;

[0035] Calculate the third difference between the lengths of the ninth and tenth opposite sides;

[0036] Calculate the fourth difference between the lengths of the eleventh and twelfth opposite sides;

[0037] If the first difference, the second difference, the third difference, and the fourth difference are all less than a preset distance, then the initial object contour edge pole is taken as the actual object contour edge pole.

[0038] If the first difference, the second difference, the third difference, or the fourth difference is not less than a preset distance, then the initial object contour edge poles are re-extracted, and the actual object contour edge poles are selected from the new initial object contour edge poles.

[0039] Furthermore, the step of calculating the clamping position and motion path based on the position information of the extreme points of the actual object's contour edge includes:

[0040] Calculate the center of the surface of the object to be clamped based on the extreme points of the actual object's contour edge;

[0041] A motion planning algorithm is used to calculate the motion path of the clamping part from its current position to the center of the surface of the object to be clamped.

[0042] The motion path is discretized into trajectory points and pose information;

[0043] The object clamping motion is performed by executing the trajectory points and pose information through the servo motion module.

[0044] A second aspect of the present invention provides a motion control device, comprising:

[0045] The acquisition unit is used to acquire real-time images of the object to be clamped through the industrial vision module;

[0046] The extraction unit is used to extract the initial object contour edge poles corresponding to the object to be clamped in the real-time image;

[0047] The identification unit is used to identify feature points located around the object to be clamped;

[0048] The determining unit is used to determine the actual object contour edge poles based on the spatial distribution relationship between the feature points and the initial object contour edge poles;

[0049] The calculation unit is used to calculate the clamping position and motion path based on the position information of the extreme points of the actual object's contour edge;

[0050] The control unit is used to control the servo motion module to perform object clamping motion based on the clamping position and the motion path.

[0051] A third aspect of the present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method described in the first aspect.

[0052] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method described in the first aspect.

[0053] The beneficial effects of this invention compared to existing technologies are as follows: By acquiring images of the object to be clamped in real time through an industrial vision module and extracting the object's contour edge pole information, the initial position of the object can be accurately identified. Furthermore, by identifying feature points around the object and based on the spatial distribution relationship between these feature points and the initial contour edge pole, the contour edge pole of the actual object is precisely determined. This process effectively avoids positioning errors caused by factors such as changes in ambient light and object deformation, thus achieving high-precision object detection. Based on the position information of the actual object's contour edge pole, the clamping position and motion path can be accurately calculated. Through this precise path planning, the clamp can flexibly clamp objects in complex environments, avoiding clamping failures or positional deviations caused by inaccurate paths in traditional methods. Using a servo motion module to control the clamp to perform object clamping motion allows for precise control of the clamping action based on the calculated clamping position and motion path, thereby improving the response speed and execution accuracy of the clamping process. This method not only improves the system's working efficiency but also reduces problems caused by mechanical errors or human intervention, ensuring the stability and reliability of the clamping action. In summary, the motion control method provided by this invention effectively improves the accuracy, flexibility, and efficiency of the clamping process through precise object contour recognition, path planning, and servo control. Attached Figure Description

[0054] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0055] Figure 1 A schematic flowchart of a motion control method provided by the present invention is shown;

[0056] Figure 2 A schematic diagram of a motion control device according to an embodiment of the present invention is shown;

[0057] Figure 3 A schematic diagram of a terminal device according to an embodiment of the present invention is shown;

[0058] Figure 4 This diagram illustrates the positional relationship between a fixed-size pixel region and adjacent pixel regions.

[0059] Figure 5 A schematic diagram of the distribution of feature points and edge poles is shown. Detailed Implementation

[0060] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of the invention. However, those skilled in the art will understand that the invention can be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of the invention with unnecessary detail.

[0061] This invention provides a motion control method and apparatus to solve the technical problem of improving the accuracy and flexibility of object clamping.

[0062] First, this invention provides a motion control method applied to an industrial control system. The industrial control system includes an industrial vision module and a servo motion module, and can be a device such as an industrial robot or robotic arm. Please see below. Figure 1 , Figure 1 A schematic flowchart of a motion control method provided by the present invention is shown. Figure 1 As shown, the motion control method may include the following steps:

[0063] Step 101: Acquire real-time images of the object to be clamped using the industrial vision module;

[0064] The system acquires real-time images of the object to be clamped using an industrial vision module (such as a camera or other vision sensor). The role of the industrial vision module is to provide visual information about the object, providing basic data for subsequent processing and analysis.

[0065] Step 102: Extract the initial object contour edge extremes corresponding to the object to be clamped in the real-time image;

[0066] The initial object contour edge extremes refer to the diagonal points of the object's surface, such as the four diagonal points of a cube or cuboid. It's worth noting that because the industrial vision module floats above the object to be gripped, the cube appears as a single surface in the real-time image it captures. The logic for extracting the initial object contour edge extremes is as follows:

[0067] Specifically, step 102 includes steps 1021 to 1026:

[0068] Step 1021: Binarize the real-time image to obtain a binarized image;

[0069] The real-time image is converted into a binarized image. Binarization converts the pixel values ​​in the image into two categories: one representing the pixel values ​​of the object to be clamped (such as the color or brightness of the object area), and the other representing the pixel values ​​of the background or non-objects (such as the color or brightness of the background). This step simplifies the image information and facilitates subsequent analysis.

[0070] Step 1022: Extract the first pixel corresponding to the first pixel value and the second pixel corresponding to the second pixel value from the binarized image; the first pixel value refers to the pixel value corresponding to the object to be clamped; the second pixel value refers to the pixel value corresponding to the object not to be clamped.

[0071] The first pixel value (corresponding to the pixel value of the object to be clamped) and the second pixel value (corresponding to the pixel value of the non-object to be clamped). These pixel values ​​are selected based on the object's color or brightness characteristics and are used to distinguish the object from the background.

[0072] In this setup, the object to be clamped is located on an operating platform, and the operating platform has uniform and known color information, such as pure white. Therefore, after binarization, the low-grayscale pixel value can be used as the second pixel value, and the high-grayscale pixel value can be used as the first pixel value.

[0073] Step 1023: Based on each of the first pixels, obtain a fixed-size pixel region centered on the first pixel;

[0074] For each first pixel in the image (the pixel of the object), a fixed-size pixel region is obtained centered on that pixel. The size of this region is predetermined and its purpose is to capture surrounding background information in order to determine the position of the object's edges. The edges of the fixed-size pixel region need to be set parallel to the extension direction of the object's edges.

[0075] Step 1024: Calculate the ratio between the number of second pixel values ​​and the number of first pixel values ​​in the fixed-size pixel region;

[0076] Within this fixed-size area, calculate the ratio between the number of second pixel values ​​(background pixels) and the number of first pixel values ​​(object pixels). This ratio helps determine the edge features of the object.

[0077] If the ratio falls within a preset range (which is set based on experiments or prior knowledge), then that pixel can be identified as the first edge extreme. This ratio range can be adjusted based on the separation between the object and the background; typically, there are more background pixels at the object's edge and fewer pixels within the object's region.

[0078] It's understandable that if a pixel is located at a diagonal point, the ratio of background pixels to object pixels is approximately 3:1. If a pixel is located at the center of an edge, the ratio is approximately 1:1. Therefore, the extreme points of an object's contour edge can be selected based on the ratio of the second pixel value to the first pixel value.

[0079] Step 1025: If the ratio is within a preset range, then the first pixel corresponding to the ratio is taken as the first edge pole.

[0080] If the ratio is around 3 / 1, the corresponding first pixel is taken as the first edge extreme point. The preset range can be set around 3 / 1 based on the calculation precision.

[0081] Step 1026: Extract the initial object contour edge poles based on the pixel features of the pixel regions surrounding the multiple first edge poles.

[0082] To avoid the influence of outliers or noise, it is necessary to select the initial object contour edge poles based on the pixel features of the pixel regions surrounding multiple first edge poles. The specific logic is as follows:

[0083] Specifically, step 1026 includes steps A1 to A5:

[0084] Step A1: Sort the ratios corresponding to the multiple first edge poles from largest to smallest, and extract the first four first edge poles as the current poles;

[0085] In the previous step, multiple first edge poles were extracted. This step sorts these edge poles by their ratios from largest to smallest, selecting the four poles with the largest ratios as the poles for the current analysis. This sorting method aims to prioritize edge points that contrast most sharply with the background, as these points are more likely to be located in the salient edge regions of the object. Since squares and rectangles have four corner points, the first four first edge poles are selected as the current poles.

[0086] Step A2: Obtain the four adjacent pixel regions of the fixed-size pixel region corresponding to the current pole; the adjacent pixel region refers to the four pixel regions adjacent to the four sides of the fixed-size pixel region, and the number of pixels in the adjacent pixel region is the same as that in the fixed-size pixel region;

[0087] For a selected current extremum, obtain its four adjacent pixel regions of a fixed size. These four adjacent regions are located adjacent to the four edges of the current pixel region, and the number of pixels in each adjacent region is the same as that in the fixed region. For example... Figure 4 As shown, Figure 4This diagram illustrates the positional relationship between a fixed-size pixel region and its adjacent pixel regions. Box 1 represents the fixed-size pixel region, boxes 2, 3, 4, and 5 represent the four adjacent pixel regions, and box 6 represents the object surface.

[0088] To verify whether the current extremum is a true corner point (i.e., an edge point of the object's contour), it is necessary to obtain the four adjacent pixel regions of a fixed-size pixel area. It can be understood that if the current extremum is a corner point, then two of the four adjacent pixel regions intersect with the two edges respectively (i.e.,...). Figure 4 (Blocks 3 and 4 in the image), the remaining two adjacent pixel regions are both located in the background region (i.e. Figure 4 (See boxes 2 and 5 in the diagram). If the current extremum is not a corner point, then two of the four adjacent pixel regions intersect with the two edges respectively, and the remaining two adjacent pixel regions are located in the background region and the object surface region respectively. Therefore, based on the two pixel value distributions in the adjacent pixel regions, it can be verified whether the current extremum is a true corner point.

[0089] Step A3: Extract the target adjacent pixel regions in the four adjacent pixel regions where the number of second pixel values ​​is greater than a preset number;

[0090] For these four adjacent pixel regions, the number of second pixel values, i.e., the number of background pixels, is counted. Adjacent regions with a second pixel value greater than a preset number are extracted as target adjacent pixel regions. This setting ensures that at the object's edge, the adjacent region is mainly composed of background pixels, thus further verifying whether the current extreme point is located in the object's edge region.

[0091] The preset number can be between all and half of the number of pixels in the adjacent pixel area.

[0092] Step A4: If the number of adjacent pixel regions of the target is two, then the current pole is determined to be the initial object contour edge pole;

[0093] Step A5: If the number of current adjacent pixel regions is not two, then extract the subsequent first edge poles according to the sorting and match the initial object contour edge poles.

[0094] If the target has two adjacent pixel regions, the current pole is considered a valid initial object contour edge pole. This is because there are usually two adjacent regions at the edge that are background pixels.

[0095] If the number of adjacent pixel regions of the target is not two, it means that the current pole may not belong to the edge of the object, or the edge is not obvious. It is necessary to continue to select subsequent edge poles by sorting and repeat the above analysis process until a suitable initial object contour edge pole is found.

[0096] This scheme prioritizes the analysis of the four most representative first edge poles by sorting multiple first edge poles according to their ratios. By acquiring the adjacent pixel regions corresponding to the current pole and determining the number of second pixel values ​​in these regions, this scheme can adapt to changes in background and object shape. When the number of second pixel values ​​in an adjacent region exceeds a preset limit, the adjacent region is accurately identified as the target region, effectively recognizing the boundary of the object's contour. This dynamic region selection method ensures stability and robustness in various complex environments. If there are two target adjacent pixel regions, the system can immediately confirm the current pole as the initial object contour edge pole; otherwise, the system automatically extracts subsequent first edge poles for matching based on the ratio sorting. By analyzing the relationship between adjacent pixel regions and fixed-size pixel regions, this scheme can accurately capture the details of the object's contour, further improving the accuracy of edge detection. Especially in complex backgrounds and with many interference factors, this method effectively reduces false positives, ensuring the stable extraction of the object's contour and improving object recognition and clamping accuracy.

[0097] In this embodiment, by binarizing the real-time image, the object to be clamped is clearly distinguished from the background or non-clamped object region, thus providing a clear foundation for subsequent edge detection. By extracting pixels corresponding to different pixel values ​​in the image, the contour region of the object can be effectively determined, and the edge extremes of the object to be clamped can be accurately located. This scheme calculates the ratio within a fixed-size pixel region to determine the pixel features of the object to be clamped and the non-clamped object, adapting to different scenes, lighting, and background changes, ensuring stable and accurate extraction of the object's initial edge in various environments. Threshold judgment based on the ratio avoids misjudgment caused by background noise or uneven lighting. After obtaining the neighborhood pixel features of each pixel of the object to be clamped, the pixel value ratio is calculated and compared with a preset range to effectively filter out edge extremes that meet the conditions. The multi-point extraction method further improves the robustness of edge recognition, avoids single-point misjudgment, and improves the overall recognition accuracy. This scheme can accurately extract the initial contour edge extremes of the object, providing accurate data support for subsequent clamping path planning. This high-precision edge recognition significantly improves the stability and reliability of the clamping system, ensuring accurate clamping actions, especially in complex environments. The use of a fixed-size pixel region and pixel ratio calculation method results in low computational complexity for edge point extraction, enabling rapid response to real-time image processing needs and meeting the requirements of applications in dynamic environments, making it suitable for embedded real-time processing systems. In summary, this technical solution effectively identifies and extracts the initial contour edge poles of the object to be clamped from real-time images through precise pixel ratio calculation and efficient edge feature extraction methods.

[0098] Step 103: Identify feature points located around the object to be clamped;

[0099] By identifying preset marker points or QR codes located around the object to be clamped, the midpoint of the preset marker points or QR codes is used as the feature point. The preset marker points or QR codes are feature points pre-set on the operating platform.

[0100] Step 104: Determine the actual object contour edge poles based on the spatial distribution relationship between the feature points and the initial object contour edge poles;

[0101] To further improve the recognition accuracy of contour edge poles, it is also necessary to determine the actual object contour edge poles based on the spatial distribution relationship between feature points and the initial object contour edge poles. The specific logic is as follows:

[0102] Specifically, step 104 includes steps 1041 to 1043:

[0103] Step 1041: Calculate the distances between the feature points and the multiple initial object contour edge poles respectively;

[0104] Step 1042: Calculate the length of the opposite side based on the triangle formed between the feature points and the multiple initial object contour edge poles and the cosine function;

[0105] The length of the opposite side can be calculated using the following cosine function:

[0106] Where a and b represent the two sides of the triangle (i.e., the distance between the feature point and the extreme point of the initial object contour edge), and c represents the length of the opposite side. It represents the included angle between two sides.

[0107] Step 1043: Sort the lengths of the multiple opposite sides from largest to smallest, and determine the extreme point of the actual object contour edge based on the difference relationship between the lengths of the multiple opposite sides.

[0108] Please refer to Figure 5 , Figure 5 A schematic diagram of the distribution of feature points and edge poles is shown. For example... Figure 4 As shown, the diagonal points of the object's surface are points A, B, C, and D. Based on step 1042, the lengths of twelve opposite sides can be obtained, namely AB, BA, BC, CB, CD, DC, AD, DA, AC, CA, BD, and DB. Among them, AB, BA, BC, CB, CD, DC, AD, and DA are the lengths of the sides, and AC, CA, BD, and DB are the lengths of the diagonals.

[0109] Based on the lengths of the sides and the diagonal, it can be determined whether the lengths of the twelve opposite sides corresponding to the initial object contour edge poles conform to the difference relationship between the side lengths and the diagonal lengths, thereby determining whether the initial object contour edge poles are the actual object contour edge poles. The specific judgment logic is as follows:

[0110] Specifically, step 1043 includes steps B1 to B7:

[0111] Step B1: Extract the lengths of the fifth, sixth, seventh, eighth, ninth, tenth, eleventh, and twelfth opposite sides according to the sorting.

[0112] Since the lengths of the four diagonals are the longest (i.e., AC, CA, BD, and DB), it is necessary to remove the lengths of the first four opposite sides and extract the lengths of the fifth, sixth, seventh, eighth, ninth, tenth, eleventh, and twelfth opposite sides.

[0113] The lengths of the fifth, sixth, seventh, and eighth opposite sides correspond to the longer sides (i.e., AB, BA, CD, DC).

[0114] The lengths of the ninth, tenth, eleventh, and twelfth opposite sides correspond to the shorter sides (i.e., AD, DA, BC, and CB).

[0115] Step B2: Calculate the first difference between the lengths of the fifth and sixth opposite sides;

[0116] Step B3: Calculate the second difference between the lengths of the seventh and eighth opposite sides;

[0117] Step B4: Calculate the third difference between the lengths of the ninth and tenth opposite sides;

[0118] Step B5: Calculate the fourth difference between the lengths of the eleventh and twelfth opposite sides;

[0119] Step B6: If the first difference, the second difference, the third difference, and the fourth difference are all less than a preset distance, then the initial object contour edge pole is taken as the actual object contour edge pole.

[0120] based on Figure 4 It can be seen that if the initial object contour edge extreme point is the actual object contour edge extreme point, then the first difference, the second difference, the third difference and the fourth difference are all less than the preset distance (because the two sides are the same edge, so the difference is small).

[0121] Step B7: If the first difference, the second difference, the third difference, or the fourth difference is not less than a preset distance, then re-extract the initial object contour edge poles and select the actual object contour edge poles from the new initial object contour edge poles.

[0122] If one or more of the first, second, third, and fourth differences are not less than a preset distance, then the initial object contour edge pole is an anomaly. Therefore, it is necessary to obtain a new initial object contour edge pole and execute the above process steps to obtain the actual object contour edge pole.

[0123] By calculating and judging the differences in lengths of multiple opposite sides in detail, this scheme can eliminate edge poles that do not meet the conditions, reducing the probability of misjudgment. This multi-screening mechanism of difference comparison improves the accuracy and stability of object contour edge pole extraction, and can effectively avoid errors caused by external interference or noise, especially in dynamic environments.

[0124] By calculating the distances between feature points and multiple initial object contour edge poles, and using the triangle formed by these distances and the law of cosines to calculate the lengths of opposite sides, this scheme can accurately locate the contour edge poles of the actual object. This scheme can dynamically adjust the object contour recognition process based on the difference in opposite side lengths, flexibly adapting to varying object shapes and ensuring accurate extraction of actual contour edge poles even in complex scenarios. Accurate extraction of the actual object contour edge poles provides high-quality input data for the clamping system. Precise object edge recognition effectively improves clamping accuracy, ensuring precise execution of clamping actions. Especially in demanding industrial automation scenarios, this technology significantly enhances system performance and stability.

[0125] Step 105: Calculate the clamping position and motion path based on the position information of the extreme points of the actual object contour edge;

[0126] Specifically, step 105 includes steps 1051 to 1054:

[0127] Step 1051: Calculate the center of the surface of the object to be clamped based on the extreme points of the actual object contour edge;

[0128] In the previous steps, the initial contour edge extremes of the object have been extracted; these extremes represent key points on the object's edges. Next, using the positional information of these edge extremes, the geometric center of the object's surface is calculated. This geometric center is a point on the object's surface, typically representing the most representative area of ​​the object and the ideal location for clamping.

[0129] The center of an object's surface can usually be calculated using the geometric center of these edge poles (i.e., the average position of all poles) or using more precise calculation methods (such as the center point of the minimum bounding rectangle or the minimum bounding circle).

[0130] Step 1052: Using a motion planning algorithm, calculate the motion path of the clamping part from its current position to the center of the surface of the object to be clamped;

[0131] The goal of motion planning algorithms is to calculate the optimal motion path from the current position of the gripper to the center of the surface of the object to be gripped. Path planning needs to consider multiple factors, such as the accessibility of the gripper, path smoothness, speed limits, and environmental obstacles. Commonly used motion planning algorithms include A* algorithm, Dijkstra's algorithm, and RRT (Fast Random Tree) algorithm. These algorithms can efficiently calculate the optimal path from the starting position to the target position.

[0132] In practical applications, the planning of the motion path is not just a straight line connection from the current position to the target. It also requires avoiding obstacles on the path and considering the shortest or smoothest path to ensure the smooth execution of the clamping action.

[0133] Step 1053: Discretize the motion path into trajectory points and pose information;

[0134] Motion path planning yields a continuous path, but in actual execution, the clamping unit needs to move along this path step by step. Therefore, this path needs to be discretized into a series of trajectory points and pose information.

[0135] Trajectory points are specific discrete locations on the path, representing the spatial position of the clamping unit at each step; pose information is the attitude information of the clamping unit corresponding to each trajectory point, including the direction and angle of the clamping unit. These trajectory points and pose information will be used for subsequent control commands.

[0136] Step 1054: The servo motion module executes the trajectory points and pose information to perform object clamping motion.

[0137] The system executes the calculated trajectory points and pose information through the servo motion module. The servo motion module is responsible for precisely controlling the movement of the clamping part, moving it step by step according to the set trajectory points and pose information to complete the clamping operation.

[0138] Servo control modules are typically able to precisely control the position and orientation of robotic arms or gripping devices, ensuring that the gripping part can smoothly and accurately reach the center of the object's surface along a predetermined trajectory, thereby achieving efficient object gripping.

[0139] The core of this technical solution lies in determining the center of the object's surface by calculating the positions of the extreme points at the object's contour edges. Then, a motion planning algorithm is used to calculate the optimal motion path from the current position to the center of the object's surface. Discretized trajectory points and pose information guide the servo motion module in executing the object clamping motion. The key advantages of this process are: determining the object's center by using the extreme points at the contour edges effectively avoids positional uncertainties in complex environments; the motion planning algorithm avoids obstacles and calculates the optimal path, ensuring the safety and efficiency of the clamping operation; and the servo control system accurately executes the motion trajectory, ensuring smooth clamping.

[0140] Step 106: Based on the clamping position and the motion path, control the servo motion module to perform object clamping motion.

[0141] Based on the previously calculated clamping position and motion path, the system uses a servo motion module to control the fixture to perform specific object clamping operations. The servo system drives the fixture to perform precise movements according to the path planning instructions, ensuring that the fixture can clamp the object in the correct position and in the appropriate manner.

[0142] In this embodiment, an industrial vision module acquires images of the object to be clamped in real time and extracts the object's contour edge pole information, accurately identifying the object's initial position. Further, by identifying feature points around the object and based on the spatial distribution relationship between these feature points and the initial contour edge poles, the actual object's contour edge poles are precisely determined. This process effectively avoids positioning errors caused by changes in ambient light and object deformation, thus achieving high-precision object detection. Based on the position information of the actual object's contour edge poles, the clamping position and motion path can be accurately calculated. Through this precise path planning, the clamper can flexibly clamp objects in complex environments, avoiding clamping failures or positional deviations caused by inaccurate paths in traditional methods. A servo motion module controls the clamper to perform the object clamping motion, precisely controlling the clamping action according to the calculated clamping position and motion path, thereby improving the response speed and execution accuracy of the clamping process. This method not only improves the system's working efficiency but also reduces problems caused by mechanical errors or human intervention, ensuring the stability and reliability of the clamping action. In summary, the motion control method provided by this invention effectively improves the accuracy, flexibility, and efficiency of the clamping process through precise object contour recognition, path planning, and servo control.

[0143] like Figure 2 This invention provides a motion control device 2, please refer to [link / reference]. Figure 2 , Figure 2 A schematic diagram of a motion control device provided by the present invention is shown, such as... Figure 2The motion control device shown includes:

[0144] The acquisition unit 21 is used to acquire real-time images of the object to be clamped through the industrial vision module;

[0145] Extraction unit 22 is used to extract the initial object contour edge poles corresponding to the object to be clamped in the real-time image;

[0146] The identification unit 23 is used to identify feature points located around the object to be clamped;

[0147] The determining unit 24 is used to determine the actual object contour edge poles based on the spatial distribution relationship between the feature points and the initial object contour edge poles;

[0148] The calculation unit 25 is used to calculate the clamping position and motion path based on the position information of the extreme points of the actual object contour edge;

[0149] The control unit 26 is used to control the servo motion module to perform object clamping motion based on the clamping position and the motion path.

[0150] This invention provides a motion control device that uses an industrial vision module to acquire images of the object to be clamped in real time and extracts the object's contour edge pole information, accurately identifying the object's initial position. Further, by identifying feature points around the object and based on the spatial distribution relationship between these feature points and the initial contour edge poles, the actual object's contour edge poles are precisely determined. This process effectively avoids positioning errors caused by factors such as changes in ambient light and object deformation, thus achieving high-precision object detection. Based on the position information of the actual object's contour edge poles, the clamping position and motion path can be accurately calculated. Through this precise path planning, the clamper can flexibly clamp objects in complex environments, avoiding clamping failures or positional deviations caused by inaccurate paths in traditional methods. Using a servo motion module to control the clamper's object clamping motion allows for precise control of the clamping action based on the calculated clamping position and motion path, thereby improving the response speed and execution accuracy of the clamping process. This method not only improves the system's working efficiency but also reduces problems caused by mechanical errors or human intervention, ensuring the stability and reliability of the clamping action. In summary, the motion control method provided by this invention effectively improves the accuracy, flexibility, and efficiency of the clamping process through precise object contour recognition, path planning, and servo control.

[0151] Figure 3 This is a schematic diagram of a terminal device provided in an embodiment of the present invention. Figure 3As shown, a terminal device 3 in this embodiment includes: a processor 30, a memory 31, and a computer program 32 stored in the memory 31 and executable on the processor 30, such as a motion control program. When the processor 30 executes the computer program 32, it implements the steps described in the various motion control method embodiments above, for example... Figure 1 Steps 101 to 105 are shown. Alternatively, when the processor 30 executes the computer program 32, it implements the functions of each unit in the above-described device embodiments, for example... Figure 2 The functions of units 21 to 25 are shown.

[0152] For example, the computer program 32 can be divided into one or more units, which are stored in the memory 31 and executed by the processor 30 to complete the present invention. The one or more units can be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program 32 in the terminal device 3. For example, the specific functions of each unit of the computer program 32 can be divided as follows:

[0153] The acquisition unit is used to acquire real-time images of the object to be clamped through the industrial vision module;

[0154] The extraction unit is used to extract the initial object contour edge poles corresponding to the object to be clamped in the real-time image;

[0155] The identification unit is used to identify feature points located around the object to be clamped;

[0156] The determining unit is used to determine the actual object contour edge poles based on the spatial distribution relationship between the feature points and the initial object contour edge poles;

[0157] The calculation unit is used to calculate the clamping position and motion path based on the position information of the extreme points of the actual object's contour edge;

[0158] The control unit is used to control the servo motion module to perform object clamping motion based on the clamping position and the motion path.

[0159] The terminal device includes, but is not limited to, a processor 30 and a memory 31. Those skilled in the art will understand that... Figure 3 This is merely an example of a terminal device 3 and does not constitute a limitation on a terminal device 3. It may include more or fewer components than shown, or combine certain components, or different components. For example, the terminal device may also include input / output devices, network access devices, buses, etc.

[0160] The processor 30 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0161] The memory 31 can be an internal storage unit of the terminal device 3, such as a hard disk or memory of the terminal device 3. The memory 31 can also be an external storage device of the terminal device 3, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the terminal device 3. Furthermore, the memory 31 can include both internal and external storage units of the terminal device 3. The memory 31 is used to store the computer program and other programs and data required by the roaming control device. The memory 31 can also be used to temporarily store data that has been output or will be output.

[0162] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0163] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of the present invention. For details on their specific functions and technical effects, please refer to the method embodiments section, which will not be repeated here.

[0164] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this invention. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0165] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.

[0166] This invention provides a computer program product that, when run on a mobile terminal, enables the mobile terminal to implement the steps described in the above-described method embodiments.

[0167] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to a photographing device / terminal device, a recording medium, a computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0168] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0169] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0170] In the embodiments provided by this invention, it should be understood that the disclosed apparatus / network devices and methods can be implemented in other ways. For example, the apparatus / network device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0171] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units.

[0172] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0173] It should also be understood that the term “and / or” as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0174] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [the described condition or event] is detected" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once [the described condition or event] is detected," or "in response to detection of [the described condition or event]."

[0175] Furthermore, in the description of this invention and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0176] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of the invention include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0177] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A motion control method, characterized in that, The motion control method is applied to an industrial control system, which includes an industrial vision module and a servo motion module. The motion control method includes: The industrial vision module acquires real-time images of the object to be clamped. Extract the initial object contour edge extremes corresponding to the object to be clamped in the real-time image; Identify feature points located around the object to be clamped; Based on the spatial distribution relationship between the feature points and the edge poles of the initial object contour, the actual object contour edge poles are determined; The clamping position and motion path are calculated based on the position information of the extreme points of the actual object's contour edge. Based on the clamping position and the motion path, the servo motion module is controlled to perform object clamping motion; The step of determining the actual object contour edge poles based on the spatial distribution relationship between the feature points and the initial object contour edge poles includes: Calculate the distances between the feature points and the multiple initial object contour edge poles respectively; The lengths of opposite sides are calculated based on the triangles formed between the feature points and the multiple initial object contour edge poles and the cosine function. Sort the lengths of the multiple opposite sides from largest to smallest, and determine the extreme points of the actual object contour edge based on the difference relationship between the lengths of the multiple opposite sides; The step of sorting the lengths of multiple opposite sides from largest to smallest and determining the extreme points of the actual object contour edge based on the difference relationship between the lengths of multiple opposite sides includes: Extract the lengths of the fifth, sixth, seventh, eighth, ninth, tenth, eleventh, and twelfth opposite edges based on the order. Calculate the first difference between the lengths of the fifth and sixth opposite sides; Calculate the second difference between the lengths of the seventh and eighth opposite sides; Calculate the third difference between the lengths of the ninth and tenth opposite sides; Calculate the fourth difference between the lengths of the eleventh and twelfth opposite sides; If the first difference, the second difference, the third difference, and the fourth difference are all less than a preset distance, then the initial object contour edge pole is taken as the actual object contour edge pole. If the first difference, the second difference, the third difference, or the fourth difference is not less than a preset distance, then the initial object contour edge poles are re-extracted, and the actual object contour edge poles are selected from the new initial object contour edge poles.

2. The motion control method as described in claim 1, characterized in that, The step of extracting the initial object contour edge poles corresponding to the object to be clamped in the real-time image includes: The real-time image is binarized to obtain a binarized image; Extract the first pixel corresponding to the first pixel value and the second pixel corresponding to the second pixel value from the binarized image; the first pixel value refers to the pixel value corresponding to the object to be clamped; the second pixel value refers to the pixel value corresponding to the object not to be clamped. Based on each of the first pixels, obtain a fixed-size pixel region centered on the first pixel; Calculate the ratio between the number of second pixel values ​​and the number of first pixel values ​​in the fixed-size pixel region; If the ratio is within a preset range, then the first pixel corresponding to the ratio is taken as the first edge pole. The initial object contour edge poles are extracted based on the pixel features of the pixel regions surrounding the multiple first edge poles.

3. The motion control method as described in claim 2, characterized in that, The step of extracting the initial object contour edge poles based on the pixel features of the pixel regions surrounding the multiple first edge poles includes: Sort the ratios corresponding to multiple first marginal poles from largest to smallest, and extract the top four first marginal poles as the current poles; Obtain the four adjacent pixel regions of the fixed-size pixel region corresponding to the current pole; the adjacent pixel region refers to the four pixel regions that are adjacent to the four sides of the fixed-size pixel region, and the number of pixels in the adjacent pixel region is the same as that in the fixed-size pixel region; Extract target adjacent pixel regions from the four adjacent pixel regions where the number of second pixel values ​​is greater than a preset number; If the number of adjacent pixel regions of the target is two, then the current pole is determined to be the initial object contour edge pole; If the number of adjacent pixel regions of the target is not two, then the subsequent first edge poles are extracted according to the sorting and matched with the initial object contour edge poles.

4. The motion control method as described in claim 1, characterized in that, The step of identifying feature points located around the object to be clamped includes: By identifying preset marker points or QR codes located around the object to be clamped, the midpoint of the preset marker points or the QR codes is taken as the feature point.

5. The motion control method as described in claim 1, characterized in that, The step of calculating the clamping position and motion path based on the position information of the edge poles of the actual object contour includes: Calculate the center of the surface of the object to be clamped based on the extreme points of the actual object's contour edge; A motion planning algorithm is used to calculate the motion path of the clamping part from its current position to the center of the surface of the object to be clamped. The motion path is discretized into trajectory points and pose information; The object clamping motion is performed by executing the trajectory points and pose information through the servo motion module.

6. A motion control device, characterized in that, The motion control device includes: The acquisition unit is used to acquire real-time images of the object to be clamped through the industrial vision module; The extraction unit is used to extract the initial object contour edge poles corresponding to the object to be clamped in the real-time image; The identification unit is used to identify feature points located around the object to be clamped; The determining unit is used to determine the actual object contour edge poles based on the spatial distribution relationship between the feature points and the initial object contour edge poles; The calculation unit is used to calculate the clamping position and motion path based on the position information of the extreme points of the actual object's contour edge; The control unit is used to control the servo motion module to perform object clamping motion based on the clamping position and the motion path; The step of determining the actual object contour edge poles based on the spatial distribution relationship between the feature points and the initial object contour edge poles includes: Calculate the distances between the feature points and the multiple initial object contour edge poles respectively; The lengths of opposite sides are calculated based on the triangles formed between the feature points and the multiple initial object contour edge poles and the cosine function. Sort the lengths of the multiple opposite sides from largest to smallest, and determine the extreme points of the actual object contour edge based on the difference relationship between the lengths of the multiple opposite sides; The step of sorting the lengths of multiple opposite sides from largest to smallest and determining the edge extremes of the actual object contour based on the difference relationship between the lengths of multiple opposite sides includes: Extract the lengths of the fifth, sixth, seventh, eighth, ninth, tenth, eleventh, and twelfth opposite edges based on the order. Calculate the first difference between the lengths of the fifth and sixth opposite sides; Calculate the second difference between the lengths of the seventh and eighth opposite sides; Calculate the third difference between the lengths of the ninth and tenth opposite sides; Calculate the fourth difference between the lengths of the eleventh and twelfth opposite sides; If the first difference, the second difference, the third difference, and the fourth difference are all less than a preset distance, then the initial object contour edge pole is taken as the actual object contour edge pole. If the first difference, the second difference, the third difference, or the fourth difference is not less than a preset distance, then the initial object contour edge poles are re-extracted, and the actual object contour edge poles are selected from the new initial object contour edge poles.

7. A terminal device, characterized in that, The terminal device includes: a memory, a processor, and a motion control program stored in the memory and executable on the processor, the motion control program being configured to implement the steps of the motion control method as described in any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • A monocular vision positioning-based rotor unmanned aerial vehicle attitude estimation method

    CN109949361A

  • Corner detection method and apparatus

    WO2024016686A1