A kind of burning evaluation method for machining surface based on the ccd image feature
Technical field
The present invention relates to a kind of machining surface burn method of discrimination, especially a kind of machining surface burn method of discrimination that combines Digital image technology and MATLAB analytical technology, specifically a kind of burning evaluation method for machining surface based on the ccd image feature.
Background technology
At present, domestic and international existing main burning evaluation method for machining surface: (1) ocular estimate: generate layer oxide film at surface of the work when burn produces, the thickness difference of film causes change color, can differentiate the burn degree according to the shade of surface film oxide.(2) acid wash: the acid solution with prescribed formula is washed surface of the work, and the acid solution with prescribed formula after the pickling is washed surface of the work, estimates the burn degree according to the change color on surface after the pickling.(3) cut (mill) and cut temperature method: in general, cutting (mill), to cut surface temperature high more, and burn will be serious more, can predict the burn degree by measuring processing district temperature or spark temperature.(4) burn layer depth method: can form certain thickness metamorphic layer on the top layer behind the burn, and the serious more metamorphic layer of burn is thick more; Can determine the burn degree according to measuring the burn layer depth.(5) surface microhardness method: after producing the tempering burn, surface microhardness can significantly descend, and it is serious more to burn, and microhardness descends many more; Can be according to the skin hardness degree evaluation burn degree that descends.(6) unrelieved stress method: after the tempering burn took place on the surface, unrelieved stress became tension, and stress intensity is relevant with the degree of burn, thereby can estimate the degree of burn according to the size of stress.
First three kind can only qualitative evaluation, and is very inaccurate, though back three kinds of methods can be estimated the burn degree in ground to a certain extent, and the needs that have destruction workpiece, the sample preparation again that has, and have certain limitation.And the multiple burn of Barkhausen noise detection method of development in recent years, X ray detection method, eddy-current method, acoustic emission signal method or the like detects or Forecasting Methodology, not only needs special instrument, and operating process is also very complicated, is applied to burn and detects also not really extensive.
Therefore, important for some, especially difficult-to-machine material is judged processed workpiece in time, prevent from blindly and with subjectivity to conjesture, for optimizing machined parameters, guaranteeing provides specification product, cuts down finished cost and cost of raw materials used all has crucial meaning.But existing method of discrimination all can't satisfy above-mentioned requirements.
Summary of the invention
The objective of the invention is to invest problems such as big, a kind of burning evaluation method for machining surface based on the ccd image feature is provided at existing burned work-surface degree method of discrimination cycle length, poor accuracy, inspection machine.
Because the applicant finds that the digital picture of the surface of the work of burn has himself feature in various degree, the power spectrum characteristic of the gray scale of its image of burn surfaces (Gray), colourity (H), Fourier conversion is all inequality in various degree.The applicant finds through a large amount of experiments: for the machining surface with a kind of material, the power spectrum of the gray scale (Gray) of different burn degree surface images, colourity (H), Fourier conversion presents regular variation the (between good corresponding relation is arranged) with the burn heighten degree.That is: a. burn is serious more, and (Gray) is more little for the gradation of image average; B. burn is serious more, and image chroma value (H) zonation is wide more; C. burn is serious more, and image Fourier transform power spectrum average is more little.To the gray scale of image, Fourier transform power spectrum average respectively setting threshold whether distinguish workpiece burn, image chroma variance setting threshold is differentiated the workpiece burn grade.As long as determine gray average, Fourier transform power spectrum average, the colourity variance place threshold range of institute's detected image, can differentiate its burn grade.
In view of this, the present invention proposes following technical solution:
A kind of burning evaluation method for machining surface based on the ccd image feature, it comprises the foundation of appraisement system and differentiates two processes, it is characterized in that:
(1) foundation of described appraisement system may further comprise the steps:
The first step, the machining of learning from else's experience is judged as some groups of the workpiece of severe burn, moderate burn, mild burn later on, utilize image capture device to gather its digital picture, with the digital picture input computing machine that obtains, utilize image processing method among the MATLAB to obtain characteristic parameter gray scale (Gray) average, Fourier transform power spectrum average, colourity (H) variance of the digital picture of above-mentioned three kinds of burn degree;
Second step, utilize above-mentioned digital picture characteristic parameter gray scale (Gray) average, Fourier transform power spectrum average and when not burning with reference to the different roughness workpiece corresponding gray scale (Gray) average, Fourier transform power spectrum average come setting threshold as estimating the standard of whether burning, utilize colourity (H) variance and colourity (H) variance when not burning with reference to the different roughness workpiece is come the index of setting threshold as evaluation burn grade, and described threshold value is deposited in the computing machine as discrimination threshold;
(2) described differentiation process may further comprise the steps:
At first utilize the image capture device collection need judge the burn degree workpiece the quantity image and import in the computing machine, next utilizes Flame Image Process instrument among the MATLAB to obtain characteristic parameter gray scale (Gray) average of the digital picture of taking the photograph, colourity (H) variance, Fourier transform power spectrum average, with gained gray scale (Gray) average, the threshold value of being stored in Fourier transform power spectrum average and the computing machine compares, whether burn to judge, if the gray scale of gained (Gray) average, there is one less than corresponding threshold in the Fourier transform power spectrum average, then be judged to be burn, and then the severe burn by being stored in colourity (H) variance yields of will be tried to achieve and the computing machine, moderate burn, the colourity of mild burn (H) variance discrimination threshold compares and demonstrate the burn classification automatically in computing machine.
Described Flame Image Process and differentiation process are carried out under the control of program automatically by computing machine, to improve its automatization level.
With the discrimination threshold of the unlike material that utilizes method of the present invention to collect deposit in the same database for differentiate automatically in real time and automatically control use, giving full play to the powerful data-handling capacity of computing machine, for processing automatically and automatically control lay the first stone.
Described image capture device is a ccd video camera, and it links to each other with computing machine by video frequency collection card, and has used when images acquired and weakened the reflective measure in metal surface.
With the high temperature alloy is example, concrete evaluation index is: gray threshold is 170, gray average is differentiated for burning less than 170, and described Fourier transform power spectrum threshold value is 2.500e+008, and Fourier transform power spectrum average is differentiated for burning less than 2.500e+008; Described colourity threshold value is 0.0700 and 0.1500 two-stage, and the colourity variance is a mild burn less than 0.0700, and between 0.0700 and 0.1500 is moderate burn, is severe burn greater than 0.1500.
The present invention has the following advantages:
1. at first, solve the reflective problem in metal surface in the capturing digital image process, obtain the high-reliability image.Utilize the homemade reflective equipment in metal surface that weakens during photographic images, possess outstanding advantages such as expense is low, easy realization.
2. give full play to and utilized the powerful advantages of Flame Image Process instrument aspect extraction digital picture characteristic parameter among the MATLAB, obtain different burn degree situation hypograph characteristic ginseng value scopes, estimating for the machining surface burn provides clear and definite, reliable foundation.
3. computing method that the present invention relates to and image processing techniques are easy to realize.
4. the present invention effectively is applied to curve fitting, test of hypothesis algorithm in the middle of the conclusion of characteristics of image parameter rule, has got rid of in the experiment because the error that accidentalia causes, and has improved the accuracy of data computation and evaluation criterion formulation greatly.
5. can realize online treatment,, reduce labour intensity for the testing staff provides favourable instrument.
6. help to improve automatization level and intelligent level that workpiece fatigue strength, serviceable life are estimated.
7. the present invention can be used for the burn grade discrimination under any material workpiece what machining mode in office.
8. select for the machining parameter and condition determine to provide foundation.
9. provide a kind of for fault diagnosis in next step mechanical processing process for using for reference and efficient ways.
10, applied range can be used for the differentiation of various metals, nonmetallic materials finished surface, is particularly useful for difficult-to-machine material and is difficult to the differentiation of observed surface of deep hole burn degree.
11, help reducing cost, can reduce the phenomenon that it is scrapped of differentiating inaccurate appearance because of mild burn, reduce enterprise's material cost, and distinguishing speed is very fast, can improve process velocity.
Description of drawings
Fig. 1 is middle image acquisition of the present invention and treatment scheme synoptic diagram.
Fig. 2 is the metal surface reflex reflector structural representation that weakens of the present invention.
Fig. 3 is the high temperature alloy grinding surface mild burn image chroma distribution plan that utilizes method of the present invention to obtain.
Fig. 4 is the high temperature alloy grinding surface moderate burn image chroma distribution plan that utilizes method of the present invention to obtain.
Fig. 5 is the high temperature alloy grinding surface serious burn image chroma distribution plan that utilizes method of the present invention to obtain.
201 is CCD cameras among Fig. 2, the 202nd, and the part pallet, the 203rd, casing, the 204th, computing machine, the 205th, data line, 206 is workpiece, 207 is incandescent lamp.
Embodiment
The present invention is further illustrated for following structure drawings and Examples.
As shown in Figure 1, 2.
The concrete steps flow process as shown in Figure 1.
A. at first the style of not burning of different roughness is carried out being placed on homemade weakening in the reflective equipment in metal surface after the cleaning, and place correct position, as shown in Figure 2.Utilize ccd video camera and video capture device acquisition digital picture and import computing machine.And utilize Flame Image Process instrument among the MATLAB to obtain the average of the average of characteristics of image parameter gray scale (Gray) and variance, colourity (H) and variance, Fourier transform power spectrum average, analyze itself and the relation of workpiece burn degree, the summary rule.
What b. the acquisition image method was gathered some groups of (can adopt the 3-10 group to carry out data acquisition as required) identical material respectively above the utilization is slight (one-level) through prior art judgement machining surface burn degree, moderate (secondary), the surface of the work image of severe (three grades) burn, utilize Flame Image Process instrument extraction characteristics of image parameter gray scale (Gray) among the MATLAB, colourity (H), Fourier transform power spectrum is got its mean value and is analyzed (1) gray scale (Gray) average and relation that variance changes with the burn degree and compare with do not burn surface of the work gradation of image (Gray) average and variance; (2) relation that changes with the burn degree of colourity (H) average and variance and compare with end burn surface of the work image chroma (H) average and variance; (3) relation that changes with the burn degree of Fourier transform power spectrum average and compare with do not burn surface of the work image Fourier transform power spectrum average and variance.Reach a conclusion: utilize gray scale (Gray) average of image, Fourier transform power spectrum average to differentiate workpiece and whether burn; Utilize colourity (H) variance of image to determine the workpiece burn grade.
C. utilize the above-mentioned characteristics of image parameter rule that obtains, colourity (H) variance of image is set the two-stage threshold value, as estimating the burn level index.
D. utilize image-pickup method acquisition digital picture among a, extract characteristic parameter gray scale (Gray), colourity (H), the Fourier transform power spectrum of workpiece to be discriminated, analyze the feature such as average, variance of each parameter and check threshold range under it, and differentiate as follows:
(1), shows that then this workpiece burns if gray scale (Gray) average of its digital picture and Fourier transform power spectrum average drop in gray scale (Gray) average and Fourier transform power spectrum average threshold range of the surface of the work digital picture that burn does not take place respectively; Otherwise, then show and burn;
(2) if its surface number image chroma (H) variance of the generation that determines burn workpiece drops in the first-degree burn threshold range, then show this workpiece generation first-degree burn (mild burn);
(3) if its surface number image chroma (H) variance of the generation that determines burn workpiece drops in the second degree burns threshold range, then show this workpiece generation second degree burns (moderate burn);
(4) if its surface number image chroma (H) variance of the generation that determines burn workpiece drops in three grades of burn threshold scopes, show that then three grades of burns (serious burn) take place this workpiece.
Below be certain high temperature alloy (as GH36) grinding (gray scale when making different roughness respectively and not burning, Fourier transform power spectrum average and the test of colourity variance yields and burn degree gray scale, the Fourier transform power during for slight, moderate, severe burn composed average and colourity variance yields) surface number characteristics of image Parameter Extraction process and theoretical foundation thereof:
Shown in Fig. 3,4,5.
1. average, variance and power spectrum brief introduction
A. average
(x, average y) is defined as random field f
It is that (x is y) in that (so be the function of x, y, E represents to ask expectation to random field f for x, the mean value of y) locating.
The each point characteristic parameter can be used f in the digital picture
1(x, y), f
2(x, y) ..., f
n(x y) represents, and
f
1(x, y), f
2(x, y) ..., f
n(x, y) independent mutually, then have
E[f
1(x,y),f
2(x,y),...,f
n(x,y)]=E[f
1(x,y)]+E[f
2(x,y)]+...+E[f
n(x,y)]
B. variance
The portrayal stochastic variable on sample space, fluctuate variation index normally of great use, so below introduce variance of a random variable.
Random field f (x, variance function σ y)
2 f(x y) then is
-{E[f(x,y)]}
2
Because f
1(x, y), f
2(x, y) ..., f
n(x, y) independent mutually, then have
Var[f
1(x,y),f
2(x,y),...,f
n(x,y)]=Var[f
1(x,y)]+Var[f
2(x,y)]+...+Var[f
n(x,y)]
C. classical power spectrum
The power spectrum density of a static random process is the discrete Fourier transformation of this process correlated series, as shown in the formula:
P
Xx(ω) be power spectrum density, xx is the correlated series of this stochastic process.
The power spectrum of the Fourier conversion of image:
At first the image F to gray processing carries out the Fourier conversion, and the Fourier transform definition of image { f (x, y) } is:
F(u,v)=∫∫f(x,y)exp[-j2π(ux+vy)]dxdy
Its power spectrum is defined as:
|F(u,v)|
2=F(u,v)F
*(u,v)
Wherein * represents complex conjugate.
2. gradation of image (Gray) average, Fourier transform power spectrum average, the application of colourity (H) variance in analyzing high temperature alloy characteristics of image and burn grade evaluation are at first, to the high temperature alloy grinding not in the burn surfaces image applications MATLAB Flame Image Process tool box imcrop () function cut out and cut a fixed size image, after utilizing rgb2gray () gray processing, utilize mean2 () to ask average, the Fourier transform power spectrum average of gray level image, utilize std2 () to obtain the gray level image variance.Utilize rgb2hsv () with image be converted into HSV (H: tone, S: saturation degree, V: brightness) color mode, utilize mean2 () to obtain the image chroma average, utilize std2 () to obtain the image chroma variance.
Use imcrop () function and cut out a section high temperature alloy grinding burn surfaces image, size is the same, after utilizing rgb2gray () gray processing, utilize mean2 () to ask average, the Fourier transform power spectrum average of gray level image, utilize std2 () to obtain the gray level image variance.Utilize rgb2hsv () with image be converted into HSV (H: tone, S: saturation degree, V: brightness) color mode, utilize mean2 () to obtain the image chroma average, utilize std2 () to ask the image chroma variance.Process more as can be seen, the gray average of burn image is significantly less than the gray average of the image of not burning, the gray-scale value of image and the roughness of workpiece of not burning has certain relation, as shown in table 1, and behind workpiece burn, its gray-scale value is only relevant with the burn degree, and little with the surfaceness relation, can ignore, as shown in table 2.Fourier transform power spectrum average also has this rule, shown in table 3, table 4.But no significant change rule between the colourity of the burn and the image of not burning is as shown in table 5.In addition, for the burn image, it is serious more to burn, and the colourity zonation of image is wide more, that is: the colourity variance is big more, and is as shown in table 6.
Thereby reach a conclusion: the gray average of usable image and Fourier transform power spectrum average can be made as 170 with gray threshold as judging burned work-surface whether index, and gray average is differentiated for burning less than 170; Fourier transform power spectrum threshold value is made as 2.500e+008, and Fourier transform power spectrum average is differentiated for burning less than 2.500e+008.With the colourity variance of image evaluation index, the colourity threshold value is made as two-stage as the burn grade: 0.0700,0.1500, the colourity variance is a mild burn less than 0.0700, is moderate burn between 0.0700 to 0.1500, is severe burn greater than 0.1500.
3. gradation of image (Gray) average, Fourier transform power are composed average, the application of colourity (H) variance in analyzing titanium alloy characteristics of image and burn grade evaluation is identical with high temperature alloy.
The do not burn gray average of gray average table 2 burn specimen surface image of specimen surface image of table 1
The do not burn table 4 burn specimen surface image of specimen surface image of table 3
Fourier transform power spectrum average Fourier transform power spectrum average
Table 5 do not burn colourity average, the variance of specimen surface image
Colourity average, the variance of table 6 burn specimen surface image
Need to prove if the burn area in a certain work more for a long time, should utilize method of the present invention to judge to corresponding zone respectively, the zone of being cut apart is more little, accuracy is high more, and final differentiation result should be with the foundation of the most serious value of burn degree as the burn degree of whole work-piece.