Numerical control lathe visual positioning system and method

By using vibrating disc automatic feeding module, robotic grasping module, visual recognition module and other components on CNC lathes, combined with visual recognition and image processing technology, high-precision and automated positioning of workpieces are achieved, solving the problems of low accuracy and poor adaptability of existing CNC lathe positioning methods, and improving processing accuracy and production efficiency.

CN120161786AInactive Publication Date: 2025-06-17HUIZHOU XINYUHAO ELECTRONIC TECHNOLOGY CO LTD

Patent Information

Application Number
CN202510236264.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-06-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing CNC lathe positioning methods have problems of low accuracy and poor adaptability, which is difficult to meet the manufacturing industry's demand for improving processing accuracy and production efficiency.

Method used

The automatic feeding module of the vibration disc, the robot grasping module, the visual recognition module, the rack feeding module and the CNC machining module are adopted with communication connection. Through visual recognition and image processing technology, high-precision and automatic positioning of the workpiece are achieved.

Benefits of technology

It realizes high-precision and automated positioning of the workpiece, improves processing accuracy and production efficiency, and solves the problems of low accuracy and poor adaptability of traditional positioning methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120161786A_ABST
    Figure CN120161786A_ABST
Patent Text Reader

Abstract

The invention discloses a numerical control lathe visual positioning system and method, and the system comprises a vibration disc automatic feeding module which is used for automatically providing target workpieces, arranging the target workpieces in order, and outputting the target workpieces one by one; the manipulator grabbing module is used for determining initial coordinate information of a target workpiece grabbed by a manipulator; the visual identification module is used for acquiring a multi-angle image of the target workpiece and calculating the position deviation and the angle deviation of the target workpiece relative to the standard workpiece so as to determine visual positioning information of the target workpiece; the truss feeding module is used for grabbing the target workpiece subjected to visual positioning according to the visual positioning information and transferring the target workpiece to a machining area of the numerical control lathe; the numerical control machining module is used for machining a target workpiece based on a preset machining program, the problems that an existing numerical control lathe positioning mode is low in precision, poor in adaptability and the like are solved, high-precision and automatic positioning of the workpiece is achieved, and the machining precision and the production efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of numerical control lathe machining, and particularly relates to a visual positioning system and method for a numerical control lathe. Background Art

[0002] During the machining process of a numerical control lathe, accurate workpiece positioning is crucial for ensuring machining accuracy and product quality. Traditional numerical control lathe positioning methods usually rely on manual operation or mechanical positioning devices. Manual operation is prone to introducing errors and has low efficiency; while mechanical positioning devices can improve positioning accuracy to a certain extent, but they have poor adaptability to workpieces with complex shapes or different specifications. With the continuous improvement of the requirements for machining accuracy and production efficiency in the manufacturing industry, the existing positioning methods are difficult to meet the actual production needs. Therefore, developing a visual positioning system and method for a numerical control lathe that can achieve high-precision and automated positioning has become an urgent technical problem to be solved. Summary of the Invention

[0003] The purpose of the present invention is to provide a visual positioning system and method for a numerical control lathe to solve the deficiencies in the prior art. By providing a visual positioning system and method for a numerical control lathe, problems such as low accuracy and poor adaptability existing in the existing numerical control lathe positioning methods are solved, high-precision and automated positioning of workpieces is achieved, and machining accuracy and production efficiency are improved.

[0004] An embodiment of the present application provides a visual positioning system for a numerical control lathe, and the system includes:

[0005] A vibrating bowl automatic feeding module, a manipulator grasping module, a visual recognition module, a gantry feeding module, and a numerical control machining module that are communicatively connected; wherein,

[0006] The vibrating bowl automatic feeding module is used to automatically provide target workpieces, and arrange and output the target workpieces in an orderly manner one by one;

[0007] The manipulator grasping module is used to determine the initial coordinate information of the manipulator to grasp the target workpiece by real-time monitoring of the position of the target workpiece output by the vibrating bowl according to a preset grasping strategy;

[0008] The visual recognition module is used to obtain multi-angle images of the target workpiece, and extract the target features of the target workpiece through a preset image processing algorithm and feature extraction and matching algorithms, and compare the target features with the pre-stored standard workpiece features, and calculate the position deviation and angle deviation of the target workpiece relative to the standard workpiece to determine the visual positioning information of the target workpiece; the visual positioning information includes the target posture and target coordinate information of the target workpiece;

[0009] The gantry feeding module is used to grasp the target workpiece located by vision according to the vision positioning information and transfer the target workpiece to the machining area of the CNC lathe;

[0010] The numerical control machining module is used to receive the feeding signal sent by the gantry feeding module and perform machining on the target workpiece based on a preset machining program.

[0011] Optionally, automatically providing the target workpiece, arranging the target workpieces in an orderly manner, and outputting them one by one includes:

[0012] Determining the machining trajectory of the target workpiece according to the preset machining process of the CNC lathe;

[0013] Setting an automatic arrangement rule and calculating the initial position information of the target workpiece;

[0014] Selecting a preset control algorithm, and arranging and outputting the target workpieces in an orderly manner according to the machining trajectory and initial position information of the target workpiece.

[0015] Optionally, according to the preset grasping strategy, by real-time monitoring of the position of the target workpiece output by the vibrating bowl, determining the initial coordinate information of the manipulator to grasp the target workpiece includes:

[0016] Collecting an initial image of the graspable area of the target workpiece position through the vision unit of the vibrating bowl;

[0017] Performing preprocessing on the initial image, and according to the preprocessing result, using a path planning algorithm to plan the grasping path of the manipulator, and combining with a preset control algorithm to determine the initial coordinate information of the manipulator to grasp the target workpiece.

