CN107564000B - Hericium erinaceus non-destructive testing stage division based on computer vision - Google Patents

Hericium erinaceus non-destructive testing stage division based on computer vision Download PDF

Info

Publication number
CN107564000B
CN107564000B CN201710797163.0A CN201710797163A CN107564000B CN 107564000 B CN107564000 B CN 107564000B CN 201710797163 A CN201710797163 A CN 201710797163A CN 107564000 B CN107564000 B CN 107564000B
Authority
CN
China
Prior art keywords
hericium erinaceus
image
factor
cap
destructive testing
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.)
Active
Application number
CN201710797163.0A
Other languages
Chinese (zh)
Other versions
CN107564000A (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.)
Nanjing Xiaozhuang University
Original Assignee
Nanjing Xiaozhuang 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 Nanjing Xiaozhuang University filed Critical Nanjing Xiaozhuang University
Priority to CN201710797163.0A priority Critical patent/CN107564000B/en
Publication of CN107564000A publication Critical patent/CN107564000A/en
Application granted granted Critical
Publication of CN107564000B publication Critical patent/CN107564000B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Investigating Or Analysing Materials By Optical Means (AREA)
  • Sorting Of Articles (AREA)

Abstract

The present invention relates to a kind of non-destructive testing stage divisions of Hericium erinaceus, belong to Food Inspection technical field.This method include from Hericium erinaceus image characteristic parameter extraction, establish corresponding discriminant function, Hericium erinaceus non-destructive testing is classified each step.Compared with manual grading skill, the present invention not only may be implemented Hericium erinaceus and fast and accurately detect, and it completely avoids damaging, so that existing graded index is improved and quantifies, i.e. using three Hericium erinaceus color, size and shape good index as the graded index of Hericium erinaceus, the grade scale of more science is provided for Hericium erinaceus industrialization production process.

Description

