CN113887389A - Quality inspection and classification method for traditional Chinese medicine decoction pieces based on image recognition - Google Patents
Quality inspection and classification method for traditional Chinese medicine decoction pieces based on image recognition Download PDFInfo
- Publication number
- CN113887389A CN113887389A CN202111151004.6A CN202111151004A CN113887389A CN 113887389 A CN113887389 A CN 113887389A CN 202111151004 A CN202111151004 A CN 202111151004A CN 113887389 A CN113887389 A CN 113887389A
- Authority
- CN
- China
- Prior art keywords
- decoction pieces
- decoction
- module
- grading
- quality inspection
- 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
Links
Images
Classifications
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B07—SEPARATING SOLIDS FROM SOLIDS; SORTING
- B07C—POSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
- B07C5/00—Sorting 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/04—Sorting according to size
- B07C5/10—Sorting according to size measured by light-responsive means
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B07—SEPARATING SOLIDS FROM SOLIDS; SORTING
- B07C—POSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
- B07C5/00—Sorting 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/16—Sorting according to weight
- B07C5/18—Sorting according to weight using a single stationary weighing mechanism
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B07—SEPARATING SOLIDS FROM SOLIDS; SORTING
- B07C—POSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
- B07C5/00—Sorting 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/34—Sorting according to other particular properties
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B07—SEPARATING SOLIDS FROM SOLIDS; SORTING
- B07C—POSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
- B07C5/00—Sorting 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/34—Sorting according to other particular properties
- B07C5/342—Sorting according to other particular properties according to optical properties, e.g. colour
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01G—WEIGHING
- G01G17/00—Apparatus for or methods of weighing material of special form or property
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/17—Systems in which incident light is modified in accordance with the properties of the material investigated
- G01N21/25—Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/8851—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01P—MEASURING LINEAR OR ANGULAR SPEED, ACCELERATION, DECELERATION, OR SHOCK; INDICATING PRESENCE, ABSENCE, OR DIRECTION, OF MOVEMENT
- G01P3/00—Measuring linear or angular speed; Measuring differences of linear or angular speeds
- G01P3/42—Devices characterised by the use of electric or magnetic means
- G01P3/50—Devices characterised by the use of electric or magnetic means for measuring linear speed
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2415—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
- G06F18/24155—Bayesian classification
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/8851—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
- G01N2021/8854—Grading and classifying of flaws
- G01N2021/8874—Taking dimensions of defect into account
Abstract
The invention discloses a quality inspection and grading method of traditional Chinese medicine decoction pieces based on image identification, belonging to the technical field of quality inspection of traditional Chinese medicines, and comprising a transmission module for conveying decoction pieces, an image acquisition module, an image identification module for extracting characteristic parameters of the decoction pieces and an automatic grading module for determining quality grades of the decoction pieces; further comprising the steps of: 1) manually selecting decoction piece samples, and manually grading superior products, medium products and inferior products; 2) establishing an automatic grading model, and 3) automatically classifying the drinking tablets in batches according to the established grading model, extracting characteristic parameters of the traditional Chinese medicine decoction pieces, and automatically grading the decoction pieces by using a naive Bayes classification model, so that the dependence on subjective judgment in the traditional manual quality inspection is overcome, and the objective standards of quality inspection and grading of the traditional Chinese medicine decoction pieces are determined; greatly reduces the manual demand required in the quality inspection process of the decoction pieces, and the quality inspection and classification process is automatically finished by a computer.
Description
Technical Field
The invention belongs to the technical field of traditional Chinese medicine quality inspection, and particularly relates to a quality inspection and classification method of traditional Chinese medicine decoction pieces based on image recognition.
Background
The traditional Chinese medicine decoction pieces refer to traditional Chinese medicines for prescription prepared by processing traditional Chinese medicines according to the needs, or traditional Chinese medicines which can be directly used in traditional Chinese medicine clinical practice. The traditional Chinese medicine decoction pieces are the essences of traditional Chinese medicines, the properties and the effects of the traditional Chinese medicine decoction pieces can be changed by different processing methods, and the traditional Chinese medicine decoction pieces are the characteristics and the advantages of traditional Chinese medicine.
The quality of the traditional Chinese medicine decoction pieces is directly related to the effect and safety of traditional Chinese medicine treatment, so quality inspection and classification of the decoction pieces are required to ensure that the quality of the decoction pieces is over-qualified. The traditional quality inspection method is manual visual inspection, but the method needs a large amount of labor, the judgment result depends on the subjective experience of quality inspectors, the uniform standard of objective quantification is lacked, misjudgment can occur, and the method has great limitation.
The prior patents assist manual quality inspection through a flowing water belt transmission device; some patents detect the quality by detecting the humidity and the effective components of the decoction pieces. The specific patents are as follows:
201910759086.9A Chinese medicinal decoction piece detection device
201821911801.3A quality control and quantitative device for Chinese medicinal decoction pieces
The prior art is not enough:
a) most of the existing quality inspection methods are used as the assistance of manual quality inspection, and the full-automatic detection process cannot be realized;
b) the manual quality inspection is a subjective process without uniform standards, different quality inspectors can judge the same decoction pieces differently, and finally the quality of the decoction pieces is uneven;
the existing quality inspection method only concerns the effective components of the decoction pieces, neglects the difference of the decoction pieces in size and shape, for example, the decoction pieces with good quality and the decoction pieces with different quality have the same effective components but different prices, and the quality of the decoction pieces is only graded by the effective components, which is unreasonable.
Disclosure of Invention
The invention aims to solve the problems, provides a quality inspection and classification method of traditional Chinese medicine decoction pieces based on image recognition, overcomes the defects of an artificial quality inspection method of the traditional Chinese medicine decoction pieces, and meets the requirement of mass flow production.
In order to realize the purpose, the invention adopts the technical scheme that: a quality inspection and grading method of traditional Chinese medicine decoction pieces based on image identification comprises a transmission module for conveying decoction pieces, an image acquisition module, an image identification module for extracting characteristic parameters of the decoction pieces and an automatic grading module for determining quality grades of the decoction pieces;
further comprising the steps of:
1) manually selecting decoction piece samples, and manually grading superior products, medium products and inferior products;
2) establishing an automatic grading model, including;
a. conveying, namely putting the decoction pieces on a conveying module for conveying, and setting the conveying speed;
b. the image acquisition module photographs decoction pieces above the conveying module, and the transmission speed of the conveying module controls the photographing frequency;
c. the image recognition module extracts the parameter characteristics of the photographed image;
d. the grading module carries out calculation processing according to the parameters extracted by the image identification module and carries out grading processing on the drinking tablets;
3) and automatically classifying the drinking tablets in batches according to the established grading model.
As a further improvement of the technical proposal, the conveying module comprises a conveying belt and a roller wheel, the roller wheel is connected with a motor, a pressure sensor is arranged below the conveying belt,
the image acquisition module comprises a Hall element, a computer and a camera, wherein the Hall element, the computer and the camera are arranged in the front side direction of the movement of the conveyor belt, and the Hall element and the camera are respectively in telecommunication connection with the computer.
As a further improvement of the technical scheme, the pressure sensor detects the weight of the decoction pieces, the camera shoots the decoction pieces, and the pressure sensor and the camera respectively transmit and transmit information to the computer and process the information in the image recognition module and the grading module.
As a further improvement of the above technical solution, the image recognition module extracts size features, weight features, color features, and defect percentage features of the decoction pieces, wherein:
the size characteristics of the decoction pieces take the area of the decoction pieces as a parameter;
the defect percentage characteristics refer to the percentage of the area of the defect portion in the total area as a parameter.
As a further improvement of the above technical solution, when extracting color features, the image recognition module adopts H parameters and S parameters in the HIS model as the color features of the decoction pieces, and the H parameters and S parameters can be obtained by the following formula (obtained by RBG):
wherein
H defines the frequency of the color.
As a further improvement of the above technical solution, the grading module in item d of step 2) confirms the quality grade of the decoction pieces according to the characteristic parameters of the decoction pieces by using a naive bayes classification model;
suppose there are m samples (x)1,y1),(x2,y2),…,(xm,ym) X represents a certain decoction piece and is a 4-dimensional characteristic variable including size, weight, color and defect percentage; y is corresponding grade, and is totally three, y belongs to { C1, C2, C3}, and corresponding superior products, medium products and inferior products are allocated;
for any given x, the probability P (C) that x belongs to each rank needs to be calculated separately1|x),P(C2|x),P(C3| x), where there is a maximum value of P (C)k| x), x belongs to this level:
wherein the content of the first and second substances,
assuming that the features are independent, there are:
P(x1,x2,......xn|Ck)=P(x1|Ck)P(x2|Ck)......P(xn|Ck) Formula (5)
Substituting the formula (5) into the formula (4);
for any given sample, the value of x is deterministic and x is independent of C, so p (x) can be ignored, and reduction can be:
in formula 6, P (C)K) Estimating probability by using frequency, and counting C in m sampleskThe frequency of the sample of (1) is sufficient; assume that the variables conform to a Gaussian distribution and are in class CkIn (1), characteristic xjHas a mean value of μkjThe variance is σ2 kjThen:
by calculating P (C)K) And P (x)j|Ck) Namely Cx can be solved, and automatic classification according to the characteristic parameters is realized.
The invention has the beneficial effects that: the invention automatically grades the decoction pieces by extracting the characteristic parameters of the traditional Chinese medicine decoction pieces and utilizing a naive Bayes classification model. The innovation and the advantages of the invention are realized in the following aspects:
1) overcomes the dependence on subjective judgment in the traditional manual quality inspection, and determines the objective standard of quality inspection and classification of the traditional Chinese medicine decoction pieces;
2) the manual demand required in the quality inspection process of the decoction pieces is greatly reduced, and the quality inspection and classification process is automatically finished by a computer;
3) has strong adaptability, and can be used for detecting other traditional Chinese medicine decoction pieces only by changing a small amount (extracting characteristic parameters).
Drawings
Fig. 1 is a schematic view of the overall structure of the present invention.
The text labels in the figures are represented as: 11. a conveyor belt; 12. a roller; 13. a motor; 14. a pressure sensor; 21. a camera; 22. an LED bulb; 23. a Hall element; 24. and (4) a computer.
Detailed Description
The following detailed description of the present invention is given for the purpose of better understanding technical solutions of the present invention by those skilled in the art, and the present description is only exemplary and explanatory and should not be construed as limiting the scope of the present invention in any way.
As a specific embodiment of the present invention, the specific structure of the present invention is: a quality inspection and grading method of traditional Chinese medicine decoction pieces based on image identification comprises a transmission module for conveying decoction pieces, an image acquisition module, an image identification module for extracting characteristic parameters of the decoction pieces and an automatic grading module for determining quality grades of the decoction pieces;
further comprising the steps of:
1) manually selecting decoction piece samples, and manually grading superior products, medium products and inferior products;
2) establishing an automatic grading model, including;
a. conveying, namely putting the decoction pieces on a conveying module to convey in the same direction, and setting the conveying speed;
b. the image acquisition module photographs decoction pieces above the conveying module, and the transmission speed of the conveying module controls the photographing frequency;
c. the image recognition module extracts the parameter characteristics of the photographed image;
d. the grading module carries out calculation processing according to the parameters extracted by the image identification module, carries out grading processing on the decoction pieces, and divides the decoction pieces into three grades of superior, medium and inferior through the grading processing;
3) and automatically classifying the drinking tablets in batches according to the established grading model.
Further optimization is carried out on the basis of the embodiment: the conveying module comprises a conveying belt 11 and a roller 12, a motor 13 is connected to the roller 12, a pressure sensor 14 is arranged below the conveying belt 11, whether decoction pieces exist on the conveying belt 11 is judged by the pressure sensor 14, and when the decoction pieces exist, the motor 13 works to drive the roller 12 to drive the conveying belt 11 to operate; when no decoction pieces are detected, the conveyor belt 11 stops working;
the image acquisition module comprises a Hall element 23, a computer 24, an LED bulb 22 and a camera 21 which are arranged in the front side direction of the movement of the conveyor belt 11 and used for acquiring the transmission speed, wherein the Hall element 23 and the camera 21 are respectively in telecommunication connection with the computer 24, and when the conveyor belt 11 is provided with traditional Chinese medicine decoction pieces, the LED bulb 22 is kept open to ensure that the decoction piece photos can be clearly shot; when the decoction pieces pass by, the camera 21 takes a picture of the decoction pieces; the Hall element 23 arranged on the conveyor belt 11 can monitor the movement speed of the conveyor belt 11 in real time and send the movement speed to the computer 24, and the computer 24 controls the photographing frequency of the roller 12 according to the transmission speed to ensure that each decoction piece can be photographed; after the picture is taken, the picture is automatically sent to the computer 24.
Wherein pressure sensor 14 detects decoction piece weight, and camera 21 shoots the drink piece, and pressure sensor 14 and camera 21 will respectively and transmit information to computer 24 to handle in image recognition module and grading module, draw the size characteristic, weight characteristic, color characteristic and the defect percentage characteristic of decoction piece by the image recognition module.
When the image identification module extracts the size characteristics of the decoction pieces, the area of the decoction pieces is selected as a characteristic parameter for measuring the size, and the resolution of the pictures shot by the camera 21 is the same, so the area of the decoction pieces can be represented according to the sum of the number of pixels occupied by the decoction pieces in the pictures;
when the weight characteristics of the decoction pieces are extracted by the image recognition module, the weight of the decoction pieces is obtained by the pressure sensor 14 below the conveyor belt 11;
when the image identification module extracts the defect percentage characteristics of the decoction pieces, some defects are inevitably generated in the planting, transporting and manufacturing processes of the decoction pieces of traditional Chinese medicine, for example, some parts on the surfaces of the decoction pieces are sunken due to insect damage or collision in the transporting process, and the defects can have certain influence on the quality grading of the decoction pieces;
when the image identification module extracts the color features of the decoction pieces, the HSI color model is adopted to describe the color features of the decoction pieces. The HIS color model describes color features with H, S, I three parameters, where H defines the frequency of a color, called hue; s represents the shade degree of the color, called saturation; i represents brightness, and since the brightness of the picture is closely related to the lighting at the time of shooting and is not related to the color information of the image, in the present invention, only the H parameter and the S parameter in the HIS model are used as the color features of the decoction pieces, and the H parameter and the S parameter can be obtained by the following formula (converted from RBG):
further optimization is carried out on the basis of the embodiment: in the step d, the grading module confirms the quality grade of the decoction pieces according to the characteristic parameters of the decoction pieces by using a naive Bayes classification model;
suppose there are m samples (x)1,y1),(x2,y2),...,(xm,ym) X represents a certain decoction piece and is a 4-dimensional characteristic variable including size, weight, color and defect percentage; y is corresponding grade, and is totally three, y belongs to { C1, C2, C3}, and corresponding superior products, medium products and inferior products are allocated;
for any given x, the probability P (C) that x belongs to each rank needs to be calculated separately1|x),P(C2|x),P(C3| x), where there is a maximum value of P (C)k| x), x belongs to this level:
wherein the content of the first and second substances,
assuming that the features are independent, there are:
P(x1,x2,......xn|Ck)=P(x1|Ck)P(x2|Ck)......P(xn|Ck) Formula (5)
Substituting the formula (5) into the formula (4);
for any given sample, the value of x is deterministic and x is independent of C, so p (x) can be ignored, and reduction can be:
in formula 6, P (C)K) Estimating probability by using frequency, and counting C in m sampleskThe frequency of the sample of (1) is sufficient; assume that the variables conform to a Gaussian distribution and are in class CkIn (1), characteristic xjHas a mean value of μkjThe variance is σ2 kjThen:
by calculating P (C)K) And P (x)j|Ck) Namely Cx can be solved, and automatic classification according to the characteristic parameters is realized.
The working principle of the invention is explained by referring to the attached figure 1 of the specification;
firstly, existing data is utilized to establish a grading model in the invention, 20 superior products, medium products and inferior products of a certain traditional Chinese medicine decoction piece are manually selected as samples, and at the moment, the probability of the superior products, the medium products and the inferior products of a certain decoction piece is 1/3, namely P (C)K)=1/3;
Putting the decoction pieces on the conveyor belt 11 one by one, and starting the motor 13 to drive the conveyor belt 11 to operate when the pressure sensor 14 detects that the decoction pieces are on the conveyor belt 11; the Hall element 23 connected to the front part of the conveyor belt 11 obtains the moving speed of the conveyor belt 11 in real time and sends speed information to the computer 24, and the computer 24 adjusts the photographing frequency of the camera 21 according to the speed to ensure that each decoction piece is photographed;
the pressure sensor 14 records the weight of the decoction pieces, the LED bulb 22 is lightened, the camera 21 takes a picture of the decoction pieces and sends the picture to the computer 24, the motor 13 continues to operate for 30 seconds after the weight information obtained by the pressure sensor 14 is 0, and the motor 13 stops working when the pressure sensor 14 does not detect the existence of the decoction pieces all the time;
after receiving the decoction piece photos, the computer 24 extracts the characteristic parameters of the sample decoction pieces, the size of the decoction pieces, the weight of the decoction pieces, the color of the decoction pieces and the defect percentage of the decoction pieces according to the method described above;
then, P (x) is calculated according to the formula (7)j|Ck) A value of (d);
p (C)K) And P (x)j|Ck) Storing the value of (A) into a computer, and establishing a grading model;
and finally, carrying out batch grading classification treatment on the decoction pieces according to the established grading model, namely putting new decoction pieces on a conveyor belt, obtaining the characteristic parameters of each decoction piece in the same process as the model establishment process, and automatically classifying the decoction pieces according to a formula (3) by a computer.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts of the present invention. The foregoing is only a preferred embodiment of the present invention, and it should be noted that there are objectively infinite specific structures due to the limited character expressions, and it will be apparent to those skilled in the art that a plurality of modifications, decorations or changes may be made without departing from the principle of the present invention, and the technical features described above may be combined in a suitable manner; such modifications, variations, combinations, or adaptations of the invention using its spirit and scope, as defined by the claims, may be directed to other uses and embodiments.
Claims (6)
1. A quality inspection and classification method of traditional Chinese medicine decoction pieces based on image recognition is characterized by comprising the following steps: comprises a transmission module for conveying decoction pieces, an image acquisition module, an image identification module for extracting characteristic parameters of the decoction pieces and a grading module for determining quality grades of the decoction pieces;
further comprising the steps of:
1) manually selecting decoction piece samples, and manually grading superior products, medium products and inferior products;
2) establishing an automatic grading model, including;
a. conveying, namely putting the decoction pieces on a conveying module for conveying, and setting the conveying speed;
b. the image acquisition module photographs decoction pieces above the conveying module, and the transmission speed of the conveying module controls the photographing frequency;
c. the image recognition module extracts the parameter characteristics of the photographed image;
d. the grading module carries out calculation processing according to the parameters extracted by the image identification module and carries out grading processing on the drinking tablets;
3) and automatically classifying the drinking tablets in batches according to the established grading model.
2. The method for quality inspection and classification of herbal pieces prepared for decoction based on image recognition as claimed in claim 1, wherein: the conveying module comprises a conveying belt (11) and a roller (12), a motor (13) is connected on the roller (12), a pressure sensor (14) is arranged below the conveying belt (11),
the image acquisition module comprises a Hall element (23) for acquiring transmission speed, a computer (24) and a camera (21) which are arranged in the front side direction of the movement of the conveyor belt (11), wherein the Hall element (23) and the camera (21) are respectively in telecommunication connection with the computer (24).
3. The method for quality inspection and classification of herbal pieces prepared for decoction based on image recognition as claimed in claim 2, wherein: wherein pressure sensor (14) detects decoction piece weight, and camera (21) is taken a picture to the beverage piece, and pressure sensor (14) and camera (21) will and transmit information to computer (24) respectively to handle in image recognition module and hierarchical module.
4. The method for quality inspection and classification of herbal pieces prepared for decoction based on image recognition as claimed in claim 3, wherein: the image identification module extracts size characteristics, weight characteristics, color characteristics and defect percentage characteristics of the decoction pieces, wherein:
the size characteristics of the decoction pieces take the area of the decoction pieces as a parameter;
the defect percentage characteristics refer to the percentage of the area of the defect portion in the total area as a parameter.
5. The method for quality inspection and classification of herbal pieces prepared for decoction based on image recognition as claimed in claim 4, wherein: when the image identification module extracts the color features, the H parameter and the S parameter in the HIS model are used as the color features of the decoction pieces, and the H parameter and the S parameter can be obtained through the following formula (obtained by RBG conversion):
wherein
H defines the frequency of the color.
6. The method for quality inspection and classification of herbal pieces prepared for decoction based on image recognition as claimed in claim 5, wherein: the grading module in the item d in the step 2) confirms the quality grade of the decoction pieces according to the characteristic parameters of the decoction pieces by using a naive Bayes classification model;
suppose there are m samples (x)1,y1),(x2,y2),…,(xm,ym) X represents a certain decoction piece and is a 4-dimensional characteristic variable including size, weight, color and defect percentage; y is corresponding grade, and is totally three, y belongs to { C1, C2, C3}, and corresponding superior products, medium products and inferior products are allocated;
for any given x, the probability P (C) that x belongs to each rank needs to be calculated separately1|x),P(C2|x),P(C3| x), where there is a maximum value of P (C)k| x), x belongs to this level:
wherein the content of the first and second substances,
assuming that the features are independent, there are:
P(x1,x2,......xn|Ck)=P(x1|Ck)P(x2|Ck)......P(xn|Ck) Formula (5)
Substituting the formula (5) into the formula (4);
for any given sample, the value of x is deterministic and x is independent of C, so p (x) can be ignored, and reduction can be:
in formula 6, P (C)K) Estimating probability by using frequency, and counting C in m sampleskThe frequency of the sample of (1) is sufficient; hypothesis variable symbolGaussian distribution and in class CkIn (1), characteristic xjHas a mean value of μkjThe variance is σ2 kjThen:
by calculating P (C)K) And P (x)j|Ck) Namely Cx can be solved, and automatic classification according to the characteristic parameters is realized.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111151004.6A CN113887389A (en) | 2021-09-29 | 2021-09-29 | Quality inspection and classification method for traditional Chinese medicine decoction pieces based on image recognition |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111151004.6A CN113887389A (en) | 2021-09-29 | 2021-09-29 | Quality inspection and classification method for traditional Chinese medicine decoction pieces based on image recognition |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113887389A true CN113887389A (en) | 2022-01-04 |
Family
ID=79007885
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111151004.6A Pending CN113887389A (en) | 2021-09-29 | 2021-09-29 | Quality inspection and classification method for traditional Chinese medicine decoction pieces based on image recognition |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113887389A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115836976A (en) * | 2023-02-23 | 2023-03-24 | 四川新荷花中药饮片股份有限公司 | Production method of intelligent control system for production of toxic decoction pieces in Araceae |
CN115921333A (en) * | 2022-11-07 | 2023-04-07 | 安徽华润金蟾药业有限公司 | Chinese herbal piece character online detection grading system and method based on image recognition |
CN116921248A (en) * | 2023-09-15 | 2023-10-24 | 江苏盖睿健康科技有限公司 | Medicine checking method and system based on computer vision |
-
2021
- 2021-09-29 CN CN202111151004.6A patent/CN113887389A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115921333A (en) * | 2022-11-07 | 2023-04-07 | 安徽华润金蟾药业有限公司 | Chinese herbal piece character online detection grading system and method based on image recognition |
CN115836976A (en) * | 2023-02-23 | 2023-03-24 | 四川新荷花中药饮片股份有限公司 | Production method of intelligent control system for production of toxic decoction pieces in Araceae |
CN116921248A (en) * | 2023-09-15 | 2023-10-24 | 江苏盖睿健康科技有限公司 | Medicine checking method and system based on computer vision |
CN116921248B (en) * | 2023-09-15 | 2023-12-26 | 江苏盖睿健康科技有限公司 | Medicine checking method and system based on computer vision |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113887389A (en) | Quality inspection and classification method for traditional Chinese medicine decoction pieces based on image recognition | |
CN111274860B (en) | Recognition method for online automatic tobacco grade sorting based on machine vision | |
Li et al. | A machine vision system for identification of micro-crack in egg shell | |
CN108287010B (en) | Crab multi-index grading device and method | |
CN103076288B (en) | A kind of flesh of fish self-grading device based on computer vision and method | |
CN109190567A (en) | Abnormal cervical cells automatic testing method based on depth convolutional neural networks | |
CN108918527A (en) | A kind of printed matter defect inspection method based on deep learning | |
CN109035273B (en) | Image signal fast segmentation method of immunochromatography test paper card | |
CN109724984A (en) | A kind of defects detection identification device and method based on deep learning algorithm | |
CN109064454A (en) | Product defects detection method and system | |
CN109978822A (en) | A kind of banana maturity judge modeling method and evaluation method based on machine vision | |
CN108267455B (en) | Device and method for detecting defects of printed characters of plastic film | |
CN106874929B (en) | Pearl classification method based on deep learning | |
CN110335262A (en) | A kind of printed matter automatic defect classification method in machine vision | |
CN106355579A (en) | Defect detecting method of cigarette carton surface wrinkles | |
TW201019237A (en) | Method and system for item identification | |
CN104361357B (en) | Photo album categorizing system and sorting technique based on image content analysis | |
CN109307675A (en) | A kind of product appearance detection method and system | |
CN207516257U (en) | A kind of wheat seed Image-capturing platform based on machine vision | |
CN108318494B (en) | The red online vision detection and classification devices and methods therefor for proposing fruit powder | |
CN108287162A (en) | A kind of method of food security intelligent measurement | |
CN109101891A (en) | A kind of rice pest detection system and its detection method merging artificial intelligence | |
CN108932712A (en) | A kind of rotor windings quality detecting system and method | |
CN102721793A (en) | Method and device for digitally detecting quality of edible vinegar | |
CN109089992A (en) | A kind of classification method and system of the Estimation of The Fish Freshness 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 |