CN116899896A - Red ginseng sorting device and sorting method based on machine vision - Google Patents

Red ginseng sorting device and sorting method based on machine vision Download PDF

Info

Publication number
CN116899896A
CN116899896A CN202211657930.5A CN202211657930A CN116899896A CN 116899896 A CN116899896 A CN 116899896A CN 202211657930 A CN202211657930 A CN 202211657930A CN 116899896 A CN116899896 A CN 116899896A
Authority
CN
China
Prior art keywords
gmm
red ginseng
sorting
image
machine vision
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.)
Pending
Application number
CN202211657930.5A
Other languages
Chinese (zh)
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.)
Yuxi Normal University
Original Assignee
Yuxi Normal 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 Yuxi Normal University filed Critical Yuxi Normal University
Priority to CN202211657930.5A priority Critical patent/CN116899896A/en
Publication of CN116899896A publication Critical patent/CN116899896A/en
Pending legal-status Critical Current

Links

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B07SEPARATING SOLIDS FROM SOLIDS; SORTING
    • B07CPOSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
    • B07C5/00Sorting according to a characteristic or feature of the articles or material being sorted, e.g. by control effected by devices which detect or measure such characteristic or feature; Sorting by manually actuated devices, e.g. switches
    • B07C5/34Sorting according to other particular properties
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B07SEPARATING SOLIDS FROM SOLIDS; SORTING
    • B07CPOSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
    • B07C5/00Sorting according to a characteristic or feature of the articles or material being sorted, e.g. by control effected by devices which detect or measure such characteristic or feature; Sorting by manually actuated devices, e.g. switches
    • B07C5/02Measures preceding sorting, e.g. arranging articles in a stream orientating
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B07SEPARATING SOLIDS FROM SOLIDS; SORTING
    • B07CPOSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
    • B07C5/00Sorting according to a characteristic or feature of the articles or material being sorted, e.g. by control effected by devices which detect or measure such characteristic or feature; Sorting by manually actuated devices, e.g. switches
    • B07C5/34Sorting according to other particular properties
    • B07C5/342Sorting according to other particular properties according to optical properties, e.g. colour
    • B07C5/3422Sorting according to other particular properties according to optical properties, e.g. colour using video scanning devices, e.g. TV-cameras
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B07SEPARATING SOLIDS FROM SOLIDS; SORTING
    • B07CPOSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
    • B07C5/00Sorting according to a characteristic or feature of the articles or material being sorted, e.g. by control effected by devices which detect or measure such characteristic or feature; Sorting by manually actuated devices, e.g. switches
    • B07C5/36Sorting apparatus characterised by the means used for distribution
    • B07C5/361Processing or control devices therefor, e.g. escort memory
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B07SEPARATING SOLIDS FROM SOLIDS; SORTING
    • B07CPOSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
    • B07C5/00Sorting according to a characteristic or feature of the articles or material being sorted, e.g. by control effected by devices which detect or measure such characteristic or feature; Sorting by manually actuated devices, e.g. switches
    • B07C5/36Sorting apparatus characterised by the means used for distribution
    • B07C5/361Processing or control devices therefor, e.g. escort memory
    • B07C5/362Separating or distributor mechanisms
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B07SEPARATING SOLIDS FROM SOLIDS; SORTING
    • B07CPOSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
    • B07C2501/00Sorting according to a characteristic or feature of the articles or material to be sorted
    • B07C2501/009Sorting of fruit

Abstract

The invention discloses a red ginseng sorting device and a sorting method based on machine vision, wherein the device comprises the following components: the device comprises a feeding hopper, a conveying table, a conveying belt, a camera, a sorting steering engine, a distributing hopper and a control part; the red ginseng sorting method based on machine vision comprises the following steps: s1: the camera collects the red ginseng image on the transmission roller and transmits the red ginseng image to the MCU of the control part; s2: identifying and extracting image contour features of red ginseng; s3: extracting color characteristics of the red ginseng image; s4: establishing a machine learning model; s5: identifying the levels of different fruits by using a machine learning model; aiming at the characteristic that the red ginseng peel is easy to break, the smooth conveyor belt designed by the invention can independently discharge the red ginseng, avoid accumulation and prevent peel damage; the machine vision image processing method provided by the invention has the advantages of high identification precision for fruits and high sorting accuracy.

