Grapefruit quality classification method and device

文档序号:1422728 发布日期:2020-03-17 浏览:38次 中文

阅读说明:本技术 一种柚子品质分类方法与装置 (Grapefruit quality classification method and device ) 是由 曾镜源 冯亚芬 于 2019-11-29 设计创作,主要内容包括:本发明公开了一种柚子品质分类方法,属于柚子分类技术领域,主要解决的是现有分类方式效果差的技术问题,该方法是根据口感对同一批次的柚子挑选训练样本,根据训练样本的参数构建分类模型,利用该分类模型对该批次的柚子进行品质分类。本发明还公开了一种柚子品质分类装置。本发明分类效果好,柚子品质的一致性好。(The invention discloses a grapefruit quality classification method, belongs to the technical field of grapefruit classification, and mainly solves the technical problem that the existing classification method is poor in effect. The invention also discloses a grapefruit quality classification device. The invention has good classification effect and good consistency of grapefruit quality.)

1. A grapefruit quality classification method is characterized in that training samples are selected for grapefruit of the same batch according to mouthfeel, a classification model is built according to parameters of the training samples, and the grapefruit of the batch is subjected to quality classification by using the classification model.

2. The grapefruit quality classification method according to claim 1, characterized by comprising the following steps:

s1, acquiring the year, the area, the picking time and the planting monitoring data of the grapefruit in the batch as first parameters;

s2, a taste detector selects shaddocks which can represent each type from the batches of shaddocks;

s3, tasting the selected pomelos by a taste detector, classifying the tasted pomelos according to the feeling of the taste detector, and selecting a plurality of training samples for each category;

s4, acquiring the contour, the surface and surface image characteristics and the weight of each training sample as second parameters;

s5, obtaining quality evaluation indexes according to the outlines and the weights of the training samples, and taking the ratio of the quality evaluation indexes of the training samples as a third parameter;

s6, inputting the first parameter, the second parameter and the third parameter into different data mining classification models respectively for training, classifying samples to be detected by using the data mining classification models respectively, and selecting the most suitable classification model as a final classification model by a taste detector;

and S7, using the final classification model to perform quality classification on the grapefruit in the batch.

3. The method for classifying the quality of the grapefruits according to claim 2, wherein the grapefruits in the same batch are consistent in year, area and picking time.

4. The method for classifying the quality of grapefruit according to claim 2, wherein in step S5, the quality evaluation index Q of one of the training samplespComprises the following steps:

wherein the content of the first and second substances,

Figure FDA0002294904180000022

x is the side length of an image pixel, hx is the height of a grapefruit, nx is the width of a grapefruit, the mass of a grapefruit, v the volume of a grapefruit,

quality evaluation index Q of another training samplesComprises the following steps:

Figure FDA0002294904180000023

msto train the quality of the sample, vsTo train the volume of the sample, wherein,

Figure FDA0002294904180000024

hsnumber of pixels, n, for the current training sample heightsThe quality evaluation index Q is the number of wide pixelspAnd a quality evaluation index QsRatio R ofpComprises the following steps:

Figure FDA0002294904180000025

order:

Figure FDA0002294904180000026

on the same test batch, ApIs a constant number of times, and is,

Figure FDA0002294904180000031

wherein the content of the first and second substances,

Figure FDA0002294904180000032

5. the method for classifying the quality of grapefruit according to claim 2, wherein in step S6, the data mining classification model includes a PCA data mining classification model and a K-Means data mining classification model.

6. A grapefruit quality classification device comprises a computer (1) and is characterized by further comprising a conveyor belt (2), wherein a detection box (3) is arranged above the conveyor belt (2), a top light source (4) is arranged at the top of an inner cavity of the detection box (3), a first side light source (5) and a second side light source (6) are respectively arranged on two sides of the inner cavity of the detection box (3), a plurality of image acquisition units (7) are arranged in the inner cavity of the detection box (3), a weighing sensor (8) is arranged below the conveyor belt (2), and the computer (1) is respectively and electrically connected with the top light source (4), the first side light source (5), the second side light source (6), the image acquisition units (7) and the weighing sensor (8); the computer (1) collects parameters of the pomelo (9) through the image collecting unit (7) and the weighing sensor (8) and classifies the quality of the pomelo (9) by using the method according to any one of claims 1 to 5.