Hericium erinaceus non-destructive testing stage division based on computer vision
Technical field
The present invention relates to a kind of non-destructive testing stage division of edible mushroom, the non-destructive testing of especially a kind of Hericium erinaceus is classified Method belongs to Food Inspection technical field.
Background technology
Hericium erinaceus also known as hedgehog hydnum, monkey mushroom, hedgehog bacterium, not only bacterial context is fresh and tender, aromatic palatable, also has higher nutriture value Value and medical value.With the expansion of consumption market and the fast development of social economy, the gradual work of production model of Hericium erinaceus Factory.
The production of batch production not only increases the quality and yield of Hericium erinaceus, while also reducing labour cost, can be with whole day Wait production.But Hericium erinaceus Quality Detection remains in the primitive stage of artificial sense detection, not only subjective assessment is not only imitated Rate is low, error is big, is also vulnerable to the influence of many conditions.Most importantly this subjective appreciation also rests on qualitative judgement mostly Stage, objectivity and accuracy are poor.
Computer vision refers to replacing human eye to be identified, track to target with computer and measuring.In recent years, it will calculate Machine vision mainly concentrates on above fruits and vegetables applied to the research in terms of agricultural and sideline product detection and classification.Such as 1985 Year, the scholars such as Sarkar just describe the shape of tomato, but algorithm using computer vision and Image Information Processing technology Excessively tediously long, the speed of service is slow;The finger that for another example scholars such as Woo Chaw Seng are classified using area, perimeter, color as fruit Mark, successfully identifies and 6 kinds of fruit of having classified.The fruit quality of China's First independent research monitors the production line with classification in real time It answers justice is refined scholars is waited to develop by Zhejiang University, the parameters such as various fruits size, color, shape can be detected simultaneously.
However the correlative study in terms of edible mushroom is less and scattered.According to the applicant understood, it there is no based on computer vision Hericium erinaceus detection method.
Invention content
It is an object of the invention to:It is proposed a kind of Hericium erinaceus non-destructive testing stage division based on computer vision, to Scientific method is provided for the non-destructive testing classification of Hericium erinaceus, meets the needs of industrialized production conscientiously.
In order to achieve the above object, the present invention is based on the Hericium erinaceus non-destructive testing stage division basic fundamentals of computer vision Scheme includes the following steps:
The first step, characteristic parameter extraction --- Hericium erinaceus cap overhead view image of the intake as training sample extract After the pretreatment of characteristic factor, extraction color characteristic factor, size characteristic factor, shape feature factor;The color characteristic because Element at least contains one of R, G, B mean value, and the size characteristic factor at least contains one of area, perimeter, path length, and the shape is special Sign factor at least contains one of circularity, eccentricity;
Second step establishes corresponding discriminant function --- using Hericium erinaceus grade as dependent variable, with the color characteristic of extraction because Element, size characteristic factor, shape feature factor are independent variable, according to discriminant analysis criterion, pass through training, structure Hericium erinaceus classification The discriminant function of model;
Third step, Hericium erinaceus non-destructive testing classification --- Hericium erinaceus cap overhead view image of the intake as sample to be checked, into After the pretreatment of row extraction characteristic factor, it is special to extract color characteristic factor corresponding with hierarchy model, size characteristic factor, shape Sign factor;Respective value is substituted into the hierarchy model discriminant function of structure respectively, by comparing discriminant function result of calculations at different levels, Determine the classification of sample Hericium erinaceus to be checked.
Hericium erinaceus proposed by the present invention based on the non-destructive testing stage division under computer vision compared with manual grading skill, no Hericium erinaceus only may be implemented fast and accurately to detect, and completely avoid damaging.What makes more sense is that Hericium erinaceus at present Manual grading skill is classified as 1 grade, 2 grades, 3 grades of three ranks, description excessively cage according only to ball block diameter, color two indices It unites, is no quantization, being such as 4-8cm for 3 grades of description of ball block diameter, only having for the description of color broadly white, clean It is white and white yellow, and the present invention makes existing graded index improve and quantifies, i.e., with Hericium erinaceus color, size and shape three Graded index of the good index as Hericium erinaceus, therefore provide for Hericium erinaceus industrialization production process the classification mark of more science It is accurate.
Description of the drawings
The present invention will be further described below with reference to the drawings.
Fig. 1 is the Hericium erinaceus original image of one embodiment of the invention intake.
Fig. 2 is smoothed images of the Fig. 1 after gray processing and noise reduction.
Fig. 3 is black white images of the Fig. 2 after binaryzation.
Fig. 4 is the contour images that Fig. 3 passes through edge extracting.
Specific implementation mode
Embodiment one
The present embodiment Hericium erinaceus non-destructive testing stage division based on computer vision is as follows:
The first step, characteristic parameter extraction --- one group is chosen without spot, disease-free, lossless Hericium erinaceus, clears up its surface contaminants As training sample, rgb image (i.e. 24 RGB color images) is overlooked with slr camera intake Hericium erinaceus cap, the image Each pixel value is divided into tri- primary color components of R, G, B, and each component is 256 gray values.
It carries out later
1, extraction characteristic factor pretreatment (referring to Fig. 1-Fig. 4)
Gray processing --- the rgb image of intake is converted into gray level image;
Noise reduction --- mean filter or medium filtering eliminate the noise in image, become smoothed image;
Binaryzation --- the pixel gray value on smoothed image is set as 0,255, becomes only black white image;
Edge extracting --- edge contour will be used as at variation of image grayscale mutation.
2, characteristic factor is extracted, including
Color characteristic factor --- color represents the grade and freshness of Hericium erinaceus in some sense, applicant's Experimental study shows that totally ascendant trend is presented in the increase with storage number of days, the average value of R, G, B three primary colours, The color mean value ascendant trend of middle channel B is slower, and rapid increase trend is then presented in the color mean value of G, channel B.Thus anti- It mirrors, the new fresh Hericium erinaceus just picked is more close with white, and with the increase of storage time after picking, respiration is consumed Energy also gradually increase so that Hericium erinaceus browning degree gradually increases, show as Hericium erinaceus color and gradually deepen, tend to white Huang Color.
Comparative test shows that the color of a certain piece of sample Hericium erinaceus can only be detected by extracting the color difference meter that color characteristic factor uses Difference, therefore grading effect is carried out more preferably according to the trichromatic mean value of R, G, B, and R, G, B carry out Grading accuracy rate most with R mean values For ideal;The present embodiment seeks R pixel averages from the smoothed image after medium filtering noise reduction process with mean2 functions.
Size characteristic factor --- size be also reflect Hericium erinaceus grade and freshness can considerations, applicant's Experimental study shows that the perimeter of Hericium erinaceus and area were slightly fluctuated at first nine days, and slow downward trend is mainly presented, and Then water evaporation rate was obviously accelerated since the 9th day, and the perimeter and area to cause Hericium erinaceus become smaller rapidly.Can be with In the area, perimeter, path length that characterize Hericium erinaceus size, it is ideal that Grading accuracy rate is carried out with area.Therefore the present embodiment is adopted It is in the measure for placing object of reference (coin) as the Hericium erinaceus side of object, with regionprops functions to take intake image The pixel value of target area in black white image is counted, the area of Hericium erinaceus then can be obtained by following formula
Shape feature factor --- shape is the factor that manual grading skill can not be weighed, and applicant takes cap circularity, partially Heart rate is as considerations
(1) circularity is used for describing cap area and circular similarity, and formula is as follows:
In formula:R0--- cap circularity;
S --- cap area;
L --- cap perimeter.
Work as R0When=1, figure is circle;Work as R0Value it is bigger when, indicate figure it is more irregular, i.e., surveyed object and Circular gap is bigger.
(2) cap eccentricity also known as elongation, eccentricity, for describing the shape of cap profile, formula is as follows:
In formula:P --- cap eccentricity;
Dmax--- cap maximum gauge;
Dmin--- cap minimum diameter;
As eccentricity P=0, figure is circle;When the value of eccentricity P is bigger, the more flat the surveyed object of expression the more flat.
The experimental study of applicant shows that the increase with storage number of days, the circularity of Hericium erinaceus cap were in before this Now extremely slow ascendant trend when by the 9th day starts that zooming trend is presented;Cap eccentricity is presented in first 5 days The trend slowly risen is presented in the five to nine day in the trend being declined slightly, and by the 9th day, then it shows on quickly The trend risen.Thus model has reflected Hericium erinaceus cap aging speed and had started obviously to become faster at the 9th day, shows as cap individual gradually Become smaller, circularity and cap eccentricity are becoming larger, that is, indicate that Hericium erinaceus cap is more and more flat and irregular.Circularity and It is ideal with the latter's progress Grading accuracy rate in eccentricity;Therefore the present embodiment obtains eccentricity using above formula.
Second step establishes corresponding discriminant function --- using Hericium erinaceus grade as dependent variable, with the color characteristic of extraction because Element, size characteristic factor, shape feature factor are independent variable, according to discriminant analysis criterion, pass through training, structure Hericium erinaceus classification One group of discriminant function formula of model;
Since the research data about the classification of Hericium erinaceus grade, applicant have not used for reference one scholar of Feng's first so far [1]It closes and is utilized on the basis of fischer (Fisher) techniques of discriminant analysis with the research of the detection classification of leafy vegetable freshness The characteristic parameters such as color, size and form factor build Pan Biehanshuo [2-4].Fischer differentiates that law theory is thought:It is so-called Discriminant analysis i.e. classify determine under conditions of, differentiate that its type affiliation is asked according to the various characteristic values of a certain research object A kind of Multivariable Statistical Methods of topic.And on how to formulate the rule of identification and classification, solution has perhaps in statistics It is more, for example:Bayesian Decision, Fisher differentiations, distance discrimination etc..The present embodiment selects Fisher criterions to build hedgehog hydnum Mushroom hierarchy model.
The basic ideas of Fisher diagnostic methods are by the way that the independent variable combined projection originally in R dimension spaces is relatively low to dimension D dimension spaces go, then classify again in D dimension spaces.In simple terms, it is exactly as small as possible according to variance in class, between class Mean value gap principle as big as possible carries out minimum distance classification to establish discriminant function to discriminant function.Such differentiation side Not only application range is wider for method, and simple and clear.
(2) foundation of Hericium erinaceus hierarchy model
To the image of no edible value (totally 18 days) as sample training collection, structure point after training sample Hericium erinaceus is picked Class device model.Influence in order to avoid irrelevant variable or the lower variable of percentage contribution to hierarchy model, and cross multi objective and cause Keep model stability poor as a result, the present embodiment sieve is with the highest R mean values of percentage contribution, area S, cap eccentricity P tri- Characteristic parameter is independent variable, using the grade of Hericium erinaceus as dependent variable, builds Fisher discriminant classification models, result following table institute Show.
The classification discriminant function of Hericium erinaceus
Third step, Hericium erinaceus non-destructive testing classification --- Hericium erinaceus cap overhead view image of the intake as sample to be checked, into After the extraction characteristic factor pretreatment of row as hereinbefore, color characteristic factor R mean values corresponding with hierarchy model, size are extracted Characteristic factor area S, shape feature factor cap eccentricity P, and R=144.63, S=are obtained by operation as hereinbefore It is substituted into the three-level Model checking function of structure, obtains Y by 47.18, P=1.0637 respectively1=219.91, Y2=220.10, Y3=219.40, compare the data of result of calculation, the classification using 220.10 corresponding 2 grades of maximum value as sample Hericium erinaceus to be checked As a result.
Hericium erinaceus proposed by the present invention based on the non-destructive testing stage division under computer vision compared with manual grading skill, no Hericium erinaceus only may be implemented fast and accurately to detect, and completely avoid damaging.
Later, 20 Hericium erinaceus images are randomly selected in training sample and carry out back sentencing verification as test set shows 1 grade The recognition accuracy of Hericium erinaceus is 100%, and the recognition accuracy of 2 grades of Hericium erinaceus is 85.7%, the recognition accuracy of 3 grades of Hericium erinaceus It is 87.5%, the needs of industrialization can be met completely by being indicated above the grading effect of the present embodiment.
In addition to the implementation, the present invention can also have other embodiment.It is all to use equivalent substitution or equivalent transformation shape At technical solution, fall within the scope of protection required by the present invention.
[1]Leafy vegetable freshness detection Fen Jiyanjiu &#91s of one, of Feng's first based on computer vision technique;D]:Nanjing agriculture University, 2012.
[2]The structure of Liu Jing wave vegetable colour QA systems and application study;D]:Jilin University, 2004.
[3]The computer vision that Xu Hong stamens is based on detects " secondary youth " sweet tea persimmon external sort the research with classification;D]:Nanjing Agriculture university, 2010.
[4]The design and realization of Jiang Wei vegetables identification modules based on computer vision;D]:Southeast China University, 2015.

