CN104741325B - Fruit surface color grading method based on normalization hue histogram - Google Patents
Fruit surface color grading method based on normalization hue histogram Download PDFInfo
- Publication number
- CN104741325B CN104741325B CN201510170649.2A CN201510170649A CN104741325B CN 104741325 B CN104741325 B CN 104741325B CN 201510170649 A CN201510170649 A CN 201510170649A CN 104741325 B CN104741325 B CN 104741325B
- Authority
- CN
- China
- Prior art keywords
- fruit
- normalization
- chroma histogram
- chroma
- chromatic value
- 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
Links
Abstract
The invention discloses a fruit surface color grading method based on a normalization hue histogram. The fruit surface color grading method comprises the following steps: selecting two fruits with different surface colors as samples, acquiring original digital images, and removing backgrounds, so as to obtain fruit sample images; converting the fruit sample images into HIS color space format images, and calculating to obtain normalization hue histogram vectors; drawing normalization hue histograms of the sample fruits; setting a fruit grading threshold value: collecting the images of the measured fruits, and processing and calculating to obtain normalization hue histogram vectors, and grading by virtue of calculation and comparison. According to the fruit surface color grading method, threshold values are graded by virtue of the normalization hue histogram of the fruit images, and the fruit surface color grading is carried out by comparing accumulation of different sections of different elements of normalization hue histogram vectors, so that the calculation and processing speeds are high.
Description
Technical field
The present invention relates to a kind of fruit grading method, more particularly, to a kind of fruit based on normalization chroma histogram
According to surface color stage division.
Background technology
The surface color of fruit often affects the purchasing behavior of people, the such as fruit as gift to require that surface color is fresh
Fruit surface solid colour in gorgeous, same packaging.Fruit color is detected and is classified, be to improve fruit commodity value
Effective means.
Fruit surface color is sometimes also related to its inside quality.Research shows that Radix seu Herba Tetrastigmatis Hypoglauci contains abundant potassium, bigcatkin willow
Acid, ferrum, the matter of trampling on of anthocyanin, wherein salicylic acid can reduce cholesterol, and anthocyanin contributes to blood supply, strangle matter acid dilute blood, institute
Myocardial infarction and apoplexy can be prevented with Radix seu Herba Tetrastigmatis Hypoglauci.And green grapes only contain potassium, ferrum and vitamin C, B.Therefore, Radix seu Herba Tetrastigmatis Hypoglauci nutrition
Value is high;Contain 200mg vitamin Cs per 100g Fructus Capsicis, be 2 times of green chili, Fructus Capsici is also rich in carotene, vitamin
B, dimension cattle element E and Folic Acid, can enhancing immunity.Therefore, Fructus Capsici is worth high than green chili.
The color of fruit surface is one of its important exterior quality index, has close relationship with inside quality.If
Evaluated by the sense organ of people, lacked objectivity and accuracy.
In the surface color context of detection of fruit, completed work mainly has:
Tao et al. (Tao Y, Heinemann P H, et al.Machine vision for color inspection
of potatoes and apples.Trans of the ASAE.1995.38(5):1555-1561) having succeeded in developing is used for
The Vision Builder for Automated Inspection of Fructus Mali pumilae color detection, it can distinguish " golden marshall apple " of yellow and green.
Abdullah et al. (Abdullah M Z, Mohamad-Saleh J, Fathinul-Syahir A S, et
al.Discrimination and classification of fresh-cut starfruits(Averrhoa
carambola L.)using automated machine vision system.Journal of Food
Engineering,2006,76(4):506-523) have developed for a kind of golden general's starfruits (Asterias amurensis Lutken shape fruit) surface face
The Vision Builder for Automated Inspection software of normal complexion fruit shape detection, the software utilize HIS color spaces, using linear discriminant function and multilamellar god
Jing networks carry out maturation, immaturity and the post-mature state for detecting fruit, and the detection to 200 samples shows, linear discriminant letter
The Detection accuracy of number and multilayer neural network is respectively 65.3% and 90.5%.
Mendoza et al. (Mendoza F, Dejmek P, Aguilera J M.Calibrated color
measurements of agricultural foods using image analysis.Postharvest Biology
and Technology,2006,41(3):SRGB is have studied respectively 285-295), HSV and L*a*b* color model is in fruit product
The application of quality detection computer vision, as a result shows, sRGB efficiency is higher, but easily by background, fruit surface curvature and scattering shadow
Ring, L*a*b* is more suitable for the detection for being used for fruit surface color in computer vision system.
Yang Xiukun et al. (Yang Xiukun, Chen Xiaoguang. grinding for Fructus Mali pumilae color automatic detection is carried out with Genetic Neural Network Method
Study carefully. Transactions of the Chinese Society of Agricultural Engineering, 1997,13 (2):The chroma histogram of Fructus Mali pumilae is obtained by computer vision technique 173-176) and is carried
Its surface color feature is taken, a multilayer feedforward neural network system is established using advanced genetic algorithm.
Li Qingzhong (Li Qingzhong, Zhang Man. the Real-Time Apple Color Grading based on genetic neural network. Chinese image figure
Shape journal (A volume), 2000,5 (9):The hardware composition of Fructus Mali pumilae color automatic grading system is described 779-784), it is determined that Fructus Mali pumilae
The extracting method of color characteristic, realizes the learning scene of multilayer feedforward neural network evaluator using genetic algorithm, realizes
The real-time graded of Fructus Mali pumilae color, and the effectiveness of method by experimental verification, result of the test show that color grading identification is accurate
More than 90%, the time used by a Fructus Mali pumilae that is classified is 150ms to rate.This method needs first specified value sample, gathers image
After being analyzed, training network, when fruit variety is changed, need to re-start network training, and user is adapted to using inconvenience, kind
Property is poor.
Feng Bin et al. (Feng Bin, Wang Maohua. the Computer Vision Classification of Fruit based on color point shape. agricultural engineering
Report .2002,18 (2):141-144) it is characterized to enter different stain level fruit in the fractal dimension being distributed using fruit surface
During row classification, HIS models are employed, using the accumulative and spatial characteristics of each chroma point.
(Rao Xiuqin, the key technology of the fruit quality real-time detection based on machine vision and grading production line grind Rao Xiuqin
Study carefully, 2007, Zhejiang University) using HIS color model, principal component analytical method and mahalanobis distance method, fruit is realized by surface
Color grading.The classification results that 800 width fruit images are carried out are shown with total relative error 1.75% can meet fruit color
Detection and the requirement being classified.
Zhao Jiewen etc. (Zhao Jiewen etc., the defect Fructus Jujubae Machine Vision Recognition based on support vector machine. agricultural mechanical journal,
2008(03):The 113-115+147 page .) by the use of Cangzhou, Hebei Province Golden jujube as object of study, using support vector machine
Defect Fructus Jujubae after identification is drying.In HIS color spaces, the average and mean square deviation of H are extracted as Fructus Jujubae color feature value, application
Radial basis kernel function sets up support vector machine identification model;And determining that when parameter be C=32, during σ=2, the accuracy rate of identification is most
Height, reaches 96.2%.
Thus, to typically be compared more modeling work could realize according to surface color entering fruit in existing method
Row classification, process are complex.
The content of the invention
In order to overcome the shortcomings of prior art in terms of detection fruit quality, it is an object of the invention to propose a kind of base
In the fruit according to surface color stage division of normalization chroma histogram, according to surface color it is classified by normalization chroma histogram,
More modeling work is avoided, to simplify classification process.
The technical solution used in the present invention is comprised the following steps:
1) gather image:From with a batch of fruit choose two have different surfaces color fruit as two samples
This fruit, is designated as first order fruit S1 and second level fruit S2 respectively, obtains its respective original number by Vision Builder for Automated Inspection
Word image, removes background and obtains fruit sample image;
2) calculate normalization chroma histogram vector:Fruit sample image is converted into into HIS color space format-pattern, so
After be calculated the respective normalization chroma histogram vector P of fruit;
3) the normalization chroma histogram of two sample fruit is drawn on same figure;
4) set the threshold value of fruit grading:By normalization chroma histogram obtained above, by normalization chroma histogram
Main peak starting point chromatic value be designated as T1, the main peak cross point chromatic value of normalization chroma histogram is designated as into T2, by normalization color
Spend histogrammic main peak terminal chromatic value and be designated as T3;
5) tested fruit grading:By tested fruit repeat the above steps 1)~2) gather and image be calculated all tested
Then all tested fruit are relatively classified by the respective normalization chroma histogram vector P of fruit by calculating.
The step 3) draw sample fruit normalization chroma histogram be specially:With HIS color space format-pattern
Chromatic value be transverse axis, the value with normalization chroma histogram vector P drawn in same rectangular plots respectively as the longitudinal axis
The normalization chroma histogram vector P for obtaining two sample fruit obtains a normalization chroma histogram;
The step 5) process that is calculated and compared by normalization chroma histogram vector P is specific as follows:By tested water
Normalization chroma histogram vector P of the chromatic value of fruit between main peak starting point chromatic value T1 and main peak cross point chromatic value T2
Element is cumulative to obtain the first colourity frequency accumulated value M1, by the chromatic value of tested fruit in main peak cross point chromatic value T2 and main peak
The element of the normalization chroma histogram vector P between terminal chromatic value T3 is cumulative to obtain the second colourity frequency accumulated value M2;Will
M1>The fruit of M2 is divided into first order fruit, and the fruit of M1≤M2 is divided into second level fruit.
The normalization chroma histogram vector P of each described fruit is specifically calculated in the following ways:It is empty by HIS colors
Between format-pattern calculate histogram vectors H of its chromatic component, obtain HIS color space format-pattern of the chromatic value in the fruit
The number of times of middle appearance, is multiplied by 100 HIS color space format charts again divided by the fruit using below equation histogram vectors H
The sum of all pixels C of picture, is calculated the normalization chroma histogram vector P of the fruit:
P=100H/C
Wherein, C is the sum of all pixels of the HIS color space format-pattern of the fruit.
The invention has the advantages that:
The present invention carries out classification thresholds using the normalization chroma histogram of fruit image, compares normalization chroma histogram
The accumulated value of the different elements of two sections of the element of vector is according to surface color classified carrying out fruit, and calculating speed is fast.
Description of the drawings
Fig. 1 is the fruit gray level image of embodiment of the present invention first order sample fruit.
Fig. 2 is the fruit gray level image of embodiment of the present invention second level sample fruit.
Fig. 3 is that the embodiment of the present invention draws the normalization chroma histogram for obtaining.
Fig. 4 is the Vision Builder for Automated Inspection schematic diagram of the embodiment of the present invention.
In figure:2nd, camera lens, 3, camera support, 4, LED lamp bar, 5, lighting box, 6, computer.
Specific embodiment
The invention will be further described with reference to the accompanying drawings and examples.
The present invention adopts Fructus Jujubae as the fruit of specific embodiment, and its specific implementation process is as follows:
As shown in figure 4, Vision Builder for Automated Inspection is by colorful CCD camera (DFK 23G445, The Imaging Source
Europe GmbH), 3, four LED lamp bars of camera support 4 (long 370mm, wide 38mm), lighting box 5 and computer 6 constitute, it is colored
CCD camera is arranged on lighting box 5 by camera support 3, and four side of inwall of the lighting box 5 below colorful CCD camera is provided with
Four LED lamp bars 4, towards underface, focal length is 12mm to the camera lens 2 of colorful CCD camera.
1) gather image.From with a batch of fruit choose two have different surfaces color fruit as sample,
First order fruit S1 and second level fruit S2 is designated as respectively, Vision Builder for Automated Inspection is then respectively fed to, and is obtained such as Fig. 1 and Fig. 2 institutes
The digital picture shown, removes background to digital picture, obtains fruit sample image.
2) calculate normalization chroma histogram vector.Each width fruit sample image is converted into into HIS color space form,
Histogram vectors H of its chromatic component are calculated respectively1And H2(i=0,1 ... 255) in first order fruit to record chromatic value i respectively
The number of times occurred in S1 and second level fruit S2 images, uses C1And C2Record first order fruit S1's and second level fruit S2 respectively
Sum of all pixels, uses vectorial H1And H2100 are multiplied by respectively again divided by C1And C2, obtain normalization chroma histogram vector P1And P2, i.e.,
Below equation:
In formula, P1Represent the normalization chroma histogram vector of first order fruit S1, P2Represent the normalizing of second level fruit S2
Change chroma histogram vector, H1Represent the chroma histogram vector of first order fruit S1, H2Represent that the colourity of second level fruit S2 is straight
Side's figure vector, C1Represent the sum of all pixels of first order fruit S1, C2Represent the sum of all pixels of second level fruit S2.
3) the normalization chroma histogram of two sample fruit is drawn on same figure.As shown in figure 3, with chromatic value being
Transverse axis, with normalization chroma histogram vector value as the longitudinal axis, draws first order fruit in same squareness coordinate diagram respectively
The normalization chroma histogram vector P of S11With the normalization chroma histogram vector P of second level fruit S22, obtain as shown in Figure 3
Normalization chroma histogram.
4) classification thresholds are set.The normalization of the normalization chroma histogram and second level fruit S2 of note first order fruit S1
The main peak starting point chromatic value of chroma histogram is T1, the normalization chroma histogram and second level fruit S2 of first order fruit S1
The main peak cross point chromatic value of normalization chroma histogram is T2, the normalization chroma histogram of first order fruit S1 and the second level
The main peak terminal chromatic value of the normalization chroma histogram of fruit S2 is T3.
5) it is classified.Again by step 1)~2) tested fruit is processed, it is calculated the normalization of all tested fruit
The element of chroma histogram vector P, the normalization chroma histogram vector P by chromatic value between T1 and T2 is cumulative to obtain first
The element of colourity frequency accumulated value M1, the normalization chroma histogram vector P by chromatic value between T2 and T3 is cumulative to obtain the
Two colourity frequency accumulated value M2.For example, for M1>The fruit of M2, then be classified as first order fruit S1, is otherwise classified as
Two grades of fruit S2.
Compared with other methods, the stage division that fruit is according to surface color classified by the present invention need only calculate normalization colourity
The cumulative of the different elements of two sections of element of histogram vectors can be classified, and the calculating carried out in MATLAB softwares shows,
It is only 0.062 to carry out the time being classified needed for 1000 times to the normalization chroma histogram of red jujube image vector as stated above
Second, calculating speed is fast.
Above-mentioned specific embodiment is used for illustrating the present invention, rather than limits the invention, the present invention's
In spirit and scope of the claims, any modifications and changes made to the present invention both fall within the protection model of the present invention
Enclose.
Claims (3)
1. a kind of fruit based on normalization chroma histogram according to surface color stage division, it is characterised in that the step of the method
It is as follows:
1) gather image:From with a batch of fruit choose two have different surfaces color fruit as two sample water
Really, its respective original digital image is obtained by Vision Builder for Automated Inspection, removes background and obtain fruit sample image;
2) calculate normalization chroma histogram vector:Fruit sample image is converted into into HIS color space format-pattern, Ran Houji
Calculation obtains the respective normalization chroma histogram vector P of fruit;
3) the normalization chroma histogram of two sample fruit is drawn on same figure;
4) set the threshold value of fruit grading:By normalization chroma histogram obtained above, by the master of normalization chroma histogram
Peak starting point chromatic value is designated as T1, and the main peak cross point chromatic value of normalization chroma histogram is designated as T2, will be normalization colourity straight
The main peak terminal chromatic value of square figure is designated as T3;
5) tested fruit grading:By all tested fruit equal repeat the above steps 1)~2) gather image and process and be calculated respectively
From normalization chroma histogram vector P, then by calculate relatively all tested fruit are classified;
The step 5) process that is calculated and compared by normalization chroma histogram vector P is specific as follows:By tested fruit
The element of normalization chroma histogram vector P of the chromatic value between main peak starting point chromatic value T1 and main peak cross point chromatic value T2
It is cumulative to obtain the first colourity frequency accumulated value M1, by the chromatic value of tested fruit in main peak cross point chromatic value T2 and main peak terminal
The element of the normalization chroma histogram vector P between chromatic value T3 is cumulative to obtain the second colourity frequency accumulated value M2;By M1>M2
Fruit be divided into first order fruit, tested fruit is divided into into second level fruit otherwise.
2. a kind of fruit based on normalization chroma histogram according to claim 1 according to surface color stage division, its
It is characterised by:The step 3) draw sample fruit normalization chroma histogram be specially:With HIS color space format-pattern
Chromatic value be transverse axis, the value with normalization chroma histogram vector P drawn in same rectangular plots respectively as the longitudinal axis
The normalization chroma histogram vector P for obtaining two sample fruit obtains a normalization chroma histogram.
3. a kind of fruit based on normalization chroma histogram according to claim 1 according to surface color stage division, its
It is characterised by:The normalization chroma histogram vector P of each fruit is specifically calculated in the following ways:It is empty by HIS colors
Between format-pattern calculate histogram vectors H of its chromatic component, obtain HIS color space format-pattern of the chromatic value in the fruit
The number of times of middle appearance, is calculated the normalization chroma histogram vector P of the fruit using below equation:
P=100H/C
Wherein, C is the sum of all pixels of the HIS color space format-pattern of the fruit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510170649.2A CN104741325B (en) | 2015-04-13 | 2015-04-13 | Fruit surface color grading method based on normalization hue histogram |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510170649.2A CN104741325B (en) | 2015-04-13 | 2015-04-13 | Fruit surface color grading method based on normalization hue histogram |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104741325A CN104741325A (en) | 2015-07-01 |
CN104741325B true CN104741325B (en) | 2017-04-12 |
Family
ID=53581905
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510170649.2A Active CN104741325B (en) | 2015-04-13 | 2015-04-13 | Fruit surface color grading method based on normalization hue histogram |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104741325B (en) |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0520426A (en) * | 1991-07-15 | 1993-01-29 | Sumitomo Heavy Ind Ltd | Fruit hue judgement device using neural network |
US5533628A (en) * | 1992-03-06 | 1996-07-09 | Agri Tech Incorporated | Method and apparatus for sorting objects by color including stable color transformation |
US5813542A (en) * | 1996-04-05 | 1998-09-29 | Allen Machinery, Inc. | Color sorting method |
GB9810771D0 (en) * | 1998-05-19 | 1998-07-15 | Active Silicon Limited | Method of detecting colours |
WO2005099916A1 (en) * | 2004-04-16 | 2005-10-27 | At Engineering Sdn Bhd | Methods and system for color recognition and enhancing monochrome image recognition |
CN100534642C (en) * | 2007-09-24 | 2009-09-02 | 浙江大学 | Fruit classifying method according to surface color |
-
2015
- 2015-04-13 CN CN201510170649.2A patent/CN104741325B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN104741325A (en) | 2015-07-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Sahu et al. | Defect identification and maturity detection of mango fruits using image analysis | |
Haidar et al. | Image-based date fruit classification | |
Lee et al. | Rapid color grading for fruit quality evaluation using direct color mapping | |
Rupanagudi et al. | A cost effective tomato maturity grading system using image processing for farmers | |
CN101085442B (en) | Method for treating and classifying orange image based on RGB composite model | |
CN108181316B (en) | Bamboo strip defect detection method based on machine vision | |
CN101059425A (en) | Method and device for identifying different variety green tea based on multiple spectrum image texture analysis | |
Rozario et al. | Segmentation of the region of defects in fruits and vegetables | |
CN105606473B (en) | A kind of red grape rigidity nondestructive testing method based on machine vision | |
Leiva et al. | The automatic sorting using image processing improves postharvest blueberries storage quality | |
CN103528967A (en) | Hyperspectral image based overripe Lonicera edulis fruit identification method | |
CN109883967A (en) | A kind of Eriocheir sinensis quality grade method of discrimination based on information fusion | |
Song et al. | Wood materials defects detection using image block percentile color histogram and eigenvector texture feature | |
Wang et al. | Application of hybrid image features for fast and non-invasive classification of raisin | |
CN201041547Y (en) | Device for analyzing and recognizing different types of green teas based on multi-spectrum image texture | |
Jin et al. | Methodology for potatoes defects detection with computer vision | |
Janardhana et al. | Computer aided inspection system for food products using machine vision—a review | |
CN110929787B (en) | Apple objective grading system based on image | |
Ganganagowdar et al. | Recognition and classification of White Wholes (WW) grade cashew kernel using artificial neural networks | |
CN104741325B (en) | Fruit surface color grading method based on normalization hue histogram | |
CN110118735B (en) | Hyperspectral imaging detection method and device for detecting male and female bergamot pears | |
Bermúdez et al. | Image analysis for automatic feature estimation of the Mangifera indica fruit | |
Shetty et al. | Intelligent system to evaluate the quality of DRC using image processing and then categorize using artificial neural network (ANN) | |
Monavar et al. | Detection of red ripe tomatoes on stem using Image Processing Techniques | |
Yang et al. | Machine vision based granular raw material adulteration identification in Baijiu brewing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |