The visual non-contact detection method of meat quality based on spectrum picture
Technical field
The present invention relates to a kind of method detecting for meat quality, refer in particular to based on spectrum picture meat is carried out to non-contact detection, testing result adopts visual means to present relevant quality in the method for the distributed degrees situation of measured surface, belongs to food object technical field of nondestructive testing.
Background technology
China is that pork is produced and the maximum economy of consuming, and the volume of production and marketing of pork occupies No. 1 in the world throughout the year.But the measuring means of meat is still rested on to reduced levels, there is the deficiencies such as subjectivity is large, index is single, length consuming time in traditional organoleptic detection, physics and chemistry and microorganism detection, rig-site utilization inconvenience, therefore limited the detection to meat at storage, transportation and sales section.
Emerging detection means as the rise based on detection methods such as Electronic Nose, conductivity, yellowish pinks be that meat fast detecting has been opened up new approach, but these technology are subject to that sample is had to the restriction that destructiveness, testing result and traditional detection index are subject to the factors such as individual of sample differentia influence is remarkable in varying degrees.The harmless quick means that the multinomial index of quality of meat is carried out to comprehensive detection are at present still in miss status.
Spectrum detection technique can be realized cordless with it detected object is carried out to inside quality detection, is applied in the fast detecting of agricultural and animal products.For example by condenser lens and optical fiber, the averaged spectrum data of measurand are outputed to spectrum and carry out spectral detection; These class methods belong to " point " and detect, or " average " detection, only to make Quality Detection according to spectral space information, so owing to not having spatial information cannot make the detection of the space distribution degree of the index of quality.
Development along with hardware technology, the spectrum picture checkout equipment with spatial resolving power also starts to be applied in the Quality Detection of agricultural and animal products, but at present the application of spectrum picture technology is not given full play to the advantage of its spatial resolving power, still continued to use traditional spectral detection thinking and adopt " average " to detect the index of quality detected value that obtains imaginary uniformity to measurand.
Traditional Machine Vision Detection barment tag to measurand in visible-range detects, and possesses and detects the feature that index is described in space distribution situation, but show and cannot realize owing to being subject to imaging spectral wave band for inside quality.
Summary of the invention
In order to solve problems of the prior art, the present invention proposes the visual non-contact detection method of a kind of meat quality based on spectrum picture, space distribution information and spectral signature information by the reflection characteristics of objects to be measured comprising in spectrum picture, a plurality of indexs of meat quality (water percentage, water activity, TVB-N content, yellowish pink, microorganism count, acid value, pH value) are distinguished or comprehensive assessment, and according to specific targets, the space distribution situation in measured target provides in the mode of image assessment result.Concrete steps of the present invention are as follows:
Purchase and have certain representational Sample Storehouse, the meat sample in Sample Storehouse should reflect under the corresponding storage condition of quality prediction model to be set up that the index of quality to be measured all may distribution range, and sample index of quality degree distribution probability density is even as far as possible.
Two equal portions that Sample Storehouse are divided into mutual correspondence, a as traditional meat quality check word bank, another part with it parallel sample word bank used as spectrum picture collection.Two meat samples in every group of Duplicate Samples should be accomplished unanimously in each side such as meat storage condition, starting condition, index degree to be measured as far as possible.
Traditional detection obtains traditional Quality Detection index storehouse with training sample word bank through traditional sense organ, physics and chemistry and microorganism detection.
High spectrum image collection obtains spectrum picture with the sample in the parallel word bank of training meat through spectrum picture acquisition system and deposits spectrum picture storehouse in.Utilize spectrum picture pre-service to carry out pre-service to the spectrum picture in spectrum picture storehouse, and extract the effective surveyed area in meat parallel samples to be measured is extracted through effective surveyed area, by effective surveyed area spectrum, extract operation representing that spectrum extracts and deposit library of spectra in effective coverage subsequently.
The spectroscopic data that the knowledge base that traditional detection index storehouse and library of spectra form comprises the right traditional detection index result of mutual parallel samples one to one and effective surveyed area, by the Forecast of Spectra modeling of traditional detection index, obtain the spectral prediction model of traditional detection index, according to the different index of quality, different sample object type and different storage condition, can obtain the spectral prediction model of a plurality of different traditional detection indexs, these models are stored in traditional detection index spectral prediction model storehouse, complete the foundation of model bank;
Gather the spectrum picture of tested meat sample, by spectrum pre-service and effective surveyed area, extract the effective surveyed area of spectrum picture that obtains measurand, utilize corresponding forecast model in the traditional detection index spectral prediction model storehouse of having set up to do visual detection to effective surveyed area of tested meat object, finally obtain the visual test result of meat quality index.
1. set up traditional detection index spectral prediction model storehouse
Choose the sample that detected object under object population to be measured, position, storage mode and environment forms certain population, position, storage mode and environment, the distribution range of the subject object qualitative character in sample should cover intends the whole of sensing range.Qualitative character overall degree is uniformly distributed in sample as far as possible, and in sample, the number of objects in each quality level is as far as possible consistent.
A plurality of samples form Sample Storehouse, to reflect the situation of detected object under different population, position, storage mode and environment.
Each sample in Sample Storehouse is divided into two parts that quantity equates, and a is training meat sample, and another part is training meat parallel samples.Training meat sample obtains traditional detection calibration value through traditional sense organ, physics and chemistry and microorganism detection, is stored in traditional detection index storehouse; Training meat parallel samples through spectra collection, obtain spectrum picture and be stored in spectrum picture storehouse, spectrum picture through spectrum picture pre-service, effectively surveyed area extracts, effectively surveyed area spectrum extracts and obtains training the spectral information of meat parallel samples to be stored in library of spectra; Traditional detection index storehouse and library of spectra form knowledge base jointly.The Forecast of Spectra modeling of knowledge base being carried out to traditional detection index obtains traditional detection index spectral prediction model, to carrying out for the data of multiple traditional detection index or storage condition the spectral prediction models that Forecast of Spectra modeling obtains many cover traditional detection indexs in knowledge base, is stored in traditional detection index spectral prediction model storehouse.
2. carry out visual detection
To tested meat object carry out spectrum picture collection, spectrum picture pre-service, effectively surveyed area extracts the spectrum picture information of the effective surveyed area that obtains tested meat object, according to carrying out with the spectral prediction model of the corresponding population of measurand, position, storage mode and environment the visual test result that the visual detection of meat spectrum picture finally obtains meat quality index in traditional detection index spectral prediction model storehouse.
3. visual testing process
Comprise and show on tested meat object the index of quality of every sub regions in effective coverage, with reflect the index of quality on tested meat object space distribution situation, display mode can adopt, but is not limited to pseudo-color or stereo data display packing.The granule size that shows subregion, spatial discrimination yardstick, need to regulate according to index characteristic distributions, user and equipment.The upper limit that this Resolving size regulates is measurand spectrum picture to be carried out to the index of quality with sub-pix yardstick detect and show; The lower limit that this Resolving size regulates is the overall meat sample index of quality to be carried out to as a subdomain in the effective coverage of whole measurand spectrum picture detect and show, now the present invention is in minimum mode of operation.
4. effectively surveyed area extracts operation
Comprise spectrum picture is processed, therefrom extract effective surveyed area, get rid of irrelevant in spectrum picture or inactive area.Extraneous areas refers to detect the incoherent meat of index region with certain.For example, but be not limited to, background area and most of detection between index have nothing to do; Fat region and TVB-N content index are irrelevant, because the latter is only for muscle region.Inactive area refer to a certain detection index relevant range in because thereby certain or many reasons cause some part quality of spectrum picture surveyed area to cause the local invalid in certain coherent detection region lower than subsequent treatment desired level.For example, but be not limited to, the part of certain muscle region in meat sample is subject to light source and imaging system relative angle and surperficial grease and moisture effects and in spectrum picture, presents high reflective solar flare, the spectrum picture at this place does not meet intended imaging mode, for example, but be not limited to, surface diffuse reflectance image-forming condition, therefore belong to inactive area.
5. effectively surveyed area spectrum extracts operation
Comprise according to spectrum picture and the effective coverage that wherein extracts, obtain the spectral signature that the one or more representative curve of spectrum reflects effective coverage in this spectrum picture.Representational curve of spectrum extracting mode can but be not limited to the spectrum Mean curve of asking for this region, or spectrum intermediate value curve, or spectrum maximal value, minimum value and Mean curve, or Mean curve and average plus-minus standard deviation curve.
6. the Forecast of Spectra modelling operability of traditional detection index
First carry out spectrum pre-service: for example, but be not limited to, utilize the operations such as standardized normal distribution processing, spectrum smothing filtering and difference derivation of spectroscopic data to improve spectral space signal to noise ratio (S/N ratio).
Then by the combination of offset minimum binary, multiple linear regression or offset minimum binary and multiple linear regression analysis method, spectral image data is carried out to Feature selection and extraction and set up spectroscopic data and traditional index between regression model.
Beneficial effect
With visual means, present testing result, reflection directly perceived detects the space distribution situation of the degree difference of index in measurand detection faces.Than traditional single numerical value, reflect that the expression way of whole object approaches the actual conditions of meat interior tissue compositional variation more.
The present invention can carry out fast meat object, can't harm, non-contact detecting, and the comprehensive detection result of meat quality individual event or many index is provided.Break through meat quality tradition sense organ, physics and chemistry and the limitation of microorganism detection aspect subjectivity, rapidity and non-destructive.
The multispectral image of usining detects as basis, and this checkout equipment carries out Quality Detection according to the caused photonic absorption frequency change of internal component difference of meat, and evaluation result is objective.
Between detected face and pick-up unit, do not contact, sample is not had to destructiveness, belong to Non-Destructive Testing.
Detection, without pre-treatment, simplifies the operation, and saves time.
A surface sweeping can obtain Measuring Several Indexes, meat quality is detected to comprehensively many index and make accurate evaluation.
Accompanying drawing explanation
Fig. 1 is the visual non-contact detection method block diagram of the meat quality based on spectrum picture.
Embodiment
The visual non-contact detection method of meat quality based on spectrum picture, step comprises:
1) set up traditional detection index spectral prediction model storehouse;
2) detected meat object is carried out to spectrum picture collection;
3) to step 2) spectrum picture that obtains carries out pre-service;
4) to step 3) spectrum picture that obtains, extracts the effective surveyed area in spectrum picture;
5) utilize step 1) corresponding traditional detection index spectral prediction model in the model bank set up, effective surveyed area of tested meat object is done to visual detection, finally obtain the visual test result of meat quality index;
Described step 1), in, the establishment step in traditional detection index spectral prediction model storehouse is as follows:
101) set up Sample Storehouse:
Choose the detected object under object population to be measured, position, storage mode and environment, form the sample of certain population, position, storage mode and environment;
A plurality of samples form Sample Storehouse, to reflect the situation of detected object under different population, position, storage mode and environment;
Each sample in Sample Storehouse is divided into two parts that quantity equates, and a is training meat sample, and another part is training meat parallel samples; Two class samples form Sample Storehouse;
102) set up knowledge base,
Described training meat sample is that meat obtains traditional detection calibration value through traditional sense organ, physics and chemistry and microorganism detection, is stored in traditional detection index storehouse; Training meat parallel samples is meat process spectra collection, obtains spectrum picture, is stored in spectrum picture storehouse;
Spectrum picture in spectrum picture storehouse, through spectrum picture pre-service, effectively surveyed area extraction and effectively surveyed area spectrum extraction, obtains training the spectral information of meat parallel samples to be stored in library of spectra;
Traditional detection index storehouse and library of spectra form knowledge base jointly;
103) set up traditional detection index spectral prediction model storehouse
To carrying out Forecast of Spectra modeling for the data of various traditional detection indexs or storage condition in knowledge base, obtain the spectral prediction model of corresponding many covers traditional detection index, these models are stored in traditional detection index spectral prediction model storehouse.
Specifically, the modeling method of spectral prediction model can be to utilize multivariate statistics homing method, partial least-square regression method, swarm intelligence homing method or Artificial Neural Network to set up spectral prediction model to the corresponding data collection in traditional detection index storehouse and library of spectra.
Described step 1), in, the distribution range of the subject object qualitative character in sample covers intends the whole of sensing range; Qualitative character overall degree is uniformly distributed in sample, and in sample, the number of objects in each quality level is consistent.
The preprocess method of spectrum picture is first to utilize standardized normal distribution processing, spectrum smothing filtering and the difference derivation operation of spectroscopic data to improve spectral space signal to noise ratio (S/N ratio); Then by offset minimum binary or, the combination of multiple linear regression or offset minimum binary and multiple linear regression analysis method, spectral image data is carried out to Feature selection and extraction, and sets up the regression model between spectroscopic data and traditional index.
The method of carrying out effective surveyed area extraction is:
According to measured target and gather between background, the difference of the feature such as the brightness in certain or some characteristic wave bands images of effective coverage and inactive area, area, form, spectrum picture is carried out to image to be cut apart, therefrom extract effective surveyed area, get rid of extraneous areas and inactive area in spectrum picture.Extraneous areas refers to detect the incoherent meat of index region with certain; Inactive area refer to a certain detection index relevant range in, thereby some part quality of spectrum picture surveyed area causes the local invalid in certain coherent detection region lower than subsequent treatment desired level.Cause quality lower than the reason of subsequent treatment desired level, be due to input spectrum picture this in part due to external factor such as noise, environmental interference, or in spectrum picture processing procedure due to some operator adopting (as at target and background border place execution mean filter etc.), cause the decay of the image local quality of data.
According to spectrum picture and the effective coverage that wherein extracts, obtain the spectral signature that the one or more representative curve of spectrum reflects effective coverage in this spectrum picture; Representational curve of spectrum extracting mode comprises the spectrum Mean curve of asking for this region, or spectrum intermediate value curve, or spectrum maximal value, minimum value and Mean curve, or Mean curve and average plus-minus standard deviation curve.
Described step 3) in,
Show on tested meat object the index of quality of every sub regions in effective coverage, to reflect the space distribution situation of the index of quality on tested meat object;
The granule size that shows subregion is spatial discrimination yardstick, according to index characteristic distributions, user and equipment, need to regulate;
The upper limit that this Resolving size regulates is measurand spectrum picture to be carried out to the index of quality with sub-pix yardstick detect and show;
The lower limit that this Resolving size regulates is the overall meat sample index of quality to be carried out to as a subdomain in the effective coverage of whole measurand spectrum picture detect and show, now this method is in minimum mode of operation.
The index of quality of every sub regions in effective coverage on the tested meat object of described demonstration, its display mode is pseudo-color or stereo data display packing.
Described spectrum picture, is the image that possesses several or discontinuous wave band spectral informations continuous to hundreds of, and spatial information and the spectral information of reflection measurand, comprise multispectral image and high spectrum image.
Below in conjunction with a kind of embodiment and accompanying drawing, describe the present invention in detail, but embodiments of the present invention are not limited in this kind of embodiment.
Visual detection index: TVB-N content.
Visual detected object, population: pork; Position: the not logical ridge section of place to go skin and back fat; Storage condition: 4 ℃ of storages of cold fresh meat; Terms of packing: PE seals packing.
The logical ridge section from 10 pigs with batch production is chosen in detection, while noting choosing, gets rid of PSE and DFD meat, is divided into training sample and training parallel samples.Training sample and training parallel samples are included into respectively in two of the left and right of the same tangent plane of same logical ridge, to guarantee that parallel samples is being consistent with training sample aspect starting condition.All sample standard deviations adopt packing, the storing temperature of unified specification identical with condition, consistent with parallel samples storage condition to guarantee training sample.
Within every 24 hours, take out one group of training sample and the parallel samples of every pig, gather the spectrum picture of training sample, and with semimicro-Kjeldahl determination according to GB GB/T5009.44---the total volatile basic nitrogen numerical value of 1996 collection parallel sampleses.Within every 24 hours, gather 10 groups, meat sample, meat sample is only used once, and each collection is destroyed meat sample after detecting with physics and chemistry.After the collections of 14 days and physics and chemistry detection, obtain the spectrum picture storehouse that the logical ridge of these 10 pigs is cut into slices under same terms of packing, identical storing temperature changed with the holding time, and the traditional detection index storehouse of corresponding parallel meat sample.
Image in spectrum picture storehouse through spectrum picture pre-service, effectively surveyed area extract, effectively surveyed area spectrum after extracting, obtain the logical ridge section of these 10 pigs under same terms of packing, identical storing temperature is with effective surveyed area spectrum that the holding time changes, and is stored into library of spectra.
The spectrum picture preprocessing process using comprises: reject low signal-to-noise ratio wave band, carry out image noise reduction, by image, cut apart and carried out background removal and only retain meat sample part in image.
Effectively surveyed area leaching process, because TVB-N content index mainly reflects that in muscle decay process, protein decomposites putrescine total amount, little with fat and pork skin regional relation, therefore effective surveyed area is the muscle region in meat sample in this detects.Through artificial light analysis of spectrum, find that muscle and fat, pork skin have notable difference at the absorption peak at 575nm place, therefore the pretreated meat sample spectrum picture of process is carried out to Threshold segmentation according to the height of 575nm place absorption peak, obtain the muscle region of tested meat sample.Adopting 5 * 5 mean filter methods to carry out after the operation of spatial filtering noise reduction, for guaranteeing the quality of effective coverage marginal information, it is as effective coverage after 5 erosion operation that muscle region is carried out to radius.
The spectrum leaching process using comprises: ask for the spectrum average in effective surveyed area, and carry out necessary noise reduction, adopt 3 smothing filtering noise reductions in this example.Finally carry out standardization and obtain effective surveyed area spectrum.
The knowledge base that spectroscopic data in total volatile basic nitrogen content's index in traditional detection index storehouse and corresponding library of spectra thereof in effective surveyed area forms, sets up total volatile basic nitrogen content prediction model A through partial least-squares regression method.Total volatile basic nitrogen is set up to total volatile basic nitrogen content prediction Model B containing numerical quantity and spectroscopic data differential data through partial least-squares regression method.Adopt leaving-one method to carry out respectively modelling verification to forecast model A and forecast model B, get the wherein good model of prediction effect and be stored in traditional detection index spectral prediction model storehouse as total volatile basic nitrogen Forecast of Spectra working model.
Gather tested meat object spectrum picture by spectrum picture pre-service, concrete steps when setting up spectrum picture storehouse step used with.By effectively surveyed area extraction, when concrete steps are set up library of spectra together, step used is same, obtains the spectrum picture of the effective surveyed area of measurand, and it is carried out to the visual detection of meat spectrum picture, and its concrete steps are:
First image-region is carried out to 3 level and smooth spectral filterings, adopt when setting up spectral prediction model storehouse spectral filtering identical parameters, then the total volatile basic nitrogen Forecast of Spectra working model of transferring in traditional detection index spectral prediction model storehouse is predicted the Forecast of Spectra value that obtains the total volatile basic nitrogen of effective pixel point in the effective surveyed area of measurand, and adopts pseudo-color to show and predict the outcome with image mode.