7. The grapefruit quality classification device according to claim 6, characterized in that said image acquisition unit (7) comprises at least one of a camera, a hyperspectral image sensor, and an infrared image sensor.

8. A grapefruit quality-classifying device according to claim 6 or 7, characterized in that said detection box (3) is made of a non-light-permeable substance.

Technical Field

The invention relates to the technical field of grapefruit classification, in particular to a grapefruit quality classification method and a grapefruit quality classification device.

Background

In the existing devices, scientific and technical papers and patents, the classification of fruit agricultural products generally adopts devices or sensors such as computer vision (or machine vision), hyperspectrum, infrared and weighing to perform nondestructive detection on the internal and external characteristics of fruits. Due to the fact that the quality of pomelo fruits is poor in consistency, factors such as different years, regions, picking time and the orientation of fruits on trees can have great influence on the quality, the method for judging the quality of pomelo by adopting the internal and external detection data of pomelo is not feasible in practice, and the classification effect is poor. In addition, the protection of the grapefruit skin on the pulp is important, and any damage to the skin can cause rapid decay of the grapefruit, so that only a nondestructive testing scheme is considered in practice.

Disclosure of Invention

The invention aims to solve the technical problem of the prior art, and aims to provide a grapefruit quality classification method with a good classification effect.

The second purpose of the invention is to provide a grapefruit quality classification device with a good classification effect.

In order to achieve the first purpose, the invention provides a grapefruit quality classification method, which includes the steps of selecting training samples from the grapefruit in the same batch according to mouthfeel, constructing a classification model according to parameters of the training samples, and performing quality classification on the grapefruit in the batch by using the classification model.

As a further improvement, the method comprises the following steps:

s1, acquiring the year, the area, the picking time and the planting monitoring data of the grapefruit in the batch as first parameters;

s2, a taste detector selects shaddocks which can represent each type from the batches of shaddocks;

s3, tasting the selected pomelos by a taste detector, classifying the tasted pomelos according to the feeling of the taste detector, and selecting a plurality of training samples for each category;

s4, acquiring the contour, the surface and surface image characteristics and the weight of each training sample as second parameters;

s5, obtaining quality evaluation indexes according to the outlines and the weights of the training samples, and taking the ratio of the quality evaluation indexes of the training samples as a third parameter;

s6, inputting the first parameter, the second parameter and the third parameter into different data mining classification models respectively for training, classifying samples to be detected by using the data mining classification models respectively, and selecting the most suitable classification model as a final classification model by a taste detector;

and S7, using the final classification model to perform quality classification on the grapefruit in the batch.

Furthermore, the years, the areas and the picking time of the grapefruits in the same batch are consistent.

Further, in the step S5, the quality evaluation index Q of one of the training samplespComprises the following steps:

Figure BDA0002294904190000021

wherein the content of the first and second substances,

Figure BDA0002294904190000022

x is the side length of an image pixel, hx is the height of a grapefruit, nx is the width of a grapefruit, the mass of a grapefruit, v the volume of a grapefruit,

quality evaluation index Q of another training samplesComprises the following steps:

Figure BDA0002294904190000023

msto train the quality of the sample, vsTo train the volume of the sample, wherein,

Figure BDA0002294904190000031

hsnumber of pixels, n, for the current training sample heightsThe quality evaluation index Q is the number of wide pixelspAnd a quality evaluation index QsRatio of (A to (B)Value RpComprises the following steps:

Figure BDA0002294904190000032

order:

Figure BDA0002294904190000033

on the same test batch, ApIs a constant number of times, and is,

Figure BDA0002294904190000034

wherein the content of the first and second substances,

further, in the step S6, the data mining classification model includes a PCA data mining classification model and a K-Means data mining classification model.

In order to achieve the second purpose, the invention provides a grapefruit quality classification device, which comprises a computer and a conveyor belt, wherein a detection box is arranged above the conveyor belt, a top light source is arranged at the top of an inner cavity of the detection box, a first side light source and a second side light source are respectively arranged on two sides of the inner cavity of the detection box, a plurality of image acquisition units are arranged in the inner cavity of the detection box, a weighing sensor is arranged below the conveyor belt, and the computer is respectively and electrically connected with the top light source, the first side light source, the second side light source, the image acquisition units and the weighing sensor; the computer collects parameters of the pomelos through the image collecting unit and the weighing sensor and classifies the quality of the pomelos by the method.

As a further improvement, the image acquisition unit comprises at least one of a camera, a hyperspectral image sensor and an infrared image sensor.

Further, the detection box is made of a material which is not transparent to light.

Advantageous effects

Compared with the prior art, the invention has the advantages that:

1. according to the method, the training samples are selected for the grapefruits in the same batch according to the taste, the classification model is constructed according to the parameters of the training samples, and the grapefruits in the batch are subjected to quality classification by using the classification model, so that the classification effect is good, and the consistency of the grapefruits is good.

2. According to the invention, the pomelos capable of representing various types are selected by a taste detector, the selected pomelos are tasted, quality classification is carried out according to the taste of the pomelos, training samples of various types are selected, accurate classification can be carried out, and the consistency of the quality of the pomelos is ensured.

3. The method takes the year, the area, the picking time and the planting monitoring data of the grapefruit as first parameters, the outlines, the surface and surface layer image characteristics and the weight of training samples as second parameters, the ratio among the quality evaluation indexes of the training samples as third parameters, and the most suitable classification model is selected according to the first parameters, the second parameters and the third parameters, so that the classification model is strong in generalization capability and good in stability.

Drawings

FIG. 1 is a schematic structural view of the present invention;

fig. 2 is a schematic view of the height and width of a grapefruit.

Wherein: 1-computer, 2-conveyor belt, 3-detection box, 4-top light source, 5-first side light source, 6-second side light source, 7-image acquisition unit, 8-weighing sensor and 9-grapefruit.

Detailed Description

The invention will be further described with reference to specific embodiments shown in the drawings.

Referring to fig. 1, a method for classifying grapefruit quality includes selecting training samples from grapefruit in the same batch according to mouthfeel, constructing a classification model according to parameters of the training samples, and performing quality classification on the grapefruit in the batch by using the classification model. The method specifically comprises the following steps:

s1, acquiring year, area, picking time and planting monitoring data of a batch of grapefruits as first parameters;

s2, a taste detector selects shaddocks which can represent various types from the shaddocks in the batch;

s3, tasting the selected pomelos by a taste detector, classifying the tasted pomelos according to the feeling of the taste detector, and selecting a plurality of training samples for each category;

s4, acquiring the contour, the surface and surface image characteristics and the weight of each training sample as second parameters;

s5, obtaining quality evaluation indexes according to the outlines and the weights of the training samples, and taking the ratio of the quality evaluation indexes of the training samples as a third parameter;

s6, inputting the first parameter, the second parameter and the third parameter into different data mining classification models respectively for training, classifying samples to be detected by using the data mining classification models respectively, and selecting the most suitable classification model as a final classification model by a taste detector;

and S7, using the final classification model to classify the quality of the grapefruit in the batch.

The years, areas and picking time of the grapefruits in the same batch are consistent. The volume-weight ratio of the grapefruit is an important selection standard of grapefruit mouthfeel, and can be used as a quality evaluation index, the quality evaluation index can be directly calculated to relate to the calibration of pixel length, and the accurate length calibration even needs a line ruler, so that the cost is high, and the steps are complex. The ratio of the quality evaluation indexes of the pomelos in the same batch is more practical.

In step S5, the quality evaluation index Q of one of the training samplespComprises the following steps:

wherein the content of the first and second substances,

as shown in fig. 2, x is the side length of an image pixel, hx is the height of a grapefruit, nx is the width of a grapefruit, the mass of an m grapefruit, v the volume of a grapefruit,

quality evaluation index Q of another training samplesComprises the following steps:

Figure BDA0002294904190000063

msto train the quality of the sample, vsTo train the volume of the sample, wherein,

Figure BDA0002294904190000064

hsnumber of pixels, n, for the current training sample heightsThe quality evaluation index Q is the number of wide pixelspAnd a quality evaluation index QsRatio R ofp

Figure BDA0002294904190000065

Order:

Figure BDA0002294904190000066

on the same test batch, ApIs a constant number of times, and is,

Figure BDA0002294904190000071

wherein the content of the first and second substances,

Figure BDA0002294904190000072

obtaining the ratio R of the quality evaluation indexpThe n and h of (2) do not need to be calibrated by pixels any more, and the operation amount is also reduced. The mass m is measured by a weighing sensor, and only V needs to be calculated during operationtThen R can be obtainedpThe value of (c). If the grapefruit is classified into k categories, then RpIs a vector containing k elements, each of which takes the average value within the class.

In step S6, the data mining classification model includes PCA data mining classification model, K-Means data mining classification model, and certainly may not include other data mining classification models.

The utility model provides a shaddock quality classification device, including computer 1, still include conveyer belt 2, 2 tops of conveyer belt are equipped with detection case 3, 3 inner chamber tops of detection case are equipped with top light source 4, 3 inner chamber both sides of detection case are equipped with first side light source 5 respectively, second side light source 6, 3 inner chambers of detection case are equipped with a plurality of image acquisition unit 7, 2 below of conveyer belt are equipped with weighing sensor 8, computer 1 is electric connection top light source 4 respectively, first side light source 5, second side light source 6, image acquisition unit 7, weighing sensor 8. The 9 shaddock carpopodium up place the tray in on, the tray moves and weighs the result real-time transmission to computer 1 after 8 on weighing sensor. The computer 1 can adjust the top light source 4, the first side light source 5 and the second side light source 6, so that the surface of the grapefruit 9 is polished to reach the brightness required by photographing. A plurality of image acquisition unit 7 is fixed in inside the box, and under computer 1's control, image acquisition unit 7 is to shaddock 9 collection image, and the image that obtains supplies computer 1 to handle. The computer 1 classifies the quality of the grapefruit 9 according to the acquired parameters by the above-mentioned method. The computer 1 processing mainly comprises extracting the outline, texture, spot characteristics of the surface of the pomelo peel, the number of spots, the presence or absence of decay or mechanical damage of the pomelo 9. In which the grapefruit 9, which has the characteristics of rotting or mechanical damage, is not affected by other characteristics and is directly specified as being rejected.

The image acquisition unit 7 comprises at least one of a camera, a hyperspectral image sensor and an infrared image sensor. The detection box 3 is made of a light-tight substance so as not to interfere the image collected by the internal image collecting unit 7 by an external light source.

According to the method, the training samples are selected for the grapefruits in the same batch according to the taste, the classification model is constructed according to the parameters of the training samples, and the grapefruits in the batch are subjected to quality classification by using the classification model, so that the classification effect is good, and the consistency of the grapefruits is good. Select the shaddock that can represent each type through the taste measurement personnel, taste the shaddock of selecting to carry out the quality classification and select the training sample of each classification according to the taste of shaddock, can accurate classification, guarantee the uniformity of shaddock quality. The method comprises the steps of taking the year, the area, the picking time and the planting monitoring data of the grapefruit as first parameters, taking the outline, the surface and surface layer image characteristics and the weight of training samples as second parameters, taking the ratio among the quality evaluation indexes of the training samples as third parameters, and selecting the most suitable classification model according to the first parameters, the second parameters and the third parameters, wherein the classification model is high in generalization capability and good in stability.

The above is only a preferred embodiment of the present invention, and it should be noted that it is obvious to those skilled in the art that several variations and modifications can be made without departing from the structure of the present invention, which will not affect the effect of the implementation of the present invention and the utility of the patent.

9页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种车间作业台

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!