A method and system for online detection of solid drug particle size

Through the combination of cloud servers and camera equipment, the online detection of drug particle size is realized, solving the problems of complex detection processes, high cost and high accuracy requirements in the existing technology, and simplifying processes and reducing costs are achieved. and improve accuracy.

CN117274221BActive Publication Date: 2025-02-11BEIJING XUZE PHARMA TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311312413.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-10
Publication Date
2025-02-11
Estimated Expiration
2043-10-10

AI Technical Summary

Technical Problem

In the prior art, the detection of drug particle size requires multiple screenings, the process is complex and costly, and requires high control accuracy, resulting in a long detection time.

Method used

Receive user-side instructions through the cloud server, start the camera device to obtain solid drug images, and combine them with the distance value of the distance measuring sensor to fuse them. Image recognition technology is used to screen the images and extract the appearance through a convolutional neural network to calculate the particle size of the drug.

Benefits of technology

The simplified process of drug particle size detection is realized, reducing detection costs, shortening detection time, and improving detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117274221B_ABST
    Figure CN117274221B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image recognition technology, and specifically discloses a method and system for online detection of the particle size of solid medicine particles, including: a cloud server receives instruction information from a user end, and starts a camera device to obtain a solid medicine image according to the instruction information; when the camera device collects the solid medicine image, it sends a distance measurement instruction to a distance measurement sensor, and fuses the distance value measured by the distance measurement sensor in the image obtained by the camera device; the cloud server obtains the solid medicine image, obtains the shape of the solid medicine in the image through image recognition, and counts the solid medicine based on the shape; and calculates the particle size of the solid medicine according to the count and the distance value in the image. The drug particle size detection system designed by the present invention only needs to shoot the drug to determine the drug particle size, and the process is simple and the cost is low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an image recognition technology, and in particular to a method and a system for online detection of the particle size of solid medicine particles. Background Art

[0002] At present, the particle size of drugs is usually tested by sieving test, which is specifically expressed in several ways, such as sieving particle size, sedimentation particle size and equivalent particle size.

[0003] However, screening testing requires multiple screenings, which is a complicated process. In addition, for the particle size detection of drug particles, screening testing requires high control accuracy, resulting in high testing costs and long testing time. Summary of the invention

[0004] In order to solve the problems raised in the above background technology, the present invention provides a method for online detection of the particle size of solid medicine particles. The present invention also provides a system for online detection of the particle size of solid medicine particles.

[0005] The present invention provides a method for online detection of the particle size of solid drug particles, comprising:

[0006] The cloud server receives the instruction information from the user terminal, and starts the camera device to obtain the solid medicine image according to the instruction information;

[0007] When the camera device collects the image of the solid medicine, it sends a distance measurement instruction to the distance measurement sensor, and fuses the distance value measured by the distance measurement sensor into the image acquired by the camera device;

[0008] The cloud server acquires the solid medicine image, obtains the shape of the solid medicine in the image through image recognition, and counts the solid medicine based on the shape;

[0009] The particle size of the solid medicine is calculated according to the count and the distance value in the image.

[0010] Optionally, the camera device is a high-definition camera.

[0011] Optionally, also include:

[0012] The cloud server sends the calculated particle size of the solid drug particles to the user terminal.

[0013] Optionally, the cloud server, the user terminal and the camera device are connected via the Internet.

[0014] Optionally, obtaining the shape of the solid medicine in the image by image recognition includes:

[0015] Use convolutional neural network to filter pixels in images;

[0016] The boundary of the shape is extracted based on the screened pixels.

[0017] The present invention also provides a system for online detection of particle size of solid drug particles, comprising:

[0018] The command module is used for the cloud server to receive the command information from the user end, and start the camera device to obtain the solid medicine image according to the command information;

[0019] An acquisition module, used for sending a distance measurement instruction to a distance measurement sensor when the camera device acquires the image of the solid medicine, and fusing the distance value measured by the distance measurement sensor in the image acquired by the camera device;