[0018] Optionally, performing preprocessing on the initial image, and according to the preprocessing result, using a path planning algorithm to plan the grasping path of the manipulator, and combining with a preset control algorithm to determine the initial coordinate information of the manipulator to grasp the target workpiece includes:

[0019] Converting the initial image into a grayscale image using the weighted average method; wherein, the weight values of the red, green, and blue channels of the grayscale image are 0.587, 0.299, and 0.114 respectively;

[0020] Based on the grayscale image, extracting the edge contour, shape, and size information of the target workpiece;

[0021] According to the edge contour, shape, and size information of the target workpiece, and converting the path planning problem into a multi-knapsack problem, using the K-means clustering algorithm, and minimizing the variance of the grasping path to determine the initial coordinate information of the manipulator to grasp the target workpiece.

[0022] Optionally, extracting the edge contour, shape, and dimension information of the target workpiece based on the grayscale image includes:

[0023] Using an edge detection algorithm to determine the edge contour of the target workpiece;

[0024] Utilizing deep learning image recognition technology, inputting the edge contour of the target workpiece through a pre-trained convolutional neural network model to determine the shape and dimension information of the target workpiece.

[0025] Optionally, based on the edge contour, shape, and dimension information of the target workpiece, transforming the path planning problem into a multi-knapsack problem, and using the K-means clustering algorithm to minimize the variance of the grasping path to determine the initial coordinate information of the manipulator to grasp the target workpiece, including:

[0026] Constructing a value matrix according to the edge contour, shape, and dimension information of the target workpiece;

[0027] Performing normalization processing on the value matrix;

[0028] According to the normalized value matrix, using the elbow method to determine the number of clusters and calculate the variance of all grasping paths within each cluster;

[0029] According to the variance of all grasping paths within each cluster, adjusting the path planning parameters to minimize the variance of the grasping path to determine the initial coordinate information of the manipulator to grasp the target workpiece.

[0030] Optionally, obtaining multi-angle images of the target workpiece and extracting the target features of the target workpiece through a preset image processing algorithm and feature extraction and matching algorithms, including:

[0031] Collecting multi-angle images of the target workpiece through a vibrating bowl vision unit;

[0032] Using a preset image processing algorithm to perform preprocessing on the multi-angle images;

[0033] Using an edge feature extraction algorithm and a key feature extraction algorithm to determine the key feature elements of the target workpiece;

[0034] Based on the key feature elements and matching algorithms, determining the target features of the target workpiece.

[0035] Another embodiment of the present application provides a numerical control lathe vision positioning method, and the method includes:

[0036] Obtaining the target workpiece and the initial coordinate information of the target workpiece;

[0037] According to the initial coordinate information, obtaining multi-angle images of the target workpiece;

[0038] Process the multi-angle images through a preset image processing algorithm and feature extraction and matching algorithms, extract the target features of the target workpiece, and compare the target features with the standard workpiece features stored in advance to calculate the position deviation and angle deviation of the target workpiece relative to the standard workpiece, so as to determine the visual positioning information of the target workpiece; the visual positioning information includes the target posture and target coordinate information of the target workpiece;

[0039] According to the visual positioning information, grasp the visually positioned target workpiece, and transfer the target workpiece to the machining area of the numerically controlled lathe, and perform machining on the target workpiece based on a preset machining program.

[0040] Another embodiment of the present application provides a storage medium, in which a computer program is stored, and the computer program is configured to implement the above-mentioned method when running.

[0041] Another embodiment of the present application provides an electronic device, including a memory and a processor, a computer program is stored in the memory, and the processor is configured to run the computer program to implement the above-mentioned method.

[0042] Compared with the prior art, the present application includes a vibrating bowl automatic feeding module, a manipulator grasping module, a visual recognition module, a gantry feeding module, and a numerical control machining module connected through communication; among them, the vibrating bowl automatic feeding module is used to automatically provide target workpieces, arrange the target workpieces in an orderly manner, and output them one by one; the manipulator grasping module is used to determine the initial coordinate information of the manipulator to grasp the target workpiece by real-time monitoring of the position of the target workpiece output by the vibrating bowl according to a preset grasping strategy; the visual recognition module is used to obtain multi-angle images of the target workpiece, and through a preset image processing algorithm and feature extraction and matching algorithms, extract the target features of the target workpiece, and compare the target features with the standard workpiece features stored in advance to calculate the position deviation and angle deviation of the target workpiece relative to the standard workpiece, so as to determine the visual positioning information of the target workpiece; the gantry feeding module is used to grasp the visually positioned target workpiece according to the visual positioning information and transfer the target workpiece to the machining area of the numerically controlled lathe; the numerical control machining module is used to receive the feeding signal sent by the gantry feeding module and perform machining on the target workpiece based on a preset machining program. Solve the problems of low accuracy and poor adaptability existing in the existing positioning methods of numerically controlled lathes, realize high-precision and automatic positioning of workpieces, and improve machining accuracy and production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a hardware structure block diagram of a computer terminal for a numerical control lathe visual positioning method provided by an embodiment of the present invention;

[0044] Figure 2 Schematic structural diagram of a visual positioning system for a numerically controlled lathe provided by an embodiment of the present invention;

[0045] Figure 3 Schematic flow diagram of a visual positioning method for a numerically controlled lathe provided by an embodiment of the present invention. Detailed implementation manners

[0046] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0047] An embodiment of the present invention first provides a visual positioning method for a numerically controlled lathe. This method can be applied to electronic devices, such as computer terminals, specifically ordinary computers, tablets, etc.