Claims (5)

1. a kind of Hericium erinaceus non-destructive testing stage division based on computer vision, it is characterised in that include the following steps:
The first step, characteristic parameter extraction --- Hericium erinaceus cap overhead view image of the intake as training sample extract feature After the pretreatment of factor, extraction color characteristic factor, size characteristic factor, shape feature factor;The color characteristic factor is extremely Contain one of R, G, B mean value less, the size characteristic factor at least contains one of area, perimeter, path length, the shape feature because Element at least contains one of circularity, eccentricity;
Second step establishes corresponding discriminant function --- using Hericium erinaceus grade as dependent variable, with the color characteristic factor of extraction, greatly Small characteristic factor, shape feature factor are independent variable, according to discriminant analysis criterion, pass through training, structure Hericium erinaceus hierarchy model Discriminant function;
Third step, Hericium erinaceus non-destructive testing classification --- Hericium erinaceus cap overhead view image of the intake as sample to be checked are carried After taking the pretreatment of characteristic factor, extract corresponding with hierarchy model color characteristic factor, size characteristic factor, shape feature because Element;Respective value is substituted into the hierarchy model discriminant function of structure respectively, by comparing discriminant function result of calculations at different levels, is determined The classification of sample Hericium erinaceus to be checked;
The intake image of the first step is included in places object of reference as the Hericium erinaceus side of object, and the extraction size is special Sign factor, which is taken, counts the pixel value in black white image, and the area of Hericium erinaceus is obtained by following formula
The extraction shape feature factor of the third step acquires cap eccentricity using following formula:
In formula:P --- cap eccentricity;
Dmax--- cap maximum gauge;
Dmin--- cap minimum diameter.
2. Hericium erinaceus non-destructive testing stage division based on computer vision according to claim 1, it is characterised in that:It takes the photograph Being taken as the pretreatment after the Hericium erinaceus cap vertical view rgb image for training sample includes:
Gray processing --- the rgb image of intake is converted into gray level image;
Noise reduction --- medium filtering eliminates the noise in image, becomes smoothed image;
Binaryzation --- the pixel gray value on smoothed image is set as 0,255, becomes only black white image;
Edge extracting --- edge contour will be used as at variation of image grayscale mutation.
3. Hericium erinaceus non-destructive testing stage division based on computer vision according to claim 2, it is characterised in that:Institute It states extraction color characteristic factor and seeks R pixel averages from the smoothed image after medium filtering noise reduction process.
4. Hericium erinaceus non-destructive testing stage division based on computer vision according to claim 3, it is characterised in that:
Hericium erinaceus hierarchy model is built using Fisher criterions, with R pixel averages, area S, cap eccentricity P tri- Characteristic parameter is independent variable, using the grade of Hericium erinaceus as dependent variable, structure Fisher classification three-level Model checking functions.
5. Hericium erinaceus non-destructive testing stage division based on computer vision according to claim 4, it is characterised in that:It will R pixel averages, area S, the cap eccentricity P values extracted after sample Hericium erinaceus pretreatment to be checked substitute into the three-level mould respectively Type discriminant function, and compare the data of result of calculation, using the corresponding grade of maximum value as the classification knot of sample Hericium erinaceus to be checked Fruit.
CN201710797163.0A 2017-09-06 2017-09-06 Hericium erinaceus non-destructive testing stage division based on computer vision Active CN107564000B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710797163.0A CN107564000B (en) 2017-09-06 2017-09-06 Hericium erinaceus non-destructive testing stage division based on computer vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710797163.0A CN107564000B (en) 2017-09-06 2017-09-06 Hericium erinaceus non-destructive testing stage division based on computer vision

