CN115273053B - Drug disintegration performance identification method based on data processing - Google Patents
Drug disintegration performance identification method based on data processing Download PDFInfo
- Publication number
- CN115273053B CN115273053B CN202211186227.0A CN202211186227A CN115273053B CN 115273053 B CN115273053 B CN 115273053B CN 202211186227 A CN202211186227 A CN 202211186227A CN 115273053 B CN115273053 B CN 115273053B
- Authority
- CN
- China
- Prior art keywords
- disintegration
- medicine
- area
- drug
- degree
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/60—Type of objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/26—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/44—Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/762—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
Abstract
The invention relates to the technical field of data processing, in particular to a method for identifying the disintegration performance of a medicine based on data processing. The method comprises the following steps: collecting multi-frame RGB images in the tablet drug disintegration process, obtaining corresponding gray level images, obtaining edge points and drug areas in each frame of gray level images, and setting three stages of drug disintegration; for the first stage, obtaining a first disintegration degree according to the gradient amplitude difference of each edge point and the number of the edge points; for the second stage, acquiring the disintegration degree of the drug disintegration region and the diffusion degree of the drug diffusion region, and acquiring a second disintegration degree according to the disintegration degree and the diffusion degree; for the third stage, a gray level run matrix corresponding to the medicine area is constructed to calculate the long run advantage, and a third disintegration degree is obtained according to the long run advantage; acquiring the disintegration speed of the medicine according to the first disintegration degree, the second disintegration degree and the third disintegration degree; the obtained disintegration speed is more accurate and reliable.
Description
Technical Field
The invention relates to the technical field of data processing, in particular to a method for identifying drug disintegration performance based on data processing.
Background
Generally, after being taken, oral solid preparations must be absorbed to perform blood circulation until reaching a certain blood concentration, so that the effect can be achieved, the premise that the medicine is dissolved in body fluid after being released from the preparation by disintegration is that the medicine is absorbed, and the process of dissolving the medicine from the solid preparation is usually the rate-limiting stage of the absorption process, so that the dissolving speed is an important index for controlling the quality of the solid preparation. Before being absorbed, the drug in the solid preparation needs to be disintegrated and dissolved and then converted into a solution, while the disintegration of the tablet is the first step of the dissolution of the drug, and in order to enable the drug to rapidly exert the drug effect, disintegrating agents are added into common tablets except sustained-release tablets and tablets for certain special purposes; the disintegrant is a substance which can rapidly break the tablet into fine particles in a solvent, so that the functional components in the tablet are rapidly dissolved and absorbed to play a role; the different solvents include water, artificial gastric juice, artificial intestinal juice and other transparent solvents.
The faster the medicine is disintegrated, the faster the medicine release speed is shown, but in the process of research, development and preparation of the medicine, the dosage of the disintegrant is difficult to control, and the dissolution speed of the researched and developed medicine is difficult to control; if the drug disintegrates slowly, the rate of absorption of the drug may be problematic; in addition, because some medicines have violent pharmacological action and small safety index, if the medicine is quickly absorbed due to too fast disintegration speed, obvious adverse reaction can be generated, and the time for maintaining the medicine effect is also shortened; therefore, in the development and formulation stage of tablet drugs, the disintegration speed of the drugs in different solvents is usually required to be detected so as to further determine whether the content of the disintegrating agent is reasonable, thereby realizing the quality control of the tablets.
The existing method for detecting the disintegration speed of the tablet medicine can adopt machine vision detection, but most of the existing methods only consider the change of the area and the volume of the medicine when analyzing the disintegration process of the medicine based on machine vision, ignore the change of detailed textures of the medicine at different times, and have large errors in the evaluation of the disintegration speed of the medicine, so that the result of judging whether the medicine disintegrant reaches the expected result according to the disintegration speed of the medicine is not accurate enough, and the research and development of the medicine can not be accurately assisted.
Disclosure of Invention
In order to solve the above technical problems, the present invention provides a method for identifying drug disintegration properties based on data processing, the method comprising the steps of:
collecting continuous multi-frame RGB images, wherein the RGB images are images of the tablet medicine in the process from adding a solvent to complete disintegration; obtaining a corresponding gray image according to each frame of RGB image; performing edge detection on all the gray level images to obtain edge points in each frame of gray level image;
performing threshold segmentation on each frame of gray level image to obtain a corresponding medicine area, recording a first frame of gray level image after a medicine is added into a solvent as an initial gray level image, recording a medicine area corresponding to the initial gray level image as an initial medicine area, and setting a first stage, a second stage and a third stage of medicine disintegration according to the initial medicine area and the medicine area corresponding to each frame of gray level image;
calculating the gradient amplitude difference between the edge point and a corresponding standard edge point for the gray level image with the drug disintegration as the first stage, wherein the standard edge point is the edge point in the initial gray level image; obtaining a first disintegration degree according to all the gradient amplitude differences and the number of the edge points;
clustering the gray level image of which the medicine is disintegrated into the second stage based on the position coordinates of each edge point to obtain a medicine disintegration area and a medicine diffusion area; acquiring the disintegration degree of the drug disintegration region and the diffusion degree of the drug diffusion region, and acquiring a second disintegration degree according to the disintegration degree and the diffusion degree;
for the gray level image of the third stage of drug disintegration, constructing a gray level run matrix corresponding to the traditional Chinese medicine area in the gray level image, calculating a long run advantage according to the gray level run matrix, and obtaining a third disintegration degree according to the long run advantage;
and acquiring the disintegration speed of the medicament according to the first disintegration degree, the second disintegration degree and the third disintegration degree.
Preferably, the method for setting the first stage, the second stage and the third stage of drug disintegration according to the initial drug region and the drug region corresponding to each frame of gray scale image includes:
acquiring the area of the traditional Chinese medicine in each frame of gray level image;
when the difference value between the area of the medicine area in the gray image and the area of the initial medicine area is 0, the gray image is the first stage of medicine disintegration;
when the difference value between the area of the medicine area in the gray level image and the area of the initial medicine area is larger than 0, and the area of the medicine area in the gray level image is larger than the area of the medicine area in the previous gray level image adjacent to the gray level image, the gray level image is the second stage of medicine disintegration;
and when the difference value between the area of the medicine area in the gray-scale image and the area of the initial medicine area is larger than 0, and the area of the medicine area in the gray-scale image is equal to the area of the medicine area in the previous gray-scale image adjacent to the medicine area in the previous frame, the gray-scale image is the third stage of medicine disintegration.
Preferably, the method for obtaining the first disintegration degree according to all the gradient magnitude differences and the number of the edge points includes:
the gradient amplitude difference is the difference of the gradient amplitudes between the edge point and a standard edge point at a corresponding position in the initial gray level image;
obtaining a first disintegration degree of each gray level image according to the gradient amplitude difference of each edge point in each frame of gray level image and the number of the edge points, wherein a calculation formula of the first disintegration degree is as follows:
wherein the content of the first and second substances,indicates the first stageA first disintegration degree corresponding to the frame gray image;representing the number of edge points in the grayscale image;representing the first in a grey scale imageThe gradient amplitude difference corresponding to each edge point.
Preferably, the method for clustering based on the position coordinates of each edge point to obtain the drug disintegration region and the drug diffusion region includes:
acquiring a central point of the area of the traditional Chinese medicine in each frame of gray level image, and constructing a two-dimensional coordinate system by taking the central point as an origin, thereby obtaining the coordinate of each edge point; clustering edge points in each frame of gray level image by adopting a DBSCAN clustering algorithm to obtain two categories, wherein the clustering distance is the distance of coordinate positions between the edge points;
and performing convex hull detection on the edge points in each category, wherein the category with a large number of edge points is a medicine disintegration area, and the category with a small number of edge points is a medicine diffusion area.
Preferably, the method for acquiring the center point of the region of the medicine in each frame of the gray scale image includes:
constructing a rectangular coordinate system by taking the upper left corner of each frame of gray level image as an origin, acquiring the coordinate value of each pixel point in the medicine area of the gray level image according to the rectangular coordinate system, and calculating the average value of the horizontal coordinates and the average value of the vertical coordinates of all the pixel points in the medicine area; and the point corresponding to the horizontal coordinate average value and the vertical coordinate average value is the central point of the medicine area.
Preferably, the method of acquiring the degree of disintegration of the drug disintegration region and the degree of diffusion of the drug diffusion region includes:
constructing a gray level run matrix of the drug disintegration region, and calculating a short run advantage based on the gray level run matrix;
acquiring the area of the drug disintegration region, and calculating the ratio of the area of the drug disintegration region to the area of the initial drug region; the product of the ratio and the short run advantage is the degree of disintegration of the drug disintegration region;
acquiring a saturation image corresponding to each frame of gray image, acquiring the saturation of each pixel point and the saturation of the central point of each medicine area based on the saturation image, wherein the saturation of the central point of each medicine area is the initial saturation;
acquiring the area of the drug diffusion region, calculating the distance between each pixel point in the drug diffusion region and the drug disintegration region and the central point of the drug region, and acquiring the maximum distance between the pixel point in the drug disintegration region and the central point of the drug region in each direction;
the calculation formula of the diffusion degree is as follows:
wherein the content of the first and second substances,indicating the degree of diffusion of the drug diffusion region;indicates the first in the drug diffusion regionSaturation corresponding to each pixel point;representing the initial saturation corresponding to the central point;representing the number of all pixel points in the drug diffusion region;indicates the area of the drug diffusion region;indicates the first in the drug diffusion regionThe distance between each pixel point and the center point;expressed in the central point to the drug diffusion regionAnd in the direction of each pixel point, the maximum distance between the pixel point and the central point in the drug disintegration region.
Preferably, the method for obtaining the second disintegration degree according to the disintegration degree and the diffusion degree comprises:
and obtaining the ratio of the area of the drug disintegration region to the total area of the drug region as the weight of the disintegration degree, obtaining the ratio of the area of the drug diffusion region to the total area of the drug region as the weight of the diffusion degree, and weighting and summing the disintegration degree and the diffusion degree to obtain a second disintegration degree.
Preferably, the method for obtaining a third degree of disintegration according to the long run advantage includes:
obtaining the distance between each pixel point in each run of the medicine area and the central point of the medicine area, and correcting the advantages of the long run according to the distance to obtain a third disintegration degree, wherein a calculation formula of the third disintegration degree is as follows:
wherein the content of the first and second substances,showing the third stageA third degree of disintegration of the frame gray image;is shown in the drug regionThe continuous appearance of the pixel points of each gray levelThe number of times of the length;representing the number of gray levels in the drug region;representing a maximum length traveled by the same gray level in the drug region;indicating the first in each runThe distance between each pixel point and the center point of the medicine region;representing an exponential function operation;representing the long-run advantage of the gray-run matrix.
Preferably, the method for acquiring the disintegration rate of the drug according to the first disintegration degree, the second disintegration degree and the third disintegration degree comprises the following steps:
acquiring the number of gray level images corresponding to a first stage, a second stage and a third stage, wherein the calculation formula of the disintegration speed is as follows:
wherein, the first and the second end of the pipe are connected with each other,indicates the rate of disintegration;is shown asAt the stage ofCorresponding to frame gray imageDegree of disintegration;denotes the firstAt the stage ofCorresponding to frame gray imageDegree of disintegration;is shown asThe number of gray images at each stage;representing the total number of gray scale images at all phases.
The invention has the following beneficial effects: the medicine disintegration process is divided into three stages through the area change of the medicine area in the medicine disintegration process, the characteristics of the medicine area in each stage are analyzed, the disintegration degree corresponding to each stage is obtained by combining a plurality of factors such as gradient, gray level run matrix and saturation, the disintegration speed of the medicine disintegration is obtained based on the disintegration degree corresponding to each stage, the area change of the medicine is considered, the analysis of texture details in the medicine disintegration process is increased, the reliability of the medicine disintegration speed obtained based on the factors in the medicine disintegration process is high, and the calculated result of the medicine disintegration speed is more accurate.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a method for identifying drug disintegration performance based on data processing according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a drug disintegration process according to an embodiment of the present invention.
Detailed Description
In order to further illustrate the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description, the structure, the features and the effects of a method for identifying the disintegration property of a drug based on data processing according to the present invention are provided with reference to the accompanying drawings and the preferred embodiments. In the following description, the different references to "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The method is suitable for analyzing the disintegration speed of the azithromycin tablet in the disintegration process, and the specific scheme of the method for identifying the disintegration performance of the azithromycin tablet based on data processing is concretely described below by combining the accompanying drawings.
Referring to fig. 1, a flowchart of a data processing-based drug disintegration performance identification method according to an embodiment of the present invention is shown, where the method includes the following steps:
s100, collecting continuous multi-frame RGB images, wherein the RGB images are images of the tablet medicine from the process of adding a solvent to the process of completely disintegrating; obtaining a corresponding gray level image according to each frame of RGB image; and performing edge detection on all the gray level images to obtain edge points in each frame of gray level image.
Specifically, a camera is arranged to acquire images in the process of drug disintegration, wherein the process of drug disintegration refers to the process from adding a drug into a solvent to complete disintegration, continuous multi-frame RGB images in the process of drug disintegration are acquired, and each frame of RGB images are subjected to graying processing to obtain corresponding grayscale images; correspondingly, each frame of RGB image is converted into HSV space to obtain a corresponding HSV image, and the analysis is mainly carried out according to the saturation degree of the color in the embodiment of the invention, so that a saturation image corresponding to each frame of HSV image in a saturation S channel is obtained.
It should be noted that in the embodiment of the present invention, a macro-delay photography technology is used for image acquisition in the drug disintegration process, and a camera lens is set to be as close as possible to the drug during acquisition, so as to avoid the influence of illumination on the RGB image as much as possible.
Furthermore, edge detection is performed on each frame of gray level image to obtain edge points in each frame of gray level image.
Step S200, performing threshold segmentation on each frame of gray level image to obtain a corresponding medicine area, recording a first frame of gray level image after a medicine is added into a solvent as an initial gray level image, recording a medicine area corresponding to the initial gray level image as an initial medicine area, and setting a first stage, a second stage and a third stage of medicine disintegration according to the initial medicine area and the medicine area corresponding to each frame of gray level image.
Specifically, the medicine region in each frame of gray level image is obtained, in the embodiment of the invention, the medicine region of each frame of gray level image is obtained by adopting a threshold segmentation method for identification, and the area of the medicine region in each frame of gray level image is obtained; in order to facilitate subsequent analysis and comparison, a gray image corresponding to a first frame of RGB image acquired when a drug is just added into a solvent is used as an initial gray image, and a drug region in the initial gray image is an initial drug region.
The process of medicine disintegration is that the medicine surface is gradually disintegrated and damaged, then the medicine begins to diffuse to the periphery, and the diffusion is accompanied with the disintegration of the medicine; after the medicine is completely disintegrated, the medicine is converted into granules, and then the granules of the medicine continue to disintegrate until the granules of the medicine disappear to complete the disintegration process of the medicine. Because the medicine is disintegrated slowly, the medicine corresponds to different phenomena in different stages of disintegration, for example, in the initial stage of disintegration, the dissolved medicine is not enough to reach the phenomenon of diffusion, but the phenomenon of blurring can occur at the edge of the medicine; therefore, different stages of drug disintegration can be divided according to the change of the drug.
Since the most intuitive change among different disintegration stages is the medicine region, the different disintegration stages are identified and divided based on the area of the medicine region in the embodiment of the invention; calculating the difference value of the areas of the drug regions in the two adjacent frames of gray level images, and if the difference value is 0, indicating that the drug regions in the two frames of gray level images are not diffused; along with the increase of the disintegration time, in the process of disintegration of the medicine, disintegrated particles can be accumulated at the periphery of the medicine and along with the increase of random area, so that the medicine particles are pushed to diffuse towards the periphery, and after the disintegration is finished, the medicine can not be pushed to diffuse towards the periphery; therefore, when the area of the drug region in the two adjacent frames of gray images is not changed, probably because the drug disintegration is completed in a short time and the diffusion area is not changed any more, the analysis is performed in combination with the area of the initial drug region in the initial gray image.
The medicine disintegration process is divided into the following three stages according to the areas of the medicine areas in different gray level images:
wherein the first stage is initial disintegration stage, and the difference between the area of the corresponding medicine region of the gray image and the area of the initial medicine region is 0;Is shown asThe area of the drug region corresponding to the frame gray image;representing the area of the initial drug region.
The second stage is a drug disintegration stage, when the difference between the area of the corresponding drug region of the gray image and the area of the initial drug region is greater than 0, i.e. the difference is(ii) a Meanwhile, the medicine is dispersed due to the disintegration of the medicine, and the areas of the medicine areas between two adjacent frames of gray images are different, namely(ii) a Wherein the content of the first and second substances,denotes the firstArea of the drug region corresponding to the frame gray image.
The third stage is a disintegration completion stage, and when the disintegration of the medicine is completed, namely the disintegration is completed, the area of the medicine region is not changed any more, and the area of the medicine region is larger than that of the initial medicine region, namely the area of the initial medicine region isAnd is。
Step S300, calculating the gradient amplitude difference between the edge point and the corresponding standard edge point of the gray image with the drug disintegrated into the first stage, wherein the standard edge point is the edge point in the initial gray image; and obtaining a first disintegration degree according to all gradient amplitude differences and the number of edge points.
The drug disintegration process is divided into three stages in step S200, and the disintegration degree of each stage is analyzed; referring to fig. 2, a schematic diagram of a drug disintegration process is shown; along the arrow direction in the figure, image 1-image 4; image 1 shows the first stage of initial disintegration of the drug with no change in area of the drug, images 2 and 3 show the second stage of disintegration of the drug with disintegration and progressive diffusion of the drug, and image 4 shows the third stage of complete disintegration of the drug with no change in area of the drug region.
When the gray image of the first stage is analyzed, the medicine is not diffused all around, so that evaluation is only carried out according to the edge points of the medicine area.
In step S100, edge detection is performed on all the gray level images to obtain edge points therein, so that edge points of the medicine region in each gray level image can be obtained, and a gradient amplitude difference of each edge point is obtained, where the gradient amplitude difference refers to a difference between a gradient amplitude of the edge point and a standard edge point at a corresponding position in the initial gray level image, and a larger gradient amplitude difference indicates a larger disintegration condition of the medicine, and the calculation of the gradient amplitude is the prior known technology and is not described again.
Obtaining a first disintegration degree corresponding to each frame of gray level image based on the gradient amplitude difference corresponding to the edge points in each frame of gray level image and the number of the edge points as follows:
wherein, the first and the second end of the pipe are connected with each other,indicates the first stageA first disintegration degree corresponding to the frame gray image;representing the number of edge points in the grayscale image;representing the first in a grey scale imageDifference in gradient amplitude for each edge pointAnd (3) distinguishing.
And by analogy, obtaining a first disintegration degree corresponding to the gray image according to the number of the edge points in each frame of gray image at the first stage and the gradient amplitude difference of each edge point.
S400, clustering the gray level image of which the medicine is disintegrated into a second stage based on the position coordinates of each edge point to obtain a medicine disintegration area and a medicine diffusion area; and acquiring the disintegration degree of the drug disintegration area and the diffusion degree of the drug diffusion area, and acquiring a second disintegration degree according to the disintegration degree and the diffusion degree.
Specifically, when the medicine is disintegrated in the second stage, the shape of the medicine per se is disintegrated, so that the positions of edge points of the medicine are changed; considering that the peripheral diffusion of the drug occurs at the second stage and the drug is disintegrated into the granular form at this stage, the drug region in the second stage may be divided into a drug disintegration region and a drug diffusion region.
The medicine disintegration area is an area where the medicine is converted from a tablet shape to a granular shape, the edge characteristics of the area are obvious, but the granular medicine has larger texture complexity relative to the tablet shape medicine and diffuses towards the periphery along with the further disintegration of the granular medicine, so that the medicine diffusion area has gradual change characteristics, and the edge points in the medicine diffusion area are fuzzy; the method for distinguishing the drug disintegration region from the drug diffusion region in the embodiment of the invention is as follows:
firstly, constructing a two-dimensional coordinate system in each frame of gray level image; constructing an initial rectangular coordinate system by taking the upper left corner of each frame of gray image as an origin, acquiring the average value of the horizontal coordinates of each pixel point in the medicine area in each frame of gray image and the average value of the vertical coordinates of each pixel point according to the rectangular coordinate system, taking the point corresponding to the average value of the horizontal coordinates and the average value of the vertical coordinates as the central point of the medicine area, and reconstructing a two-dimensional coordinate system by taking the central point as the origin of coordinates; and meanwhile, taking the saturation value of the position of the corresponding central point in the saturation image as the initial saturation of the medicine area.
Secondly, acquiring coordinates of edge points of the area of the traditional Chinese medicine in each frame of gray image based on a two-dimensional coordinate system, and clustering based on the coordinate positions of all the edge points, wherein the clustering method adopts a DBSCAN clustering algorithm to cluster all the edge points into two categories according to the coordinate positions; the edge characteristics of the drug disintegration region obviously have more edge points, so that one of the categories with more edge points is the edge point of the drug disintegration region, and the edge point of the drug disintegration region is subjected to convex hull detection to obtain the drug disintegration region in the gray level image; correspondingly, the edge points in the other category are the edge points of the medicine diffusion area, and the medicine diffusion area in the gray image is obtained by performing convex hull detection on the edge points of the medicine diffusion area.
Further, analyzing the disintegration degree according to the medicine disintegration region and the medicine diffusion region in each gray level image in the obtained second stage; constructing a gray level run matrix of the drug disintegration region, wherein the line number of the gray level run matrix is the number of all gray levels in the drug disintegration region, the column number of the gray level run matrix is the maximum length of the same wandering gray level, and the construction direction of the gray level run matrix isDirection of, whereinGo to the firstData of columnIn the drug collapse regionThe pixel points of each gray level appear continuouslyThe number of times of the length; more granules indicate more disintegration in the drug disintegration region, and the granulesThe more the substance, the larger the short-run advantage of the drug disintegration region, therefore, the short-run advantage is calculated based on the gray-level run matrix of the drug disintegration region, and then the disintegration degree of the drug disintegration region is obtained according to the short-run advantage:
wherein, the first and the second end of the pipe are connected with each other,indicates the degree of disintegration of the drug disintegration region;the method is used for representing the short run advantage of a medicine disintegration region and is used for representing the texture complexity of the surface of the medicine disintegration region;in the region of drug disintegrationThe pixel points of each gray level appear continuouslyNumber of times of length;representing the number of gray levels in the drug disintegration region;represents the maximum length traveled by the same gray level in the drug disintegration region;indicates the area of the drug disintegration region;representing the area of the initial drug region.
Since the particles generated by disintegration are accumulated around the drug after the drug is disintegrated, the area of the drug disintegration region increases and the complexity of the texture on the surface of the drug increases, and thus the degree of disintegration at this time is expressed based on the area of the drug disintegration region and the complexity of the texture on the surface of the drug disintegration region.
Further, acquiring the diffusion degree of the drug diffusion area; the closer the position in the medicine diffusion region and the medicine disintegration region are, the more the medicine amount is contained, so that the saturation of the pixel point at the position is closer to the initial saturation of the central point, and the central point is the central point of the acquired medicine region; acquiring pixel points corresponding to the drug disintegration region when the distance between the pixel points and the central point in any direction is maximum and the distance between each pixel point and the central point in the drug diffusion region, and acquiring the diffusion degree of the drug diffusion region based on the distance:
wherein the content of the first and second substances,indicating the degree of diffusion of the drug diffusion region;indicates the first in the drug diffusion regionSaturation corresponding to each pixel point;representing the initial saturation corresponding to the central point;representing the number of all pixel points in the drug diffusion region;indicates the area of the drug diffusion region;indicates the first in the drug diffusion regionThe distance between each pixel point and the center point;is shown in the center point to the drug diffusion regionAnd in the direction of each pixel point, the maximum distance between the pixel point and the central point in the drug disintegration region.
The larger the area of the drug diffusion region, the greater the degree of diffusion; the larger the difference between the distance from all the pixel points to the central point in the medicine diffusion region and the maximum distance from the central point in the corresponding direction of each pixel point is, the larger the medicine diffusion range is, and the larger the diffusion degree of the characteristic medicine diffusion region is.
Acquiring a second disintegration degree of the corresponding drug area in the second stage according to the disintegration degree of the drug disintegration area and the diffusion degree of the drug diffusion area, and taking the ratio of the areas occupied by the drug disintegration area and the drug diffusion area as corresponding weight, wherein the calculation method of the second disintegration degree is as follows:
wherein the content of the first and second substances,indicating second stageA second degree of disintegration of the frame gray image;indicates the degree of disintegration of the drug disintegration region;indicating the degree of diffusion of the drug diffusion region;indicates the area of the drug disintegration region;indicates the area of the drug diffusion region;is shown asTotal area of the material region in the frame gray image.
And S500, constructing a gray run matrix corresponding to the traditional Chinese medicine area in the gray image for the gray image of the third stage of medicine disintegration, calculating a long run advantage according to the gray run matrix, and obtaining a third disintegration degree according to the long run advantage.
Specifically, when the drug is disintegrated in the third stage, the drug is transformed from the tablet shape into granules and the edges of the drug itself are lost, and then the drug is completely disintegrated as the granular drug continues to disintegrate until the edges of the granular drug disappear. In this stage, since the drug disintegration region is gradually converted into the drug diffusion region, a gray level run matrix of the drug region at this time is constructed, and a corresponding long-run advantage is calculated according to the gray level run matrix, in order to make the result more accurate, in the embodiment of the present invention, when calculating the long-run advantage, the long-run advantage is corrected by a distance between each pixel point in each run relative to a central point, so as to obtain a third disintegration degree of the drug region:
wherein the content of the first and second substances,shows the third stageA third disintegration degree of the frame gray image;is shown in the drug regionThe pixel points of each gray level appear continuouslyThe number of times of the length;representing the number of gray levels in the drug region;representing a maximum length traveled by the same gray level in the drug region;indicating the first in each runThe distance between each pixel point and the center point of the medicine region;representing an exponential function operation;expressing the long-run advantage of the gray-level run matrix by the distance between the pixel point and the center point of the medicine region in each runThe distance is corrected for the dominance of the long run, with runs closer to the center point of the drug region occupying a greater proportion when evaluating the degree of third disintegration.
And step S600, acquiring the disintegration speed of the medicine according to the first disintegration degree, the second disintegration degree and the third disintegration degree.
Obtaining a first disintegration degree, a second disintegration degree and a third disintegration degree corresponding to the gray-scale image in each stage in the steps S300, S400 and S500; counting the number of gray level images respectively corresponding to the first stage, the second stage and the third stage; acquiring the disintegration speed of the medicine according to the number of the gray level images at each stage and the disintegration degree of each frame of gray level image, wherein the disintegration speed is as follows:
wherein the content of the first and second substances,represents the rate of disintegration;denotes the firstAt the next stageCorresponding to the frame gray imageDegree of disintegration;denotes the firstAt the next stageCorresponding to the frame gray imageDegree of disintegration;denotes the firstThe number of gray images at each stage;representing the total number of gray scale images at all stages;is shown asThe proportion of each stage in the whole disintegration process is higher, and the stage is more likely to be the main stage of the drug disintegration.
Therefore, the disintegration speed of the medicine can be evaluated and calculated according to the corresponding disintegration degree and the number of the gray level images in each stage, the larger the difference of the disintegration degrees between the adjacent frame gray level images in the same stage is, the larger the corresponding medicine disintegration speed is, and the disintegration time of the medicine in each stage is reflected on the side face by combining the number of the corresponding gray level images in each stage; if the disintegration speed of the medicine is extremely slow, the absorption speed of the medicine can be problematic, and for some medicines with severe pharmacological effects, obvious adverse reactions can be generated if the disintegration speed is too fast, so that whether the disintegrant in the medicine reaches the expectation can be judged based on the disintegration speed of the medicine, and the obtained disintegration speed can be used for assisting the development of subsequent medicines.
In summary, in the embodiment of the present invention, the edge points and the drug regions in each gray image are obtained by obtaining the multi-frame gray images and the corresponding saturation images in the drug disintegration process for analysis, and the whole drug disintegration process is divided according to the change of the areas of the drug regions to obtain a plurality of stages; for the first stage, acquiring a first disintegration degree based on the gradient amplitude difference of the edge points in the gray-scale image and the number of the edge points; for the second stage, dividing the medicine area in each frame of gray level image into a medicine disintegration area and a medicine diffusion area, obtaining the disintegration degree of the medicine disintegration area and the diffusion degree of the medicine diffusion area, and obtaining a second disintegration degree according to the disintegration degree and the diffusion degree; for the third stage, a gray level run matrix of the traditional Chinese medicine area of each frame of gray level image is constructed, and a third disintegration degree is obtained according to the long run advantage of the gray level run matrix; finally, the disintegration speed of the medicine is obtained according to the comprehensive analysis of the disintegration degree of each stage, the result obtained by the stage analysis of the medicine disintegration process is more reliable, and the processing based on the image data is more convenient and accurate.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
All the embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from other embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that are within the spirit of the present invention are intended to be included therein.
Claims (8)
1. A method for identifying the disintegration performance of a medicine based on data processing is characterized by comprising the following steps:
collecting continuous multi-frame RGB images, wherein the RGB images are images of the tablet medicine in the process from adding a solvent to complete disintegration; obtaining a corresponding gray image according to each frame of RGB image; performing edge detection on all the gray level images to obtain edge points in each frame of gray level image;
performing threshold segmentation on each frame of gray level image to obtain a corresponding medicine area, recording a first frame of gray level image after a medicine is added into a solvent as an initial gray level image, recording a medicine area corresponding to the initial gray level image as an initial medicine area, and setting a first stage, a second stage and a third stage of medicine disintegration according to the initial medicine area and the medicine area corresponding to each frame of gray level image;
calculating the gradient amplitude difference between the edge point and a corresponding standard edge point for the gray image with the drug disintegration as the first stage, wherein the standard edge point is the edge point in the initial gray image; obtaining a first disintegration degree according to all the gradient amplitude differences and the number of the edge points;
clustering the gray level image of which the medicine is disintegrated into the second stage based on the position coordinates of each edge point to obtain a medicine disintegration area and a medicine diffusion area; acquiring the disintegration degree of the medicine disintegration area and the diffusion degree of the medicine diffusion area, and acquiring a second disintegration degree according to the disintegration degree and the diffusion degree;
for the gray level image of the third stage of drug disintegration, constructing a gray level run matrix corresponding to the traditional Chinese medicine area in the gray level image, calculating a long run advantage according to the gray level run matrix, and obtaining a third disintegration degree according to the long run advantage;
acquiring the disintegration speed of the medicine according to the first disintegration degree, the second disintegration degree and the third disintegration degree;
the method for setting the first stage, the second stage and the third stage of drug disintegration according to the initial drug region and the drug region corresponding to each frame of gray level image comprises the following steps:
acquiring the area of the traditional Chinese medicine in each frame of gray level image;
when the difference value between the area of the medicine area in the gray image and the area of the initial medicine area is 0, the gray image is the first stage of medicine disintegration;
when the difference value between the area of the medicine area in the gray level image and the area of the initial medicine area is larger than 0, and the area of the medicine area in the gray level image is larger than the area of the medicine area in the previous gray level image adjacent to the gray level image, the gray level image is the second stage of medicine disintegration;
and when the difference value between the area of the medicine area in the gray-scale image and the area of the initial medicine area is larger than 0, and the area of the medicine area in the gray-scale image is equal to the area of the medicine area in the previous gray-scale image adjacent to the medicine area in the previous frame, the gray-scale image is the third stage of medicine disintegration.
2. The method for identifying drug disintegration performance based on data processing of claim 1 wherein the method for obtaining the first disintegration degree according to all the gradient magnitude differences and the number of the edge points comprises:
the gradient amplitude difference is the difference of the gradient amplitudes between the edge point and a standard edge point at a corresponding position in the initial gray level image;
obtaining a first disintegration degree of each gray level image according to the gradient amplitude difference of each edge point in each frame of gray level image and the number of the edge points, wherein a calculation formula of the first disintegration degree is as follows:
wherein, the first and the second end of the pipe are connected with each other,indicates the first stageA first disintegration degree corresponding to the frame gray image;representing the number of edge points in the grayscale image;to express the second in a gray scale imageThe gradient amplitude difference corresponding to each edge point.
3. The method for identifying drug disintegration performance based on data processing according to claim 1, wherein the method for obtaining the drug disintegration area and the drug diffusion area by clustering based on the position coordinates of each edge point comprises:
acquiring a central point of a traditional Chinese medicine area in each frame of gray image, and constructing a two-dimensional coordinate system by taking the central point as an origin, thereby obtaining a coordinate of each edge point; clustering edge points in each frame of gray level image by adopting a DBSCAN clustering algorithm to obtain two categories, wherein the clustering distance is the distance of coordinate positions between the edge points;
and performing convex hull detection on the edge points in each category, wherein the category with a large number of edge points is a medicine disintegration area, and the category with a small number of edge points is a medicine diffusion area.
4. The method for identifying drug disintegration performance based on data processing according to claim 3, wherein the method for obtaining the central point of the drug region in each frame of gray level image includes:
constructing a rectangular coordinate system by taking the upper left corner of each frame of gray level image as an origin, obtaining the coordinate value of each pixel point in the medicine area of the gray level image according to the rectangular coordinate system, and calculating the horizontal coordinate average value and the vertical coordinate average value of all the pixel points in the medicine area; and the point corresponding to the horizontal coordinate average value and the vertical coordinate average value is the central point of the medicine area.
5. The method for identifying the drug disintegration performance based on the data processing as claimed in claim 4, wherein the method for obtaining the disintegration degree of the drug disintegration area and the diffusion degree of the drug diffusion area comprises:
constructing a gray level run matrix of the drug disintegration region, and calculating a short run advantage based on the gray level run matrix;
acquiring the area of the drug disintegration region, and calculating the ratio of the area of the drug disintegration region to the area of the initial drug region; the product of the ratio and the short run advantage is the degree of disintegration of the drug disintegration region;
acquiring a saturation image corresponding to each frame of gray image, and acquiring the saturation of each pixel point and the saturation of the central point of each medicine region based on the saturation image, wherein the saturation of the central point of each medicine region is initial saturation;
acquiring the area of the drug diffusion region, calculating the distance between each pixel point in the drug diffusion region and the drug disintegration region and the central point of the drug region, and acquiring the maximum distance between the pixel point in the drug disintegration region and the central point of the drug region in each direction;
the calculation formula of the diffusion degree is as follows:
wherein the content of the first and second substances,indicating the degree of diffusion of the drug diffusion region;indicates the first in the drug diffusion regionSaturation corresponding to each pixel point;indicating the initial saturation of the central point correspondences;Representing the number of all pixel points in the drug diffusion region;indicates the area of the drug diffusion region;indicates the first in the drug diffusion regionThe distance between each pixel point and the center point;expressed in the central point to the drug diffusion regionAnd in the direction of each pixel point, the maximum distance between the pixel point and the central point in the drug disintegration region.
6. The method for identifying disintegration performance of drug based on data processing as claimed in claim 5, wherein said method for obtaining the second disintegration degree according to the disintegration degree and the diffusion degree comprises:
and obtaining the ratio of the area of the medicine disintegration area to the total area of the medicine area as the weight of the disintegration degree, obtaining the ratio of the area of the medicine diffusion area to the total area of the medicine area as the weight of the diffusion degree, and weighting and summing the disintegration degree and the diffusion degree to obtain a second disintegration degree.
7. The method for identifying drug disintegration performance based on data processing according to claim 1, wherein the method for obtaining the third disintegration degree according to the long run advantage includes:
obtaining the distance between each pixel point in each run of the medicine region and the central point of the medicine region, and correcting the advantage of the long run according to the distance to obtain a third disintegration degree, wherein the calculation formula of the third disintegration degree is as follows:
wherein the content of the first and second substances,showing the third stageA third degree of disintegration of the frame gray image;is shown in the drug regionThe pixel points of each gray level appear continuouslyNumber of times of length;representing the number of gray levels in the drug region;representing the maximum length traveled by the same gray level in the drug region;indicating the first in each runThe distance between each pixel point and the center point of the medicine region;representing an exponential function operation;representing the long-run advantage of the gray-run matrix.
8. The method for identifying drug disintegration performance based on data processing according to claim 1, wherein the method for obtaining the disintegration speed of the drug according to the first disintegration degree, the second disintegration degree and the third disintegration degree comprises:
acquiring the number of gray level images corresponding to a first stage, a second stage and a third stage, wherein the calculation formula of the disintegration speed is as follows:
wherein the content of the first and second substances,indicates the rate of disintegration;denotes the firstAt the stage ofCorresponding to the frame gray imageDegree of disintegration;denotes the firstAt the next stageCorresponding to frame gray imageDegree of disintegration;is shown asThe number of gray images at each stage;representing the total number of gray scale images at all phases.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211186227.0A CN115273053B (en) | 2022-09-28 | 2022-09-28 | Drug disintegration performance identification method based on data processing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211186227.0A CN115273053B (en) | 2022-09-28 | 2022-09-28 | Drug disintegration performance identification method based on data processing |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115273053A CN115273053A (en) | 2022-11-01 |
CN115273053B true CN115273053B (en) | 2022-12-20 |
Family
ID=83756936
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211186227.0A Active CN115273053B (en) | 2022-09-28 | 2022-09-28 | Drug disintegration performance identification method based on data processing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115273053B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115909302B (en) * | 2023-03-09 | 2023-06-16 | 菏泽学院 | Data processing method for identifying drug disintegration performance |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9842257B2 (en) * | 2012-01-23 | 2017-12-12 | Perceptimed, Inc. | Automated pharmaceutical pill identification |
CN110032946B (en) * | 2019-03-21 | 2021-02-12 | 西安交通大学 | Aluminum/aluminum blister packaging tablet identification and positioning method based on machine vision |
CN113516017B (en) * | 2021-04-22 | 2023-07-11 | 平安科技(深圳)有限公司 | Supervision method and device for medicine taking process, terminal equipment and storage medium |
CN114168772A (en) * | 2021-12-03 | 2022-03-11 | 杭州睿胜软件有限公司 | Tablet identification method, readable storage medium, and electronic device |
-
2022
- 2022-09-28 CN CN202211186227.0A patent/CN115273053B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN115273053A (en) | 2022-11-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021169128A1 (en) | Method and apparatus for recognizing and quantifying fundus retina vessel, and device and storage medium | |
Alyoubi et al. | Diabetic retinopathy detection through deep learning techniques: A review | |
CN115273053B (en) | Drug disintegration performance identification method based on data processing | |
Li et al. | DeepRetina: layer segmentation of retina in OCT images using deep learning | |
US10339648B2 (en) | Quantitative predictors of tumor severity | |
Jitpakdee et al. | A survey on hemorrhage detection in diabetic retinopathy retinal images | |
CN109685809B (en) | Liver infusorian focus segmentation method and system based on neural network | |
CN109199322B (en) | Yellow spot detection method and storage device | |
US20220270244A1 (en) | Convolutional neural networks for classification of cancer histological images | |
CN110838114B (en) | Pulmonary nodule detection method, device and computer storage medium | |
CN110648344B (en) | Diabetes retinopathy classification device based on local focus characteristics | |
CN110189307B (en) | Pulmonary nodule detection method and system based on multi-model fusion | |
Haider et al. | Artificial Intelligence-based computer-aided diagnosis of glaucoma using retinal fundus images | |
CN107767362A (en) | A kind of early screening of lung cancer device based on deep learning | |
CN111950595A (en) | Liver focus image processing method, system, storage medium, program, and terminal | |
WO2019067557A1 (en) | Morphometric genotyping of cells in liquid biopsy using optical tomography | |
CN112862756A (en) | Method for identifying pathological change type and gene mutation in thyroid tumor pathological image | |
Hatanaka et al. | Improvement of automatic hemorrhage detection methods using brightness correction on fundus images | |
Antal et al. | A multi-level ensemble-based system for detecting microaneurysms in fundus images | |
Peng et al. | Liver tumor segmentation and classification using FLAS-UNet++ and an improved DenseNet | |
Liu et al. | Retinal vessel segmentation using densely connected convolution neural network with colorful fundus images | |
WO2023103609A1 (en) | Eye tracking method and apparatus for anterior segment octa, device, and storage medium | |
CN115908274A (en) | Device, equipment and medium for detecting focus | |
Zhou et al. | Computer aided diagnosis for diabetic retinopathy based on fundus image | |
CN114418915A (en) | Eye fundus retina OCTA image fusion method and system |
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 |