[0020] A processing module, configured for the cloud server to acquire the solid medicine image, obtain the shape of the solid medicine in the image through image recognition, and count the solid medicine based on the shape;

[0021] A calculation module is used to calculate the particle size of the solid medicine according to the count and the distance value in the image.

[0022] Optionally, the camera device is a high-definition camera.

[0023] Optionally, also include:

[0024] The sending module is used for the cloud server to send the solid drug particle size obtained by calculation to the user terminal.

[0025] Optionally, the cloud server, the user terminal and the camera device are connected via the Internet.

[0026] Optionally, obtaining the shape of the solid medicine in the image by image recognition includes:

[0027] Use convolutional neural network to filter pixels in images;

[0028] The boundary of the shape is extracted based on the screened pixels.

[0029] The advantages of the present invention over the prior art are:

[0030] The invention provides a method for online detecting the particle size of solid medicine particles and a medicine particle size detection system. By utilizing image recognition technology, the particle size of the medicine can be determined by only photographing the medicine, and the process is simple and the cost is low. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1It is a flow chart of online detection of solid drug particle size in the present invention.

[0032] Figure 2 It is a flow chart of obtaining the appearance of the solid medicine described in the image in the present invention.

[0033] Figure 3 It is a schematic diagram of the on-line detection system for solid drug particle size in the present invention. DETAILED DESCRIPTION

[0034] The following contents are all examples of specific implementation processes provided for describing in detail the technical solutions to be protected by the present invention. However, the present invention may also be implemented in other ways different from the description. Those skilled in the art may, under the guidance of the concept of the present invention, adopt different technical means to implement the present invention. Therefore, the present invention is not limited to the specific embodiments below.

[0035] The present invention provides a method for online detection of the particle size of solid medicine particles, comprising: a cloud server receives instruction information from a user end, and starts a camera device to acquire a solid medicine image according to the instruction information; when acquiring the solid medicine image, the camera device sends a distance measurement instruction to a distance measurement sensor, and fuses the distance value measured by the distance measurement sensor in the image acquired by the camera device; the cloud server acquires the solid medicine image, obtains the shape of the solid medicine in the image through image recognition, and counts the solid medicine based on the shape; and calculates the particle size of the solid medicine according to the count and the distance value in the image.

[0036] Figure 1 It is a flow chart of online detection of solid drug particle size in the present invention.

[0037] Please refer to Figure 1 As shown, S101 the cloud server receives instruction information from the user terminal, and starts the camera device to obtain the solid medicine image according to the instruction information;

[0038] The user end is an operation and display end, and the user end is connected to the cloud server via a wired or wireless network, for example, the cloud server, the user end and the camera device are connected via the Internet. The operation end can be a mobile phone, a laptop or other handheld device.

[0039] The operating terminal can transmit instruction information to the cloud server according to the instructions input by the operator, and interpret the instruction information to generate control instructions.

[0040] The control instruction will be sent to the camera device, and the camera device will start according to the control instruction and start the shooting task.

[0041] Specifically, the medicine should be spread on a plane, and the color of the plane should be in contrast with the color of the medicine particles. Those skilled in the art can make settings according to actual conditions, wherein at least two different plane colors are used for shooting.

[0042] The tiling method uses a certain frequency of vibration to evenly spread the drug particles on the plane. Then, the camera device starts to capture the plane image of the solid drug particles. Preferably, the camera device is a high-definition camera.

[0043] Please refer to Figure 1 As shown, in S102, when the camera device collects the solid medicine image, it sends a distance measurement instruction to the distance measurement sensor, and integrates the distance value measured by the distance measurement sensor into the image obtained by the camera device.

[0044] A distance measuring sensor is arranged on one side of the camera device, and the distance measuring sensor may be a laser distance measuring sensor. The distance measuring sensor detects distance data from the plane to the camera device.

[0045] Specifically, after the camera device captures the drug particle data, the distance data is added to the data, and the data is encoded in a preset encoding manner to generate a data packet.

[0046] The data packet is sent to a cloud server for decoding to obtain image data and distance data.

[0047] Specifically, the steps of acquiring the image data and distance data are as follows: the camera device starts up after receiving the control instruction, and then takes an image after starting up. Meanwhile, the distance measuring sensor detects whether the camera device is started up, and when it is detected that the camera device has been started up, the first distance measurement is started.

[0048] In addition, when the first shooting is completed, the ranging sensor receives the shooting control instruction sent by the cloud server to the camera device, and performs the second or multiple ranging before the camera device starts shooting.

[0049] S103: The cloud server acquires the solid medicine image, obtains the shape of the solid medicine in the image through image recognition, and counts the solid medicine based on the shape.

[0050] Figure 2 It is a flow chart of obtaining the appearance of the solid medicine described in the image in the present invention.

[0051] Please refer to Figure 2 As shown, S201 uses a convolutional neural network to perform pixel screening on the image.

[0052] Please refer to Figure 2 As shown, S202 extracts the boundary of the shape based on the screened pixels.

[0053] Specifically, the image recognition is performed using a convolutional neural network model, which includes three convolutional layers and a fusion layer, and the steps are as follows:

[0054] The images are respectively composed of at least two images of two plane colors, and each image is input into the convolutional neural network respectively.

[0055] In the convolution layer, the image is converted into a grayscale image, and pixel recognition is performed to assign values ​​to each pixel. The assignment means that a plurality of grayscale value intervals with gradients are set, the grayscale value of each pixel of the grayscale image is detected, and the grayscale value is adjusted to the median of the grayscale value interval in which the grayscale value is located. The gradient refers to a plurality of preset grayscale value thresholds, and the grayscale value interval refers to the continuous grayscale values ​​between two gradients.

[0056] Each convolution layer assigns different grayscale value intervals to the grayscale value to form an assigned image.

[0057] Two valued images are input to the fusion layer, the grayscale values ​​of the two images are read, and the grayscale values ​​with overlapping properties are merged. The overlapping property refers to that the positions of the image pixels with continuous grayscale values ​​are the same.

[0058] The fused assigned image is extracted as a reading image, the shape of the image in the reading image is identified, the shapes that meet the preset shapes are read and counted, and the size of the shapes is measured.

[0059] S104 calculates the particle size of the solid medicine according to the count and the distance value in the image.

[0060] After completing the above steps, two data of the solid drug particles are obtained, one is the quantity, and the other is the size of each drug particle.

[0061] The size of the drug particles is extracted and combined with the distance data to calculate the size of the drug particles. The calculation formula is as follows:

[0062]

[0063] Wherein, A is the actual size of the solid drug particles, m is the number of pixels in a row or column of the captured image within the current viewing angle, L is the distance data, n is the data of the largest row or column of the identified solid drug particles, and λ is the viewing angle of the camera.

[0064] According to the count and the true size, the size of the solid medicine and the proportion occupied are calculated respectively, so as to complete the detection of the particle size of the solid medicine.

[0065] Finally, the cloud server sends the calculated particle size of the solid drug particles to the user terminal.

[0066] The present invention also provides a system for online detection of the particle size of solid medicine particles, which includes an instruction module 301 , a collection module 302 , a processing module 303 , and a calculation module 304 .

[0067] Please refer to Figure 3 As shown, the instruction module 301 is used for the cloud server to receive instruction information from the user end, and start the camera device to obtain the solid medicine image according to the instruction information;

[0068] The user end is an operation and display end, and the user end is connected to the cloud server via a wired or wireless network, for example, the cloud server, the user end and the camera device are connected via the Internet. The operation end can be a mobile phone, a laptop or other handheld device.

[0069] The operating terminal can transmit instruction information to the cloud server according to the instructions input by the operator, and interpret the instruction information to generate control instructions.

[0070] The control instruction will be sent to the camera device, and the camera device will start according to the control instruction and start the shooting task.

[0071] Specifically, the medicine should be spread on a plane, and the color of the plane should be in contrast with the color of the medicine particles. Those skilled in the art can make settings according to actual conditions, wherein at least two different plane colors are used for shooting.

