Planar alignment workpiece edge triangle positioning method and system based on linear CCD
Through the plane-oriented workpiece edge triangular positioning method based on linear CCD, the problems of low accuracy, low efficiency and high cost in the traditional method are solved, and efficient and accurate workpiece edge triangular positioning is achieved, improving production quality and efficiency.
Patent Information
- Application Number
- CN202411669157.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-02-07
AI Technical Summary
The traditional alignment method has problems of low accuracy, low efficiency and high cost in the positioning of workpiece edge triangles, which is difficult to meet the needs of efficient and accurate positioning of automated production lines.
采用基于线性CCD的平面对位工件边沿三角形定位方法,通过扫描工件并采集三角形特征的图像数据,进行图像预处理、边缘检测和三角特征提取,计算三角形在工作边沿上的实际位置,并通过闭环 The control system adjusts the alignment platform in real time to ensure that the triangle is accurately aligned with the preset position.
It improves the accuracy and efficiency of the triangular positioning of the workpiece edge, reduces costs, realizes accurate alignment of the alignment platform, and ensures improvement of production quality and efficiency.
Smart Images

Figure CN119399182A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of industrial automation technology, and in particular to a method and system for locating a triangle edge of a plane alignment workpiece based on a linear CCD. Background Art
[0002] In automated production lines, accurate alignment of planar workpieces is an important step in ensuring production quality and efficiency. For workpiece edges with complex shapes or specific markings, traditional alignment methods often have problems such as low precision and low efficiency. With the continuous advancement of photoelectric sensing technology and image processing technology, linear CCD has been widely used in the field of automated alignment due to its advantages such as high resolution, high sensitivity, low cost and real-time performance. However, for the specific application scenario of triangular positioning of workpiece edges, traditional alignment methods often have problems such as low precision, low efficiency and high cost, and an efficient and accurate solution is still needed. Summary of the invention
[0003] The present application provides a method, system, computer equipment and storage medium for locating the edge triangle of a plane alignment workpiece based on a linear CCD, so as to reduce the trouble of merchants in submitting documents.
[0004] In a first aspect, the present application provides a method for locating a triangle edge of a plane alignment workpiece based on a linear CCD, comprising: Scan the planar workpiece and collect image data of the edge triangle features; Improve image quality through image preprocessing; Use edge detection algorithms to identify workpiece edges; In the edge area, the triangular features are extracted using image processing technology; According to the extracted triangle feature information, combined with the workpiece size and preset information, the actual position of the triangle on the working edge is calculated, and the position deviation information is calculated; The position deviation information is fed back to the motion control unit to drive the positioning platform to make corresponding adjustments until the triangle on the edge of the workpiece is accurately aligned with the preset position.
[0005] In a second aspect, the present application also provides a plane alignment workpiece edge triangle positioning system based on a linear CCD, the system comprising: An image acquisition unit, scanning a planar workpiece and collecting image data of edge triangular features; An image processing unit improves image quality through image preprocessing, uses an edge detection algorithm to identify the edge of the workpiece, and uses image processing technology to extract triangular features in the edge area; The deviation calculation unit calculates the actual position of the triangle on the working edge according to the extracted triangle feature information, combined with the workpiece size and preset information, and calculates the position deviation information; The motion control unit drives the alignment platform to make corresponding adjustments until the triangle on the edge of the workpiece is precisely aligned with the preset position.
[0006] The present application discloses a method and system for positioning the edge triangle of a plane alignment workpiece based on a linear CCD, which scans the plane workpiece and collects image data of the edge triangle features; improves the image quality through image preprocessing; uses an edge detection algorithm to identify the edge of the workpiece; extracts the triangle features in the edge area using image processing technology; calculates the actual position of the triangle on the working edge based on the extracted triangle feature information, combined with the workpiece size and preset information, and calculates the deviation information between the preset information and the actual position; feeds back the position deviation information to the motion control unit, and drives the alignment platform to make corresponding adjustments until the triangle on the edge of the workpiece is accurately aligned with the preset position. The image processing algorithm is optimized to improve the accuracy of feature extraction and triangle positioning; a closed-loop control system is introduced to monitor and adjust the alignment process in real time to ensure positioning accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0008] Figure 1 It is a schematic flow chart of a method for locating a triangle along an edge of a plane alignment workpiece based on a linear CCD according to an embodiment of the present application; Figure 2 It is a schematic block diagram of a method for positioning a triangle on the edge of a plane alignment workpiece based on a linear CCD provided in an embodiment of the present application. DETAILED DESCRIPTION
[0009] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0010] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0011] The embodiment of the present application provides a method and system for locating a triangle edge of a workpiece for plane alignment based on a linear CCD, wherein the method for locating a triangle edge of a workpiece for plane alignment based on a linear CCD can be applied to a terminal to locate a triangle edge of a workpiece.
[0012] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0013] See also Figure 1 , Figure 1 This is a schematic flow chart of a method for locating a triangle edge of a plane alignment workpiece based on a linear CCD according to an embodiment of the present application, wherein the method comprises steps S101 to S106.
[0014] S101, scanning a planar workpiece and collecting image data of edge triangle features.
[0015] Specifically, the image can be acquired by a high-resolution linear CCD camera to improve the image acquisition accuracy.
[0016] S102: Improving image quality through image preprocessing.
[0017] Specifically, preprocessing operations such as denoising and contrast enhancement are performed on the collected images to improve image quality.
[0018] S103: Use an edge detection algorithm to identify the edge of the workpiece.
[0019] Specifically, an edge detection algorithm is used to identify the edge of the workpiece, and the focus of the identification is on the edge area where the triangular features are located.
[0020] S104: In the edge area, extract triangular features using image processing technology.
[0021] Specifically, in the edge area, the triangle features are extracted using image processing technology. The triangle features include key information such as vertices and side lengths. The image processing technology used is such as contour analysis, Hough transform, etc. The processed image file is obtained by combining the above steps.
[0022] S105 , calculating the actual position of the triangle on the working edge according to the extracted triangle feature information, combined with the workpiece size and preset information, and calculating the position deviation information.
[0023] Specifically, the triangle positioning calculation calculates the actual position of the triangle on the edge of the workpiece based on the extracted triangle feature information, combined with the workpiece size and preset position information; and calculates the deviation information between the preset position and the actual position.
[0024] S106, feeding back the position deviation information to the motion control unit, driving the alignment platform to make corresponding adjustments until the triangle on the edge of the workpiece is accurately aligned with the preset position.
[0025] The above-mentioned embodiment provides a method for locating the edge triangle of a plane alignment workpiece based on a linear CCD, which scans the plane workpiece and collects image data of the edge triangle features; improves the image quality through image preprocessing; uses an edge detection algorithm to identify the edge of the workpiece; extracts the triangle features in the edge area using image processing technology; calculates the actual position of the triangle on the working edge based on the extracted triangle feature information, combined with the workpiece size and preset information, and calculates the deviation information between the preset information and the actual position; feeds back the position deviation information to the motion control unit, and drives the alignment platform to make corresponding adjustments until the triangle on the edge of the workpiece is accurately aligned with the preset position. This application optimizes the image processing algorithm, improves the accuracy of feature extraction and triangle positioning; introduces a closed-loop control system to monitor and adjust the alignment process in real time to ensure positioning accuracy. After trial use by our company, the cost of using this method was reduced by 4 / 5, the installation volume of the equipment was reduced by 1 / 3, and the efficiency was increased by nearly 1 times.
[0026] In an optional embodiment, S102 includes steps S1021 - S1023 .
[0027] S1021. Use a Gaussian kernel to smooth the image.
[0028] Specifically, in this step, the image is smoothed using a Gaussian kernel to remove large-area noise points.
[0029] S1022, wavelet denoising, using wavelet transform to decompose the signal into sub-bands of different frequencies, and then denoising through threshold processing.
[0030] Specifically, the wavelet transform signal is divided into sub-bands of different frequencies, and then the noise is removed by threshold processing to remove noise from the image with obvious edges and optimize the image lines.
[0031] S1023. The Laplacian operator is used to sharpen the image. The cv.Laplacian() function in openCV is used to achieve sharpening.
[0032] Specifically, the cv.Laplacian() function in openCV is used to achieve sharpening, and the sharpened image is combined with the original image to achieve the purpose of edge sharpening.
[0033] In an optional embodiment, step S103, using an edge detection algorithm to identify the edge of the workpiece includes using the canny edge detection in OpenCV, combined with the structure of image preprocessing, to obtain the final edge.
[0034] Specifically, we use the canny edge detection in OpenCV, a multi-stage algorithm with high accuracy and good detection performance. Combined with the results of image preprocessing, we call the cv2.Canny() function to get the final edge.
[0035] In an optional embodiment, S104 includes steps S1041 - S1042 .
[0036] S1041. Detect contours in the image using the cv2.findContours() function in OpenCV, which can find all contours in the image.
[0037] S1042. For each detected contour, use the cv2.approxPolyDP() function to approximate the contour.
[0038] It should be noted that if the value obtained by cv2.approxPolyDP(curve, epsilon, closed) is 3, it is an approximate triangle. This is because this function approximates the contour point set to a polygon according to the specified precision parameter. The approximated polygon has three sides, so it is a triangle.
[0039] S1043: If the contour is identified as a triangle, further calculate and extract the features of the triangle through the coordinates of the contour points. The features of the triangle include area, perimeter, angle, etc. These features can be calculated through the coordinates of the contour points.
[0040] S1044. Draw a triangle.
[0041] It should be noted that if you need to mark the detected triangles in the image, you can use the cv2.drawContours() function.
[0042] In an optional embodiment, S105 includes steps S1051 - S1055 .
[0043] S1051. Open a preset reference triangle image, obtain the vertex point of the triangle in the image, and set the vertex point as P1 (x1, y1).
[0044] S1052 . According to the processed image obtained, a corner of a triangle in the middle area of the image is obtained as a vertex angle, and the vertex point is set as P2 (x2, y2).
[0045] S1053, calculating the distance from P1 to P2, and calculating the horizontal and vertical distances between the two points respectively.
[0046] S1054, P2 is aligned with the vertex of P1, an edge of P1 is selected, and an edge of P2 corresponding to P1 is compared to calculate the angle offset of P2.
[0047] It is understandable that P1 can also be aligned with P2.
[0048] S1055. Finally, the X, Y and angle values of the required offset of the triangle are obtained.
[0049] See also Figure 2 , Figure 2 It is a schematic block diagram of a plane alignment workpiece edge triangle positioning system based on a linear CCD provided in one embodiment of the present application. The system can be configured in a terminal to execute the aforementioned plane alignment workpiece edge triangle positioning method based on a linear CCD.
[0050] like Figure 2 As shown, the system 200 includes: an image acquisition unit 201 , an image processing unit 202 , a deviation calculation unit 203 and a motion control unit 204 .
[0051] The image acquisition unit 201 scans the planar workpiece and collects image data of edge triangle features.
[0052] The image processing unit 202 improves the image quality by performing image preprocessing, uses an edge detection algorithm to identify the edge of the workpiece, and uses image processing technology to extract triangular features in the edge area.
[0053] The deviation calculation unit 203 calculates the actual position of the triangle on the working edge according to the extracted triangle feature information, combined with the workpiece size and preset information, and calculates the position deviation information.
[0054] The motion control unit 204 drives the alignment platform to make corresponding adjustments until the triangle on the edge of the workpiece is accurately aligned with the preset position.
[0055] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and each unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0056] In an optional embodiment, the linear CCD-based plane alignment workpiece edge triangle positioning system of the present application further includes a reference positioning unit, which is used to provide reference position information during the alignment process to ensure positioning accuracy.
[0057] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for positioning a plane alignment workpiece edge triangle based on a linear CCD, characterized in that: include: Scan the planar workpiece and collect image data of the edge triangle features; Improve image quality through image preprocessing; Use edge detection algorithms to identify workpiece edges; In the edge area, the triangular features are extracted using image processing technology; According to the extracted triangle feature information, combined with the workpiece size and preset information, the actual position of the triangle on the working edge is calculated, and the deviation information between the preset information and the actual position is calculated; The position deviation information is fed back to the motion control unit to drive the positioning platform to make corresponding adjustments until the triangle on the edge of the workpiece is accurately aligned with the preset position.
2. The method for locating the edge triangle of a plane alignment workpiece based on a linear CCD according to claim 1, characterized in that: In the process of scanning the planar workpiece and collecting the image data of the edge triangle features, a linear CCD camera is used for collection.
3. The method for locating the edge triangle of a plane alignment workpiece based on a linear CCD according to claim 2, characterized in that: The image quality is improved by image preprocessing, including: Gaussian kernel is used to smooth the image; Wavelet denoising uses wavelet transform to decompose the signal into sub-bands of different frequencies, and then removes noise through threshold processing; The Laplacian operator is used to sharpen the image. The cv2.Laplacian() function in openCV is used to achieve sharpening.
4. The method for locating the edge triangle of a plane alignment workpiece based on a linear CCD according to claim 3 is characterized in that: The method of using an edge detection algorithm to identify the edge of a workpiece includes: Use the canny edge detection in OpenCV and combine it with the structure of image preprocessing to obtain the final edge.
5. The method for locating the edge triangle of a plane alignment workpiece based on a linear CCD according to claim 4, characterized in that: The method of extracting triangular features in the edge area by using image processing technology includes: Detect contours in an image using the cv2.findContours() function in OpenCV, which finds all contours in an image. For each detected contour, use cv2.approxPolyDP() function to approximate the contour; If the contour is identified as a triangle, the features of the triangle are further calculated and extracted through the coordinates of the contour points; Draw a triangle.
6. The method for locating the edge triangle of a plane alignment workpiece based on a linear CCD according to claim 4, characterized in that: The actual position of the triangle on the working edge is calculated based on the extracted triangle feature information, combined with the workpiece size and preset information, and the position deviation information is calculated, including: Open the preset reference triangle image, obtain the vertex point of the triangle in the image, and set the vertex point to be P1 (x1, y1); According to the processed image, a corner of a triangle in the middle area of the image is taken as the vertex, and the vertex point is set as P2 (x2, y2); Calculate the distance from P1 to P2, and calculate the horizontal and vertical distances between the two points respectively; Align P2 with the vertex of P1, select an edge of P1, compare P2 with an edge of P1, and calculate the angle offset of P2; Finally we get the X, Y and angle values of the offset we need for the triangle.
7. A plane alignment workpiece edge triangle positioning system based on linear CCD, characterized in that: include: An image acquisition unit, scanning a planar workpiece and collecting image data of edge triangular features; An image processing unit improves image quality through image preprocessing, uses an edge detection algorithm to identify the edge of the workpiece, and uses image processing technology to extract triangular features in the edge area; The deviation calculation unit calculates the actual position of the triangle on the working edge according to the extracted triangle feature information, combined with the workpiece size and preset information, and calculates the position deviation information; The motion control unit drives the alignment platform to make corresponding adjustments until the triangle on the edge of the workpiece is precisely aligned with the preset position.
8. The plane alignment workpiece edge triangle positioning system based on linear CCD according to claim 7 is characterized in that: Also includes: The reference positioning unit is used to provide reference position information during the alignment process to ensure positioning accuracy.