Publications (2)

Publication Number Publication Date
CN107564000A CN107564000A (en) 2018-01-09
CN107564000B true CN107564000B (en) 2018-10-26

Family

ID=60979438

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710797163.0A Active CN107564000B (en) 2017-09-06 2017-09-06 Hericium erinaceus non-destructive testing stage division based on computer vision

Country Status (1)

Country Link
CN (1) CN107564000B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108875627B (en) * 2018-06-14 2021-11-19 深度计算(长沙)信息技术有限公司 Betel nut sorting method based on image visual identification
CN110020672A (en) * 2019-03-11 2019-07-16 潍坊学院 A kind of vegetables screening technique and system
CN110322434A (en) * 2019-06-17 2019-10-11 浙江省农业科学院 A kind of squid freshness identification method based on color notation conversion space and pixel cluster
CN112257506A (en) * 2020-09-21 2021-01-22 北京豆牛网络科技有限公司 Fruit and vegetable size identification method and device, electronic equipment and computer readable medium
CN112556606A (en) * 2020-12-24 2021-03-26 宁夏农林科学院农业经济与信息技术研究所(宁夏农业科技图书馆) Self-propelled wolfberry fruit actual measurement method and device based on binocular vision
CN114378002A (en) * 2022-03-09 2022-04-22 滁州学院 Hericium erinaceus grading system and grading method based on machine vision

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101322969B (en) * 2008-07-18 2012-11-14 中国农业大学 Test and classification method
CN101949834B (en) * 2010-08-02 2012-05-30 扬州福尔喜果蔬汁机械有限公司 Method for detecting and grading internal quality of fruits
CN101957313B (en) * 2010-09-21 2012-07-04 吉林大学 Method and device for computer visual inspection classification of quality of fresh corn ears
CN103177257A (en) * 2013-04-09 2013-06-26 江苏大学 Image identification method and image classification method for coprinus comatus