Description

Red ginseng sorting device and sorting method based on machine vision
Technical Field
The invention belongs to the technical field of machine vision, and particularly relates to a red ginseng sorting device and a sorting method based on machine vision.
Background
The earliest application of machine vision technology in the agricultural field began in the middle and late 80 s of the last century. In 1986, g.e.rehkugler et al used machine vision to detect surface bruising of apples, and classified apples by american apple classification standards, with a large error in classification results. In 1988, davenel et al used machine vision to extract apple size and crush injury characteristics to rank apples. In 1990, han.y.j. Et al measured the reflectance of crops from background soil using a spectrophotometer, separating crop images from background soil. In 1991, tarbell K.A. et al used chromaticity coordinates to overcome the effects of changes in illumination during studies of maize growth characteristics. In 1992, segineerI et al used machine vision to monitor plant leaf growth, and the results could be used as control signals for irrigation systems. In 1995, nozer et al studied a system for automatically classifying fruits by using machine vision, extracted feature quantities such as shape, size, color, etc., of fruits, and classified by using BP neural network. In 1996, ahmadI.S. and the like extract corn image color information to find that RGB values can well reflect drought and fertilizer deficiency symptoms of crops. In 2002, hiroaki, ishizawa analyzed the correlation between chemical composition of three apples of different maturity stages and their mouthfeel and spectral image data. In 2005, panitnatyimmam et al detected the shape, size, color and surface area of mangoes using computer vision techniques. In 2003, e.j.vanhenten et al developed a machine vision based robotic system for picking cucumbers in a greenhouse. In 2010, nick Sigrimis et al used a CCD camera in combination with a filter to detect the nutritional status and growth status of crops.
For the research condition of the machine vision technology in the agricultural production field, compared with other developed countries, china starts later, and research is started in the 90 th century. In 1995 Chen Xiaoguang, the image processing technology was used to analyze and distinguish the growth information of vegetable seedlings, and provide necessary information for transplanting and thinning. In 1998, li Shaokun et al applied image processing techniques to extraction of crop information and growth monitoring. In 2005, wu Congling and the like can be used for predicting the real leaf area of the plant by using a computer to nondestructively measure the leaf crown projection area of the cucumber, so that better precision is achieved. In 2008, song Yajie et al studied a nondestructive crop moisture detection model based on machine vision technology. In 2009, zhang Yuan and the like adopted a multispectral machine vision technology to detect rape nitrogen, so as to obtain detection models of different growth periods. In 2012, peng Hui and the like propose a binocular vision-based parallax segmentation algorithm for the situation that overlapping fruits are not easy to segment, and the fruits can be segmented well. In 2014, li Wenbin and other studies on the positioning and maturity of the Lingwu long dates by utilizing a machine vision technology, a Lingwu long date maturity grade identification algorithm based on the combination of hue H and red color ratio is provided, and the discrimination accuracy of the algorithm reaches 92.60%. Although the application of machine vision technology in agricultural production has been rapidly developed in recent decades, china still needs to be continuously improved compared with other developed countries.
For the agricultural product grading technology based on machine vision, part of related researches exist at home and abroad, and the existing researches have the following two problems: (1) only the identification and detection of near-circular fruits such as apples, oranges, tomatoes and the like are carried out, and related grading standards and detection methods are not available for special-shaped fruits such as newly developed plateau special agricultural products, namely red fruit ginseng and spider fruits. (2) The existing research is mainly carried out on an image processing algorithm, the classification recognition theory is researched, and the recognition and sorting linkage is rarely developed for corresponding sorting system equipment.
Disclosure of Invention
The invention provides a red ginseng sorting device and a sorting method based on machine vision, which are characterized in that red ginseng is fed through a sorting device, red ginseng images are collected by a camera in the process of conveying, the collected red ginseng images are analyzed and processed by the sorting method provided by the invention, namely an image recognition processing method, after analysis processing results are obtained, a sorting mechanical arm is controlled by an MCU processing program in a control part, and red ginseng of different grades is sorted to different sorting hoppers.
In order to achieve the technical purpose, the invention is realized by the following technical scheme:
a machine vision based red fruit ginseng sorting device comprising: the device comprises a feeding hopper, a conveying table, a conveying belt, a camera, a sorting steering engine, a distributing hopper and a control part;
the feeding hopper is arranged at the left side of the conveying table;
the conveying table is rotatably connected with a conveying belt;
a camera is arranged between the conveying table and the feeding hopper and above the conveying table;
a sorting steering engine is arranged on one side of the conveying table to finish sorting actions; a distributing hopper matched with the sorting steering engine is correspondingly arranged on the other side of the conveying table;
the side edge of the conveying table is connected with a control part, and the control part is internally integrated and connected with an MCU; and performing machine vision image processing analysis on the image acquired by the camera through the MCU, and controlling the driving of the sorting steering engine through the MCU.
Preferably, a plurality of fruit position grooves are formed in the conveyor belt, and each fruit can fall into one fixed fruit position groove;
preferably, the camera is placed in the lamp box of the light shield above the conveying table so as to obtain continuous and stable ambient light, thereby improving the recognition accuracy.
Another object of the present invention is to provide a machine vision based red ginseng sorting method, comprising the steps of:
s1: collecting red ginseng images on the conveying belt by a camera and transmitting the red ginseng images to an MCU of a control part;
s2: identifying and extracting image contour features of red ginseng:
a modified minimum graph cut (GrabCut) algorithm is used: firstly, modeling an object and a background by using a full covariance GMM (mixed gaussian model) of K gaussian components (generally k=5) for an RGB color space respectively; then dividing the pixels into background pixels and target pixels through frame selection, distributing Gaussian components in the GMM to each pixel, substituting RGB values of the pixel n into each Gaussian component in the target GMM, learning parameters of optimizing the GMM for given image data, and estimating whether each pixel belongs to the target GMM or the background GMM; finally, parameters of the GMM modeling the target and the background are better through a plurality of iterative processes, and the whole iterative process is converged to an optimal image segmentation result;
s3: extracting color features of red ginseng images: the difference of color components H of fruits in an HSV color space is utilized, and for the components H of the fruit images, the distribution characteristics of different angles of the histogram are divided into subsets with obvious differences according to different maturity levels, so that the identification of the colors of the fruits is realized;
s4: establishing a machine learning model: performing cluster analysis by using K-means, taking the mean value of the H component as an initial center point, setting K=3, and dividing the initial training set into 3 feature sets;
s5: identifying the levels of different fruits using a machine learning model: training 3 SVM classifiers with 3 feature sets and judging by using a one-to-one strategy;
preferably, the image contour feature recognition and extraction method specifically comprises the following steps:
s2.1: and (3) establishing a color model: using RGB color space, modeling the target and the background with a K gaussian component (generally k=5) full covariance GMM (mixed gaussian model), respectively, for each pixel, without a certain gaussian component from the target GMM or without a certain gaussian component from the background GMM;
s2.2: initializing: obtaining an initial set by selecting the target through a frame, namely, all pixels outside the frame are used as background pixels, and all pixels in the frame are used as pixels which are possible targets;
s2.3: iterative minimization: (1) assigning gaussian components in the GMM to each pixel, substituting RGB values of pixel n into each gaussian component in the target GMM, (2) learning parameters for optimizing the GMM for given image data, (3) estimating whether each pixel belongs to the target GMM or the background GMM by segmentation, (4) repeating (1) to (3) until the iterative process converges;
s2.4: smoothing the boundary to form a final contour;
preferably, the image color feature extraction method specifically comprises the following steps:
s3.1: converting an RGB image acquired by a camera into an HSV color space;
s3.2: dividing the detected image into different levels according to maturity, and calculating the mean value and variance of H components in each level for the distribution of the H components in different angles so as to obtain the distribution characteristics of the H components in different levels;
s3.3: in the later stage, the machine learning model is used for identifying the distribution characteristics of the H component at different levels in the process of identifying the levels of different fruits, and the training machine is divided into corresponding attribution levels according to the characteristics presented by the H component of the image;
preferably, the machine learning model building process is as follows:
s4.1: performing cluster analysis by using K-means; the process comprises the following steps: (1) taking the mean value of the H component as an initial clustering center point, taking 'small intra-cluster difference and big inter-cluster difference' as optimization targets, and setting the difference as Euclidean distance from a sample point to the mass center of a cluster where the sample point is located; (2) circularly calculating the distance from each sample point to the centroid, and distributing the sample to the centroid at the position close to the centroid to obtain K clusters; (3) for each cluster, calculating the average distance of all sample points divided into the cluster as a new centroid, and calculating again; (4) repeating the three steps until all clusters are not changed;
s4.2: in order to facilitate operation and improve sorting efficiency, the prepared initialization training set is divided into 3 clusters, namely 3 feature sets divided by H components, through a K-means algorithm;
s4.3: training an SVM classifier by using the feature set; the process comprises the following steps: (1) mapping the feature vector of the instance to some points in space as support vectors; (2) searching a hyperplane so that points closer to the hyperplane can have larger spacing; (3) distinguishing the attribution classification of the feature vector by using the obtained hyperplane;
s4.4: judging by using a one-to-one strategy; the method comprises the following steps: (1) calculating the possibility of belonging to the class by using three trained binary classifiers for the feature vectors to be classified; (3) and selecting the highest-scoring class as the class of the characteristics of the input sample to be classified, thereby realizing final judgment.
The beneficial effects of the invention are as follows:
the device provided by the invention can sort the red ginseng, and the smooth conveyor belt designed by the invention can separate the red ginseng, avoid accumulation and prevent peel damage aiming at the characteristic that the red ginseng peel is easy to break; the independent arrangement of the red ginseng does not influence the image acquisition of the camera on the red ginseng; in addition, the machine vision image processing method provided by the invention has high identification precision on fruits and high sorting accuracy.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a machine vision red ginseng sorting apparatus of the present invention;
in the drawings, the list of components represented by the various numbers is as follows:
the device comprises a 1-feeding hopper, a 2-conveying table, 201-supporting legs, a 3-conveying belt, 301-fruit position grooves, 4-cameras, 401-light shields, 5-sorting steering engines, 6-distributing hoppers and 7-control parts.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
A machine vision based red fruit ginseng sorting device comprising: the automatic sorting machine comprises a feeding hopper 1, a conveying table 2, a conveying belt 3, a camera 4, a sorting steering engine 5, a distributing hopper 6 and a control part 7;
the feeding hopper 1 is arranged at the left side of the conveying table 2;
a rotatable connection conveyor belt 3 is arranged in the conveyor table 2;
a camera 4 is arranged between the conveying table 2 and the feeding hopper 6 and above the conveying table 2;
a sorting steering engine 5 is arranged on one side of the conveying table 2 to finish sorting actions; a distributing hopper 6 matched with the sorting steering engine 5 is correspondingly arranged on the other side of the conveying table 2;
the side edge of the conveying table 2 is connected with a control part 7, and the control part 7 is internally integrated and connected with an MCU; the image acquired by the camera 4 is processed and analyzed by the MCU, and the driving of the sorting steering engine 5 is controlled by the MCU.
Preferably, a plurality of fruit position slots 301 are arranged on the conveyor belt 3, and each fruit can fall into one fixed fruit position slot 301;
preferably, the camera 4 is placed in the light box of the light shield 401 above the conveying table 2, so as to obtain continuous and stable ambient light, thereby improving the recognition accuracy.
Example 2
A red ginseng sorting method based on machine vision comprises the following steps:
s1: collecting red ginseng images on the conveying belt by a camera and transmitting the red ginseng images to an MCU of a control part;
s2: identifying and extracting image contour features of red ginseng:
a modified minimum graph cut (GrabCut) algorithm is used: firstly, modeling an object and a background by using a full covariance GMM (mixed gaussian model) of K gaussian components (generally k=5) for an RGB color space respectively; then dividing the pixels into background pixels and target pixels through frame selection, distributing Gaussian components in the GMM to each pixel, substituting RGB values of the pixel n into each Gaussian component in the target GMM, learning parameters of optimizing the GMM for given image data, and estimating whether each pixel belongs to the target GMM or the background GMM; finally, parameters of the GMM modeling the target and the background are better through a plurality of iterative processes, and the whole iterative process is converged to an optimal image segmentation result;
s3: extracting color features of red ginseng images: the difference of color components H of fruits in an HSV color space is utilized, and for the components H of the fruit images, the distribution characteristics of different angles of the histogram are divided into subsets with obvious differences according to different maturity levels, so that the identification of the colors of the fruits is realized;
s4: establishing a machine learning model: performing cluster analysis by using K-means, taking the mean value of the H component as an initial center point, setting K=3, and dividing the initial training set into 3 feature sets;
s5: identifying the levels of different fruits using a machine learning model: training 3 SVM classifiers with 3 feature sets and judging by using a one-to-one strategy;
preferably, the image contour feature recognition and extraction method specifically comprises the following steps:
s2.1: and (3) establishing a color model: using RGB color space, modeling the target and the background with a K gaussian component (generally k=5) full covariance GMM (mixed gaussian model), respectively, for each pixel, without a certain gaussian component from the target GMM or without a certain gaussian component from the background GMM;
s2.2: initializing: obtaining an initial set by selecting the target through a frame, namely, all pixels outside the frame are used as background pixels, and all pixels in the frame are used as pixels which are possible targets;
s2.3: iterative minimization: (1) assigning gaussian components in the GMM to each pixel, substituting RGB values of pixel n into each gaussian component in the target GMM, (2) learning parameters for optimizing the GMM for given image data, (3) estimating whether each pixel belongs to the target GMM or the background GMM by segmentation, (4) repeating (1) to (3) until the iterative process converges;
s2.4: smoothing the boundary to form a final contour;
preferably, the image color feature extraction method specifically comprises the following steps:
s3.1: converting an RGB image acquired by a camera into an HSV color space;
s3.2: dividing the detected image into different levels according to maturity, and calculating the mean value and variance of H components in each level for the distribution of the H components in different angles so as to obtain the distribution characteristics of the H components in different levels;
s3.3: in the later stage, the machine learning model is used for identifying the distribution characteristics of the H component at different levels in the process of identifying the levels of different fruits, and the training machine is divided into corresponding attribution levels according to the characteristics presented by the H component of the image;
preferably, the machine learning model building process is as follows:
s4.1: performing cluster analysis by using K-means; the process comprises the following steps: (1) taking the mean value of the H component as an initial clustering center point, taking 'small intra-cluster difference and big inter-cluster difference' as optimization targets, and setting the difference as Euclidean distance from a sample point to the mass center of a cluster where the sample point is located; (2) circularly calculating the distance from each sample point to the centroid, and distributing the sample to the centroid at the position close to the centroid to obtain K clusters; (3) for each cluster, calculating the average distance of all sample points divided into the cluster as a new centroid, and calculating again; (4) repeating the three steps until all clusters are not changed;
s4.2: in order to facilitate operation and improve sorting efficiency, the prepared initialization training set is divided into 3 clusters, namely 3 feature sets divided by H components, through a K-means algorithm;
s4.3: training an SVM classifier by using the feature set; the process comprises the following steps: (1) mapping the feature vector of the instance to some points in space as support vectors; (2) searching a hyperplane so that points closer to the hyperplane can have larger spacing; (3) distinguishing the attribution classification of the feature vector by using the obtained hyperplane;
s4.4: judging by using a one-to-one strategy; the method comprises the following steps: (1) calculating the possibility of belonging to the class by using three trained binary classifiers for the feature vectors to be classified; (3) and selecting the highest-scoring class as the class of the characteristics of the input sample to be classified, thereby realizing final judgment.

