CN102704215B - Automatic cutting method of embroidery cloth based on combination of DST file parsing and machine vision - Google Patents

Automatic cutting method of embroidery cloth based on combination of DST file parsing and machine vision Download PDF

Info

Publication number
CN102704215B
CN102704215B CN 201210121892 CN201210121892A CN102704215B CN 102704215 B CN102704215 B CN 102704215B CN 201210121892 CN201210121892 CN 201210121892 CN 201210121892 A CN201210121892 A CN 201210121892A CN 102704215 B CN102704215 B CN 102704215B
Authority
CN
China
Prior art keywords
dst
image
sample
embroidery
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN 201210121892
Other languages
Chinese (zh)
Other versions
CN102704215A (en
Inventor
***
金晓彬
曹久祥
张秀龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southeast University
Original Assignee
Southeast University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Southeast University filed Critical Southeast University
Priority to CN 201210121892 priority Critical patent/CN102704215B/en
Publication of CN102704215A publication Critical patent/CN102704215A/en
Application granted granted Critical
Publication of CN102704215B publication Critical patent/CN102704215B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses an automatic cutting method of embroidery cloth based on combination of DST file parsing and machine vision. In wool toy manufacturing industry, the profile and pattern of the wool toy are processed by adopting an embroidery machine, and the whole embroidery piece is cut one by one by adopting a laser cutter. The method comprises the steps of: firstly parsing a DST file (embroidery file) into an image file, selecting cutting units from the image file, and extracting the information of the cutting units to obtain the inside parameter of the unit; and carrying out correlated processing according to the image of cut sample obtained by camera shooting, matching the obtained cutting unit information with the processed sample, finally determining the cutting line position, generating a PLT file and cutting by a cutter. Different from other laser cutting methods based on machine vision, the method can finish cutting of the whole embroidery sample just by once shooting; and the method has the characteristics of high working efficiency and low unqualified rate, and has very strong cutting capability on the complicated embroidery sample.

Description

The automatic cutting method of embroidery cloth of being combined with machine vision based on the DST document analysis
Technical field
The present invention relates to the automatic cutting method of a kind of embroidery cloth, based on the combination of DST document analysis and machine vision.
Background technology
Present embroidery cloth laser cutting system mainly contains two kinds: a kind of is earlier on blank sheet of paper cutting once will embroider the cloth sample then and be placed on the cut surface, cut once again after the profile that cuts out on colored type and the blank sheet of paper embroidered on the cloth is alignd; Another kind is at laser cutting head camera to be installed, and colored type unit of every cutting will extract sample and handle once, namely can only cut a colored type unit at every turn.Because so there is diced system to have inefficiency, therefore problems such as defect ware proportion height press for a kind of new cutting mode, in order to replace current mode.The develop rapidly of machine vision provides a kind of new thinking for we address the above problem.
Machine vision utilizes machine to replace human eye to do various measurements and judgement exactly.It is an important branch of computer subject, and it combines the technology of aspects such as optics, machinery, electronics, computer software and hardware, relates to a plurality of fields such as computer, image processing, pattern-recognition, artificial intelligence, signal processing, optical, mechanical and electronic integration.On production line, the people does this type of measurement and judgement meeting and produces the sum of errors mistake because of fatigue, person-to-person difference etc., but machine but can be tirelessly, stably go on.In general, NI Vision Builder for Automated Inspection has comprised illuminator, camera lens, camera system and image processing system.Use for each, we need the size of the speed of service of taking into account system and image processing velocity, detection target still to detect target that zero defect, visual field needs are much, height more than resolution ratio needs, contrast needs are much etc.Typical NI Vision Builder for Automated Inspection can be divided into: IMAQ part, image processing section and motion control part.
The groundwork process of a complete NI Vision Builder for Automated Inspection is as follows:
1, camera is taken pictures according to instruction, and its time for exposure preestablishes;
2, IMAQ partly receives the Digital Image Data after the video camera digitlization, and it is deposited in processor or the calculator memory;
3, measurement result or logic control value are handled, analyze, identify, obtained to processor to image;
4, the error of the action of result control streamline, location, correction campaign etc.
Summary of the invention
Goal of the invention: low in order to overcome the operating efficiency that exists in the prior art, stock utilization is low, and cost is than problems such as height.The present invention has solved the shortcoming that original diced system scientific and technological content and operating efficiency are low, defect ware proportion is high by using the method for machine vision.By using the method for machine vision, reduced the effect of people in cutting process, rely on the high accuracy of camera and cutting machine, can improve greatly product yield rate, reduce cost, increase work efficiency.
Technical scheme: for solving the problems of the technologies described above, the invention provides a kind of automatic cutting method of embroidery cloth of being combined with machine vision based on the DST document analysis, it is characterized in that this method uses a kind of laser cutting machine, set up camera directly over this laser cutting machine cut surface, the automatic cutting method of described embroidery cloth comprises the steps:
(1) DST document analysis obtains original embroidery document image information and internal feature information, for images match does homework;
(2) sample extraction and processing, taking pictures by camera obtains sample image information, and sample image is carried out distortion correction, binary conversion treatment and extracts the operation of sample internal feature, obtains the characteristic information of sample;
(3) coupling is mated the DST file that obtains and the characteristic information of sample, and the matching unit barycenter also carries out barycenter coupling and line of cut correction according to least square method;
(4) DST shines upon, and the line of cut coordinate after the coupling is mapped to by coordinate transform be used for cutting under the cut surface coordinate system, exports the PLT file that laser cutting machine can be carried out then, is cut by laser cutting machine.
The present invention will be input to treatment system and handle for embroidery cloth embroidery file (DST file) information of processing down toy by the DST analytical algorithm, obtain matched sample, extract by camera then and embroider cloth sample image, and information and the certain Processing Algorithm of using DST to resolve acquisition detect embroidery cloth, obtain the wherein position of each cutter unit, result is fed back to laser cutting machine carry out cutting operation, to improving cutting accuracy, reduce the work complexity, reducing workload and have very important significance.
The present invention utilizes machine vision to replace artificial method, utilize the performance of camera resolution height, working stability, by certain handling procedure, the image processing algorithm of uses advanced can improve cutting efficiency greatly, reduce cutting machine for people's degree of dependence, raise labour productivity, because high accuracy of the present invention, can effectively improve the utilization rate of cloth, reduce the defect ware proportion of cutting.Be different from other based on the laser cutting method of machine vision, this method only need be taken pictures and once just can be finished the cutting of view picture embroidery sample, has high efficiency, characteristics that inferior rate is low.Complexity embroidery sample there is very strong cutting power.
Description of drawings
Fig. 1, machine vision cutting flow chart
Fig. 2, the display frame of DST file;
Embroidery cloth after Fig. 3, the embroidery of corresponding DST file;
Fig. 4, the inner separate unit of DST file extract;
Fig. 5, frame extract flow chart;
Fig. 6, DST unit and frame intersect;
Fig. 7, be used for to obtain the circular image after the cutting of transformed coordinate system;
Fig. 8,9 casual water completion methods;
Fig. 9, MFC operation interface;
Figure 10, laser cutting machine schematic diagram;
The image that goes out in the MFC interface display after Figure 11, the images match;
Figure 12, line of cut location general image;
Figure 13, line of cut location topography;
Figure 14, laser cutting machine cutting process;
Figure 15, cutting back image.
The specific embodiment
Theoretical foundation: image recognition.The first step of image recognition is to extract effective characteristics of image, here, we mainly introduce moment characteristics amount and contour feature amount, and the moment characteristics amount comprises Hu square, normalization rotary inertia (NMI) and affine not bending moment, and the contour feature amount comprises profile discretization parameter and singular value decomposition.These 5 characteristic quantities all have good translation, rotation and constant rate, have obtained using widely in image object identification.
1 couple of the present invention does further explanation below in conjunction with accompanying drawing.
The 1DST document analysis
Because the embroidery file of computer design is the DST form, can not directly obtain its internal feature and image information, therefore the first step of the present invention is the DST document analysis, and the DST file is resolved, and obtains its image information and internal feature.The DST file is made up of header file and style file body, and two parts are used for depositing different information, and concrete resolving is as follows.
1.1DST header file is formed
The style file header is mainly used to deposit some about the descriptive information of style, the DST file has the file header of 512 bytes, preceding 128 bytes have been stored some fileinfos with the form of text, these information comprise message identification and the value of information, the value of information is used decimal code, untapped part is replaced by space character (ASCII character value 0x20), each section by character " " (ASCII character value 0x0D) isolate, specifically each section meaning is referring to table 1.
Table 1 DST form style file header structure
1.2 style file body structure
What deposit in the style file is the data of describing the whole needle trackings actions of style, has both comprised the displacement of every needle tracking, has also comprised the control of the actions such as trimming, colour changing of embroidery machine.The style file body of DST, form be since the 513rd byte to EOF, and per 3 bytes are used for representing a pin, and are as shown in table 2.
A 7A 6A 5A 4A 3A 2A 1A 0 B 7B 6B 5B 4B 3B 2B 1B 0 C 7C 6C 5C 4C 3C 2C 1C 0
Per three byte representation one pins in the table 2 style file
This paper arranges level and is the X forward to the right, is the Y forward vertically downward.We make △ x, and △ y represents the displacement of needle tracking on X, Y-direction respectively, and namely current pin is with respect to the relative step number of last needlework frame in X, Y-direction movement.DST is a kind of ternary coding form.△ x, △ y need calculate with reference to the weights shown in the table 3.
Figure GDA00003400349200041
The weights of every correspondence in one pin of table 3.DST form
Computing formula is as follows:
△x=A 3*(-9)+A 2*9+A 1*(-1)+A 0*1+B 3*(-27)+B 2*27+B 1*(-3)+B 0*3+C 3*(-81)+C 2*81
△y=A 7*1+A 6*(-1)+A 5*9+A 4*(-9)+B 7*3+B 6*(-3)+B 5*27+B 4*(-27)+C 5*81+C 4*(-81)
C among the DST 7, C 6, C 1, C 0This four constitute its function code, as shown in table 4.
Function Value
Make C 7=C 6=0,C 1=C 0=1
Bouncing pilotage C 7=C 1=C 0=1,C 6=0
Colour changing C 7=C 6=C 1=C 0=1, represent that other position of this pin is 0
Trimming The bouncing pilotage sign indicating number that several are continuous
Finish C 7=C 6=C 5=C 4=C 1=C 0=1, represent that other position of this pin is 0
The function code of table 4DST
Also have a termination character 0xlA at DST formatted file end, in addition, empty needle is the special pin of making, and value is equal to 0.
According to said process, all data messages of DST file are resolved, after parsing is finished, create a width of cloth blank image, the information that obtains according to parsing on this image delineates out in this blank image, thereby obtains the image information of DST file.
1.3 the unit in the justifying DST file extracts
Fig. 2 is the manufacturing DST file of the typical down toy of a width of cloth, and Fig. 3 is the embroidery cloth of its correspondence.The characteristic feature of this class DST file is:
1, a big outer rim is arranged in the DST file, be used for determining to embroider the size of cloth;
2, there are some separate units inside, and each unit is the embroidered square of making down toy;
3, separate unit has frame line separately, and this edge frame line is actual to be the line of cut of this unit;
4, be bouncing pilotage between the separate unit, do not have line to connect, perhaps have only single line to connect;
5, in order to save the space, often according to left-right symmetry, perhaps symmetry is arranged up and down between the internal element;
6, the separate unit inner element is no more than line of cut.
According to these features, we have adopted method as shown in Figure 4 to extract separate unit in the DST file.
1.4DST resolve
The parsing of DST file is handled just passable according to header file composition and the coded system of DST file in theory, but in the DST of reality file, file data tends to occur indivedual mistakes, typical problem is exactly to represent view picture DST size+X in the header file,-X ,+Y ,-Y data are mistake often, the calculating so need sort to the point among the DST obtains actual DST image size.
At first, obtain the offset coordinates of every pin according to DST document No. mode, i.e. △ x, △ y value then by progressively addition, obtains the coordinate of each pin of view picture DST.Because coordinate zero point is starting point in the DST file, handle conveniently for successive image, need handle coordinate, first on upper left side is made as coordinate zero point, be to the right x axle positive direction, be downwards y axle positive direction.When resolving, note each at the embroidery mode of operation of answering.
1.4.1 the judgement of outer rim
In general view picture is embroidered cloth all outer rim, and embroidering the cloth housing mainly is for the size of confirming the DST file substantially, and product does not need outer rim but we send out existing in the reality investigation.Therefore, the first step of DST format analysis has judged whether outer rim exactly.Judge the flow process of outer rim, as Fig. 5.
In order to save cloth, some DST unit may intersect with outer rim, as Fig. 6 in the DST of reality embroidered square.So the size of frame not necessarily with DST space of a whole page equal and opposite in direction.Outer rim is all once embroidered into by embroidery machine, so outer rim is a continuous closed data segment, and continuous data segment is very many in the DST file, therefore need carry out verification to the DST continuous data segment of collecting, and judges whether it is outer rim.Rule of judgment:
1. four end points are relevant with DST space of a whole page size;
2. the point between each end points all point-blank.
1.4.2DST the judgement of cell borders
There is following feature DST unit in the down toy DST file:
1, DST cell borders closure;
2, not thread-changing in the single DST cell borders embroidery process;
3, two adjacent edge frames are if close together may not thread-changing, generally all can thread-changing;
4, the DST unit is arranged uncertainly, and at present association area does not also have Automatic Typesetting software, all is the own random arrangement of designer, and randomness is bigger;
5, if outer rim is arranged, then the frame of DST unit is only surrounded by outer rim.If no outer rim does not then have other closed data segment to surround the DST cell borders.
According to above feature, at first need to determine all closed data segments, judge then whether certain closed data segment is cell borders.Can judge according to feature whether a closed data segment is the DST cell borders.In practical operation, the DST cell borders is irregular figure often, judges whether inside has comparatively difficulty of element, so we adopt the processing of advancing of the method for boundary rectangle.
1.4.3DST inner element is determined
DST unit inner element feature in the down toy DST file:
1, internal element has been embroidered several times.For the consideration that reduces the colour changing number of times, generally all be that color identical in the whole space of a whole page has all been embroidered afterwards just can colour changing, so internal element will repeatedly could have been embroidered in general, so inner element comparatively disperses.
2, inner element can not surpass cell borders.
According to above feature, our processing method mainly is to mate except continuous data and existing DST cell borders boundary rectangle outside outer rim (if existence), the cell borders, and which element can determine has in certain DST cell borders.
1.5 extract DST unit internal information
DST unit according to above DST document analysis obtains extracts its inner parameter, is used for next step images match.By calculating parameters such as obtaining internal feature figure, barycenter, characteristic vector.Because might there be too much feature in inside, DST unit, therefore when extracting DST unit internal information, can be set to automatic information extraction, also can namely select interesting areas with mouse by the mode of artificial extraction.The present invention tends to the latter, the better effects if of coupling some.
2 sample extraction and processing
A most important step of vision-based detection is exactly IMAQ and processing, can realize accurate vision measurement by high-resolution camera, native system adopts the Cannon550d camera, and this camera has 1,800 ten thousand pixels, resolution ratio is 5184*3456, and camera lens is for focusing the 50mm camera lens.Can comparatively comprehensively extract sample information by high-resolution camera, for the processing of sample image is laid a good foundation.Native system has stronger applicability, can be applied in other similar system.
2.1 system calibrating
Because embroidery cloth full-size to be processed is 60cm*40cm, consider the lens parameters of camera, camera frame is located at 1.4m place directly over the cut surface.In case camera is in place, with the cutting machine working face of camera lens perpendicular alignmnet below, adjust camera to pinpointed focus, locked then, no longer change camera parameter and position.The effective field of view of camera is about 62.98cm*42cm.
Carry out camera calibration according to the Zhang Zhengyou method, can obtain the distortion parameter of camera after the demarcation and then utilize the least square circle to detect the information such as mapping point that are tied to the cutting machine coordinate system by camera coordinates.Thereby finish following function:
1, carries out predistortion by distortion parameter, recover the real cloth sample image of embroidering as much as possible;
2, carry out camera coordinates and be tied to mapping under the physical coordinates system (coordinate system of machine), thereby instruct cutting machine correctly to cut.
Need demarcate when using for the first time, the distortion parameter, confidential reference items matrix and the camera coordinates that are used for the acquisition camera are tied to the mapping relations of cutting machine coordinate system.Calibration process is:
At first obtain lens distortion parameter and the confidential reference items matrix of camera by " Zhang Zhengyou gridiron pattern standardization ".Preserve parameter then, behind later every acquisition piece image, at first carry out distortion correction, to recover the information of original image as far as possible.
Next, adopt " based on the coordinate system standardization of least square method circle detection " to obtain the coordinate system transformation matrix, step is as follows:
(1) at first designs the PLT file of demarcating circle for cutting, be illustrated in fig. 7 shown below, cut out the circle of the different radii arrangement of 6*9 at the blank sheet of paper of a 70cm*55cm;
(2) from the PLT file, obtain accurate central coordinate of circle under the cutting machine coordinate system, P Ij=(x Ij, y Ij), x wherein Ij, y IjX axial coordinate and the y axial coordinate of the center of circle on the cutting machine coordinate system of representing the circle of the capable j row of i respectively;
(3) utilize camera to take one and demarcate circular image clearly, utilize existing distortion parameter then, carry out image and correct;
(4) adopt casual water completion method that the image after correcting is carried out binary conversion treatment, the circle in the image is become white, background becomes black;
(5) image after the binaryzation is carried out profile and extract, detect the point sequence C that each demarcates circle Ij
(6) each point sequence is carried out the match of RANSAC circle, obtain the central coordinate of circle Q of each circle Ij=(x' Ij, y' Ij), x' wherein Ij, y' IjRepresent x axial coordinate and the y axial coordinate that fasten in camera coordinates in the center of circle of the circle of the capable j of i row respectively;
(7) with the central coordinate of circle under the cutting machine coordinate system according to from left to right, form from top to bottom is arranged as homogeneous coordinates matrix P, with camera coordinates system down central coordinate of circle also be shown homogeneous coordinates matrix Q according to the race-card of correspondence;
P = x 11 , y 11 , 1 x 12 , y 12 , 1 · · · x 19 , y 19 , 1 x 21 , y 21 , 1 · · · · · · x 69 , y 69 , 1 Q = x ′ 11 , y ′ 11 , 1 x ′ 12 , y ′ 12 , 1 · · · x ′ 19 , y ′ 19 , 1 x ′ 21 , y ′ 21 , 1 · · · · · · x ′ 69 , y ′ 69 , 1
(8) adopt least square method, calculate the transform matrix M that is mapped to the cutting machine coordinate system from camera coordinate system, make it to satisfy following formula:
Q*M=P
(9) preserve matrix M, with it as later coordinate system mapping parameters.
2.2 sample extraction
The process of sample extraction is that sample is taken pictures, and carries out the process of distortion correction then.Put into when embroidering the cloth finished product at every turn and need guarantee that sample fully in the visual field of camera, prevents the situation that sample departs from the camera visual field.Be printed on the boundary line of workspace at the working face of cutting machine, place that the boundary line can guarantee to embroider the cloth position in valid analysing range as long as roughly align in the upper left corner when embroidering cloth at every turn.
2.3 sample process
Figure 3 shows that an embroidery cloth that adopts the full-automatic computer embroidery machine to finish, embroider and be covered with a lot of flower type unit (minimum unit in the sampler file) on the cloth, the position of arranging of these flower type unit is basic consistent with the DST design document, therefore there is a perspective transformation matrix from the DST file to embroidery cloth sample, with the DST coordinate system transformation to embroidering the cloth physical coordinates is.Computer embroidering machine is according to the embroidery data that comprises in the DST file, and embroidery such as execution is made, bouncing pilotage, colour changing, trimming are moved.Usually the precision of computer embroidering machine is 0.1mm, under the condition of ignoring the machine system error, can think DST file and actual embroidery cloth finished product, is man-to-man full scale mapping.In the time of on embroidering the cut surface that cloth is placed on cutting machine artificially, exists one from the DST file to the perspective transformation matrix of embroidering cloth sample image, the DST coordinate system transformation is arrived magazine embroidery cloth coordinate system.But in actual the use, it is soft yielding embroidering cloth, causes this conversion to have error.Especially when embroidering the perk of cloth part, have tangible distortion.Therefore need to adopt least square method, calculate the optimal transformation matrix.
A common colored type unit has comprised line of cut and inner a plurality of colored type elements of a closure.These flower type elements arranging and the shape machine of all embroider is embroidered out according to the DST file, therefore, can embroider the thorn embroidery type unit that roughly find correspondence on the cloth according to the position that obtains flower type unit in the DST file.
The basic step of sample process is:
1, cell location according to the arrange linear transformation of position and camera of DST unit, estimates the approximate location of colored type unit, orients a rectangle frame.In the position fixing process, resolve the size of the colored type unit obtain according to DST, choose a rectangle frame that can comprise colored type unit, basis draws the rectangle frame that transforms on the cutting machine by camera to the coordinate system transformation of cutting machine then.
2, binaryzation with the coloured image binaryzation in the flower type unit rectangle frame, arranges embroidery cloth background colour and becomes black, and other elements become white, keep the contour feature of flower type unit inner element.The follow-on casual water completion method in this part is used for improving the effect that casual water is filled.A plurality of as sample point by in the embroidery sample, selecting at random, by judging whether these points of selecting at random are background dot, be used as the seed point if then keep, if not then ignoring, increased the robustness of system after the improvement, the better effects if that the water that overflows is filled.
3, calculate the contour feature vector, calculate Hu square and the barycenter of binaryzation frame.
2.3.1 cell location
According to the DST analysis result, can obtain size and the corresponding bounding box of each DST unit.Also exist a kind of linear transformation between the embroidery cloth sample that DST file and camera collect, therefore can estimate each cell position of embroidering in the cloth according to the cell position that from the DST file, is resolved to.Because camera is fixed, and DST embroidery file and corresponding embroidery cloth can be regarded as basically identical.Just exist translation, rotation, three kinds of conversion of convergent-divergent between the coordinate in the DST file and the corresponding camera coordinates.
The putting position of embroidering cloth has tentatively determined shift factor T and twiddle factor R.Owing to embroider the constraint that is subjected to a certain degree of putting of cloth sample, namely embroider the effective field of view that cloth must be put into camera, therefore can estimate shift factor T'.Can embroider the zoom factor S' of cloth according to a preliminary estimate by the visual field size of camera.Can estimate twiddle factor R' by four angles of embroidering cloth, concrete steps are as follows:
(1) according to embroidering the position constraint that cloth is put: owing to embroider the visual field problem that need consider camera when cloth is put, native system is marked with effective coverage and orthogonal coordinate at cutting machine.To embroider cloth and substantially put into cutting machine as requested, then embroider the cloth anglec of rotation be generally less than ± 10 °.Can be obtained the barycenter homogeneous coordinates V of unit, 4 summits again by DST document analysis result k=(x k, y k, 1), k=1,2,3,4, and corresponding rectangular element frame R k=W k* H kThe unit, summit is numbered 1~4 according to clockwise direction.
Parameter: x wherein kFor obtaining the x axial coordinate of k summit units centre of mass of image after the DST parsing; y kFor obtaining the y axial coordinate of k summit units centre of mass of image after the DST parsing; R kFor obtaining the frame of the unit, k summit of image after the DST parsing; W kBe its border width; H kBe its frame length.
(2) adopt the Pan and Zoom conversion coefficient that estimates, obtained the initial barycenter homogeneous coordinates of unit, 4 summits in the sample image by following formula:
V' k=(x' k,y' k,1),k=1,2,3,4
The frame of unit, 4 summits in the image:
R' k=W' k×H' k=S'W k×S'H k
V ′ k T = S ′ 1 0 T ′ x 0 1 T ′ y 0 0 1 V k T
Parameter: x wherein k' be the x axial coordinate of k summit units centre of mass of sample image; y k' be the y axial coordinate of k summit units centre of mass of sample image; R k' be the frame of the unit, k summit of sample image; W k' be its border width; H k' be its frame length; T' xShift factor for x axle in the sample image; T' yShift factor for y axle in the sample image.
(3) it is level and smooth sample image to be carried out Gauss, and it is down-sampled to carry out 1/2 pyramid then, might as well get 1/4 rectangular area of embroidering the cloth size at the center of embroidering cloth, counts the highest color of the frequency of occurrences as embroidering the cloth background colour by color histogram.
(4) in sample image, with coordinate V' kCentered by, then with 1.5W k' * 1.5H k' fill binary conversion treatment for carrying out 11 casual water in the rectangular area of length and width.Shown in Fig. 8 (wherein Fig. 8 is that 9 casual water are filled), select 11 points as alternative seed point at first at random, seed point to each candidate, in the zone of 11 * 11 neighborhoods, calculate color mean value, if mean value approaches the background colour of embroidering cloth, and neighborhood color variance is less, then this point is classified as casual water and is filled the seed point.
(5) each seed point is carried out casual water filling algorithm, obtain unit V' kBinary image.Then, carry out sliding window search, in window, calculate contour area than and regional Hu square, and with DST in corresponding vertex V kContour feature carry out similitude relatively, be shown below:
I ( A , B ) = Σ p = 1 7 | m p A - m p B m p A |
m p A = sign ( h p A ) log | h p A |
m p B = sign ( h p B ) log | h p B |
I(A,B)<T hu
Wherein: A resolves the unit of back image for the DST that selects; B is the unit of the sample image of selection;
Figure GDA00003400349200098
With
Figure GDA00003400349200099
It is respectively the Hu square of A and B.T HuBe Hu square similarity threshold, generally be taken as 1.5.
(6) will satisfy the rectangular area of area ratio and Hu square similarity threshold as unit V' kThe boundary candidate frame, then, with the boundary candidate of Hu square similarity minimum as unit V' kThe real border frame.And obtain the true barycenter V'' of unit k
(7) by vertex vector in the image
Figure GDA00003400349200095
Vertex vector with DST embroidery file
Figure GDA00003400349200096
Between angle theta kAnd shift factor T', can obtain twiddle factor estimated value R'=θ.
(8) according to resolving each DST cell borders upper left corner homogeneous coordinates L that obtains in the DST file k=(x k, y k, 1) and estimate the transformation factor obtain, can estimate the frame upper left corner homogeneous coordinates L' of each flower type unit in the image kCorresponding DST frame scaled S' doubly.
L &prime; k T = S &prime; cos &theta; - sin &theta; T x &prime; sin &theta; cos &theta; T y &prime; 0 0 1 L k T
2.3.2 the binaryzation of embroidery sample
After carrying out cell location, can decide the home position of each flower type unit, local positioning is carried out in each frame inside then.Not only reduce treating capacity, accelerated processing speed, and improved positioning accuracy.The binaryzation of flower type unit is the basis of accurately extracting each unit inner element contour feature.By contrasting various binarization methods, the result of contrast binaryzation in order to guarantee the robustness of binaryzation, has improved original casual water filling algorithm, has designed a kind of adaptive casual water filling algorithm:
1, obtains the main background colour of embroidering cloth.According to DST file and camera parameter, select to embroider the cloth central area, the color histogram in computer center zone, with the highest color of frequency as embroidering cloth master color, i.e. background colour;
2, adopt 9 methods to calculate the seed point that casual water is filled.Sampling 9 points as shown in Figure 8 in image, whether be background colour, if background colour is then included it in the seed point if calculating this place neighborhood window;
3, adaptive threshold is chosen.Adopt basic thresholding method to obtain the threshold value that two-value is cut apart, and calculate crest to both sides, quantize the peak separation.By the discretization of quantized interval, realize adaptive threshold;
4, with adaptive threshold the seed point that remains is overflow water and fill, and add up the coverage of each seed point and the color average of covering;
5, filter casual water blank map by hsv color, realize embroidering the sample binaryzation.By the seed point coverage of adding up in 9 casual water filling process, can further upgrade background colour.Calculate the hsv color value of background colour then, filter out residual block of pixels in the binary map with this color value;
6, the UNICOM's territory area in the statistics bianry image, UNICOM's territory bounding box length-width ratio filters out the part zone errors;
7, fill the profile that remains, export complete binary map.
2.3.3 flower type element characteristic extracts
According to the cell location among the 2.3.1, regional Hu square and geometric properties in rectangle frame after the calculating embroidery unit binaryzation.
3 couplings
Calculated the internal feature of DST unit and the internal feature of colored type unit to be matched with top, next needed to mate.Coupling is divided into:
1, geometric properties coupling: a. comprises that area filters, and the profile that contour area is too big or too little is rejected; B. the bounding box length-width ratio is not satisfied the rejecting of threshold value.
2, outline contrasts the Hu square that each spends corresponding unit in type unit and the DST file, calculates matching result.Matching formula:
I ( A , B ) = &Sigma; p = 1 7 | m p A - m p B m p A |
m p A = sign ( h p A ) log | h p A |
m p B = sign ( h p B ) log | h p B |
I(A,B)<T hu
And successfully the units centre of mass of coupling remains, and further does the least square conversion;
3, least square conversion, the least square conversion of each corresponding unit center-of-mass coordinate can obtain a perspective transformation matrix C among the barycenter by flower type unit and the DST.
The 4DST mapping
According to the perspective transformation matrix that coupling obtains, the line of cut that the DST document analysis is obtained is mapped on the embroidery sample image, and shows the embroidery sample image after the mapping.The present invention also has been equipped with individual fine adjustment function, if the line of cut location is inaccurate, and can manual change's line of cut position.After the DST mapping is finished, preservation is mapped to the line of cut information of embroidery sample image, and this information is transformed on the cutting machine coordinate system: demarcate the transform matrix M that the camera coordinates that obtains is tied to the cutting machine coordinate system according to coordinate system, X is the line of cut coordinate of each unit among the DST, and Y is the coordinate of cutting machine coordinate system
Y=CMX
Line of cut image after the preservation conversion, this moment, this line of cut image was laser cutting machine movement locus line to the end.
Because the laser cutting machine control card is only accepted the movement locus of PLT form, therefore the line of cut image that need will obtain at last saves as the file of PLT form.
Operational instances
Be illustrated in figure 9 as the MFC interface that the present invention does, this interface mainly is divided into five parts: embroidery pattern, camera control, image detection, camera calibration and upper right corner display box.Wherein, the embroidery pattern is mainly used in the DST document analysis, by opening the DST file, shows the DST image that parses in the window thereunder; Camera control mainly is the input of control sample image, is used for obtaining sample image, by showing sample information on the cutting machine at upper right corner display box; Image detection is the further processing after the sample image input, mainly is work such as images match, line of cut location; Camera calibration is to be used for determining raw informations such as camera basic parameter, coordinate system transformation when using this invention for the first time.
Figure 10 is the cutting machine schematic diagram after the improvement of the present invention.As shown in FIG., camera frame is located at 1.4m place directly over the cut surface, can comparatively ideally obtain the cloth information of embroidering like this, because uneven illumination is even the image post-processed there is very big influence, therefore set up two fluorescent lamps on the cutting machine both sides, can reduce the inhomogeneous influence for post-processed of light so to greatest extent.The effective field of view of camera is about 62.98cm*42cm, therefore need consider visual field problem when placing embroidery cloth, and we have marked the desirable visual field on cut surface, only need put into marked region substantially when cloth is embroidered in placement and get final product.
Provide the operating procedure of an example below:
(1) need demarcate when of the present invention for the first time using.There are two buttons to be used for demarcating in the lower right corner at MFC interface, finish demarcation by clicking these two buttons, obtain the raw information of system.
(2) sample of will embroidering is put on the working face of cutting machine, is printed on the boundary line of workspace at working face, places that the boundary line can guarantee to embroider the cloth position at valid analysing range as long as roughly align in the upper left corner when embroidering cloth at every turn.
(3) click open button, input is DST file and the parsing of correspondence with it, shows the DST image after resolving in the display window of this part.
(4) click " finding a view " button at the camera control section, in top-right display box, show the visual field of camera, judge by observing whether the embroidery sample is placed in the effective field of view.
(5) clicking " taking pictures " button is used for sample image is imported into system.
(6) click " position probing " button this moment, obtain the matching result of DST image and embroidery sample, as shown in figure 11.Red square frame among the figure, the result of expression coupling namely searches out characteristic area.
(7) click " line of cut detections " and obtain the image that shows among Figure 12, Figure 13, the line of cut image that image obtains according to matching result, it is qualified that the result who locatees by the observation line of cut judges whether.
(8) judge that line of cut is qualified after, click " derivations " button and derive the PLT formatted file that cutting machine can read, begin to cut, cutting process is as shown in figure 14.
(9) Figure 15 is through the cloth after the laser cutting.

Claims (5)

1. automatic cutting method of embroidery cloth of being combined with machine vision based on the DST document analysis is characterized in that this method uses a kind of laser cutting machine, has set up camera directly over this laser cutting machine cut surface, and the automatic cutting method of described embroidery cloth comprises the steps:
(1) DST document analysis obtains original embroidery document image information and internal feature information, for images match does homework;
(2) sample extraction and processing, taking pictures by camera obtains sample image information, and sample image is carried out distortion correction, binary conversion treatment and extracts the operation of sample internal feature, obtains the characteristic information of sample;
(3) coupling is mated the DST file that obtains and the characteristic information of sample, and the matching unit barycenter also carries out barycenter coupling and line of cut correction according to least square method;
(4) DST shines upon, and the line of cut coordinate after the coupling is mapped to by coordinate transform be used for cutting under the cut surface coordinate system, exports the PLT file that laser cutting machine can be carried out then, is cut by laser cutting machine.
2. the automatic cutting method of embroidery cloth of being combined with machine vision based on the DST document analysis as claimed in claim 1 is characterized in that the process of DST document analysis comprises:
(1.1) resolve the function of each pin according to the coded system of DST file, offset coordinates and the operation of recording each pin, and the closed data segment that occurs in the record resolving;
(1.2) resolve the result who obtains according to (1.1), create a width of cloth blank image, on image, the concrete action of each pin is delineated out, obtain DST analysis diagram picture;
(1.3) the closed data segment that obtains according to (1.1), judge whether closed data segment is the frame of DST unit, if should the closure data segment be bounding box, then extract its inner information as the information of DST unit, if not then continuing judgement, up to the bounding box that obtains the DST unit.
3. the automatic cutting method of embroidery cloth of being combined with machine vision based on the DST document analysis as claimed in claim 1, it is characterized in that the transformation matrix that is mapped to the cutting machine coordinate system from camera coordinates system adopts " based on the coordinate system standardization of least square method circle detection " to obtain, step is as follows:
(1) at first designs the PLT file of demarcating circle for cutting;
(2) from the PLT file, obtain accurate central coordinate of circle under the cutting machine coordinate system
Figure 2012101218921100001DEST_PATH_IMAGE001
, wherein
Figure 950694DEST_PATH_IMAGE002
,
Figure 2012101218921100001DEST_PATH_IMAGE003
Represent respectively iRow jThe center of circle of circle of row is on the cutting machine coordinate system xAxial coordinate and y axial coordinate;
(3) utilize camera to take one and demarcate circular image clearly, utilize existing distortion parameter then, carry out image and correct;
(4) adopt casual water completion method that the image after correcting is carried out binary conversion treatment, the circle in the image is become white, background becomes black;
(5) image after the binaryzation is carried out profile and extract, detect the point sequence that each demarcates circle;
(6) each point sequence is carried out the match of RANSAC circle, obtain camera coordinates system and demarcate round heart coordinate down , wherein
Figure 2012101218921100001DEST_PATH_IMAGE005
,
Figure 631522DEST_PATH_IMAGE006
Represent respectively iRow jFasten in camera coordinates in the center of circle of the circle of row xAxial coordinate and y axial coordinate;
(7) with the central coordinate of circle under the cutting machine coordinate system according to from left to right, form from top to bottom is arranged as homogeneous coordinates matrix P, with camera coordinates system down central coordinate of circle also be arranged as homogeneous coordinates matrix Q according to the order of correspondence;
(8) adopt least square method, calculate the transform matrix M that is mapped to the cutting machine coordinate system from camera coordinates system, make it satisfied: Q*M=P.
4. the automatic cutting method of embroidery cloth of being combined with machine vision based on the DST document analysis as claimed in claim 1, it is characterized in that in sample extraction and the processing procedure, adopt the casual water completion method of improved self adaptation that sample image is carried out binary conversion treatment, namely a plurality of as sample point by in the embroidery sample, selecting at random, judge whether these points of selecting at random are background dot, be used as the seed point if then keep, if not then ignoring.
5. the automatic cutting method of embroidery cloth of being combined with machine vision based on the DST document analysis as claimed in claim 1 is characterized in that installing a fluorescent lamp respectively additional in the cutting machine both sides in order to reduce the even influence that the image post-processed is produced of uneven illumination.
CN 201210121892 2012-04-24 2012-04-24 Automatic cutting method of embroidery cloth based on combination of DST file parsing and machine vision Expired - Fee Related CN102704215B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201210121892 CN102704215B (en) 2012-04-24 2012-04-24 Automatic cutting method of embroidery cloth based on combination of DST file parsing and machine vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201210121892 CN102704215B (en) 2012-04-24 2012-04-24 Automatic cutting method of embroidery cloth based on combination of DST file parsing and machine vision

Publications (2)

Publication Number Publication Date
CN102704215A CN102704215A (en) 2012-10-03
CN102704215B true CN102704215B (en) 2013-09-25

Family

ID=46897249

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201210121892 Expired - Fee Related CN102704215B (en) 2012-04-24 2012-04-24 Automatic cutting method of embroidery cloth based on combination of DST file parsing and machine vision

Country Status (1)

Country Link
CN (1) CN102704215B (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107130376A (en) * 2016-02-26 2017-09-05 黄德林 Computer Three-dimensional embroidery calligraphy and painting process
EP3500392B1 (en) 2016-08-19 2022-07-06 Levi Strauss & Co. Laser finishing of apparel
US10921968B2 (en) 2017-10-31 2021-02-16 Levi Strauss & Co. Laser finishing design tool with image preview
US20190125015A1 (en) 2017-10-31 2019-05-02 Levi Strauss & Co. Using Neural Networks in Creating Apparel Designs
CN107967697B (en) * 2017-11-23 2021-02-26 四川大学 Three-dimensional measurement method and system based on color random binary coding structure illumination
US11313072B2 (en) 2018-02-27 2022-04-26 Levi Strauss & Co. On-demand manufacturing of laser-finished apparel
CN112262363A (en) 2018-02-27 2021-01-22 利惠商业有限公司 Laser arrangement design tool
CN108875740B (en) * 2018-06-15 2021-06-08 浙江大学 Machine vision cutting method applied to laser cutting machine
US10793998B2 (en) 2018-08-07 2020-10-06 Levi Strauss & Co. Outdoor retail space structure
WO2020102567A1 (en) * 2018-11-16 2020-05-22 The North Face Apparel Corp. Systems and methods for end-to-end article management
WO2020113236A1 (en) 2018-11-30 2020-06-04 Levi Strauss & Co. Shadow neutral 3-d garment rendering
EP4004270A4 (en) 2019-07-23 2023-07-05 Levi Strauss & Co. Three-dimensional rendering preview of laser-finished garments
CN111144160B (en) * 2019-12-27 2023-10-20 杭州爱科科技股份有限公司 Full-automatic material cutting method and device and computer readable storage medium
CN111611721A (en) * 2020-05-29 2020-09-01 全球能源互联网集团有限公司 Computer arrangement method of solar cell array
CN111932491B (en) * 2020-06-23 2022-02-08 联宝(合肥)电子科技有限公司 Component detection method, device and storage medium

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01289591A (en) * 1988-05-16 1989-11-21 Shinko Kogyo Co Ltd Multi head laser beam machine
JPH03138092A (en) * 1989-10-24 1991-06-12 Toshiba Corp Laser beam machine
JP2971327B2 (en) * 1993-07-28 1999-11-02 株式会社 タナベ刺繍 Sewing machine with laser cutter and embroidery method
CN1126633C (en) * 1995-01-13 2003-11-05 东海工业缝纫机株式会社 Laser processing machine and sewing machine with laser processing function
JPH0957473A (en) * 1995-08-25 1997-03-04 Kesami Hasegawa Method for marking identification bar code of needle
ITTO20030263A1 (en) * 2003-04-04 2004-10-05 Fiat Ricerche PROCEDURE FOR THE QUALITY CONTROL OF A
CN2734440Y (en) * 2004-07-06 2005-10-19 东莞市粤铭激光技术有限公司 Full-automatic camera shooting brand cutting machine
DE102005050482B3 (en) * 2005-10-21 2007-01-11 Saurer Hamel Ag Continuously embroidering and cutting materials, especially appliques, in embroidering machine with laser cutting head, with cutting unit operated during frame shut-down and/or material advancement stage
CN201087267Y (en) * 2007-07-04 2008-07-16 东莞市粤铭激光技术有限公司 Multi-head computer embroidery machine with laser pattern carved device
US8024060B2 (en) * 2008-06-16 2011-09-20 Electro Scientific Industries, Inc. Method for defining safe zones in laser machining systems
CN201567495U (en) * 2009-08-14 2010-09-01 武汉金运激光股份有限公司 Laser cutting head and integrated laser embroidery machine using the same

Also Published As

Publication number Publication date
CN102704215A (en) 2012-10-03

Similar Documents

Publication Publication Date Title
CN102704215B (en) Automatic cutting method of embroidery cloth based on combination of DST file parsing and machine vision
RU2680765C1 (en) Automated determination and cutting of non-singular contour of a picture on an image
CN105913093B (en) A kind of template matching method for Text region processing
CN112818988B (en) Automatic identification reading method and system for pointer instrument
CN102176228B (en) Machine vision method for identifying dial plate information of multi-pointer instrument
CN109583324A (en) A kind of pointer meters reading automatic identifying method based on the more box detectors of single-point
CN107230203A (en) Casting defect recognition methods based on human eye vision attention mechanism
CN106529559A (en) Pointer-type circular multi-dashboard real-time reading identification method
CN106951905A (en) Apple identification and localization method on a kind of tree based on TOF camera
CN112906694A (en) Reading correction system and method for inclined pointer instrument image of transformer substation
CN104200461A (en) Mutual information image selected block and sift (scale-invariant feature transform) characteristic based remote sensing image registration method
CN103034838A (en) Special vehicle instrument type identification and calibration method based on image characteristics
CN105913013A (en) Binocular vision face recognition algorithm
CN106127205A (en) A kind of recognition methods of the digital instrument image being applicable to indoor track machine people
CN103440035A (en) Gesture recognition system in three-dimensional space and recognition method thereof
CN102930251A (en) Two-dimensional collection data recording and discriminating device and method
CN111161295A (en) Background stripping method for dish image
CN112069985A (en) High-resolution field image rice ear detection and counting method based on deep learning
CN102855485A (en) Automatic wheat earing detection method
CN109389165A (en) Oil level gauge for transformer recognition methods based on crusing robot
CN108022245A (en) Photovoltaic panel template automatic generation method based on upper thread primitive correlation model
CN113657339A (en) Instrument pointer counting and reading method and medium based on machine vision
CN114119695A (en) Image annotation method and device and electronic equipment
CN111369497B (en) Walking type tree fruit continuous counting method and device
CN113378663A (en) Inspection pointer type circular instrument identification method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130925

Termination date: 20170424

CF01 Termination of patent right due to non-payment of annual fee