[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN118470023A - Quality detection method of traditional Chinese medicine decoction pieces - Google Patents

Quality detection method of traditional Chinese medicine decoction pieces Download PDF

Info

Publication number
CN118470023A
CN118470023A CN202410932805.3A CN202410932805A CN118470023A CN 118470023 A CN118470023 A CN 118470023A CN 202410932805 A CN202410932805 A CN 202410932805A CN 118470023 A CN118470023 A CN 118470023A
Authority
CN
China
Prior art keywords
chinese medicine
decoction pieces
traditional chinese
medicine decoction
pieces
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.)
Granted
Application number
CN202410932805.3A
Other languages
Chinese (zh)
Other versions
CN118470023B (en
Inventor
赖浏岭
胡潇月
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Hongyi Traditional Chinese Medicine Co ltd
Original Assignee
Sichuan Hongyi Traditional Chinese Medicine Co ltd
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 Sichuan Hongyi Traditional Chinese Medicine Co ltd filed Critical Sichuan Hongyi Traditional Chinese Medicine Co ltd
Priority to CN202410932805.3A priority Critical patent/CN118470023B/en
Publication of CN118470023A publication Critical patent/CN118470023A/en
Application granted granted Critical
Publication of CN118470023B publication Critical patent/CN118470023B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Geometry (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a quality detection method of traditional Chinese medicine decoction pieces, belonging to the technical field of traditional Chinese medicine quality detection, which comprises the steps of guiding the traditional Chinese medicine decoction pieces into a vibrating plate; spreading the Chinese medicinal decoction pieces on the vibration plate in a single layer; shooting video information of the traditional Chinese medicine decoction pieces on the vibrating plate, and decomposing the video information into a plurality of frames of images; extracting morphological characteristics of the Chinese medicinal decoction pieces in the image; calculating equivalent area and shape parameters of the traditional Chinese medicine decoction pieces; judging whether the specification of the traditional Chinese medicine decoction pieces meets the quality requirement according to the equivalent area of the traditional Chinese medicine decoction pieces, and outputting a judging result; judging whether the shape of the traditional Chinese medicine decoction pieces meets the quality requirement according to the shape parameters of the traditional Chinese medicine decoction pieces, and outputting a judging result. The invention converts the video information into the image information for processing through the vector matrix, and cooperates with the image processing to rapidly estimate the size and shape of the Chinese herbal pieces.

Description

Quality detection method of traditional Chinese medicine decoction pieces
Technical Field
The invention belongs to the technical field of quality detection of traditional Chinese medicine decoction pieces, and particularly relates to a quality detection method of traditional Chinese medicine decoction pieces.
Background
The Chinese medicinal decoction pieces are prepared by cutting the Chinese medicinal materials into slices, thick slices, inclined slices, filaments or broken slices, blocks and other certain specifications according to the properties of the Chinese medicinal materials and the medical requirements, wherein the slice-shaped Chinese medicinal decoction pieces are the most common.
Aiming at different market demands, the Chinese medicinal decoction pieces are required to be screened according to the quality of the Chinese medicinal decoction pieces, wherein the screened elements comprise the positions of the Chinese medicinal decoction pieces, the uniformity, the specification and the like of the Chinese medicinal decoction pieces; the existing screening is mainly carried out by pre-distinguishing the weight of decoction pieces, and then quality detection, including size specification detection and shape detection, is carried out on the screened Chinese medicinal decoction pieces; however, the existing detection of the size and shape of the traditional Chinese medicine decoction pieces is still mainly based on manual detection, and mainly depends on manual experience judgment, so that the traditional Chinese medicine decoction pieces have extremely high instability, unreliability and inefficiency, and the traditional Chinese medicine decoction pieces have smaller specifications, and the manual judgment has larger limitation, so that the size and shape of the traditional Chinese medicine decoction pieces cannot be accurately judged.
Disclosure of Invention
The invention aims to overcome the defects in the prior art and provide a quality detection method for traditional Chinese medicine decoction pieces, so as to solve the problems that the quality detection of the traditional Chinese medicine decoction pieces is mainly manually judged, and the detection result is unreliable and the efficiency is low.
In order to achieve the above purpose, the invention adopts the following technical scheme:
A quality detection method of traditional Chinese medicine decoction pieces comprises the following steps:
S1, guiding cut, stir-baked and dried traditional Chinese medicine decoction pieces into a vibrating plate;
S2, starting the vibrating plate to vibrate the traditional Chinese medicine decoction pieces until the traditional Chinese medicine decoction pieces are paved on the vibrating plate in a single-layer mode;
S3, shooting video information of the traditional Chinese medicine decoction pieces on the vibrating plate, and decomposing the video information into a plurality of frames of images;
s4, processing a plurality of frames of images, and extracting morphological characteristics of the traditional Chinese medicine decoction pieces in the images;
s5, constructing a two-dimensional rectangular coordinate system, gridding the two-dimensional rectangular coordinate system, and placing the processed image in the two-dimensional rectangular coordinate system after gridding;
S6, adopting an external elliptic equivalent traditional Chinese medicine decoction piece shape, and calculating equivalent area and shape parameters of the traditional Chinese medicine decoction piece based on a two-dimensional rectangular coordinate system after gridding;
s7, judging whether the specification of the traditional Chinese medicine decoction pieces meets the quality requirement according to the equivalent area of the traditional Chinese medicine decoction pieces, and outputting a judging result;
S8, judging whether the shape of the traditional Chinese medicine decoction pieces meets the quality requirement according to the shape parameters of the traditional Chinese medicine decoction pieces, and outputting a judging result.
Further, the step S4 specifically includes the following steps:
s4.1, smoothing and filtering a plurality of frame images by adopting a Gaussian filter;
s4.2, respectively pulling a plurality of frame images into a plurality of corresponding column vectors, and combining the plurality of column vectors into a vector matrix D, wherein the vector matrix D comprises a front Jing Xiangliang matrix A and a background vector matrix E;
s4.3, taking the minimum error value between the foreground vector matrix A and the background vector matrix E as a constraint target;
S4.4, optimizing the constraint target by adopting a principal component analysis method to distinguish a foreground part and a background part in each frame of image, wherein the foreground part is an area where the traditional Chinese medicine decoction pieces are positioned;
S4.5, filtering the image of the foreground part by adopting a double homomorphic filter, and fusing the filtered image of the double homomorphic filter;
S4.6, performing edge detection on the fused image by adopting CANNY algorithm to obtain morphological characteristics of the Chinese medicinal decoction pieces in the image.
Further, step S4.1 of smoothing filtering the plurality of frame images with a gaussian filter includes:
wherein H ij is a convolution kernel of size i x j; i, j is the size parameter of the convolution kernel; 2k+1 is window width; k is a natural number; sigma is variance.
Further, S4.3 takes the minimum error value between the foreground vector matrix a and the background vector matrix E as a constraint target, specifically:
Wherein, Is the Frobenius norm; Is the constraint target, namely the error minimum value between the front Jing Xiangliang matrix A and the background vector matrix E; the rank of the front Jing Xiangliang matrix a is less than or equal to the value of the target dimension.
Further, S4.4 optimizes the constraint objective by using a principal component analysis method, specifically:
Wherein, Is the core norm of the matrix, lambda is the positive weight parameter,Is the sum of the absolute values of the matrix elements.
Further, S4.5 specifically includes:
the dual homomorphic filter comprises a first homomorphic filter and a second homomorphic filter;
The method comprises the steps of filtering and extracting traditional Chinese medicine decoction pieces with the area larger than S min by a first homomorphic filter, and filtering and processing the traditional Chinese medicine decoction pieces, wherein S min is a preset lower limit value of the area of the traditional Chinese medicine decoction pieces;
The second homomorphic filter extracts the traditional Chinese medicine decoction pieces with the area smaller than S max, and carries out filtering treatment on the traditional Chinese medicine decoction pieces, wherein S max is the preset upper limit value of the area of the traditional Chinese medicine decoction pieces;
And fusing the traditional Chinese medicine decoction pieces extracted by the first homomorphic filter and the second homomorphic filter to obtain a filtered whole image of the traditional Chinese medicine decoction pieces.
Further, S4.6 specifically includes:
And carrying out edge detection on the whole image of the Chinese herbal pieces processed by the first homomorphic filter and the second homomorphic filter by adopting CANNY algorithm to obtain morphological characteristics of the Chinese herbal pieces in the image.
Further, the step S6 specifically includes:
Calculating a long side r 1 and a short side r 2 of the external ellipse, and calculating an equivalent area xi of the traditional Chinese medicine decoction pieces according to the long side r 1 and the short side r 2;
Normalizing the long side r 1 and the short side r 2 to obtain a normalized long side r 13 and a normalized short side r 23, and calculating shape parameters of the traditional Chinese medicine decoction pieces:
Wherein, Is a shape parameter.
Further, step S7 specifically includes:
If the equivalent area xi of the traditional Chinese medicine decoction pieces is larger than or equal to the maximum area threshold value or smaller than or equal to the minimum area threshold value, judging that the specification of the traditional Chinese medicine decoction pieces does not meet the quality requirement, and outputting a judgment result;
If the equivalent area xi of the traditional Chinese medicine decoction pieces is larger than the minimum area threshold and smaller than the maximum area threshold, judging that the specification of the traditional Chinese medicine decoction pieces meets the quality requirement, and outputting a judging result.
Further, step S8 specifically includes:
shape parameters of Chinese medicinal decoction pieces If the shape parameter threshold value is smaller than or equal to the shape parameter threshold value, judging that the shape of the traditional Chinese medicine decoction pieces is uneven, and outputting a judging result;
shape parameters of Chinese medicinal decoction pieces And if the shape parameter is larger than the shape parameter threshold, judging that the shape of the traditional Chinese medicine decoction pieces is uniform, and outputting a judging result.
The quality detection method of the traditional Chinese medicine decoction pieces provided by the invention has the following beneficial effects:
According to the invention, the traditional Chinese medicine decoction pieces are paved on the vibrating plate in a single-layer mode through vibration, so that the traditional Chinese medicine decoction pieces are prevented from being adhered and stacked, and later video shooting and video and image processing are facilitated.
The invention splits video information into a plurality of continuous frame images, carries out vector matrixing on the plurality of frame images, divides the images into a foreground part and a background part in a vector matrix form, and adopts a principal component analysis method to carry out optimization solution so as to distinguish the foreground part and the background part and obtain the area where the traditional Chinese medicine decoction pieces are positioned.
The invention adopts the cooperation of the dual homomorphic filter and CANNY algorithm to enhance and identify the image so as to obtain the morphological characteristics of the traditional Chinese medicine decoction pieces, and calculates the equivalent area and shape parameters of the traditional Chinese medicine decoction pieces according to the two-dimensional rectangular coordinate system after gridding so as to judge whether the size specification and shape of the traditional Chinese medicine decoction pieces meet the quality requirement.
The invention converts the video information into the image information for processing through the vector matrix, and cooperates with the image processing to quickly estimate and obtain the judgment result of the size and shape of the traditional Chinese medicine decoction pieces.
Drawings
FIG. 1 is a flow chart of a quality detection method of the traditional Chinese medicine decoction pieces.
Detailed Description
The following description of the embodiments of the present invention is provided to facilitate understanding of the present invention by those skilled in the art, but it should be understood that the present invention is not limited to the scope of the embodiments, and all the inventions which make use of the inventive concept are protected by the spirit and scope of the present invention as defined and defined in the appended claims to those skilled in the art.
Example 1
The embodiment discloses a quality detection method of traditional Chinese medicine decoction pieces, which can rapidly estimate equivalent area and shape parameters of the traditional Chinese medicine decoction pieces through acquisition of video information, further rapidly judge the sizes and shapes of the traditional Chinese medicine decoction pieces, and specifically comprises the following steps with reference to fig. 1:
s1, guiding cut, stir-baked and dried traditional Chinese medicine decoction pieces into a vibrating plate;
The vibration plate of the embodiment directly selects the prior art, as a preferable mode of the embodiment, a vibration motor is arranged below the vibration plate, and the vibration motor is adjustable in frequency, so that the power of the vibration plate can be adjusted through frequency adjustment, and the vibration power required by the traditional Chinese medicine decoction pieces can be achieved.
S2, starting a vibrating plate to vibrate the Chinese herbal pieces until the Chinese herbal pieces are paved on the vibrating plate in a single-layer mode;
According to the embodiment, the traditional Chinese medicine decoction pieces are paved on the vibrating plate in a single-layer mode through vibration, so that the traditional Chinese medicine decoction pieces are prevented from being adhered and stacked, later video shooting and processing of videos and images are facilitated, and the accuracy of later image recognition is improved.
S3, shooting video information of the traditional Chinese medicine decoction pieces on the vibrating plate, and decomposing the video information into a plurality of frames of images;
It should be noted that, the object photographed in this embodiment is a decoction piece of traditional Chinese medicine, and its size is smaller, so when photographing its video information, a high-definition industrial camera is required to photograph, and for the high-definition industrial camera, this embodiment directly adopts the prior art, and no specific description is given here.
S4, processing a plurality of frames of images, and extracting morphological characteristics of the traditional Chinese medicine decoction pieces in the images, wherein the method specifically comprises the following steps of:
S4.1, adopting a Gaussian filter to carry out smooth filtering on a plurality of frames of images so as to eliminate Gaussian noise of the images;
Specifically, the smoothing filtering of the plurality of frame images by the gaussian filter includes:
wherein H ij is a convolution kernel of size i x j; i, j is the size parameter of the convolution kernel; 2k+1 is window width; k is a natural number; sigma is variance.
S4.2, respectively pulling a plurality of frame images into a plurality of corresponding column vectors, and combining the plurality of column vectors into a vector matrix D, wherein the vector matrix D comprises a front Jing Xiangliang matrix A and a background vector matrix E;
In step S4.3, it is assumed that the vector matrix D is a matrix D E rm×n with a large number of columns, m, n are the number of rows and the number of columns of the matrix R, respectively, and in order to estimate a subspace with a low dimension, that is, the front Jing Xiangliang matrix a, a low-rank matrix needs to be found, so that the error between a and E is minimum, that is, the following constraint optimization problem is translated, and the minimum value of the error between the foreground vector matrix a and the background vector matrix E is taken as a constraint target:
Wherein, Is the Frobenius norm; Is the constraint target, namely the error minimum value between the front Jing Xiangliang matrix A and the background vector matrix E; the rank of the front Jing Xiangliang matrix a is less than or equal to the value of the target dimension.
S4.4, optimizing constraint targets by adopting a principal component analysis method, and recovering a front Jing Xiangliang matrix A from a vector matrix D as long as the background vector matrix E is sparse enough, so that a foreground part and a background part in each frame of image can be distinguished based on the front Jing Xiangliang matrix A, wherein the foreground part is the area where the traditional Chinese medicine decoction pieces are positioned;
Specifically, the optimization solution is converted into an optimization problem:
Wherein, Is the core norm of the matrix, lambda is the positive weight parameter,Is the sum of the absolute values of the matrix elements.
For the solution of the optimization problem in this step, the solution process is conventional optimization solution, and the solution can be directly performed by adopting the prior art, and in this embodiment, the solution is preferably performed by using an interior point solver, and the interior point solver is a mature solver, so that the detailed process is not repeated.
S4.5, filtering the image of the foreground part by adopting a dual homomorphic filter, and fusing the filtered image of the dual homomorphic filter;
The dual homomorphic filter of the present embodiment includes a first homomorphic filter and a second homomorphic filter;
wherein, the first homomorphic filter filters and extracts the traditional Chinese medicine decoction pieces with the area larger than S min, and filters the traditional Chinese medicine decoction pieces;
the second homomorphic filter extracts the Chinese medicinal decoction pieces with the area smaller than S max, and carries out filtering treatment on the Chinese medicinal decoction pieces;
And fusing the traditional Chinese medicine decoction pieces extracted by the first homomorphic filter and the second homomorphic filter to obtain a filtered whole image of the traditional Chinese medicine decoction pieces.
The embodiment adopts a morphological filter (a bisynchronous filter) to process the image, has a good effect of identifying the contours of the traditional Chinese medicine decoction pieces in the image, and can also effectively solve the difficult problems of identifying the pseudo shadow and the adhered traditional Chinese medicine decoction pieces.
Parameters of the homomorphic filter of the present embodiment are shown in table 1:
TABLE 1 homomorphic filter parameters
S4.6, performing edge detection on the fused image by adopting CANNY algorithm to obtain morphological characteristics of the Chinese medicinal decoction pieces in the image;
in the embodiment, CANNY algorithm is adopted to carry out edge detection on the whole image of the Chinese herbal pieces processed by the first homomorphic filter and the second homomorphic filter, so as to obtain morphological characteristics of the Chinese herbal pieces in the image.
S5, constructing a two-dimensional rectangular coordinate system, gridding the two-dimensional rectangular coordinate system, and placing the processed image in the two-dimensional rectangular coordinate system after gridding;
S6, adopting an external elliptic equivalent traditional Chinese medicine decoction piece shape, and calculating equivalent area and shape parameters of the traditional Chinese medicine decoction piece based on a two-dimensional rectangular coordinate system after gridding, wherein the method specifically comprises the following steps:
Calculating a long side r 1 and a short side r 2 of the external ellipse, and calculating an equivalent area xi of the traditional Chinese medicine decoction pieces according to the long side r 1 and the short side r 2;
Normalizing the long side r 1 and the short side r 2 to obtain a normalized long side r 13 and a normalized short side r 23, and calculating shape parameters of the traditional Chinese medicine decoction pieces:
Wherein, Is a shape parameter;
S7, judging whether the size of the traditional Chinese medicine decoction pieces meets the quality requirement according to the equivalent area of the traditional Chinese medicine decoction pieces, and outputting a judging result;
Specifically, if the equivalent area ζ of the traditional Chinese medicine decoction pieces is larger than or equal to the maximum area threshold value or smaller than or equal to the minimum area threshold value, judging that the specification of the traditional Chinese medicine decoction pieces does not meet the quality requirement, and outputting a judgment result;
If the equivalent area xi of the traditional Chinese medicine decoction pieces is larger than the minimum area threshold and smaller than the maximum area threshold, judging that the specification of the traditional Chinese medicine decoction pieces meets the quality requirement, and outputting a judging result.
The maximum area threshold and the minimum area threshold of the present embodiment may be determined according to actual products, and are not particularly limited herein.
S8, judging whether the shape of the traditional Chinese medicine decoction pieces meets the quality requirement according to the shape parameters of the traditional Chinese medicine decoction pieces, and outputting a judging result;
specifically, shape parameters of the Chinese herbal pieces The bigger the size, the more regular the shape is, the more the shape is approaching to a circle, and for the actual product, the traditional Chinese medicine decoction piece product meets the requirements; based on this, the minimum shape parameter value is set as its critical value, i.e. shape parameter threshold, if the shape parameter of the decoction pieces of Chinese medicineIf the shape parameter threshold value is smaller than or equal to the shape parameter threshold value, judging that the shape of the traditional Chinese medicine decoction pieces is uneven, and outputting a judging result;
shape parameters of Chinese medicinal decoction pieces And if the shape parameter is larger than the shape parameter threshold, judging that the shape of the traditional Chinese medicine decoction pieces is uniform, and outputting a judging result.
The method comprises the steps of splitting video information into a plurality of continuous frame images, carrying out vector matrixing on the frame images, dividing the images into a foreground part and a background part in a vector matrix mode, and carrying out optimization solution by adopting a principal component analysis method to distinguish the foreground part from the background part so as to obtain an area where traditional Chinese medicine decoction pieces are positioned; and then, enhancing and identifying the image by adopting the cooperation of the double homomorphic filter and CANNY algorithm to obtain the morphological characteristics of the traditional Chinese medicine decoction pieces, and calculating to obtain the equivalent area and shape parameters of the traditional Chinese medicine decoction pieces according to the two-dimensional rectangular coordinate system after gridding so as to judge whether the size specification and the shape of the traditional Chinese medicine decoction pieces meet the quality requirement. The invention converts the video information into the image information for processing through the vector matrix, and cooperates with the image processing to quickly estimate and obtain the judgment result of the size and shape of the traditional Chinese medicine decoction pieces.
Although specific embodiments of the invention have been described in detail with reference to the accompanying drawings, it should not be construed as limiting the scope of protection of the present patent. Various modifications and variations which may be made by those skilled in the art without the creative effort are within the scope of the patent described in the claims.

Claims (10)

1. The quality detection method of the traditional Chinese medicine decoction pieces is characterized by comprising the following steps of:
S1, guiding cut, stir-baked and dried traditional Chinese medicine decoction pieces into a vibrating plate;
S2, starting the vibrating plate to vibrate the traditional Chinese medicine decoction pieces until the traditional Chinese medicine decoction pieces are paved on the vibrating plate in a single-layer mode;
S3, shooting video information of the traditional Chinese medicine decoction pieces on the vibrating plate, and decomposing the video information into a plurality of frames of images;
s4, processing a plurality of frames of images, and extracting morphological characteristics of the traditional Chinese medicine decoction pieces in the images;
s5, constructing a two-dimensional rectangular coordinate system, gridding the two-dimensional rectangular coordinate system, and placing the processed image in the two-dimensional rectangular coordinate system after gridding;
S6, adopting an external elliptic equivalent traditional Chinese medicine decoction piece shape, and calculating equivalent area and shape parameters of the traditional Chinese medicine decoction piece based on a two-dimensional rectangular coordinate system after gridding;
s7, judging whether the specification of the traditional Chinese medicine decoction pieces meets the quality requirement according to the equivalent area of the traditional Chinese medicine decoction pieces, and outputting a judging result;
S8, judging whether the shape of the traditional Chinese medicine decoction pieces meets the quality requirement according to the shape parameters of the traditional Chinese medicine decoction pieces, and outputting a judging result.
2. The quality detection method of decoction pieces of traditional Chinese medicine according to claim 1, wherein the step S4 specifically comprises the following steps:
s4.1, smoothing and filtering a plurality of frame images by adopting a Gaussian filter;
s4.2, respectively pulling a plurality of frame images into a plurality of corresponding column vectors, and combining the plurality of column vectors into a vector matrix D, wherein the vector matrix D comprises a front Jing Xiangliang matrix A and a background vector matrix E;
s4.3, taking the minimum error value between the foreground vector matrix A and the background vector matrix E as a constraint target;
S4.4, optimizing the constraint target by adopting a principal component analysis method to distinguish a foreground part and a background part in each frame of image, wherein the foreground part is an area where the traditional Chinese medicine decoction pieces are positioned;
S4.5, filtering the image of the foreground part by adopting a double homomorphic filter, and fusing the filtered image of the double homomorphic filter;
S4.6, performing edge detection on the fused image by adopting CANNY algorithm to obtain morphological characteristics of the Chinese medicinal decoction pieces in the image.
3. The quality detection method of decoction pieces of Chinese medicine according to claim 2, wherein the step S4.1 of smoothing the plurality of frame images by using a gaussian filter comprises:
wherein H ij is a convolution kernel of size i x j; i, j is the size parameter of the convolution kernel; 2k+1 is window width; k is a natural number; sigma is variance.
4. The quality detection method of decoction pieces according to claim 2, wherein S4.3 uses a minimum error value between the foreground vector matrix a and the background vector matrix E as a constraint target, specifically:
Wherein, Is the Frobenius norm; Is the constraint target, namely the error minimum value between the front Jing Xiangliang matrix A and the background vector matrix E; the rank of the front Jing Xiangliang matrix a is less than or equal to the value of the target dimension.
5. The quality detection method of decoction pieces of traditional Chinese medicine according to claim 4, wherein the S4.4 adopts a principal component analysis method to optimize the constraint target, specifically:
Wherein, Is the core norm of the matrix, lambda is the positive weight parameter,Is the sum of the absolute values of the matrix elements.
6. The quality inspection method of decoction pieces of traditional Chinese medicine according to claim 5, wherein S4.5 specifically comprises:
the dual homomorphic filter comprises a first homomorphic filter and a second homomorphic filter;
The method comprises the steps of filtering and extracting traditional Chinese medicine decoction pieces with the area larger than S min by a first homomorphic filter, and filtering and processing the traditional Chinese medicine decoction pieces, wherein S min is a preset lower limit value of the area of the traditional Chinese medicine decoction pieces;
The second homomorphic filter extracts the traditional Chinese medicine decoction pieces with the area smaller than S max, and carries out filtering treatment on the traditional Chinese medicine decoction pieces, wherein S max is the preset upper limit value of the area of the traditional Chinese medicine decoction pieces;
And fusing the traditional Chinese medicine decoction pieces extracted by the first homomorphic filter and the second homomorphic filter to obtain a filtered whole image of the traditional Chinese medicine decoction pieces.
7. The quality detection method of decoction pieces of traditional Chinese medicine according to claim 6, wherein S4.6 specifically comprises:
And carrying out edge detection on the whole image of the Chinese herbal pieces processed by the first homomorphic filter and the second homomorphic filter by adopting CANNY algorithm to obtain morphological characteristics of the Chinese herbal pieces in the image.
8. The method for detecting the quality of decoction pieces of traditional Chinese medicine according to claim 1, wherein the step S6 specifically comprises:
Calculating a long side r 1 and a short side r 2 of the external ellipse, and calculating an equivalent area xi of the traditional Chinese medicine decoction pieces according to the long side r 1 and the short side r 2;
Normalizing the long side r 1 and the short side r 2 to obtain a normalized long side r 13 and a normalized short side r 23, and calculating shape parameters of the traditional Chinese medicine decoction pieces:
Wherein, Is a shape parameter.
9. The quality detection method of decoction pieces of traditional Chinese medicine according to claim 8, wherein the step S7 specifically comprises:
If the equivalent area xi of the traditional Chinese medicine decoction pieces is larger than or equal to the maximum area threshold value or smaller than or equal to the minimum area threshold value, judging that the specification of the traditional Chinese medicine decoction pieces does not meet the quality requirement, and outputting a judgment result;
If the equivalent area xi of the traditional Chinese medicine decoction pieces is larger than the minimum area threshold and smaller than the maximum area threshold, judging that the specification of the traditional Chinese medicine decoction pieces meets the quality requirement, and outputting a judging result.
10. The quality detection method of decoction pieces of traditional Chinese medicine according to claim 8, wherein the step S8 specifically comprises:
shape parameters of Chinese medicinal decoction pieces If the shape parameter threshold value is smaller than or equal to the shape parameter threshold value, judging that the shape of the traditional Chinese medicine decoction pieces is uneven, and outputting a judging result;
shape parameters of Chinese medicinal decoction pieces And if the shape parameter is larger than the shape parameter threshold, judging that the shape of the traditional Chinese medicine decoction pieces is uniform, and outputting a judging result.
CN202410932805.3A 2024-07-12 2024-07-12 Quality detection method of traditional Chinese medicine decoction pieces Active CN118470023B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410932805.3A CN118470023B (en) 2024-07-12 2024-07-12 Quality detection method of traditional Chinese medicine decoction pieces

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410932805.3A CN118470023B (en) 2024-07-12 2024-07-12 Quality detection method of traditional Chinese medicine decoction pieces

Publications (2)

Publication Number Publication Date
CN118470023A true CN118470023A (en) 2024-08-09
CN118470023B CN118470023B (en) 2024-09-20

Family

ID=92170968

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410932805.3A Active CN118470023B (en) 2024-07-12 2024-07-12 Quality detection method of traditional Chinese medicine decoction pieces

Country Status (1)

Country Link
CN (1) CN118470023B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060025932A1 (en) * 2001-02-08 2006-02-02 Dadala Vijaya K Novel method for chromatographic finger printing and standardization of single medicines and formulations
CN114841986A (en) * 2022-05-24 2022-08-02 亳州学院 Herbal pieces-quality monitoring analytic system based on machine vision
CN116007728A (en) * 2022-12-27 2023-04-25 深圳诺博医疗科技有限公司 Medicine counting method, medicine counting device, storage medium and computer program product
CN116630317A (en) * 2023-07-24 2023-08-22 四川新荷花中药饮片股份有限公司 On-line quality monitoring method for traditional Chinese medicine decoction pieces
CN118089546A (en) * 2024-04-22 2024-05-28 南昌市检验检测中心 Method and system for monitoring medicine stability through image analysis

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060025932A1 (en) * 2001-02-08 2006-02-02 Dadala Vijaya K Novel method for chromatographic finger printing and standardization of single medicines and formulations
CN114841986A (en) * 2022-05-24 2022-08-02 亳州学院 Herbal pieces-quality monitoring analytic system based on machine vision
CN116007728A (en) * 2022-12-27 2023-04-25 深圳诺博医疗科技有限公司 Medicine counting method, medicine counting device, storage medium and computer program product
CN116630317A (en) * 2023-07-24 2023-08-22 四川新荷花中药饮片股份有限公司 On-line quality monitoring method for traditional Chinese medicine decoction pieces
CN118089546A (en) * 2024-04-22 2024-05-28 南昌市检验检测中心 Method and system for monitoring medicine stability through image analysis

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
LI SZE CHOW等: "Review of medical image quality assessment", 《BIOMEDICAL SIGNAL PROCESSING AND CONTROL》, vol. 27, 31 May 2016 (2016-05-31), pages 145 - 154, XP029486446, DOI: 10.1016/j.bspc.2016.02.006 *
徐雅静等: "人工智能在中药材及饮片鉴别领域的应用", 《中华中医药学刊》, vol. 40, no. 8, 31 August 2022 (2022-08-31), pages 47 - 50 *

Also Published As

Publication number Publication date
CN118470023B (en) 2024-09-20

Similar Documents

Publication Publication Date Title
EP2852152B1 (en) Image processing method, apparatus and shooting terminal
CN106851437A (en) A kind of method for extracting video frequency abstract
CN108921942B (en) Method and device for 2D (two-dimensional) conversion of image into 3D (three-dimensional)
CN109544583B (en) Method, device and equipment for extracting interested area of leather image
CN107784637A (en) A kind of method of infrared image enhancement
JP2010205067A (en) Device, method and program for extracting area
CN116630317B (en) On-line quality monitoring method for traditional Chinese medicine decoction pieces
CN105678245A (en) Target position identification method based on Haar features
CN110765903A (en) Pedestrian re-identification method and device and storage medium
CN109785321A (en) Meibomian gland method for extracting region based on deep learning and Gabor filter
CN104881635A (en) Image texture extraction and identification method by non-Gauss two-dimension Gabor filter
CN110179154A (en) A method of the control uniform fragment of cigarette packet
CN107360435A (en) Blockiness detection methods, block noise filtering method and device
CN111091122B (en) Training and detecting method and device for multi-scale characteristic convolutional neural network
CN113642380A (en) Identification technology for wireless form
CN103929629B (en) A kind of image processing method based on image primary color
CN118470023B (en) Quality detection method of traditional Chinese medicine decoction pieces
CN108734054B (en) Non-shielding citrus fruit image identification method
CN112258545A (en) Tobacco leaf image online background processing system and online background processing method
CN110769262B (en) Video image compression method, system, equipment and storage medium
CN115358972A (en) Tobacco leaf grading method and system based on visual feature fusion
CN106023223A (en) Orange fruit size describing method and organic fruit size grading method
CN113627329A (en) Wheat seed hyperspectral image classification method and system based on hybrid convolutional network
CN107180419B (en) Median filtering detection method based on PCA (principal component analysis) network
CN110276260B (en) Commodity detection method based on depth camera

Legal Events

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