Claims (7)

1. Machine vision-based red fruit ginseng sorting device, which is characterized by comprising: the device comprises a feeding hopper, a conveying table, a conveying belt, a camera, a sorting steering engine, a distributing hopper and a control part;
the feeding hopper is arranged at the left side of the conveying table;
the conveying table is rotatably connected with a conveying belt;
a camera is arranged between the conveying table and the feeding hopper and above the conveying table;
a sorting steering engine is arranged on one side of the conveying table to finish sorting actions; a distributing hopper matched with the sorting steering engine is correspondingly arranged on the other side of the conveying table;
the side edge of the conveying table is connected with a control part, and the control part is internally integrated and connected with an MCU; and performing machine vision image processing analysis on the image acquired by the camera through the MCU, and controlling the driving of the sorting steering engine through the MCU.
2. The machine vision-based red fruit ginseng sorting device according to claim 1, wherein a plurality of fruit position grooves are formed in the conveyor belt.
3. The machine vision-based red fruit ginseng sorting device according to claim 1, wherein the camera is placed in a light box of a light shield above the conveying table to obtain continuous and stable ambient light, thereby improving recognition accuracy.
4. The red ginseng sorting method based on machine vision is characterized by comprising the following steps of:
s1: collecting red ginseng images on the conveying belt by a camera and transmitting the red ginseng images to an MCU of a control part;
s2: identifying and extracting image contour features of red ginseng:
an improved minimum graph cut algorithm is adopted: firstly, modeling an object and a background by using a full covariance GMM of K Gaussian components for an RGB color space respectively; then dividing the pixels into background pixels and target pixels through frame selection, distributing Gaussian components in the GMM to each pixel, substituting RGB values of the pixel n into each Gaussian component in the target GMM, learning parameters of optimizing the GMM for given image data, and estimating whether each pixel belongs to the target GMM or the background GMM; finally, parameters of the GMM modeling the target and the background are better through a plurality of iterative processes, and the whole iterative process is converged to an optimal image segmentation result;
s3: extracting color features of red ginseng images: the difference of color components H of fruits in an HSV color space is utilized, and for the components H of the fruit images, the distribution characteristics of different angles of the histogram are divided into subsets with obvious differences according to different maturity levels, so that the identification of the colors of the fruits is realized;
s4: establishing a machine learning model: performing cluster analysis by using K-means, taking the mean value of the H component as an initial center point, setting K=3, and dividing the initial training set into 3 feature sets;
s5: identifying the levels of different fruits using a machine learning model: the 3 SVM classifiers are trained with 3 feature sets and judged using a one-to-one strategy.
5. The machine vision-based red ginseng sorting method according to claim 4, wherein the image contour feature recognition and extraction method comprises the specific steps of:
s2.1: and (3) establishing a color model: using RGB color space, modeling the target and the background by using a K Gaussian component full covariance GMM respectively, wherein for each pixel, a certain Gaussian component not coming from the target GMM is not needed, and a certain Gaussian component not coming from the background GMM is needed;
s2.2: initializing: obtaining an initial set by selecting the target through a frame, namely, all pixels outside the frame are used as background pixels, and all pixels in the frame are used as pixels which are possible targets;
s2.3: iterative minimization: (1) assigning gaussian components in the GMM to each pixel, substituting RGB values of pixel n into each gaussian component in the target GMM, (2) learning parameters for optimizing the GMM for given image data, (3) estimating whether each pixel belongs to the target GMM or the background GMM by segmentation, (4) repeating (1) to (3) until the iterative process converges;
s2.4: and smoothing the boundary to form a final contour.
6. The machine vision-based red ginseng sorting method according to claim 4, wherein the image color feature extraction method specifically comprises the steps of:
s3.1: converting an RGB image acquired by a camera into an HSV color space;
s3.2: dividing the detected image into different levels according to maturity, and calculating the mean value and variance of H components in each level for the distribution of the H components in different angles so as to obtain the distribution characteristics of the H components in different levels;
s3.3: in the later stage, the machine learning model is used for identifying the distribution characteristics of the H component at different levels in the process of identifying the levels of different fruits, and the training machine is divided into corresponding attribution levels according to the characteristics presented by the H component of the image.
7. The machine vision based red ginseng sorting method of claim 4, wherein the machine learning model building process is:
s4.1: performing cluster analysis by using K-means; the process comprises the following steps: (1) taking the mean value of the H component as an initial clustering center point, taking 'small intra-cluster difference and big inter-cluster difference' as optimization targets, and setting the difference as Euclidean distance from a sample point to the mass center of a cluster where the sample point is located; (2) circularly calculating the distance from each sample point to the centroid, and distributing the sample to the centroid at the position close to the centroid to obtain K clusters; (3) for each cluster, calculating the average distance of all sample points divided into the cluster as a new centroid, and calculating again; (4) repeating the three steps until all clusters are not changed;
s4.2: in order to facilitate operation and improve sorting efficiency, the prepared initialization training set is divided into 3 clusters, namely 3 feature sets divided by H components, through a K-means algorithm;
s4.3: training an SVM classifier by using the feature set; the process comprises the following steps: (1) mapping the feature vector of the instance to some points in space as support vectors; (2) searching a hyperplane so that points closer to the hyperplane can have larger spacing; (3) distinguishing the attribution classification of the feature vector by using the obtained hyperplane;
s4.4: judging by using a one-to-one strategy; the method comprises the following steps: (1) calculating the possibility of belonging to the class by using three trained binary classifiers for the feature vectors to be classified; (3) and selecting the highest-scoring class as the class of the characteristics of the input sample to be classified, thereby realizing final judgment.
CN202211657930.5A 2022-12-22 2022-12-22 Red ginseng sorting device and sorting method based on machine vision Pending CN116899896A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211657930.5A CN116899896A (en) 2022-12-22 2022-12-22 Red ginseng sorting device and sorting method based on machine vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211657930.5A CN116899896A (en) 2022-12-22 2022-12-22 Red ginseng sorting device and sorting method based on machine vision