[0048] The following takes running on a computer terminal as an example to describe it in detail. Figure 1 Hardware structure block diagram of a computer terminal for a visual positioning method for a numerically controlled lathe provided by an embodiment of the present invention. As Figure 1 shown, this computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, the memory can include a non-volatile storage medium and an internal memory.

[0049] The non-volatile storage medium can store an operating system and computer programs. These computer programs include program instructions. When these program instructions are executed, the processor can execute any visual positioning method for a numerically controlled lathe.

[0050] The processor is used to provide computing and control capabilities to support the operation of the entire computer device.

[0051] The internal memory provides an environment for the operation of the computer programs in the non-volatile storage medium. When these computer programs are executed by the processor, the processor can execute any visual positioning method for a numerically controlled lathe.

[0052] This network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art can understand that Figure 1 the structure shown in is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0053] It should be understood that the processor can be a Central Processing Unit (CPU), and the processor can also be 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. Among them, the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0054] See Figure 2 , Figure 2 FIG. is a schematic structural diagram of a vision positioning system for a numerically controlled lathe provided by an embodiment of the present invention. The vision positioning system 200 for a numerically controlled lathe may include: a vibrating bowl automatic feeding module 201, a manipulator grasping module 202, a vision recognition module 203, a gantry feeding module 204, and a numerical control machining module 205 that are communicatively connected; wherein, the vibrating bowl automatic feeding module 201 is configured to automatically provide target workpieces, and orderly arrange and output the target workpieces one by one; the manipulator grasping module 202 is configured to determine the initial coordinate information of the manipulator to grasp the target workpiece by real-time monitoring of the position of the target workpiece output by the vibrating bowl according to a preset grasping strategy; the vision recognition module 203 is configured to obtain multi-angle images of the target workpiece, and extract target features of the target workpiece through a preset image processing algorithm and feature extraction and matching algorithms, and compare the target features with the pre-stored standard workpiece features to calculate the position deviation and angle deviation of the target workpiece relative to the standard workpiece, so as to determine the vision positioning information of the target workpiece; the vision positioning information includes the target posture and target coordinate information of the target workpiece; the gantry feeding module 204 is configured to grasp the target workpiece that has been visually positioned according to the vision positioning information, and transfer the target workpiece to the machining area of the numerically controlled lathe; the numerical control machining module 205 is configured to receive the feeding signal sent by the gantry feeding module, and perform machining on the target workpiece based on a preset machining program.

[0055] Specifically, the vibrating bowl automatic feeding module 201 is responsible for automatically providing target workpieces and ensuring that the workpieces are output one by one in an orderly arrangement. For example, through the vibration of the vibrating bowl, the workpieces move in the bowl along a certain trajectory and speed until they are sent out one by one. The manipulator grasping module 202 can, according to the preset grasping strategy, real-time monitor the position of the workpieces output by the vibrating bowl and determine the initial grasping coordinate information of the manipulator. It has high-precision positioning and grasping capabilities, can accurately grasp the target workpiece, and lift it stably. The vision recognition module 203 acquires multi-angle images of the workpiece, extracts target features through image processing algorithms, and compares them with standard features to determine the position deviation and angle deviation of the workpiece. It adopts advanced vision recognition technology, can achieve rapid and accurate recognition of the workpiece, and output detailed vision positioning information. The gantry feeding module 204 can, according to the vision positioning information, grasp the accurately positioned workpiece and transfer it to the machining area of the CNC lathe. It has flexible moving and grasping capabilities and can perform precise transfer operations according to the positioning and posture information of the workpiece. The CNC machining module 205 can receive the feeding signal sent by the gantry feeding module and process the workpiece based on the preset machining program.

[0056] The vision positioning system of the CNC lathe is fully automated from feeding to machining, reducing manual intervention and improving production efficiency. Through the vision recognition module and precise grasping strategy, it ensures the precise positioning and machining accuracy of the workpiece.

[0057] In an alternative embodiment, the automatically providing the target workpiece and arranging and outputting the target workpieces in an orderly manner one by one may include:

[0058] 1. Determine the machining trajectory of the target workpiece according to the preset machining process of the CNC lathe;

[0059] 2. Set an automatic arrangement rule and calculate the initial position information of the target workpiece;

[0060] 3. Select a preset control algorithm, and according to the machining trajectory and initial position information of the target workpiece, arrange and output the target workpieces in an orderly manner.

[0061] Specifically, determining the machining trajectory of the target workpiece according to the preset machining process of the CNC lathe includes information such as the moving path, rotation angle, machining point position, etc. of the target workpiece during the machining process. The determination of the machining trajectory is to ensure that the workpiece can proceed along the predetermined path and manner in each link of feeding, grasping, transferring, and machining.

[0062] Then, according to the shape, size, and processing requirements of the target workpiece, set the automatic arrangement rules, which may include the arrangement method of the target workpiece in the vibrating bowl, the distance between adjacent workpieces, the spacing between the workpiece and the edge of the vibrating bowl, etc. The setting of the automatic arrangement rules is to ensure that the target workpiece can be stably and orderly arranged in the vibrating bowl and facilitate subsequent grasping and transfer operations.

[0063] Calculate the initial position information of the target workpiece according to the automatic arrangement rules and the processing trajectory. The initial position information includes the starting position, arrangement direction, and relative position between adjacent workpieces of the target workpiece in the vibrating bowl.