[0072] The tiling method uses a certain frequency of vibration to evenly spread the drug particles on the plane. Then, the camera device starts to capture the plane image of the solid drug particles. Preferably, the camera device is a high-definition camera.

[0073] Please refer to Figure 3 As shown, the acquisition module 302 is used for the camera device to send a distance measurement instruction to the distance measurement sensor when acquiring the solid medicine image, and to fuse the distance value measured by the distance measurement sensor into the image acquired by the camera device.

[0074] A distance measuring sensor is arranged on one side of the camera device, and the distance measuring sensor may be a laser distance measuring sensor. The distance measuring sensor detects distance data from the plane to the camera device.

[0075] Specifically, after the camera device captures the drug particle data, the distance data is added to the data, and the data is encoded in a preset encoding manner to generate a data packet.

[0076] The data packet is sent to a cloud server for decoding to obtain image data and distance data.

[0077] Specifically, the steps of acquiring the image data and distance data are as follows: the camera device starts up after receiving the control instruction, and then takes an image after starting up. Meanwhile, the distance measuring sensor detects whether the camera device is started up, and when it is detected that the camera device has been started up, the first distance measurement is started.

[0078] In addition, when the first shooting is completed, the ranging sensor receives the shooting control instruction sent by the cloud server to the camera device, and performs the second or multiple ranging before the camera device starts shooting.

[0079] Please refer to Figure 3 As shown, the processing module 303 is used for the cloud server to obtain the solid medicine image, obtain the shape of the solid medicine in the image through image recognition, and count the solid medicine based on the shape.

[0080] The processing module comprises:

[0081] The filtering module is used to perform pixel filtering on images using a convolutional neural network.

[0082] An extraction module is used to extract the boundary of the shape based on the screened pixels.

[0083] Specifically, the image recognition is performed using a convolutional neural network model, which includes three convolutional layers and a fusion layer, and the steps are as follows:

[0084] The images are respectively composed of at least two images of two plane colors, and each image is input into the convolutional neural network respectively.

[0085] In the convolution layer, the image is converted into a grayscale image, and pixel recognition is performed to assign values ​​to each pixel. The assignment means that a plurality of grayscale value intervals with gradients are set, the grayscale value of each pixel of the grayscale image is detected, and the grayscale value is adjusted to the median of the threshold interval in which the grayscale value is located.

[0086] Each convolution layer assigns different grayscale value intervals to the grayscale value to form an assigned image.

[0087] Two valued images are input to the fusion layer, the grayscale values ​​of the two images are read, and the grayscale values ​​with overlapping properties are merged. The overlapping property refers to that the positions of the image pixels with continuous grayscale values ​​are the same.

[0088] The fused assigned image is extracted as a reading image, the shape of the image in the reading image is identified, the shape that meets the preset shape is read and counted, and the shape size is measured. The preset shape refers to an image established based on a solid granular drug, including a shape and a size. The preset shape has multiple shapes, which are the shapes of different projection surfaces of the granular drug. Specifically, the acquisition of the preset shape includes: drawing through 3D software, and capturing images according to multiple preset projection surfaces, extracting the image and storing it as the preset shape.

[0089] Please refer to Figure 3 As shown, the calculation module 304 is used to calculate the particle size of the solid medicine according to the count and the distance value in the image.

[0090] After completing the above steps, two data of the solid drug particles are obtained, one is the quantity, and the other is the size of each drug particle.

[0091] The size of the drug particles is extracted and combined with the distance data to calculate the size of the drug particles. The calculation formula is as follows:

[0092]

[0093] Wherein, A is the actual size of the solid drug particles, m is the number of pixels in a row or column of the captured image within the current viewing angle, L is the distance data, n is the data of the largest row or column of the identified solid drug particles, and λ is the viewing angle of the camera.

[0094] According to the count and the true size, the size of the solid medicine and the proportion occupied are calculated respectively, so as to complete the detection of the particle size of the solid medicine.

[0095] Finally, the cloud server sends the calculated particle size of the solid drug particles to the user terminal.

[0096] Although the embodiments of the present invention have been shown and described in the foregoing content of the present invention, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and purpose of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

Claims

1. A method for online detection of solid drug particle size, characterized in that: include: The cloud server receives the instruction information from the user terminal, and starts the camera device to obtain the solid medicine image according to the instruction information; When the camera device collects the image of the solid medicine, it sends a distance measurement instruction to the distance measurement sensor, and fuses the distance value measured by the distance measurement sensor into the image acquired by the camera device; The cloud server acquires the solid medicine image, obtains the shape of the solid medicine in the image through image recognition, and counts the solid medicine based on the shape; Calculating the particle size of the solid medicine according to the count and the distance value in the image, including: Two data of the solid drug particles are obtained, one is the quantity, and the other is the maximum diameter of each drug particle; The size of the drug particles is extracted and combined with the distance value to calculate the true size of the solid drug particles. The calculation formula is as follows: Wherein, A is the actual size of the solid drug particle, m is the number of pixels in a row or column of the image captured within the current viewing angle, L is the distance value, n is the maximum number of pixels in a row or column of the identified solid drug particle, and λ is the viewing angle of the camera; According to the count and the true size, the true size of each solid medicine and the proportion occupied are calculated respectively, so as to complete the detection of the particle size of the solid medicine particles; It also includes: the cloud server sends the calculated solid drug particle size to the user end.

2. The method for online detection of solid drug particle size according to claim 1, characterized in that: The camera device is a high-definition camera.

3. The method for online detection of solid drug particle size according to claim 1, characterized in that: The cloud server, the user terminal and the camera device are connected via the Internet.

4. The method for online detection of solid drug particle size according to claim 1, characterized in that: The step of obtaining the shape of the solid medicine in the image by image recognition comprises: Use convolutional neural network to filter pixels in images; The boundary of the shape is extracted based on the screened pixels.

5. A system for online detection of solid drug particle size, characterized in that: include: The command module is used for the cloud server to receive the command information from the user end, and start the camera device to obtain the solid medicine image according to the command information; An acquisition module, used for sending a distance measurement instruction to a distance measurement sensor when the camera device acquires the image of the solid medicine, and fusing the distance value measured by the distance measurement sensor in the image acquired by the camera device; A processing module, configured for the cloud server to acquire the solid medicine image, obtain the shape of the solid medicine in the image through image recognition, and count the solid medicine based on the shape; A calculation module is used to calculate the particle size of the solid medicine according to the count and the distance value in the image; two data of the solid medicine particles are obtained, one is the number, and the other is the maximum diameter of each medicine particle; The size of the drug particles is extracted and combined with the distance value to calculate the true size of the solid drug particles. The calculation formula is as follows: Wherein, A is the actual size of the solid drug particle, m is the number of pixels in a row or column of the image captured within the current viewing angle, L is the distance value, n is the maximum number of pixels in a row or column of the identified solid drug particle, and λ is the viewing angle of the camera; According to the count and the true size, the true size of each solid medicine and the proportion occupied are calculated respectively, so as to complete the detection of the particle size of the solid medicine particles; It also includes: a sending module, which is used for the cloud server to send the solid drug particle size obtained by calculation to the user end.

6. The system for online detection of solid drug particle size according to claim 5, characterized in that: The camera device is a high-definition camera.

7. The system for online detection of solid drug particle size according to claim 5, characterized in that: The cloud server, the user terminal and the camera device are connected via the Internet.

8. The system for online detection of solid drug particle size according to claim 5, characterized in that: The step of obtaining the shape of the solid medicine in the image by image recognition comprises: Use convolutional neural network to filter pixels in images; The boundary of the shape is extracted based on the screened pixels.

Citation Information

Patent Citations

  • Tablet counting method based on Android

    CN107909596A

  • Method and device for measuring shape and size of object in non-contact mode, and electronic equipment

    CN113781481A