Publications (1)

Publication Number Publication Date
CN116899896A true CN116899896A (en) 2023-10-20

Family

ID=88361480

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211657930.5A Pending CN116899896A (en) 2022-12-22 2022-12-22 Red ginseng sorting device and sorting method based on machine vision

Country Status (1)

Country Link
CN (1) CN116899896A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117437217A (en) * 2023-12-18 2024-01-23 武汉博源新材料科技集团股份有限公司 Paper-plastic product sorting method and system based on image recognition

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117437217A (en) * 2023-12-18 2024-01-23 武汉博源新材料科技集团股份有限公司 Paper-plastic product sorting method and system based on image recognition
CN117437217B (en) * 2023-12-18 2024-03-08 武汉博源新材料科技集团股份有限公司 Paper-plastic product sorting method and system based on image recognition

Similar Documents

Publication Publication Date Title
Liu et al. A detection method for apple fruits based on color and shape features
Li et al. In-field cotton detection via region-based semantic image segmentation
Kurtulmuş et al. Detecting corn tassels using computer vision and support vector machines
Li et al. Identifying blueberry fruit of different growth stages using natural outdoor color images
US9527115B2 (en) Computer vision and machine learning software for grading and sorting plants
CN105718945B (en) Apple picking robot night image recognition method based on watershed and neural network
Puttemans et al. Automated visual fruit detection for harvest estimation and robotic harvesting
Sun et al. Image processing algorithms for infield single cotton boll counting and yield prediction
CN107316289A (en) Crop field spike of rice dividing method based on deep learning and super-pixel segmentation
Arefi et al. Development of an expert system based on wavelet transform and artificial neural networks for the ripe tomato harvesting robot
CN116899896A (en) Red ginseng sorting device and sorting method based on machine vision
Raut et al. Assessment of fruit maturity using digital image processing
Concepcion II et al. Variety classification of Lactuca sativa seeds using single-kernel RGB images and spectro-textural-morphological feature-based machine learning
Ong et al. Image-based oil palm leaves disease detection using convolutional neural network
Ramirez et al. Agroindustrial plant for the classification of hass avocados in real-time with ResNet-18 architecture
Hemalatha et al. Automatic tomato leaf diseases classification and recognition using transfer learning model with image processing techniques
Chen et al. Automatic classification and detection of oranges based on computer vision
Tan et al. A framework for measuring infection level on cacao pods
Muladi et al. Classification Of Eligibility Consumption Of Manalagi Apple Fruit Varieties Using Backpropagation
CN112529838A (en) Tobacco leaf maturity online judging method based on image processing technology
Shuai et al. Image segmentation of field rape based on template matching and K-means clustering
Huang et al. Application of computer vision technology in agriculture
Sivaranjani et al. Computer vision-based cashew nuts grading system using machine learning methods
Dai et al. Recognition of cutting region for pomelo picking robot based on machine vision
Tan et al. A method for detecting and segmenting infected part of cacao pods

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