[0064] Finally, according to the processing trajectory and the initial position information of the target workpiece, select a preset control algorithm. The preset control algorithm needs to include the setting of parameters such as the vibration frequency, vibration direction, and grasping timing of the vibrating bowl. The selection of the preset control algorithm is to ensure that the vibrating bowl can output workpieces in a predetermined manner and rhythm, while ensuring that the manipulator can accurately grasp the workpiece and transfer it to the next link. Under the control of the preset control algorithm, the vibrating bowl starts to vibrate and arranges the workpieces in an orderly manner according to the set arrangement rules and processing trajectory. When the target workpiece is arranged in the predetermined position, the vibrating bowl stops vibrating, and the manipulator grasps the workpiece according to the initial position information and takes it out of the vibrating bowl. Subsequently, the manipulator transfers the workpiece to the next link (such as the vision recognition module) for subsequent processing and handling.

[0065] In summary, through precise calculations and control algorithms, this process realizes the orderly arrangement and individual output of the target workpiece, providing a stable and reliable workpiece source for subsequent grasping, transfer, and processing links.

[0066] Among them, the determination of the initial coordinate information for the manipulator to grasp the target workpiece by real-time monitoring of the position of the target workpiece output by the vibrating bowl according to the preset grasping strategy may include:

[0067] Step 1: Collect the initial image of the graspable area of the target workpiece position through the vibrating bowl vision unit;

[0068] Step 2: Perform preprocessing on the initial image. According to the preprocessing results, use a path planning algorithm to plan the grasping path of the manipulator, and combine it with the preset control algorithm to determine the initial coordinate information for the manipulator to grasp the target workpiece.

[0069] The process of determining the initial coordinate information for the robotic arm to grasp mainly involves collecting the initial image of the target workpiece's graspable area through the vision unit of the vibrating bowl (such as a camera). Then, preprocessing is performed on the collected initial image, and the preprocessing steps can include image denoising, contrast enhancement, edge detection, etc., to improve the quality and clarity of the image for subsequent feature extraction and recognition. Based on the preprocessed image results, a path planning algorithm is used to plan the grasping path of the robotic arm. Among them, the path planning algorithm takes into account the shape, size, position of the target workpiece and the kinematic characteristics of the robotic arm (such as joint angles, motion ranges, etc.) to ensure that the robotic arm can grasp the target workpiece in the most effective way. On the basis of path planning, combined with preset control algorithms to determine the initial grasping coordinate information of the robotic arm, these control algorithms can include position control, speed control, acceleration control, etc., to ensure that the robotic arm can accurately move to the target position and grasp the workpiece at an appropriate speed and acceleration. Through the above steps, the initial coordinate information for the robotic arm to grasp the target workpiece is finally determined, and the initial coordinate information can include the starting position, target position, motion trajectory of the robotic arm and the posture during grasping, etc.

[0070] In summary, the above process realizes the accurate recognition and positioning of the target workpiece's position and the accurate grasping of the robotic arm through the combination of image acquisition, preprocessing, path planning and control algorithms, providing strong support for subsequent processing and handling links.

[0071] In an alternative embodiment, the execution of preprocessing the initial image, based on the preprocessing results, using a path planning algorithm to plan the grasping path of the robotic arm, and combining preset control algorithms to determine the initial grasping coordinate information of the robotic arm for grasping the target workpiece may include:

[0072] Step 2-1: Convert the initial image into a grayscale image using the weighted average method; wherein, the weight values of the red, green, and blue channels of the grayscale image are 0.587, 0.299, and 0.114 respectively;

[0073] Step 2-2: Based on the grayscale image, extract the edge contour, shape, and size information of the target workpiece;

[0074] Step 2-3: According to the edge contour, shape, and size information of the target workpiece, and transforming the path planning problem into a multi-knapsack problem, use the K-means clustering algorithm and minimize the variance of the grasping path to determine the initial grasping coordinate information of the robotic arm for grasping the target workpiece.

[0075] Specifically, the initial image is converted into a grayscale image using the weighted average method. This method calculates the grayscale value of each pixel by assigning different weight values (e.g., 0.587, 0.299, 0.114) to the red, green, and blue channels, thereby generating a grayscale image. The grayscale image simplifies the image information and reduces the computational complexity of subsequent processing. Subsequently, based on the grayscale image, the edge contour, shape, and size information of the target workpiece are extracted. For example, it can be achieved through edge detection algorithms (such as Canny edge detection), shape analysis algorithms (such as Hough transform, contour tracking, etc.), and size measurement algorithms.

[0076] Exemplarily, the extracting the edge contour, shape, and size information of the target workpiece based on the grayscale image may include:

[0077] Step 2-2-1: Use an edge detection algorithm to determine the edge contour of the target workpiece;

[0078] Step 2-2-2: Utilize deep learning image recognition technology. Through a pre-trained convolutional neural network model, input the edge contour of the target workpiece to determine the shape and size information of the target workpiece.

[0079] Specifically, edge detection is a basic step in image processing used to determine the positions where the brightness changes significantly in the image, and these positions usually correspond to the boundaries of objects. Edge detection algorithms (such as Sobel operator, Laplacian operator, etc.) are used to process the grayscale image to identify the edge contour of the target workpiece. The edge detection algorithm analyzes the change in grayscale values of pixels in the image to find the position with the maximum gradient, which is the edge position.

[0080] Subsequently, based on edge detection, deep learning image recognition technology is further used to determine the shape and size information of the target workpiece. In this application, a pre-trained convolutional neural network (CNN) model is used to process the edge contour image, and it can automatically extract useful features from the original image data through learning.

[0081] Based on the pre-trained CNN model in this application, when the edge contour of the target workpiece is input into the CNN model, the model can identify features similar to those in the training data and accordingly determine the shape and size information of the target workpiece.

[0082] It should be noted that the combination of edge detection algorithms and deep learning image recognition technology can achieve accurate recognition of the edge contour, shape, and size of the target workpiece. This helps to improve the grasping accuracy of the manipulator and the overall performance of the system. The deep learning model has strong generalization ability and can recognize and process workpieces of different shapes and sizes.

[0083] Finally, the path planning problem is transformed into a multi-knapsack problem. This is an optimization problem where each "knapsack" represents a possible grasping path of the manipulator, and the "items" represent the target workpieces to be grasped. The goal of the problem is to select the optimal path combination under certain constraints, such as time, energy, the movement range of the manipulator, etc., to minimize a certain cost, such as path length, grasping time, etc.

[0084] A method based on the K-means clustering algorithm is used to handle the transformed multi-knapsack problem. K-means clustering is an unsupervised learning algorithm used to partition a dataset into K clusters such that the data points within the same cluster are as similar as possible, while the data points between different clusters are as different as possible. In this application, the position information of the target workpieces can be used as the input data, and they are divided into K groups through the K-means clustering algorithm, with each group representing a possible grasping path. Based on the application of the K-means clustering algorithm, the variance of the grasping paths is minimized to further optimize the grasping paths. Minimizing the variance means that when selecting the grasping paths, the differences between the paths, that is, the variance, are minimized as much as possible, so as to ensure that the manipulator can grasp the target workpieces in a stable and consistent manner, which may involve further analysis and adjustment of the clustering results to find the optimal combination of grasping paths.

[0085] In an alternative embodiment, the method of determining the initial coordinate information of the manipulator for grasping the target workpiece according to the edge contour, shape, and size information of the target workpiece, transforming the path planning problem into a multi-knapsack problem, using the K-means clustering algorithm, and minimizing the variance of the grasping paths may include:

[0086] Step 2-3-1: Construct a value matrix according to the edge contour, shape, and size information of the target workpiece;

[0087] Step 2-3-2: Perform normalization processing on the value matrix;

[0088] Step 2-3-3: Determine the number of clusters using the elbow method according to the normalized value matrix and calculate the variance of all grasping paths within each clustering cluster;

[0089] Step 2-3-4: Adjust the path planning parameters according to the variance of all grasping paths within each clustering cluster to minimize the variance of the grasping paths, so as to determine the initial coordinate information of the manipulator for grasping the target workpiece.

[0090] Specifically, according to the edge contour, shape, and size information of the target workpiece, a value matrix is constructed. This matrix can include multiple dimensions, such as the size of the workpiece, the complexity of the shape, the position of the grasping point, etc. Each dimension corresponds to a value or grasping cost, which is used to evaluate the advantages and disadvantages of different grasping paths. Subsequently, normalization processing of the value matrix is performed. Normalization is a process of converting data of different dimensions or different units of measurement to the same scale to ensure that each dimension has the same weight when evaluating the quality of the path. Finally, the elbow method is used to determine the number of K-means clusters. The elbow method is a method for determining the optimal number of clusters, which is determined by observing the "elbow" position of the clustering results. At the elbow position, the performance improvement brought by increasing the number of clusters becomes no longer significant, so it is considered the optimal number of clusters. According to the normalized value matrix, the grasping paths are divided into K clusters using the K-means clustering algorithm. Then, the variance of all grasping paths within each clustering cluster is calculated. According to the variance of the grasping paths within each clustering cluster, the path planning parameters are adjusted to minimize the variance of the grasping paths, that is, to find an optimal path combination so that the manipulator can grasp the target workpiece in a stable and consistent manner.

[0091] Through the above steps, the initial coordinate information of the manipulator grasping the target workpiece is finally determined. This information includes the starting position of the manipulator, the coordinates of the grasping point, the motion trajectory, and the posture during grasping, etc. This information will be used to control the motion of the manipulator to achieve accurate grasping operations.

[0092] In an alternative embodiment, the obtaining of multi-angle images of the target workpiece and the extraction of target features of the target workpiece through a preset image processing algorithm and feature extraction and matching algorithms may include:

[0093] Step A. Collect multi-angle images of the target workpiece through a vibrating bowl vision unit;

[0094] Step B. Use a preset image processing algorithm to perform preprocessing on the multi-angle images;

[0095] Step C. Use an edge feature extraction algorithm and a key feature extraction algorithm to determine the key feature elements of the target workpiece;

[0096] Step D. Based on the key feature elements and a matching algorithm, determine the target features of the target workpiece.

[0097] Exemplarily, multi-angle images of the target workpiece are collected through a vibrating bowl vision unit; wherein, the vibrating bowl vision unit includes n image acquisition sub-units, and the parameter set of each image acquisition sub-unit i is represented as P i ={f i ,a i ,t i}, where fi is the focal length, a i is the aperture, t i is the exposure time; centered on the target workpiece, the acquisition angle of the image acquisition subunit is represented as θ j , the multi-angle image acquired by the image acquisition subunit i at the angle θ j is represented as I ij ;

[0098] Using a preset image processing algorithm, perform preprocessing on the multi-angle image; wherein, the preset image processing algorithm includes Gaussian filtering and image enhancement - histogram equalization processing; wherein, for the pixel (x, y) in the multi-angle image, the pixel value after Gaussian filtering is represented as:

[0099]

[0100] wherein, σ is the standard deviation of the Gaussian distribution, (s, t) are the coordinates of neighboring pixels; the gray value after image enhancement - histogram equalization processing is represented as: k

[0101]

[0102] wherein, h(r k ) represents the gray histogram of the multi-angle image, M and N represent the number of rows and columns of the multi-angle image, and (L - 1) represents the gray level range of the multi-angle image;

[0103] Using an edge feature extraction algorithm and a key feature extraction algorithm, determine the key feature elements of the target workpiece;

[0104] For example, through edge feature extraction - Canny edge detection, calculate the image gradient magnitude:

[0105]

[0106] wherein, G x , G y are the gradients in the x and y directions respectively; the gradient direction is further determined by non-maximum suppression and double-threshold processing to obtain the edge features.

[0107] Alternatively, by constructing a Gaussian difference pyramid, wherein, the Gaussian difference pyramid D(x, y, σ) satisfies:

[0108] D(x, y, σ) = (G(x, y, kσ) - G(x, y, σ))I(x, y)

[0109] G(x, y, σ) is the Gaussian kernel function, I(x, y) is the image, and by determining the extreme points as key points, key feature elements are generated accordingly.

[0110] Based on the key feature elements and the matching algorithm, determine the target features of the target workpiece.

[0111] Exemplarily, assume that the key feature elements of the target workpiece are represented as The key feature elements of the standard workpiece are represented Adopt Euclidean distance matching, through the distance To find the target feature point corresponding to the minimum distance.

[0112] Compare the target features with the pre-stored standard workpiece features, calculate the position deviation and angle deviation of the target workpiece relative to the standard workpiece, so as to determine the visual positioning information of the target workpiece; the visual positioning information includes the target posture and target coordinate information of the target workpiece.

[0113] Exemplarily, in a two-dimensional space, assume the position coordinates of the target workpiece are (x t , y t ), and the position coordinates of the standard workpiece are (x s , y s ), the position deviation Δx = x t - x s , Δy = y t - y s ; Using vector operations, assume the direction vector of the target workpiece The direction vector of the standard workpiece The angle deviation Determine the visual positioning information of the target workpiece, the complete deviation information D = (Δx, Δy, Δz, θ), the visual positioning information of the target workpiece

[0114] In summary, through steps such as multi-angle image acquisition, image preprocessing, feature extraction and matching, and deviation calculation, the visual positioning information of the target workpiece can be determined, including the target posture and target coordinate information. This provides important support for the subsequent processing of the target workpiece.

[0115] It can be seen that the present application includes a vibrating bowl automatic feeding module, a manipulator grasping module, a vision recognition module, a gantry feeding module, and a numerical control machining module connected by communication; wherein, the vibrating bowl automatic feeding module is used to automatically provide target workpieces, arrange the target workpieces in an orderly manner, and output them one by one; the manipulator grasping module is used to determine the initial coordinate information of the manipulator to grasp the target workpiece by real-time monitoring of the position of the target workpiece output by the vibrating bowl according to a preset grasping strategy; the vision recognition module is used to obtain multi-angle images of the target workpiece, extract the target features of the target workpiece through a preset image processing algorithm and feature extraction and matching algorithms, compare the target features with the standard workpiece features stored in advance, and calculate the position deviation and angle deviation of the target workpiece relative to the standard workpiece to determine the vision positioning information of the target workpiece; the gantry feeding module is used to grasp the visually positioned target workpiece according to the vision positioning information and transfer the target workpiece to the machining area of the numerical control lathe; the numerical control machining module is used to receive the feeding signal sent by the gantry feeding module and execute the machining of the target workpiece based on a preset machining program. This solves the problems of low accuracy and poor adaptability in the existing positioning methods of numerical control lathes, realizes high-precision and automated positioning of workpieces, and improves machining accuracy and production efficiency.

[0116] See Figure 3 , Figure 3 is a schematic flow chart of a vision positioning method for a numerical control lathe provided by an embodiment of the present invention, including:

[0117] S301: Obtain the target workpiece and the initial coordinate information of the target workpiece;

[0118] S302: Obtain multi-angle images of the target workpiece according to the initial coordinate information;

[0119] S303: Process the multi-angle images through a preset image processing algorithm and feature extraction and matching algorithms, extract the target features of the target workpiece, compare the target features with the standard workpiece features stored in advance, and calculate the position deviation and angle deviation of the target workpiece relative to the standard workpiece to determine the vision positioning information of the target workpiece; the vision positioning information includes the target posture and target coordinate information of the target workpiece;

[0120] S304: Grasp the visually positioned target workpiece according to the vision positioning information, transfer the target workpiece to the machining area of the numerical control lathe, and execute the machining of the target workpiece based on a preset machining program.

[0121] Specifically, first determine the initial position of the target workpiece on the CNC lathe, for example, by means of sensors, RFID tags, manual input, or other positioning methods. Subsequently, based on the initial coordinate information, use the vision system to collect images of the target workpiece from multiple angles. Preprocess the collected multi-angle images, including denoising, grayscale conversion, binarization, morphological processing, etc., to improve the image quality and reduce noise interference. Use algorithms such as edge detection, corner detection, and contour tracking to extract the key features of the target workpiece. Compare the extracted features with the pre-stored standard workpiece features, and use algorithms such as template matching and feature point matching to calculate the similarity. According to the matching result, calculate the position deviation and angle deviation of the target workpiece relative to the standard workpiece. Based on the deviation calculation result, determine the precise position and posture of the target workpiece in the vision coordinate system, including target coordinate information and target posture information. Finally, according to the vision positioning information, plan the grasping path and transfer path of the manipulator to ensure safe and efficient grasping of the target workpiece. Transfer the grasped target workpiece to the machining area of the CNC lathe for machining operations. Select a preset machining program according to the model, size, and other information of the target workpiece.

