CN103593860A - Cutting method for any irregular blank - Google Patents
Cutting method for any irregular blank Download PDFInfo
- Publication number
- CN103593860A CN103593860A CN201310521155.5A CN201310521155A CN103593860A CN 103593860 A CN103593860 A CN 103593860A CN 201310521155 A CN201310521155 A CN 201310521155A CN 103593860 A CN103593860 A CN 103593860A
- Authority
- CN
- China
- Prior art keywords
- blank
- coordinate
- formula
- rectangle
- profile
- 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.)
- Granted
Links
Images
Landscapes
- Image Processing (AREA)
Abstract
The invention provides a cutting method for any irregular blank, and relates to the field of blank processing. The method comprises the steps that data of the blank to be cut are collected; the rectangular outline of the blank is determined by means of the genetic algorithm to serve as the cutting boundary of the blank; the cutting scheme is input into a control system, the blank to be processed in the step one is cut, and a blank board required by blank layout according with the process is obtained. According to the cutting method, as for the irregular blank shape, a rectangle having the largest area is found, the portion capable of being used or being used for used blank layout in the irregular blank can be rapidly and accurately obtained, the portion right serves as a connection port, the connection port and the blank are tightly combined, and blank layout can be directly conducted on the obtained rectangle by means of blank layout software. A large amount of blank layout time is saved, production efficiency is improved, the material using rate is increased, labor cost and material cost are saved for plants, and economic benefits are created.
Description
Technical field
The present invention relates to a kind of blank manufacture field, particularly a kind of cut-out method for any irregular blank.
Background technology
The problem of cutting out on any irregular blank border is extensively present in the industries such as boats and ships, furniture, clothes, machine-building, large stone material plate and light industry.For cutting out after the artificial repeated measurement of main employing is at present tested of irregular border, cut out, this technical merit to workman requires very high, mainly depend on workman's experience, and efficiency is very low, the workman that level is different can obtain different blank utilization factors, causes the waste of material.For this problem, the present invention proposes a kind of cut-out method for irregular blank border, obtains wherein available maximum area rectangle.
Summary of the invention
The deficiency existing for prior art, the present invention proposes a kind of cut-out method for any irregular blank, to reach a large amount of artificial stock layout time of saving, has improved the utilization factor of throughput rate and material, for factory has saved cost of labor and material cost, created economic benefit
Technical scheme of the present invention is achieved in that a kind of cut-out method for any irregular blank, comprises the following steps:
Step 1: gather the data for the treatment of tailored blank, comprising:
Step 1-1: take blank to be processed, take two width images;
The blank drawing picture that the first width is had powerful connections for band;
The second width is the background image identical with the first width background;
Step 1-2: deduct the second width image with the first sub-picture, remove background, obtain blank drawing picture;
Step 1-3: the blank drawing that utilizes Sobel operator to obtain step 1-2 looks like to carry out rim detection, determines the border of blank profile;
Step 1-4: the edge image that step 1-3 is obtained is lined by line scan, take pixel as unit, usings image lower-left angle point as initial point, sets up coordinate system, and the pixel coordinate matrix [u, v] that obtains edge image is:
In formula, u, v are pixel coordinate value in camera coordinates system, the pixel quantity that n is profile; x
1, x
2..., x
nrepresent the horizontal ordinate of point; y
1, y
2..., y
nrepresent the ordinate of point;
Step 1-5: the profile matrix conversion under blank pixel coordinate is become to the profile matrix under world coordinates, and concrete steps are as follows;
Step 1-5-1: the scaling method providing by industrial camera supplier obtains the internal reference f of video camera
x, f
y, c
x, c
ywith outer ginseng R, T, wherein: R is the rotation matrix of a 3*3, T is the translation matrix of a 3*1;
Step 1-5-2: calculate transition matrix A, the computing formula of A is as follows:
Step 1-5-3: the blank profile being obtained by step 1-3 is the profile under camera coordinates, relation between its true profile and its corresponding point in image is that the geometric model by video camera determines, the funtcional relationship between pixel coordinate value and real world coordinates value meets following formula:
In formula, Z
wfor conversion coefficient, X
w, Y
w, Z
wit is the coordinate in world coordinate system;
The pixel coordinate profile that step 1-4 is obtained is brought formula (3) into, thereby calculates the world coordinates of blank profile;
Step 1-6: utilize profile matrix coordinate points that step 1-5 obtains to determine 4 boundary extremum points, i.e. the maximal value X of X coordinate axis of blank profile
max, X coordinate axis minimum value X
min, Y coordinate axis maximal value Y
maxand the minimum value Y of Y coordinate axis
min;
Four coordinate points utilizing above-mentioned four extreme values to be combined into the circumscribed rectangle of blank profile are respectively:
RP
1(X
min, Y
min), RP
2(X
max, Y
min), RP
3(X
max, Y
max) and RP
4(X
max, Y
min)
Above-mentioned four coordinate points lines obtain the circumscribed rectangle that is parallel to coordinate axis of blank profile;
Step 2: utilize genetic algorithm to determine the rectangular profile of blank, the border as blank is cut out, comprises the following steps:
Step 2-1: in step 1-6, in determined circumscribed rectangular extent, generate at random m little rectangle as initial population, specific as follows:
Step 2-1-1: get first at random two coordinate points P
1(x
1, y
1) and P
2(x
2, y
2), make coordinate points meet following three conditions simultaneously:
Condition 1: the coordinate points P choosing at random
1horizontal ordinate x
1, P
2horizontal ordinate x
2can not exceed circumscribed rectangle horizontal ordinate border:
X
min<x
1,x
2<X
max
Condition 2: the coordinate points P choosing at random
1ordinate y
1, P
2ordinate y
2can not exceed circumscribed rectangular longitudinal coordinate border:
Y
min<y
1,y
2<Y
max,
Condition 3: preventing other 2 of little rectangle, to exceed blank profile border too many, and the length of side L of the little rectangle that forms should meet:
L<max{Y
max-Y
min,X
max-X
min}
According to coordinate points P
1and P
2coordinate figure and length of side L, calculate the coordinate figure P thirdly of little rectangle
3(x
3, y
3), formula is:
In formula, x
3represent P
3horizontal ordinate, y
3represent P
3ordinate;
By formula (4), solve and obtain two coordinate figures and meet equation, select wherein as little rectangle coordinate figure thirdly at random;
Then according to P
1, P
2, P
3calculate little rectangle the 4th point coordinate P
4(x
4, y
4), formula is:
In formula, x
4represent P
4horizontal ordinate, y
4represent P
4ordinate;
Step 2-1-2: to the coordinate of four points of the resulting little rectangle of step 2-1-1 and step 1-5 blank profile coordinate, adopt rays method to differentiate random these four points that produce and the relation of blank profile, within confirming that four points of little rectangle and the four edges of little rectangle are all positioned at the border of blank profile, if not within blank profile border, utilize step 2-1-1 to regenerate another little rectangle;
Four summit Cheng Shengyi chromogene CH that recycle formed little rectangle, the coding rule of chromogene CH is: by four coordinate points according to { x1y1x2y2x3y3x4y4} sequentially arranges;
Step 2-1-3: utilize step 2-1-1 and step 2-1-2 to produce m little rectangle as initial population N, N is the matrix of a m*8, and has N >=100;
The coding rule of population N is:
Chromogene CH of each line display of N, the columns of N represents the scale m of population;
Step 2-2: on the basis that meets rectangle constraint and area maximum, the initial population of step 2-1 generation is evaluated, because the area less expression chromogene of degree larger, that violate rectangle constraint of little rectangle is more outstanding, the area formula of arbitrary quadrilateral is:
S=0.5×|x
1×y
2-x
2×y
1+x
2×y
3-x
3×y
2+x
3×y
4-x
4×y
3+x
4×y
1-x
1×y
4| (6)
In formula, S represents tetragonal area;
What little rectangle should meet is constrained to:
Parallel Constraint: any opposite side of rectangle should be parallel, and formula is as follows:
Vertical constraint: rectangle arbitrary neighborhood both sides angle is 90 degree, and formula is as follows:
(y
2-y
1)×(y
4-y
1)-(x
2-x
1)×(x
1-x
4)=0 (8)
The degree that arbitrary quadrilateral is violated rectangle constraint is defined as penalty term, and formula is:
penatly1=|(y
4-y
1)×(x
3-x
2)-(y
3-y
2)×(x
4-x
1)|
penatly2=|(y
2-y
1)×(x
4-x
3)-(y
4-y
3)×(x
2-x
1)| (9)
penatly3=|(y
2-y
1)×(y
4-y
1)-(x
2-x
1)×(x
1-x
4)|
In formula: penatly1 represents first penalty term, penatly2 represents second penalty term, and penatly3 represents the 3rd penalty term;
The fitness function that adds penalty term to obtain population in area formula is:
fitness=S-100×(penatly1+penatly2+penatly3)/max{penatly1,penatly2,penatly3} (10)
In formula: fitness represents fitness function;
The initial population that step 2-1 is produced is brought fitness function formula (10) into chromogene is carried out to fitness evaluation, and sorts according to the size of fitness value;
Step 2-3: set up to select operator, select chromogene that adaptive value is high as the population of next step cross-reference in the colony that adopts the mode of roulette to obtain at step 2-2, be embodied as:
Adopt the mode of roulette to select to produce population of new generation: the ratio of the selecteed desired amt of each chromogene and the shared colony of its adaptive value adaptive value summation, as selecting probability, generates population of new generation;
N (the Ch of colony that is m for given scale
1, CH
2..., CH
m), individual fitness is fitness (Ch
i), it selects probability to be:
In formula: P (Ch
i) represent the selecteed probability of this chromogene; Fitness (Chi) represents this chromosomal adaptive value;
Calculate each individual fitness shared ratio in colony's adaptive value summation, represent this chromosome selected probability in selection course; Then generate a random number rand between [0,1], if met:
∑[P(CH
1)+P(CH
2)+.......+P(CH
i-1)]≤rand≤∑[P(CH
1)+P(CH
2)+.......+P(CH
i)]
Select i chromosome CH
i; After repetitive operation m time, obtain selected population N
ch, footmark ch represents the English meaning of selecting;
Step 2-4; The selected population N that step 2-3 is obtained
chcarry out interlace operation, adopt single-point to intersect, by adjacent chromogene Ch
iand Ch
i+1intersect, produce at random a random number P between [0,1]
cif, P
c<0.3 is a crossover location of random generation in interval [1,7], by chromogene Ch
iand Ch
i+1be positioned at crossover location genetic fragment afterwards and exchange, if P
c>=0.3 chromogene is not done and is intersected, the selected population N so step 2-4 being obtained
chthe intersection of carrying out between two gene obtains intersecting population N
cr, footmark cr represents the English meaning of intersecting;
Step 2-5: the population that step 2-4 is obtained carries out mutation operation, arbitrarily produces a random number P between [0,1]
mif, P
m<0.7 is random in interval [1,8] produces a variation position, and the number of variation position is become to a random number in the circumscribed rectangle that a step 1-6 produces; If P
m>=0.7 chromogene does not carry out mutation operation, the intersection population N so step 2-4 being obtained
creach chromosome operation population N that obtains making a variation
va, footmark ch represents the meaning of English variation;
Step 2-6: the population N that step 2-3,2-4 and 2-5 are obtained
ch, N
cr, N
vaform a gene pool N
gpto the chromogene of 3 * m in gene pool, utilize rays method to carry out the relationship distinguish of little rectangular dots, minor matrix four edges and blank profile; for being positioned at chromogene outside blank profile, to make fitness function value be zero, and the chromogene in blank profile is evaluated and sorted according to step 2-2;
Step 2-7: the chromosome that step 2-6 is obtained selects front m individual as follow-on initial population, and using the chromosome making number one as elite's gene, does not do any change and directly enter follow-on gene pool N
gpin guarantee that the excellent genes of every generation can not be destroyed;
Step 2-8: repeated execution of steps 2-3 step 2-7, until cycle index reaches default iterations It, stops optimizing, It >=100;
Step 2-9: the chromogene that the gene pool that step 2-8 is obtained makes number one because of output, obtains optimum blank cutting scheme as optimal base;
Step 3: this is cut out to scheme input control system, the blank to be processed of step 1 is cut out, obtain the required blank flat of stock layout that meets technique.
Beneficial effect of the present invention: most nesting all just can carry out based on rectangular plate, and actual blank shape is all irregular, need to manually participate in, the present invention is directed to irregular blank shape and find maximum area rectangle wherein, the part that can obtain rapidly and accurately can utilizing in irregular blank or can stock layout, just in time, as an interface, both are combined closely, the rectangle obtaining can directly utilize nesting to carry out stock layout.A large amount of artificial stock layout time of saving, the utilization factor ,Wei factory of having improved throughput rate and material has saved cost of labor and material cost, has created economic benefit.
Accompanying drawing explanation
Fig. 1 is that embodiment of the present invention is for the cut-out method process flow diagram of any irregular blank;
Fig. 2 is that the stone material blank drawing of embodiment of the present invention band background is as schematic diagram;
Fig. 3 is embodiment of the present invention background blank schematic diagram;
Fig. 4 is that the bright embodiment of this law background after treatment blank drawing that is black is as schematic diagram;
Fig. 5 is the blank edge image schematic diagram of the bright embodiment of this law after rim detection;
Fig. 6 is the circumscribed rectangle schematic diagram of the bright embodiment blank of this law profile;
Fig. 7 is that the imperial palace of the bright embodiment blank of this law irregular figure connects rectangle schematic diagram.
Embodiment
Below in conjunction with accompanying drawing, embodiments of the present invention are described in further detail.
The cut-out method for any irregular blank that present embodiment adopts, its flow process as shown in Figure 1, comprises the following steps:
Step 1: gather blank data, comprising:
Step 1-1: take blank to be processed, take two width images; Adopt the colored industrial digital video camera of Microvision MV-500UC to obtain large stone material plate image and background image, as shown in Figures 2 and 3.
Step 1-2: with Fig. 2 image subtraction Fig. 3, remove background, obtain blank drawing picture as shown in Figure 4.
Step 1-3: the blank drawing that utilizes Sobel operator to obtain step 1-2 looks like to carry out rim detection, Sobel operator is a kind of edge detection algorithm of first order differential operator, utilize that pixel is upper and lower, the gray scale difference of left and right adjoint point, in edge, reach extreme value Edge detected, remove part pseudo-edge, it has certain smoothing effect to noise.The blank drawing picture that step 1-2 is obtained is directly applied this operator, the blank edge image obtaining.The blank edge image obtaining as shown in Figure 5.
Step 1-4: Fig. 5 is lined by line scan, take pixel as unit, using image lower-left angle point as initial point, using the length of image as x axle, using the wide as y axle of image, the pixel coordinate that obtains edge image is:
Step 1-5: the profile matrix conversion under blank pixel coordinate is become to the profile matrix under world coordinates, and concrete mode is as follows;
Step 1-5-1: the calibration software providing by industrial camera supplier obtains the internal reference f of video camera
x=2368.91440, f
y=2368.39288, c
x=1448.11856, c
y=881.75401 and outer parameters R and T, wherein, the formula of outer parameters R is:
The formula of outer parameter T is:
Step 1-5-2: calculate transition matrix A, formula is as follows:
Step 1-5-3: bring the pixel coordinate array of step 1-4 into world coordinates that formula (3) obtains profile, formula is as follows:
Step 1-6: utilize step 1-5 to utilize the profile matrix coordinate points obtaining to ask the maximal value X of X coordinate axis
max=239.8 and minimum value X
min=0.6 and the maximal value Y of Y coordinate axis
max=341.4 and minimum value Y
min=139.8, utilize these four extreme values of X-axis and Y-axis can be combined into four coordinate points RP of rectangle
1(0.6,139.8), RP
2(239.8,139.8), RP
3(239.8,341.4) and RP
4(0.6,341.4), four coordinate points lines can obtain the circumscribed rectangle that blank profile is parallel to coordinate axis, and the circumscribed rectangle of blank profile is as shown in Figure 6.
Step 2: utilize genetic algorithm to determine the rectangular profile of cutting out blank, comprise the following steps:
Step 2-1: in determined circumscribed rectangular extent, generate at random m=100 little rectangle as initial population in step 1-6, comprising:
Step 2-1-1: get first at random two coordinate points P
1(x
1, y
1) and P
2(x
2, y
2) make coordinate points meet following constraint:
Constraint 1:X
min< x
1, x
2<X
max
Constraint 2:Y
min< y
1, y
2<Y
max
Constraint 3: each little rectangle length of side L, makes length of side L<max{Y
max-Y
min, X
max-X
min}
Object is to prevent other 2 of rectangle to exceed blank profile border too many, calculates the coordinate figure P thirdly of rectangle according to this coordinate figure of 2 and the length of side
3(x
3, y
3), formula is:
By formula (4), can solve and obtain two coordinate figures and meet equation, select wherein as rectangle coordinate figure thirdly at random.Then according to P
1, P
2, P
3calculate rectangle the 4th point coordinate P
4(x
4, y
4), formula is:
Step 2-1-2: the data point to the coordinate on four summits of the resulting rectangle of step 2-1-1 and step 1-5 blank profile, adopt rays method to differentiate four summits of the random rectangle producing and the relation of blank profile, within confirming whether four summits of little rectangle and the four edges of little rectangle are all positioned at the border of blank profile, if not within blank profile border, utilize step 2-1-1 to regenerate another little rectangle and substitute original little rectangle.
Utilize four points of little rectangle to become a raw chromogene CH, the coding rule of chromogene CH is: by four coordinate points according to { x1y1x2y2x3y3x4y4} sequentially arranges.
Step 2-1-3: utilize step 2-1-1 and step 2-1-2 to produce 100 rectangles as initial population N, N is the matrix of 100 * 8, for example:
If population N is:
Wherein, four coordinates of a rectangle of each line display, are exactly by P for the first rectangle
1(185,281), P
2(22,312), P
3(3.3165,213.7609) and P
4(166.3165,192.7609) four points form; This matrix N has 100 row, just represents to be comprised of 100 rectangles.
Step 2-2: on the basis that meets rectangle constraint and area maximum, the initial population of step 2-1 generation is evaluated.Because the area less expression chromogene of degree larger, that violate rectangle constraint of little rectangle is more outstanding, the area formula of arbitrary quadrilateral is:
S=0.5×|x
1×y
2-x
2×y
1+x
2×y
3-x
3×y
2+x
3×y
4-x
4×y
3+x
4×y
1-x
1×y
4| (6)
What rectangle should meet is constrained to:
Parallel Constraint: any opposite side of rectangle should be parallel, and formula is as follows:
Vertical constraint: rectangle arbitrary neighborhood both sides angle is 90 degree, and formula is as follows:
(y
2-y
1)×(y
4-y
1)-(x
2-x
1)×(x
1-x
4)=0 (8)
The degree that arbitrary quadrilateral is violated rectangle constraint is defined as penalty term, and formula is:
penatly1=|(y
4-y
1)×(x
3-x
2)-(y
3-y
2)×(x
4-x
1)|
penatly2=|(y
2-y
1)×(x
4-x
3)-(y
4-y
3)×(x
2-x
1)| (9)
penatly3=|(y
2-y
1)×(y
4-y
1)-(x
2-x
1)×(x
1-x
4)|
The fitness function that adds penalty term to obtain population in area formula is:
fitness=S-100×(penatly1+penatly2+penatly3)/max{penatly1,penatly2,penatly3} (10)
The initial population that step 2-1 is produced is brought fitness function formula (10) into chromogene is carried out to fitness evaluation, and sorts according to the size of fitness value.
Step 2-3: set up to select operator, set up and select operator, select chromogene that adaptive value is high as next step cross-reference in the colony that adopts the mode of roulette to obtain at step 2-2, be embodied as:
Adopt the mode of roulette to select to produce population of new generation, in the new colony of generation, the selecteed desired amt of each chromogene is relevant with the ratio of the shared colony of its adaptive value adaptive value summation.N (the Ch of colony that is 100 for given scale
1, CH
2..., CH
m), individual fitness is fitness (Ch
i), it selects probability to be:
In formula, P (Ch
i) represent the selecteed probability of this chromogene; Fitness (Ch
i) represent this chromosomal adaptive value;
Calculate each individual fitness shared ratio in colony's adaptive value summation, represent this chromosome selected probability in selection course; Then generate a random number rand between [0,1], if met:
∑[P(CH
1)+P(CH
2)+.......+P(CH
i-1)]<rand<∑[P(CH
1)+P(CH
2)+.......+P(CH
i)]
Select i chromosome CH
i; After repetitive operation m time, obtain selected population N
ch.
Step 2-4: the selected population N that step 2-3 is obtained
chcarry out interlace operation, adopt single-point to intersect, by adjacent chromogene Ch
iand Ch
i+1intersect, produce at random a random number P between [0,1]
cif, P
c<0.3 is a crossover location of random generation in interval [1,7], by chromogene Ch
iand Ch
i+1be positioned at crossover location genetic fragment afterwards and exchange, if P
c>=0.3 chromogene is not done and is intersected, the selected population N so step 2-4 being obtained
chthe intersection of carrying out between two gene obtains intersecting population N
cr.
Step 2-5: the population that step 2-4 is obtained carries out mutation operation, arbitrarily produces a random number P between [0,1]
mif, P
m<0.7 is random in interval [1,8] produces a variation position, and the number of variation position is become to a random number in the circumscribed rectangle that a step 1-6 produces; If P
m>=0.7 chromogene does not carry out mutation operation, the intersection population N so step 2-4 being obtained
creach chromosome operation population N that obtains making a variation
va.
Step 2-6: the population N that step 2-3,2-4 and 2-5 are obtained
ch, N
cr, N
vaform a gene pool N
gpto 300 chromogenes in gene pool, utilize rays method to carry out the four edges of little rectangular dots and little rectangle and the relationship distinguish of blank profile, for being positioned at chromosome outside blank profile, to make fitness function value be zero, and the chromogene in blank profile is evaluated and sorted according to step 2-2.
Step 2-7: the chromosome that step 2-6 is obtained select front 100 as follow-on initial population, and using the chromosome making number one as elite's gene, do not do any change and directly enter follow-on gene pool N
gpin guarantee that the excellent genes of every generation can not destroyed.
Step 2-8: repeated execution of steps 2-3 step 2-7, until cycle index reaches default iterations 300, stops optimizing.
Step 2-9: the chromogene that the gene pool that step 2-8 is obtained makes number one because the imperial palace of output blank irregular figure connects rectangle as shown in Figure 7, obtains optimum blank cutting scheme as optimal base.
Step 3: this is cut out to scheme input control system, the blank to be processed of step 1 is cut out, obtain the required blank flat of stock layout that meets technique.
Utilize area that formula (12) calculates blank profile and imperial palace to connect the area of rectangle, and the ratio that calculates them obtains the utilization factor of blank profile, it is 94.10% that step 2-9 the data obtained and step 1-5 blank outline data are brought the utilization factor that obtains blank into.Thereby the validity of embodiment of the present invention is described.
Wherein: S represents area, x
k, y
kthe horizontal ordinate and the ordinate that represent respectively polygon vertex, k=1,2 ..., m, is the polygonal summit of m, polygonal according to counterclockwise arranging.
Although more than described the specific embodiment of the present invention, the those skilled in the art in this area should be appreciated that these only illustrate, and can make various changes or modifications to these embodiments, and not deviate from principle of the present invention and essence.Scope of the present invention is only limited by appended claims.
Claims (1)
1. for a cut-out method for any irregular blank, it is characterized in that: comprise the following steps:
Step 1: gather the data for the treatment of tailored blank, comprising:
Step 1-1: take blank to be processed, take two width images;
The blank drawing picture that the first width is had powerful connections for band;
The second width is the background image identical with the first width background;
Step 1-2: deduct the second width image with the first sub-picture, remove background, obtain blank drawing picture;
Step 1-3: the blank drawing that utilizes Sobel operator to obtain step 1-2 looks like to carry out rim detection, determines the border of blank profile;
Step 1-4: the edge image that step 1-3 is obtained is lined by line scan, take pixel as unit, usings image lower-left angle point as initial point, sets up coordinate system, and the pixel coordinate matrix [u, v] that obtains edge image is:
In formula, u, v are pixel coordinate value in camera coordinates system, the pixel quantity that n is profile; x
1, x
2..., x
nrepresent the horizontal ordinate of point; y
1, y
2..., y
nrepresent the ordinate of point;
Step 1-5: the profile matrix conversion under blank pixel coordinate is become to the profile matrix under world coordinates, and concrete steps are as follows;
Step 1-5-1: the scaling method providing by industrial camera supplier obtains the internal reference f of video camera
x, f
y, c
x, c
ywith outer ginseng R, T, wherein: R is the rotation matrix of a 3*3, T is the translation matrix of a 3*1;
Step 1-5-2: calculate transition matrix A, the computing formula of A is as follows:
Step 1-5-3: the blank profile being obtained by step 1-3 is the profile under camera coordinates, relation between its true profile and its corresponding point in image is that the geometric model by video camera determines, the funtcional relationship between pixel coordinate value and real world coordinates value meets following formula:
In formula, Z
wfor conversion coefficient, X
w, Y
w, Z
wit is the coordinate in world coordinate system;
The pixel coordinate profile that step 1-4 is obtained is brought formula (3) into, thereby calculates the world coordinates of blank profile;
Step 1-6: utilize profile matrix coordinate points that step 1-5 obtains to determine 4 boundary extremum points, i.e. the maximal value X of X coordinate axis of blank profile
max, X coordinate axis minimum value X
min, Y coordinate axis maximal value Y
maxand the minimum value Y of Y coordinate axis
min;
Four coordinate points utilizing above-mentioned four extreme values to be combined into the circumscribed rectangle of blank profile are respectively:
RP
1(X
min, Y
min), RP
2(X
max, Y
min), RP
3(X
max, Y
max) and RP
4(X
max, Y
min)
Above-mentioned four coordinate points lines obtain the circumscribed rectangle that is parallel to coordinate axis of blank profile;
Step 2: utilize genetic algorithm to determine the rectangular profile of blank, the border as blank is cut out, comprises the following steps:
Step 2-1: in step 1-6, in determined circumscribed rectangular extent, generate at random m little rectangle as initial population, specific as follows:
Step 2-1-1: get first at random two coordinate points P
1(x
1, y
1) and P
2(x
2, y
2), make coordinate points meet following three conditions simultaneously:
Condition 1: the coordinate points P choosing at random
1horizontal ordinate x
1, P
2horizontal ordinate x
2can not exceed circumscribed rectangle horizontal ordinate border:
X
min<x
1,x
2<X
max
Condition 2: the coordinate points P choosing at random
1ordinate y
1, P
2ordinate y
2can not exceed circumscribed rectangular longitudinal coordinate border:
Y
min<y
1,y
2<Y
max,
Condition 3: preventing other 2 of little rectangle, to exceed blank profile border too many, and the length of side L of the little rectangle that forms should meet:
L<max{Y
max-Y
min,X
max-X
min}
According to coordinate points P
1and P
2coordinate figure and length of side L, calculate the coordinate figure P thirdly of little rectangle
3(x
3, y
3), formula is:
In formula, x
3represent P
3horizontal ordinate, y
3represent P
3ordinate;
By formula (4), solve and obtain two coordinate figures and meet equation, select wherein as little rectangle coordinate figure thirdly at random;
Then according to P
1, P
2, P
3calculate little rectangle the 4th point coordinate P
4(x
4, y
4), formula is:
In formula, x
4represent P
4horizontal ordinate, y
4represent P
4ordinate;
Step 2-1-2: to the coordinate of four points of the resulting little rectangle of step 2-1-1 and step 1-5 blank profile coordinate, adopt rays method to differentiate random these four points that produce and the relation of blank profile, within confirming that four points of little rectangle and the four edges of little rectangle are all positioned at the border of blank profile, if not within blank profile border, utilize step 2-1-1 to regenerate another little rectangle;
Four summit Cheng Shengyi chromogene CH that recycle formed little rectangle, the coding rule of chromogene CH is: by four coordinate points according to { x1y1x2y2x3y3x4y4} sequentially arranges;
Step 2-1-3: utilize step 2-1-1 and step 2-1-2 to produce m little rectangle as initial population N, N is the matrix of a m*8, and has N >=100;
The coding rule of population N is:
Chromogene CH of each line display of N, the columns of N represents the scale m of population;
Step 2-2: on the basis that meets rectangle constraint and area maximum, the initial population of step 2-1 generation is evaluated, because the area less expression chromogene of degree larger, that violate rectangle constraint of little rectangle is more outstanding, the area formula of arbitrary quadrilateral is:
S=0.5×|x
1×y
2-x
2×y
1+x
2×y
3-x
3×y
2+x
3×y
4-x
4×y
3+x
4×y
1-x
1×y
4| (6)
In formula, S represents tetragonal area;
What little rectangle should meet is constrained to:
Parallel Constraint: any opposite side of rectangle should be parallel, and formula is as follows:
Vertical constraint: rectangle arbitrary neighborhood both sides angle is 90 degree, and formula is as follows:
(y
2-y
1)×(y
4-y
1)-(x
2-x
1)×(x
1-x
4)=0 (8)
The degree that arbitrary quadrilateral is violated rectangle constraint is defined as penalty term, and formula is:
penatly1=|(y
4-y
1)×(x
3-x
2)-(y
3-y
2)×(x
4-x
1)|
penatly2=|(y
2-y
1)×(x
4-x
3)-(y
4-y
3)×(x
2-x
1)| (9)
penatly3=|(y
2-y
1)×(y
4-y
1)-(x
2-x
1)×(x
1-x
4)|
In formula: penatly1 represents first penalty term, penatly2 represents second penalty term, and penatly3 represents the 3rd penalty term;
The fitness function that adds penalty term to obtain population in area formula is:
fitness=S-100×(penatly1+penatly2+penatly3)/max{penatly1,penatly2,penatly3} (10)
In formula: fitness represents fitness function;
The initial population that step 2-1 is produced is brought fitness function formula (10) into chromogene is carried out to fitness evaluation, and sorts according to the size of fitness value;
Step 2-3: set up to select operator, select chromogene that adaptive value is high as the population of next step cross-reference in the colony that adopts the mode of roulette to obtain at step 2-2, be embodied as:
Adopt the mode of roulette to select to produce population of new generation: the ratio of the selecteed desired amt of each chromogene and the shared colony of its adaptive value adaptive value summation, as selecting probability, generates population of new generation;
N (the Ch of colony that is m for given scale
1, CH
2..., CH
m), individual fitness is fitness (Ch
i), it selects probability to be:
In formula: P (Ch
i) represent the selecteed probability of this chromogene; Fitness (Ch
i) represent this chromosomal adaptive value;
Calculate each individual fitness shared ratio in colony's adaptive value summation, represent this chromosome selected probability in selection course; Then generate a random number rand between [0,1], if met:
∑[P(CH
1)+P(CH
2)+.......+P(CH
i-1)]≤rand≤∑[P(CH
1)+P(CH
2)+.......+P(CH
i)]
Select i chromosome CH
i; After repetitive operation m time, obtain selected population N
ch, footmark ch represents the English meaning of selecting;
Step 2-4: the selected population N that step 2-3 is obtained
chcarry out interlace operation, adopt single-point to intersect, by adjacent chromogene Ch
iand Ch
i+1intersect, produce at random a random number P between [0,1]
cif, P
c<0.3 is a crossover location of random generation in interval [1,7], by chromogene Ch
iand Ch
i+1be positioned at crossover location genetic fragment afterwards and exchange, if P
c>=0.3 chromogene is not done and is intersected, the selected population N so step 2-4 being obtained
chthe intersection of carrying out between two gene obtains intersecting population N
cr, footmark cr represents the English meaning of intersecting;
Step 2-5: the population that step 2-4 is obtained carries out mutation operation, arbitrarily produces a random number P between [0,1]
mif, P
m<0.7 is random in interval [1,8] produces a variation position, and the number of variation position is become to a random number in the circumscribed rectangle that a step 1-6 produces; If P
m>=0.7 chromogene does not carry out mutation operation, the intersection population N so step 2-4 being obtained
creach chromosome operation population N that obtains making a variation
va, footmark ch represents the meaning of English variation;
Step 2-6: the population N that step 2-3,2-4 and 2-5 are obtained
ch, N
cr, N
vaform a gene pool N
gpto the chromogene of 3 * m in gene pool, utilize rays method to carry out the relationship distinguish of little rectangular dots, minor matrix four edges and blank profile, for being positioned at chromogene outside blank profile, to make fitness function value be zero, and the chromogene in blank profile is evaluated and sorted according to step 2-2;
Step 2-7: the chromosome that step 2-6 is obtained selects front m individual as follow-on initial population, and using the chromosome making number one as elite's gene, does not do any change and directly enter follow-on gene pool N
gpin guarantee that the excellent genes of every generation can not be destroyed;
Step 2-8: repeated execution of steps 2-3 step 2-7, until cycle index reaches default iterations It, stops optimizing, It >=100;
Step 2-9: the chromogene that the gene pool that step 2-8 is obtained makes number one because of output, obtains optimum blank cutting scheme as optimal base;
Step 3: this is cut out to scheme input control system, the blank to be processed of step 1 is cut out, obtain the required blank flat of stock layout that meets technique.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310521155.5A CN103593860B (en) | 2013-10-27 | 2013-10-27 | A kind of cut-out method for the most irregular blank |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310521155.5A CN103593860B (en) | 2013-10-27 | 2013-10-27 | A kind of cut-out method for the most irregular blank |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103593860A true CN103593860A (en) | 2014-02-19 |
CN103593860B CN103593860B (en) | 2016-08-17 |
Family
ID=50083984
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310521155.5A Expired - Fee Related CN103593860B (en) | 2013-10-27 | 2013-10-27 | A kind of cut-out method for the most irregular blank |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103593860B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105844615A (en) * | 2016-03-17 | 2016-08-10 | 网易(杭州)网络有限公司 | Method of identifying regular rectangular area and apparatus thereof |
CN106216545A (en) * | 2016-08-11 | 2016-12-14 | 成都柯博特自动化科技有限公司 | A kind of production method based on intelligent vision feeder |
CN107301634A (en) * | 2017-06-28 | 2017-10-27 | 湖南瑞森可机器人科技有限公司 | A kind of robot automatic sorting method and system |
CN112140354A (en) * | 2019-06-27 | 2020-12-29 | 厦门链石网络科技股份有限公司 | Typesetting method for large stone slab |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0745473A2 (en) * | 1995-05-29 | 1996-12-04 | Toyo Boseki Kabushiki Kaisha | Oriented film including polystyrene polymer having syndiotactic configuration |
CN101908180A (en) * | 2010-08-20 | 2010-12-08 | 秦皇岛首秦金属材料有限公司 | MES (Manufacturing execution system) material deformation method for maximizing yield of specified steel plates |
-
2013
- 2013-10-27 CN CN201310521155.5A patent/CN103593860B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0745473A2 (en) * | 1995-05-29 | 1996-12-04 | Toyo Boseki Kabushiki Kaisha | Oriented film including polystyrene polymer having syndiotactic configuration |
CN101908180A (en) * | 2010-08-20 | 2010-12-08 | 秦皇岛首秦金属材料有限公司 | MES (Manufacturing execution system) material deformation method for maximizing yield of specified steel plates |
Non-Patent Citations (2)
Title |
---|
刘云 等: "基于遗传算法的封闭轮廓最小面积凸包围盒生成算法", 《孝感学院学报》, vol. 27, no. 3, 20 May 2007 (2007-05-20), pages 64 - 66 * |
刘远洋: "基于遗传算法的数字曲线多边形逼近的实现", 《黑龙江科技信息》, no. 2, 15 January 2009 (2009-01-15), pages 73 - 74 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105844615A (en) * | 2016-03-17 | 2016-08-10 | 网易(杭州)网络有限公司 | Method of identifying regular rectangular area and apparatus thereof |
CN105844615B (en) * | 2016-03-17 | 2018-10-26 | 网易(杭州)网络有限公司 | The method and device of recognition rule rectangular area |
CN106216545A (en) * | 2016-08-11 | 2016-12-14 | 成都柯博特自动化科技有限公司 | A kind of production method based on intelligent vision feeder |
CN107301634A (en) * | 2017-06-28 | 2017-10-27 | 湖南瑞森可机器人科技有限公司 | A kind of robot automatic sorting method and system |
CN112140354A (en) * | 2019-06-27 | 2020-12-29 | 厦门链石网络科技股份有限公司 | Typesetting method for large stone slab |
CN112140354B (en) * | 2019-06-27 | 2023-08-22 | 厦门链石网络科技股份有限公司 | Typesetting method for stone large plate |
Also Published As
Publication number | Publication date |
---|---|
CN103593860B (en) | 2016-08-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103593860A (en) | Cutting method for any irregular blank | |
CN107423462B (en) | Workpiece considers the Prediction method for fatigue life and system of three-dimensional rough surface morphology | |
CN104626585B (en) | A kind of plane dividing method and device for SLA3D printers | |
CN103593511A (en) | Cutting-off and layout method for natural stone slabs with defects | |
CN111410414B (en) | Implementation method of glass cutting optimization technology | |
US20100114350A1 (en) | Method of determining mesh data and method of correcting model data | |
CN102930576A (en) | Feature flow-based method for generating abstract line drawing | |
CN105785913B (en) | Cutter path cutting direction optimization method based on machine spindle rate limitation | |
CN114434802B (en) | 3D printing contour offset filling path planning algorithm | |
DE50000345D1 (en) | Stepless display of two- or three-dimensional data sets by shifting pixel values to minimize curvature | |
CN104200496A (en) | High-precision detecting and locating method for rectangular identifiers on basis of least square vertical fitting of adjacent sides | |
Martinet et al. | Procedural modeling of cracks and fractures | |
CN105243137A (en) | Draft-based three-dimensional model retrieval viewpoint selection method | |
CN111210520A (en) | Reverse forming method and system for physical model | |
CN104933675B (en) | A kind of controllable complicated mosaic generation method of periodicity | |
CN104732589A (en) | Rapid generation method of hybrid grid | |
CN108510579B (en) | A kind of rendering indication method of the complicated trimmed surface of industry | |
CN102663184B (en) | Rasterization method of algebraic B-spline curve based on regularization conditions | |
CN102663789A (en) | Method for performing triangularization on polygon containing holes and islands in two-dimensional plane | |
CN109359381A (en) | A kind of voxel-based laser path planing method | |
CN102479266B (en) | Method for generating structural surface by polishing | |
CN115392001A (en) | Two-space closed triangular mesh model topology interlocking judgment method | |
CN104766123A (en) | Combining method for sheet specifications and types | |
Song et al. | Research on stability of optimal sheet-cutting strategy based on improved real-coded genetic algorithm | |
CN102324105A (en) | The heliogreenhouse three-dimensional modeling method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for 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 | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20160817 Termination date: 20161027 |