The function of the CNC toothbrush tufting machine is to implant the toothbrush bristles into the toothbrush holes. The processing process mainly completes a series of actions such as toothbrush blank picking, tufting head automatic positioning, CNC workbench z, y direction hole position centering, color separation and tufting. Toothbrush blanks are made by injection molding. Different specifications of toothbrush blank head hole size, position and other parameters are different. Before the hair planting process, it is necessary to obtain geometric parameters such as the hole position of the toothbrush blank, and then write a numerical control program and send it to the control of the toothbrush hair planting machine. system. When using manual methods to measure parameters such as the hole position of the toothbrush blank, there are problems such as low measurement efficiency and error of hole position parameters. In this paper, the image processing technology is used to image the hole position of the toothbrush head, and the hole position image recognition software is written to realize the automatic programming of the tufting machine processing program.
1. The image recognition process of the toothbrush head hole
The basic process of toothbrush head hole image recognition software is to obtain the binary image of the toothbrush head by using a scanner, and then determine the outer contour of the toothbrush head, identify and extract the geometric information of the hole position on the binary image, and obtain each hole Bit center size, and finally generate the NC machining program.
1.1 Toothbrush head image reading
1.2 Toothbrush head image positioning
The purpose of image positioning is to detect the edge of the toothbrush head image obtained by scanning, identify the size of the image, and determine the origin position of the y coordinate. The image edge detection algorithm adopts the scanning form, starts scanning from the first line of the image, reads the image data of this line, then applies the four-neighborhood detection method to detect the boundary of the toothbrush head image, and records the number of lines of each boundary in the image data ( or number of columns) old’3 J, to realize the edge location of the toothbrush head hole image. The algorithm flow for locating the upper boundary of the toothbrush head image is: (1) locate the upper boundary; (2) start scanning from the left boundary of each line; (3) remove the function of isolated points; (4) record the upper line boundary of the image.
1.3 Median filtering of toothbrush head image During the input process of digital image, noise will be generated that affects the quality of digital image, such as the noise in the image“glitch”Etc. is caused by noise, and the median filter of Tumen can eliminate the influence of noise.
1.4 Contour Extraction of Toothbrush Head Image
The contour extraction of the toothbrush head image includes the extraction of the outer contour and the contour extraction of the toothbrush hole. The basic process is: judge the adjacent pixel points in the four directions of up, down, left, and right directions of a certain pixel point in the image. If the gray value of the four adjacent points of the point is not 0, it means that the point is an internal point. Its gray value is set to 0; if one of the 4 adjacent points of this point has a gray value of 0, the gray value remains unchanged.
1.5 Toothbrush head image cleaning
The image after image contour extraction may be distorted, as shown by the arrow in Figure 5. During the scanning process, due to the defects of the toothbrush sample used for scanning and other reasons, the shape of some toothbrush holes in the toothbrush head image will be incomplete, and the image needs to be cleaned to ensure the accuracy of the image hole position parameter calculation . In this paper, the image processing“the brush”, using the mobile“the brush”Delete the incomplete arc segments, scattered points and discontinuous points that have problems in contour extraction.
1.6 Calculation of toothbrush head image hole position parameters
The main steps of calculating the position parameters of toothbrush head image are as follows:
(1) Mark the toothbrush holes in the image. In the study, the recursive search marking method is used. First, a black point is found, and then the eight neighbors of the black point are searched. Eight neighbors, and so on, distinguish all the toothbrush larvae L from the outline of the toothbrush head and mark them with serial numbers in turn.
(2) Carry out center detection algorithm for each toothbrush hole
There are center of gravity method, median method, curve transformation method and circle fitting spot center detection method, etc. H]. The circle fitting method has the advantages of fast calculation speed and the ability to detect incomplete arcs.
2. NC data of toothbrush hair planting processing
When generating the NC machining program, it is necessary to set the machining coordinate origin in advance. In this study, the determination method of the origin of toothbrush bristle processing coordinates is: if the mouse clicks on a toothbrush hole, the center of the hole is automatically selected as the origin of the processing coordinates; if the mouse click is not in a toothbrush hole, the The position where the mouse is clicked is taken as the origin of the processing coordinates. In addition, in order to meet the requirement of implanting different color bristles in different larvae in one toothbrush, a color processing algorithm is used to mark the image of the holes into holes of three different colors‘5.
2.1 Image recognition results of toothbrush head holes with different resolutions
2.2 Single-color and multi-color wool planting processing procedures
After image recognition, toothbrush hole hair color marking, hole center calculation and other processes, the output multi-color (three colors, the outermost 24 holes are the first color)
The difference between single-color and three-color tufting programs is whether there is an instruction to replace different material boxes in the program. This function is realized by using the M06 tool change instruction and selection of yo!, ID2, and yo3 tools in the standard CNC machining program. That is, if the M06Tol, M061D2, and M056 yo3 instructions are removed in the 00th, 24th and 32nd lines of the program, the above program will be converted into a monochrome wool planting processing program.
QUICK LINKS
PRODUCTS
CONTACT US
Contact Person: Leo
Email: Mxdx@Mxbrushmachinery.Com
Tel: +86 13232438671
Skype/Facebook: +86 13232438671
Fax: 0750-6575221
Address: Heqiaolingwu Road, Sanyi Industrial Estate, Siqian Town, Xinhui District, Jiangmen City, Guangdong Province, China (Pc:529159)Pe 2019
Contact Us