[0122] Compared with the prior art, the present application first obtains the target workpiece and the initial coordinate information of the target workpiece; according to the initial coordinate information, obtains multi-angle images of the target workpiece; processes the multi-angle images through preset image processing algorithms and feature extraction and matching algorithms, extracts the target features of the target workpiece, and compares the target features with the pre-stored standard workpiece features to calculate the position deviation and angle deviation of the target workpiece relative to the standard workpiece, so as to determine the vision positioning information of the target workpiece; finally, according to the vision positioning information, grasps the visually positioned target workpiece and transfers the target workpiece to the machining area of the CNC lathe, and executes the machining of the target workpiece based on a preset machining program. It solves the problems of low accuracy and poor adaptability existing in the existing positioning methods of CNC lathes, realizes high-precision and automated positioning of workpieces, and improves machining accuracy and production efficiency.

[0123] The embodiment of the present invention also provides a storage medium, in which a computer program is stored, and the computer program is configured to implement the steps in the above method embodiment when running.

[0124] Specifically, in this embodiment, the above storage medium can be configured to store a computer program for executing the following steps:

[0125] S301: Obtain the target workpiece and the initial coordinate information of the target workpiece;

[0126] S302: According to the initial coordinate information, obtain multi-angle images of the target workpiece;

[0127] S303: Process the multi - angle images through a preset image - processing algorithm and feature extraction and matching algorithms, extract the target features of the target workpiece, compare the target features with the standard workpiece features stored in advance, calculate the position deviation and angle deviation of the target workpiece relative to the standard workpiece, so as to determine the visual positioning information of the target workpiece; the visual positioning information includes the target posture and target coordinate information of the target workpiece.

[0128] S304: According to the visual positioning information, grasp the visually - positioned target workpiece, transfer the target workpiece to the machining area of the CNC lathe, and perform the machining of the target workpiece based on a preset machining program.

[0129] Specifically, in this embodiment, the above - mentioned storage medium may include, but is not limited to: USB flash drives, read - only memories (ROM for short), random access memories (RAM for short), mobile hard disks, magnetic disks, or optical discs, etc., all kinds of media that can store computer programs.

[0130] Compared with the prior art, this application first obtains the target workpiece and the initial coordinate information of the target workpiece; according to the initial coordinate information, obtains the multi - angle images of the target workpiece; processes the multi - angle images through a preset image - processing algorithm and feature extraction and matching algorithms, extracts the target features of the target workpiece, compares the target features with the standard workpiece features stored in advance, calculates the position deviation and angle deviation of the target workpiece relative to the standard workpiece, so as to determine the visual positioning information of the target workpiece; finally, according to the visual positioning information, grasps the visually - positioned target workpiece, transfers the target workpiece to the machining area of the CNC lathe, and performs the machining of the target workpiece based on a preset machining program. This solves the problems of low precision and poor adaptability existing in the existing positioning methods of CNC lathes, realizes high - precision and automated positioning of workpieces, and improves machining precision and production efficiency.

[0131] The embodiment of the present invention also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in the above - mentioned method embodiment.

[0132] Specifically, the above - mentioned electronic device may further include a transmission device and an input / output device. Among them, the transmission device is connected to the above - mentioned processor, and the input / output device is connected to the above - mentioned processor.

[0133] Specifically, in this embodiment, the above - mentioned processor may be configured to execute the following steps through a computer program:

[0134] S301: Obtain the target workpiece and the initial coordinate information of the target workpiece;

[0135] S302: Acquire multi - angle images of the target workpiece according to the initial coordinate information;

[0136] S303: Process the multi - angle images through a preset image - processing algorithm and a feature extraction and matching algorithm, extract the target features of the target workpiece, compare the target features with the standard workpiece features stored in advance, calculate the position deviation and angle deviation of the target workpiece relative to the standard workpiece, so as to determine the visual positioning information of the target workpiece; the visual positioning information includes the target posture and target coordinate information of the target workpiece;

[0137] S304: Grasp the visually positioned target workpiece according to the visual positioning information, transfer the target workpiece to the processing area of the numerical control lathe, and perform the processing of the target workpiece based on a preset processing program.

[0138] Compared with the prior art, the present application first obtains the target workpiece and the initial coordinate information of the target workpiece; acquires multi - angle images of the target workpiece according to the initial coordinate information; processes the multi - angle images through a preset image - processing algorithm and a feature extraction and matching algorithm, extracts the target features of the target workpiece, compares the target features with the standard workpiece features stored in advance, calculates the position deviation and angle deviation of the target workpiece relative to the standard workpiece, so as to determine the visual positioning information of the target workpiece; finally, grasps the visually positioned target workpiece according to the visual positioning information, transfers the target workpiece to the processing area of the numerical control lathe, and performs the processing of the target workpiece based on a preset processing program. It solves the problems of low precision and poor adaptability existing in the existing positioning methods of numerical control lathes, realizes high - precision and automated positioning of workpieces, and improves the processing precision and production efficiency.

[0139] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.

[0140] In the above embodiments, the descriptions of each embodiment have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0141] In several embodiments provided by the present invention, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the above division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical or other form.

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

[0143] In addition, in each embodiment of the present invention, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0144] If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the above methods in each embodiment of the present invention. And the aforementioned memory includes: various media such as USB flash drives, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), mobile hard disks, magnetic disks, or optical discs that can store program codes.

[0145] The above has introduced the embodiments of the present invention in detail. Specific examples are used in this article to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.

Claims

1. A visual positioning system for a CNC lathe, characterized in that: The system comprises: The vibration plate automatic feeding module, the robot grasping module, the visual recognition module, the rack feeding module and the CNC processing module are connected by communication; among them, The vibration plate automatic feeding module is used to automatically provide target workpieces, and arrange the target workpieces in order and output them one by one; The manipulator grasping module is used to determine the initial coordinate information of the manipulator grasping the target workpiece by real-time monitoring the position of the target workpiece output by the vibration plate according to the preset grasping strategy; The visual recognition module is used to obtain multi-angle images of the target workpiece, and extract the target features of the target workpiece through a preset image processing algorithm and a feature extraction and matching algorithm, and compare the target features with pre-stored standard workpiece features, and calculate the position deviation and angle deviation of the target workpiece relative to the standard workpiece to determine the visual positioning information of the target workpiece; the visual positioning information includes the target posture and target coordinate information of the target workpiece; The rack feeding module is used to grab the target workpiece that has been visually positioned according to the visual positioning information, and transfer the target workpiece to the processing area of ​​the CNC lathe; The CNC machining module is used to receive the feeding signal sent by the rack feeding module, and execute the machining of the target workpiece based on a preset machining program.

2. The system according to claim 1, characterized in that The method of automatically providing target workpieces, and arranging and outputting the target workpieces in order includes: Determine the machining trajectory of the target workpiece according to the preset machining process of the CNC lathe; Set automatic arrangement rules and calculate the initial position information of the target workpiece; A preset control algorithm is selected, and the target workpieces are arranged and output in order according to the processing trajectory and initial position information of the target workpieces.

3. The system according to claim 2, characterized in that The method of determining the initial coordinate information of the target workpiece to be grasped by the manipulator according to the preset grasping strategy by real-time monitoring the position of the target workpiece output by the vibration plate includes: The initial image of the graspable area of ​​the target workpiece position is collected by the vibration plate vision unit; The initial image is preprocessed, and according to the preprocessing result, a path planning algorithm is used to plan a grasping path of the manipulator, and a preset control algorithm is combined to determine the initial coordinate information of the manipulator grasping the target workpiece.

4. The system according to claim 3, characterized in that The performing of preprocessing of the initial image, planning a grasping path of the manipulator using a path planning algorithm according to the preprocessing result, and combining a preset control algorithm to determine the initial coordinate information of the manipulator grasping the target workpiece, includes: The initial image is converted into a grayscale image using a weighted average method; wherein the weight values ​​of the red, green, and blue channels of the grayscale image are 0.587, 0.299, and 0.114, respectively; Based on the grayscale image, extract edge contour, shape and size information of the target workpiece; According to the edge contour, shape and size information of the target workpiece, the path planning problem is transformed into a multi-knapsack problem. The K-means clustering algorithm is used to minimize the variance of the grasping path to determine the initial coordinate information of the manipulator grasping the target workpiece.

5. The system according to claim 4, characterized in that Extracting edge contour, shape and size information of the target workpiece based on the grayscale image includes: Adopt edge detection algorithm to determine the edge contour of the target workpiece; Using deep learning image recognition technology, the edge contour of the target workpiece is input through a pre-trained convolutional neural network model to determine the shape and size information of the target workpiece.

6. The system according to claim 5, characterized in that According to the edge contour, shape and size information of the target workpiece, the path planning problem is converted into a multi-knapsack problem, and a K-means clustering algorithm is used to minimize the variance of the grasping path to determine the initial coordinate information of the manipulator grasping the target workpiece, including: constructing a value matrix according to the edge profile, shape and size information of the target workpiece; Performing normalization processing on the value matrix; According to the normalized value matrix, the number of clusters is determined using the elbow rule and the variance of all grasping paths in each cluster is calculated. According to the variance of all grasping paths in each cluster, the path planning parameters are adjusted to minimize the variance of the grasping path to determine the initial coordinate information of the manipulator grasping the target workpiece.

7. The system according to claim 6, characterized in that The method of acquiring multi-angle images of the target workpiece and extracting target features of the target workpiece by using a preset image processing algorithm and a feature extraction and matching algorithm includes: Collect multi-angle images of the target workpiece through the vibration plate vision unit; Using a preset image processing algorithm, preprocessing the multi-angle image is performed; Using edge feature extraction algorithm and key feature extraction algorithm to determine the key feature elements of the target workpiece; Based on the key feature elements and the matching algorithm, target features of the target workpiece are determined.

8. A visual positioning method for a CNC lathe, characterized in that: The method comprises: Obtaining the target workpiece and initial coordinate information of the target workpiece; Acquire multi-angle images of the target workpiece according to the initial coordinate information; The multi-angle images are processed by a preset image processing algorithm and a feature extraction and matching algorithm to extract target features of the target workpiece, and the target features are compared with pre-stored standard workpiece features to calculate the position deviation and angle deviation of the target workpiece relative to the standard workpiece to determine visual positioning information of the target workpiece; the visual positioning information includes target posture and target coordinate information of the target workpiece; According to the visual positioning information, the visually positioned target workpiece is grasped, and the target workpiece is transferred to a processing area of ​​a CNC lathe, and the target workpiece is processed based on a preset processing program.

9. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to implement the method described in claim 8 when executed.

10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to implement the method described in claim 8.

Citation Information

Patent Citations

  • Mechanical arm tracking and positioning on-line identification and correction method based on computer vision

    CN105759720A

  • Robot grabbing posture task planning method for sorting and stacking multiple targets

    CN113657551A

  • Computer vision target detection algorithm

    CN113673515A

  • Workpiece positioning method and system for automatic production line

    CN117415660A

  • Apparatus for estimating under monocular infrared thermal imaging vision pose of object grasped by manipulator, and method thereof

    WO2024148645A1

Cited By

  • Feeding and discharging control method and system for CNC machining

    CN121120574A

  • A loading and unloading control method and system for CNC machining

    CN121120574B