A cutting path planning method and device based on machine vision
Through the cutting path planning method based on machine vision, the problem of edge cutting accuracy and inefficiency in patch component processing is solved, and a high-precision and high-efficiency cutting process is achieved.
Patent Information
- Application Number
- CN202111678110.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2041-12-31
AI Technical Summary
During the processing of patch components, the cutting edges of the ceramic blank mainly rely on manual magnified image alignment and naked eye alignment of the cutting line, resulting in low accuracy and low efficiency.
The cutting path planning method based on machine vision is adopted to determine the cutting path by obtaining original image information, identifying edge information or marking information, and calculating the cutting line position.
Improves cutting accuracy and efficiency, ensures repeatability of processing, and reduces the number of manual adjustments.
Smart Images

Figure CN114387515B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of machine vision, and in particular to a cutting path planning method and device based on machine vision. Background Art
[0002] The extensive use of surface mount components in electronic products is the most obvious feature of the development and application of modern electronic technology.
[0003] At present, in the processing of surface-mount components, the edge trimming of the ceramic body is mainly carried out by manually enlarging the image to align the left and right edges or blocks, and then controlling the cutting knife to cut. This method is low-cost, but it requires multiple adjustments to the object position to ensure that the target object is in the proper position of the left and right images, resulting in a slow inspection speed. On the other hand, aligning the cutting line with the naked eye cannot guarantee the repeatability of the processing. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a cutting path planning method and device based on machine vision with high accuracy and efficiency.
[0005] One aspect of the present invention provides a cutting path planning method based on machine vision, comprising:
[0006] Get original image information;
[0007] Identifying edge information or marker information in the original image information;
[0008] When there is edge information in the original image information, the cutting line position is calculated according to the edge of the target block in the world coordinate system of the original image; or, when there is mark information in the original image information, the cutting line position is calculated according to the center of the region in the original image;
[0009] A cutting path is determined according to the cutting line position.
[0010] Optionally, the obtaining original image information includes:
[0011] Calibrate the left camera and the right camera to determine the conversion relationship between the camera coordinate system and the world coordinate system;
[0012] Acquire an original image by using the left camera and the right camera, wherein the field of view of the left camera and the field of view of the right camera both contain the target object;
[0013] Determining a segmentation threshold according to the grayscale value of the target object;
[0014] Performing threshold segmentation on the original image according to the segmentation threshold to determine a subject in the original image;
[0015] The image after threshold segmentation is expanded to connect the discrete pixels in the image.
[0016] Optionally, the step of performing a dilation operation on the image after threshold segmentation to connect discrete pixels in the image includes:
[0017] Configure a 3×3 expansion kernel;
[0018] The original image is traversed, and the maximum grayscale value of each pixel in the original image in a 3×3 area is used as a new grayscale value of the corresponding pixel;
[0019] Generate a dilated image.
[0020] Optionally, identifying the edge information or the marking information in the original image information includes:
[0021] Finding the length information, width information and pixel area of the subject in the original image;
[0022] According to the comparison result between the length information, the width information and the pixel area and the standard value, the edge information or the mark information in the original image information is identified.
[0023] Optionally, when edge information exists in the original image information, the cutting line position is calculated according to the edge of the target block of the original image in the world coordinate system, including:
[0024] When there is edge information in the original image information, finding the target subject with the largest area in the original image;
[0025] Extracting the contour of the target subject to obtain edge information of the target subject;
[0026] According to the edge information, a straight line fitting is performed on the contour of the target body to obtain a plurality of straight lines;
[0027] According to the slope of each straight line in the world coordinate system, calculate the extension trend of each straight line;
[0028] According to the extension trend of each straight line, matching and optimization are performed to find the edge of the target block in the world coordinate system;
[0029] The cutting line position is calculated according to the edge of the target block.
[0030] Optionally, when there is marking information in the original image information, calculating the cutting line position according to the center of the region in the original image includes:
[0031] When there is marking information in the original image information, dividing the original image into a plurality of regions of interest;
[0032] Perform convolution operation on the pre-stored template image and the original image to obtain a grayscale image;
[0033] Calculating the correlation coefficient of the grayscale image;
[0034] According to the calculated correlation coefficient, searching for the region with the highest matching degree from the original image and determining the center of the region;
[0035] The cutting line position is calculated according to the information of the center of the region.
[0036] Optionally, the calculation process of the cutting line position includes:
[0037] According to the conversion relationship between the camera coordinate system and the world coordinate system, the spatial coordinates of the edge of the target block or the center of the region are calculated to determine the spatial point;
[0038] Obtaining a spatial straight line by fitting a plurality of the spatial points;
[0039] The position of the spatial straight line is used as the cutting line position.
[0040] Another aspect of the embodiment of the present invention further provides a cutting path planning device based on machine vision, comprising:
[0041] The first module is used to obtain original image information;
[0042] A second module is used to identify edge information or marking information in the original image information;
[0043] The third module is used to calculate the cutting line position according to the edge of the target block in the original image in the world coordinate system when the original image information contains edge information; or to calculate the cutting line position according to the center of the region in the original image when the original image information contains mark information;
[0044] The fourth module is used to determine the cutting path according to the cutting line position.
[0045] Another aspect of an embodiment of the present invention further provides an electronic device, including: a processor and a memory;
[0046] The memory is used to store programs;
[0047] The processor executes the program to implement the method described above.
[0048] Another aspect of the embodiments of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the method described above.
[0049] The embodiment of the present invention also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above method.
[0050] The embodiment of the present invention first obtains the original image information; identifies the edge information or marking information in the original image information; when the original image information has edge information, the cutting line position is calculated according to the edge of the target block in the original image in the world coordinate system; or when the original image information has marking information, the cutting line position is calculated according to the center of the region in the original image; and the cutting path is determined according to the cutting line position. The present invention improves accuracy and efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in 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 only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0052] Figure 1 The present invention provides an overall step flow chart of the embodiment of the present invention. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0054] In view of the problems existing in the prior art, the embodiment of the present invention provides a cutting path planning method based on machine vision, such as Figure 1 As shown, the method of the present invention comprises the following steps:
[0055] Get original image information;
[0056] Identifying edge information or marker information in the original image information;
[0057] When there is edge information in the original image information, the cutting line position is calculated according to the edge of the target block in the world coordinate system of the original image; or, when there is mark information in the original image information, the cutting line position is calculated according to the center of the region in the original image;
[0058] A cutting path is determined according to the cutting line position.
[0059] Optionally, the obtaining original image information includes:
[0060] Calibrate the left camera and the right camera to determine the conversion relationship between the camera coordinate system and the world coordinate system;
[0061] Acquire an original image by using the left camera and the right camera, wherein the field of view of the left camera and the field of view of the right camera both contain the target object;
[0062] Determining a segmentation threshold according to the grayscale value of the target object;
[0063] Performing threshold segmentation on the original image according to the segmentation threshold to determine a subject in the original image;
[0064] The image after threshold segmentation is expanded to connect the discrete pixels in the image.
[0065] Optionally, a dilation operation is performed on the image after the threshold segmentation to connect discrete pixels in the image, including:
[0066] Configure a 3×3 expansion kernel;
[0067] The original image is traversed, and the maximum grayscale value of each pixel in the original image in a 3×3 area is used as a new grayscale value of the corresponding pixel;
[0068] Generate a dilated image.
[0069] Optionally, identifying the edge information or the marking information in the original image information includes:
[0070] Finding the length information, width information and pixel area of the subject in the original image;
[0071] According to the comparison result between the length information, the width information and the pixel area and the standard value, the edge information or the mark information in the original image information is identified.
[0072] Optionally, when edge information exists in the original image information, the cutting line position is calculated according to the edge of the target block of the original image in the world coordinate system, including:
[0073] When there is edge information in the original image information, finding the target subject with the largest area in the original image;
[0074] Extracting the contour of the target subject to obtain edge information of the target subject;
[0075] According to the edge information, a straight line fitting is performed on the contour of the target body to obtain a plurality of straight lines;
[0076] According to the slope of each straight line in the world coordinate system, calculate the extension trend of each straight line;
[0077] According to the extension trend of each straight line, matching and optimization are performed to find the edge of the target block in the world coordinate system;
[0078] The cutting line position is calculated according to the edge of the target block.
[0079] Optionally, when there is marking information in the original image information, calculating the cutting line position according to the center of the region in the original image includes:
[0080] When there is marking information in the original image information, dividing the original image into a plurality of regions of interest;
[0081] Perform convolution operation on the pre-stored template image and the original image to obtain a grayscale image;
[0082] Calculating the correlation coefficient of the grayscale image;
[0083] According to the calculated correlation coefficient, searching for the region with the highest matching degree from the original image and determining the center of the region;
[0084] The cutting line position is calculated according to the information of the center of the region.
[0085] Optionally, the calculation process of the cutting line position includes:
[0086] According to the conversion relationship between the camera coordinate system and the world coordinate system, the spatial coordinates of the edge of the target block or the center of the region are calculated to determine the spatial point;
[0087] Obtaining a spatial straight line by fitting a plurality of the spatial points;
[0088] The position of the spatial straight line is used as the cutting line position.
[0089] Another aspect of the embodiment of the present invention further provides a cutting path planning device based on machine vision, comprising:
[0090] The first module is used to obtain original image information;
[0091] A second module is used to identify edge information or marking information in the original image information;
[0092] The third module is used to calculate the cutting line position according to the edge of the target block in the original image in the world coordinate system when the original image information contains edge information; or to calculate the cutting line position according to the center of the region in the original image when the original image information contains mark information;
[0093] The fourth module is used to determine the cutting path according to the cutting line position.
[0094] Another aspect of an embodiment of the present invention further provides an electronic device, including: a processor and a memory;
[0095] The memory is used to store programs;
[0096] The processor executes the program to implement the method described above.
[0097] Another aspect of the embodiments of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the method described above.
[0098] The embodiment of the present invention also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above method.
[0099] The specific working principle of the present invention is described in detail below:
[0100] In an embodiment of the present invention, a cutting path planning method based on machine vision includes the following steps:
[0101] S1: Image acquisition: Calibrate the camera and determine the conversion relationship between the camera coordinate system and the world coordinate system. To obtain the image, the motor drives the left and right cameras to search for the target object, and moves in the X and Y directions to ensure that the target object can appear in the field of view of the left and right cameras at the same time, capture the picture, and obtain the original image.
[0102] S2: Threshold segmentation to highlight the subject.
[0103] Specifically, this embodiment selects a suitable threshold value from 0-255 according to the gray value of the subject, performs threshold segmentation, and highlights the subject. In this embodiment, the suitable threshold value in practical application is 170-190.
[0104] S3: Perform a dilation operation on the image to connect the discrete pixels generated by interference.
[0105] Specifically, this embodiment sets a 3×3 expansion kernel, traverses the entire image, outputs the maximum grayscale value of the pixel in the 3×3 area as the new grayscale value of the pixel, obtains the expanded image, and connects the discrete pixels generated by interference.
[0106] S4: Determine whether there is an edge or a mark, otherwise return to step 2; if there is an edge, find the edge and enter S5; if there is a mark, find the mark and enter S8.
[0107] Specifically, this embodiment searches for the pixel area, length, and width of the subject, and compares these three values with the set subject area, length, and width. If they are greater, it is determined that there is an edge or a mark, and then manual judgment is made whether to search for an edge or a mark.
[0108] S5: If searching for edges, find the subject with the largest area, extract the contour of the subject, and obtain edge information.
[0109] Specifically, this embodiment uses the Sobel operator to perform edge extraction.
[0110] S6: Perform straight line fitting on the extracted contour to obtain multiple straight lines, and use the slope k of each straight line in the world coordinate system to calculate the extension trend δ(k) of each straight line.
[0111] Specifically, this embodiment uses Hough line detection, inputs the detected contour, and obtains multiple straight lines.
[0112] S7: Match and optimize the extension trend δ(k) of each straight line in the images captured by the left and right cameras. Find the edge of the target block in the world coordinate system, calculate the cutting line position and feed it back to the actuator.
[0113] Specifically, this embodiment selects the extension trend of a straight line in each of the left and right images, calculates the value of the average extension trend, and then calculates the square difference between this value and other extension trends. Similarly, the square difference of the extension trends of all straight line combinations is calculated, and the straight line with a square difference less than the set value is extracted, and spatial straight line fitting is performed to obtain the spatial position of the product edge.
[0114] S8: If you are looking for a marker, first divide the image into a region of interest (ROI).
[0115] S9: performing a convolution operation on the template image and the photo captured by the camera, and performing a correlation coefficient calculation on the grayscale image obtained after the convolution operation.
[0116]
[0117] 1≤i≤m-M+1,1≤j≤n-N+1
[0118] Among them, D(i,j) represents the similarity; M represents the horizontal length of the subgraph; N represents the vertical length of the subgraph; S(i,j) represents the grayscale value of point (i,j); T(s,t) represents the grayscale value of point (s,t).
[0119] This embodiment uses the image coordinates (i, j) of the original image as the starting point, divides the sub-images into MxN sub-images, calculates the similarity D(i, j), and finds the sub-image closest to the template image among all the available sub-images, that is, the area with the smallest similarity D(i, j).
[0120] S10: Obtain the area with the highest matching degree in the original image and calculate the center of the area. Using the information of the center of the area, calculate the cutting position and feed it back to the actuator.
[0121] Specifically, this embodiment determines the circumscribed rectangle of the area with the highest matching degree, and then calculates the center of the rectangle to determine the center of the area.
[0122] In the process of calculating the cutting line, the present embodiment uses coordinate transformation to calculate the spatial coordinates of the center of the rectangle, and after multiple images are taken, multiple spatial points are used to fit a spatial straight line, and the line is used as the cutting line position.
[0123] Optionally, the lens in step S1 of this embodiment is a lens of a 130W pixel industrial camera and is equipped with a customized light source.
[0124] Optionally, in step S2, this embodiment forms a polarization image by threshold segmentation.
[0125] The following takes a specific application scenario as an example to describe the implementation process of the method of the present invention in detail:
[0126] Embodiment 1:
[0127] A cutting path planning method based on machine vision includes the following steps:
[0128] S1: Image acquisition: calibrate the camera, determine the conversion relationship between the camera coordinate system and the world coordinate system, obtain the image, the motor drives the left and right cameras to search for the target object, move in the X and Y directions to ensure that the target object can appear in the field of view of the left and right cameras at the same time, capture the picture, and obtain the original image.
[0129] S2: Threshold segmentation to highlight the subject.
[0130] S3: Perform a dilation operation on the image to connect the discrete pixels generated by interference.
[0131] S4: Determine whether there is an edge or mark, otherwise return to step S2; if an edge is identified, go to step S5.
[0132] S5: Find the subject with the largest area, extract the contour of the subject, and obtain edge information.
[0133] S6: Perform straight line fitting on the extracted contour to obtain multiple straight lines, and use the slope k of each straight line in the world coordinate system to calculate the extension trend δ(k) of each straight line.
[0134] S7: Match and optimize the extension trend δ(k) of each straight line in the images captured by the left and right cameras. Find the edge of the target block in the world coordinate system, calculate the cutting line position and feed it back to the actuator.
[0135] The position deviation of the cutting line calculated in this embodiment is within ±10um and the angle deviation is within ±0.5°. When cutting a complete SMD component (i.e. cutting four sides), the average time required is 23.1s.
[0136] Embodiment 2:
[0137] A cutting path planning method based on machine vision includes the following steps:
[0138] S1: Image acquisition: calibrate the camera, determine the conversion relationship between the camera coordinate system and the world coordinate system, obtain the image, the motor drives the left and right cameras to search for the target object, move in the X and Y directions to ensure that the target object can appear in the field of view of the left and right cameras at the same time, capture the picture, and obtain the original image.
[0139] S2: Threshold segmentation to highlight the subject.
[0140] S3: Perform a dilation operation on the image to connect the discrete pixels generated by interference.
[0141] S4: Determine whether there is an edge or a mark, otherwise return to step 2; if there is an edge, find the edge and enter S5; if there is a mark, find the mark and enter S8.
[0142] S8: If you are looking for a marker, first divide the image into a region of interest (ROI).
[0143] S9: performing a convolution operation on the template image and the photo captured by the camera, and performing a correlation coefficient calculation on the grayscale image obtained after the convolution operation.
[0144] S10: Obtain the area with the highest matching degree in the original image and calculate the center of the area. Using the information of the center of the area, calculate the cutting position and feed it back to the actuator.
[0145] The position deviation of the cutting line calculated in this embodiment and the theoretically calculated cutting line is within ±10um, and the angle deviation is within ±0.5°. When a complete SMD component is cut (ie, four sides are cut), the average time required is 22.8s.
[0146] In summary, the SMD component cutting machine using the visual algorithm of the present invention can ensure the repeatability of processing by aligning the cutting line with the camera; through the visual algorithm, path planning can be completed within 0.3 seconds, and the positioning and identification of the intended cutting line can be quickly achieved.
[0147] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.
[0148] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features described may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions, and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.
[0149] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0150] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0151] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0152] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0153] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0154] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
[0155] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the described embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A cutting path planning method based on machine vision, characterized in that: include: Get original image information; Identifying edge information or marker information in the original image information; When there is edge information in the original image information, the cutting line position is calculated according to the edge of the target block in the world coordinate system of the original image; or, when there is mark information in the original image information, the cutting line position is calculated according to the center of the region in the original image; Determining a cutting path according to the cutting line position; When the original image information contains edge information, the cutting line position is calculated according to the edge of the target block of the original image in the world coordinate system, including: When there is edge information in the original image information, finding the target subject with the largest area in the original image; Extracting the contour of the target subject to obtain edge information of the target subject; According to the edge information, a straight line fitting is performed on the contour of the target body to obtain a plurality of straight lines; According to the slope of each straight line in the world coordinate system, calculate the extension trend of each straight line; According to the extension trend of each straight line, match and optimize to find the edge of the target block in the world coordinate system; The cutting line position is calculated according to the edge of the target block.
2. The cutting path planning method based on machine vision according to claim 1, characterized in that: The obtaining of original image information comprises: Calibrate the left camera and the right camera to determine the conversion relationship between the camera coordinate system and the world coordinate system; Acquiring an original image through the left camera and the right camera, wherein the field of view of the left camera and the field of view of the right camera both contain the target object; Determining a segmentation threshold according to the grayscale value of the target object; Performing threshold segmentation on the original image according to the segmentation threshold to determine a subject in the original image; The image after threshold segmentation is expanded to connect the discrete pixels in the image.
3. The cutting path planning method based on machine vision according to claim 2, characterized in that: The step of performing a dilation operation on the image segmented by the threshold value to connect discrete pixels in the image includes: Configure a 3×3 expansion kernel; The original image is traversed, and the maximum grayscale value of each pixel in the original image in a 3×3 area is used as a new grayscale value of the corresponding pixel; Generate a dilated image.
4. The cutting path planning method based on machine vision according to claim 2, characterized in that: Identifying edge information or marker information in the original image information includes: Finding the length information, width information and pixel area of the subject in the original image; According to the comparison result between the length information, the width information and the pixel area and the standard value, the edge information or the mark information in the original image information is identified.
5. The cutting path planning method based on machine vision according to claim 2, characterized in that: When the original image information contains marking information, the cutting line position is calculated according to the center of the region in the original image, including: When there is marking information in the original image information, dividing the original image into a plurality of regions of interest; Perform convolution operation on the pre-stored template image and the original image to obtain a grayscale image; Calculating the correlation coefficient of the grayscale image; According to the calculated correlation coefficient, searching for the region with the highest matching degree from the original image and determining the center of the region; The cutting line position is calculated according to the information of the center of the region.
6. The cutting path planning method based on machine vision according to claim 1, characterized in that: The calculation process of the cutting line position includes: According to the conversion relationship between the camera coordinate system and the world coordinate system, the spatial coordinates of the edge of the target block or the center of the region are calculated to determine the spatial point; Obtaining a spatial straight line by fitting a plurality of the spatial points; The position of the spatial straight line is used as the cutting line position.
7. A cutting path planning device based on machine vision, characterized in that: include: The first module is used to obtain original image information; A second module is used to identify edge information or marking information in the original image information; The third module is used to calculate the cutting line position according to the edge of the target block in the original image in the world coordinate system when the original image information contains edge information; or to calculate the cutting line position according to the center of the region in the original image when the original image information contains mark information; A fourth module is used to determine a cutting path according to the cutting line position; The third module is specifically used for: When there is edge information in the original image information, finding the target subject with the largest area in the original image; Extracting the contour of the target subject to obtain edge information of the target subject; According to the edge information, a straight line fitting is performed on the contour of the target body to obtain a plurality of straight lines; According to the slope of each straight line in the world coordinate system, calculate the extension trend of each straight line; According to the extension trend of each straight line, matching and optimization are performed to find the edge of the target block in the world coordinate system; The cutting line position is calculated according to the edge of the target block.
8. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The storage medium stores a program, and the program is executed by a processor to implement the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Laser cutting visual positioning method based on any template matching
CN110175621A
Circuit board cutting path generation method and device and board dividing machine
CN113421265A