Also Published As

Publication number Publication date
CN107564000A (en) 2018-01-09

Similar Documents

Publication Publication Date Title
CN107564000B (en) Hericium erinaceus non-destructive testing stage division based on computer vision
CN109978822B (en) Banana maturity judging modeling method and judging method based on machine vision
CN104680524B (en) A kind of leafy vegetable disease screening method
CN101814149B (en) Self-adaptive cascade classifier training method based on online learning
CN105046700B (en) Fruit surface defect detection method and system based on gamma correction and color classification
CN109308697A (en) A kind of leaf disease recognition method based on machine learning algorithm
CN107607554A (en) A kind of Defect Detection and sorting technique of the zinc-plated stamping parts based on full convolutional neural networks
CN103065149A (en) Netted melon fruit phenotype extraction and quantization method
CN106874929B (en) Pearl classification method based on deep learning
CN103034838A (en) Special vehicle instrument type identification and calibration method based on image characteristics
CN108663367A (en) A kind of egg quality lossless detection method based on egg unit weight
CN109115775B (en) Betel nut grade detection method based on machine vision
CN110736709A (en) blueberry maturity nondestructive testing method based on deep convolutional neural network
Angel et al. Assessing the state of maturation of the pineapple in its perolera variety using computer vision techniques
CN109829905A (en) It is a kind of face beautification perceived quality without reference evaluation method
CN106872473A (en) A kind of potato defects detection identifying system design based on machine vision
CN103185609A (en) Image detecting method for grading of tomatoes
CN114463843A (en) Multi-feature fusion fish abnormal behavior detection method based on deep learning
CN106326914B (en) A kind of more classification methods of pearl based on SVM
CN111950564A (en) Pork freshness detection and classification method based on SSA-ELM algorithm
CN108460380A (en) A kind of bamboo cane method for sorting colors and system based on domain color
CN108572174A (en) A kind of quality of agricultural product index nondestructive detection method
CN110929787A (en) Apple objective grading system based on images
Castelo-Quispe et al. Optimization of brazil-nuts classification process through automation using colour spaces in computer vision
Ji et al. Apple color automatic grading method based on machine vision

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant