CN111250429B - Method and device for detecting sealing defect - Google Patents

Method and device for detecting sealing defect Download PDF

Info

Publication number
CN111250429B
CN111250429B CN202010044176.2A CN202010044176A CN111250429B CN 111250429 B CN111250429 B CN 111250429B CN 202010044176 A CN202010044176 A CN 202010044176A CN 111250429 B CN111250429 B CN 111250429B
Authority
CN
China
Prior art keywords
medicine
image data
data
defect detection
detection result
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
Application number
CN202010044176.2A
Other languages
Chinese (zh)
Other versions
CN111250429A (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.)
Shenzhen Zhongtou Huaxun Terahertz Technology Co ltd
Original Assignee
Shenzhen Huaxun Ark Photoelectric Technology Co ltd
Shenzhen Institute of Terahertz Technology and Innovation
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 Shenzhen Huaxun Ark Photoelectric Technology Co ltd, Shenzhen Institute of Terahertz Technology and Innovation filed Critical Shenzhen Huaxun Ark Photoelectric Technology Co ltd
Priority to CN202010044176.2A priority Critical patent/CN111250429B/en
Publication of CN111250429A publication Critical patent/CN111250429A/en
Application granted granted Critical
Publication of CN111250429B publication Critical patent/CN111250429B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B07SEPARATING SOLIDS FROM SOLIDS; SORTING
    • B07CPOSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
    • B07C5/00Sorting according to a characteristic or feature of the articles or material being sorted, e.g. by control effected by devices which detect or measure such characteristic or feature; Sorting by manually actuated devices, e.g. switches
    • B07C5/34Sorting according to other particular properties
    • B07C5/342Sorting according to other particular properties according to optical properties, e.g. colour
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/89Investigating the presence of flaws or contamination in moving material, e.g. running paper or textiles
    • G01N21/892Investigating the presence of flaws or contamination in moving material, e.g. running paper or textiles characterised by the flaw, defect or object feature examined
    • 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
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • 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/20084Artificial neural networks [ANN]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Textile Engineering (AREA)
  • Health & Medical Sciences (AREA)
  • Quality & Reliability (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The application belongs to the technical field of medicine detection, and provides a method and a device for detecting sealing defects, wherein the method comprises the following steps: collecting spectrum data of the medicine through an optical spectrometer; the spectral data includes surface information, thickness information, and internal characteristic information of an encapsulated region of the drug; converting the spectrum data into image data, inputting the image data into a defect detection model, and detecting the tightness of the encapsulated medicine to obtain a detection result; and if the detection result is unqualified, screening out the medicine. The embodiment of the application solves the problem that the medicine with poor tightness caused by the problem of encapsulation thickness or the inherent problem cannot be detected.

Description

Method and device for detecting sealing defect
Technical Field
The application relates to the technical field of medicine detection, in particular to a method and a device for detecting sealing defects.
Background
For medicines, a layer of glue is wrapped at the joint in the middle of the medicine to ensure good sealing performance, and medicine in the medicine can be leaked and oxidized due to poor sealing performance, so that the efficacy and the shelf life of the medicine are affected, and therefore, the detection of the sealing performance of the medicine is also important for the detection of the wrapped layer of glue.
In the prior art, the tightness of the medicine is usually detected by a machine vision method, namely, an encapsulated area of the medicine is photographed by a common photographing device. Firstly, image enhancement segmentation defects are carried out by using a custom template, and then, identification and classification of the defects are carried out by using a tree classifier according to the defect characteristics. However, the method can only detect the defects on the encapsulation surface of the medicine capsule, and has no capability on the thickness and the internal characteristics of the encapsulation of the medicine capsule. Drugs with poor sealability due to encapsulation thickness problems or inherent problems cannot be detected.
Disclosure of Invention
In view of the above, the embodiments of the present application provide a method and an apparatus for detecting a sealing defect, so as to solve the problem that a drug with poor sealing property due to the problem of encapsulation thickness or the inherent problem cannot be detected.
A first aspect of an embodiment of the present application provides a method for detecting a seal defect, including:
collecting spectrum data of the medicine through an optical spectrometer; the spectral data includes surface information, thickness information, and internal characteristic information of an encapsulated region of the drug;
converting the spectrum data into image data, inputting the image data into a defect detection model, and detecting the tightness of the encapsulated medicine to obtain a detection result;
and if the detection result is unqualified, screening out the medicine.
In one embodiment, the converting the spectrum data into image data and inputting the image data into a defect detection model to detect encapsulation tightness of the drug to obtain a detection result includes:
after inputting the image data into a defect detection model, extracting a multi-scale characteristic image of the image data;
and carrying out image classification according to the multi-scale characteristic images to obtain detection results.
In one embodiment, before collecting the spectral data of the drug by the optical spectrometer, further comprising:
performing sealing defect detection training on the defect detection model according to training data; the training data includes a drug image sample having external or internal encapsulation defects.
In one embodiment, the converting the spectrum data into image data and inputting the image data into a defect detection model to detect encapsulation tightness of the drug to obtain a detection result includes:
the spectral data is converted into image data by fourier transformation.
In one implementation example, screening the drug if the detection result is failed includes:
if the detection result is unqualified, the medicine is removed from the coating furnace by controlling a motor.
A second aspect of an embodiment of the present application provides a device for detecting a seal defect, including:
the spectrum data acquisition module is used for acquiring spectrum data of the medicine through the optical spectrometer; the spectral data includes surface information, thickness information, and internal characteristic information of an encapsulated region of the drug;
the sealing defect detection module is used for converting the spectrum data into image data, inputting the image data into a defect detection model, and detecting the sealing property of the encapsulated medicine to obtain a detection result;
and the medicine screening module is used for screening the medicines if the detection result is unqualified.
In one implementation example, the seal defect detection module includes:
the multi-scale characteristic image extraction unit is used for extracting multi-scale characteristic images of the image data after the image data are input into a defect detection model;
and the detection unit is used for carrying out image classification according to the multi-scale characteristic images to obtain detection results.
In one implementation example, the apparatus further comprises:
the model training module is used for carrying out sealing defect detection training on the defect detection model according to training data; the training data includes a drug image with external or internal encapsulation defects.
In one implementation example, the medication screening module includes:
and the rejecting unit is used for rejecting the medicine from the coating furnace by controlling the motor if the detection result is unqualified.
A third aspect of an embodiment of the present application provides a device for detecting a seal defect, including: the sealing defect detection device comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the sealing defect detection method in the first aspect when executing the computer program.
According to the method and the device for detecting the sealing defect, provided by the embodiment of the application, spectrum data of a medicine is collected through an optical spectrometer; the spectral data includes surface information, thickness information, and internal characteristic information of an encapsulated region of the drug; converting the spectrum data into image data, inputting the image data into a defect detection model, and detecting the tightness of the encapsulated medicine to obtain a detection result; and if the detection result is unqualified, screening out the medicine. And acquiring surface information, thickness information and internal characteristic information of an encapsulation area of the medicine by using a spectrometer to obtain spectrum data. And converting the obtained spectrum data into image data, inputting the image data into a defect detection model, and detecting the sealing defect of the encapsulation area of the medicine to obtain a detection result. Because the image data obtained through conversion according to the spectrum data also contains the surface information, the thickness information and the internal characteristic information of the encapsulation area of the medicine, the defect detection model can detect the encapsulation thickness and the internal characteristic of the medicine, and the accuracy of detecting the sealing defect of the encapsulated medicine is improved. The medicines with unqualified detection results are timely screened out according to the obtained detection results.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments or the description of the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for detecting a seal defect according to an embodiment of the application;
FIG. 2 is a flow chart of a method for detecting a seal defect according to a second embodiment of the present application;
FIG. 3 is a schematic structural diagram of a device for detecting a seal defect according to a third embodiment of the present application;
fig. 4 is a schematic structural diagram of a device for detecting a seal defect according to a fourth embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution of an embodiment of the present application will be clearly described below with reference to the accompanying drawings in the embodiment of the present application, and it is apparent that the described embodiment is a part of the embodiment of the present application, but not all the embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
The term "comprising" in the description of the application and the claims and in the above figures and any variants thereof is intended to cover a non-exclusive inclusion. For example, a process, method, or system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed but may optionally include additional steps or elements not listed or inherent to such process, method, article, or apparatus. Furthermore, the terms "first," "second," and "third," etc. are used for distinguishing between different objects and not for describing a particular sequential order.
Example 1
Fig. 1 is a schematic flow chart of a method for detecting a seal defect according to an embodiment of the application. The embodiment is applicable to application scenes of detecting the sealing defect of the encapsulated medicine, the method can be executed by a device for detecting the sealing defect, and the device can be a processor, an intelligent terminal, a tablet or a PC (personal computer) and the like; in the embodiment of the application, a detection device for sealing defects is taken as an execution main body for explanation, and the method specifically comprises the following steps:
s110, collecting spectrum data of the medicine through an optical spectrometer; the spectral data includes surface information, thickness information, and internal characteristic information of an encapsulated region of the drug;
since the tightness of encapsulated drugs is usually detected in the prior art by means of machine vision, the encapsulated areas of the drug are photographed by means of a common photographing device. The scheme can only detect the defects on the surface of the medicine capsule encapsulation, and cannot meet the thickness and internal characteristics of the medicine capsule encapsulation. To solve this problem, the embodiment uses a spectrometer to collect spectrum data of the encapsulated drug (for example, the encapsulated drug capsule at the middle joint) by optical coherence tomography to obtain surface information, thickness information and internal characteristic information of the encapsulated region of the drug. And then converting the spectrum data containing the surface information, thickness information and internal characteristic information of the encapsulated area of the drug into image data and inputting the image data into a defect detection model to detect the tightness of the encapsulated drug.
Specifically, since the encapsulation process of the drug can be performed in the coating furnace, a spectrometer can be provided to collect spectral data for each encapsulated drug produced in the coating furnace. Alternatively, the spectrometer uses Optical Coherence Tomography (OCT) to scan the encapsulated drug. In the spectrometer, light emitted from a broadband SLD light source is split into sample light and reference light by a fiber coupler or a splitting prism. And the reference light emitted by the spectrometer is reflected back to the spectrometer through the reflector, the encapsulated area of the medicine to be detected is irradiated by the sample light emitted by the spectrometer, and the depth information of the encapsulated area of the medicine is acquired. The sample light scattered back to the spectrometer by the drug to be detected and the reference light are interfered at the spectrometer to form an interference spectrum, so that spectrum data containing surface information, thickness information and internal characteristic information of an encapsulated region of the drug is obtained.
S120, converting the spectrum data into image data, and inputting the image data into a defect detection model to detect the tightness of the encapsulated medicine to obtain a detection result;
after the spectrum data containing the surface information, the thickness information and the internal characteristic information of the encapsulated area of the medicine are acquired, the acquired spectrum data are converted into image data, so that the tightness defect detection is carried out according to the surface information, the thickness information and the internal characteristic information of the encapsulated area of the medicine in the spectrum data. And inputting the image data obtained through the spectrum data conversion into a pre-trained defect detection model, so that the defect detection model detects the tightness of the encapsulated medicine according to the input image data to obtain a detection result.
In one implementation example, the specific process of converting the acquired spectral data into image data may be: the spectral data is converted into image data by fourier transformation, thereby obtaining three-dimensional image data containing surface information, thickness information and internal characteristic information of the encapsulated region of the drug.
In one implementation example, the specific process of inputting the image data into the defect detection model to detect the tightness of the encapsulated drug to obtain the detection result may be: after inputting the image data into a defect detection model, extracting a multi-scale characteristic image of the image data; and carrying out image classification according to the multi-scale characteristic images to obtain detection results.
Specifically, in order to adapt to the size specification among different medicines, after the image data is input into a defect detection model, multi-scale characteristic image extraction can be performed on the input image data through a multi-scale characteristic convolution network in the defect detection model. Optionally, the multi-scale feature convolution network in the defect detection model may use an SSD network structure (Single Shot MultiBox Detector) to perform multi-scale convolution on the input image data through prior frames with different scales and aspect ratios to obtain a multi-scale feature image. The resulting large scale profile (the front profile) can be used to detect smaller size medications, while the small scale profile (the rear profile) can be used to detect larger size medications. And the SSD network structure can adopt a VGG16 network as a basic model, and then a plurality of convolution layers are added on the basis of the VGG16 to obtain more characteristic diagrams.
After the input image data is extracted into the multi-scale characteristic image, the extracted multi-scale characteristic image can be subjected to image classification through a classification network of the defect detection model to obtain a detection result. The detection result can be qualified, the encapsulation is too thick, the encapsulation is too thin, encapsulation is not carried out, the encapsulation position is offset, and the like. Optionally, the specific process of performing image classification according to the multi-scale feature image to obtain a detection result may be: and inputting the multi-scale characteristic image into a full-connection layer of the defect detection model for image classification to obtain classification data. And then calculating the probability of the classified data through a classifier to determine a classification result, namely a detection result. Alternatively, the classifier may be a softmax classification function. And converting classification results of detection results such as preset qualification, over-thick encapsulation, over-thin encapsulation, no encapsulation, encapsulation position deviation and the like into probabilities through a softmax classification function, outputting the classification result with the highest probability, and finishing the leak tightness defect detection of the encapsulated medicine.
And S130, screening out the medicine if the detection result is unqualified.
And converting the acquired spectrum data into image data, inputting the image data into a defect detection model to detect the tightness of the encapsulated medicine to obtain a detection result, and detecting the sealing defect of the encapsulated medicine produced by the next coating furnace if the detection result is qualified. If the detection result output by the defect detection model is the detection result of over-thick encapsulation, over-thin encapsulation, no encapsulation, encapsulation position deviation and the like, the detection result of the medicine is judged to be unqualified, and the medicine can be screened out from the production line.
In an implementation example, if the detection result is not qualified, the specific process of screening the drug may be: if the detection result is unqualified, the medicine is removed from the coating furnace by controlling a motor. Optionally, the sealing defect detecting device may be further connected to a motor, and when the detection result output by the defect detecting model is unqualified, the sealing defect detecting device may reject the drug from the coating furnace by controlling the motor.
According to the detection method of the sealing defect, provided by the embodiment of the application, spectrum data of a medicine is collected through an optical spectrometer; the spectral data includes surface information, thickness information, and internal characteristic information of an encapsulated region of the drug; converting the spectrum data into image data, inputting the image data into a defect detection model, and detecting the tightness of the encapsulated medicine to obtain a detection result; and if the detection result is unqualified, screening out the medicine. And acquiring surface information, thickness information and internal characteristic information of an encapsulation area of the medicine by using a spectrometer to obtain spectrum data. And converting the obtained spectrum data into image data, inputting the image data into a defect detection model, and detecting the sealing defect of the encapsulation area of the medicine to obtain a detection result. Because the image data obtained through conversion according to the spectrum data also contains the surface information, the thickness information and the internal characteristic information of the encapsulation area of the medicine, the defect detection model can detect the encapsulation thickness and the internal characteristic of the medicine, and the accuracy of detecting the sealing defect of the encapsulated medicine is improved. The medicines with unqualified detection results are timely screened out according to the obtained detection results.
Example two
Fig. 2 is a schematic flow chart of a method for detecting a seal defect according to a second embodiment of the present application. On the basis of the first embodiment, the present embodiment further provides a training process of the defect detection model, so as to realize accurate detection of the leak tightness defect of the encapsulated drug. The method specifically comprises the following steps:
s210, performing sealing defect detection training on the defect detection model according to training data; the training data includes a drug image sample having external or internal encapsulation defects;
when the defect detection model is trained by training data to build the model, the training data may include a drug image sample with external or internal encapsulated defects. Alternatively, the drug image samples with external or internal encapsulation defects may include drug image samples that are over-thick, over-thin, without encapsulation, and with offset encapsulation positions, etc. The training data also includes image samples of encapsulated qualified drugs. The preset detection results can comprise detection results of qualification, over-thick encapsulation, over-thin encapsulation, no encapsulation, encapsulation position deviation and the like. Therefore, after the defect detection model generated through training of the training data detects the input image data, the output classification result is one detection result of the preset detection results.
Since the pre-trained defect detection model used in the first embodiment may be a convolutional neural network model, it may be generated by training data. If the data volume of the training data is insufficient, the sample data volume can be expanded by a plurality of data online expansion methods such as overturn, horizontal offset, color change and the like. Specifically, the overturn expansion method is to randomly horizontally, vertically or horizontally and vertically overturn the sample picture to generate a new picture; the horizontal offset expansion method is to randomly translate 1-5 pixels leftwards or rightwards on the basis of original pictures of a sample picture to generate a new picture; the color change expansion method is to generate a new picture by changing the brightness (positive and negative deviation 30), contrast (scaling 0.9-1.1), chromaticity (positive and negative deviation 0.2) and saturation (scaling 0.9-1.1) of the sample picture. The data amount of the samples in the training data is equalized after a sufficient amount of sample data is obtained.
S220, collecting spectrum data of the medicine through an optical spectrometer; the spectral data includes surface information, thickness information, and internal characteristic information of an encapsulated region of the drug;
and (3) performing spectrum data acquisition on the encapsulated medicine (for example, the encapsulated medicine capsule at the middle joint) by adopting a spectrometer through an optical coherence tomography technology to obtain the surface information, the thickness information and the internal characteristic information of the encapsulated area of the medicine.
S230, converting the spectrum data into image data, and inputting the image data into a defect detection model to detect the tightness of the encapsulated medicine to obtain a detection result;
after the spectrum data containing the surface information, the thickness information and the internal characteristic information of the encapsulated area of the medicine are acquired, the acquired spectrum data are converted into image data, so that the tightness defect detection is carried out according to the surface information, the thickness information and the internal characteristic information of the encapsulated area of the medicine in the spectrum data. And inputting the image data obtained through the spectrum data conversion into a pre-trained defect detection model, so that the defect detection model detects the tightness of the encapsulated medicine according to the input image data to obtain a detection result.
S240, screening out the medicine if the detection result is unqualified.
And converting the acquired spectrum data into image data, inputting the image data into a defect detection model to detect the tightness of the encapsulated medicine to obtain a detection result, and detecting the sealing defect of the encapsulated medicine produced by the next coating furnace if the detection result is qualified. If the detection result output by the defect detection model is the detection result of over-thick encapsulation, over-thin encapsulation, no encapsulation, encapsulation position deviation and the like, the detection result of the medicine is judged to be unqualified, and the medicine can be screened out from the production line.
Example III
Fig. 3 shows a device for detecting a seal defect according to a third embodiment of the present application. On the basis of the first embodiment, the embodiment of the application also provides a device 3 for detecting a sealing defect, which comprises:
a spectrum data acquisition module 301, configured to acquire spectrum data of a drug through an optical spectrometer; the spectral data includes surface information, thickness information, and internal characteristic information of an encapsulated region of the drug;
the sealing defect detection module 302 is configured to convert the spectrum data into image data, and input the image data into a defect detection model to detect the tightness of the encapsulated drug to obtain a detection result;
and the medicine screening module 303 is configured to screen out the medicine if the detection result is not qualified.
In one implementation example, the seal defect detection module 302 includes:
the multi-scale characteristic image extraction unit is used for extracting multi-scale characteristic images of the image data after the image data are input into a defect detection model;
and the detection unit is used for carrying out image classification according to the multi-scale characteristic images to obtain detection results.
In one implementation example, the apparatus further comprises:
the model training module is used for carrying out sealing defect detection training on the defect detection model according to training data; the training data includes a drug image with external or internal encapsulation defects.
In one implementation example, the drug screening module 303 includes:
and the rejecting unit is used for rejecting the medicine from the coating furnace by controlling the motor if the detection result is unqualified.
According to the detection device for the sealing defect, provided by the embodiment of the application, spectrum data of a medicine is collected through an optical spectrometer; the spectral data includes surface information, thickness information, and internal characteristic information of an encapsulated region of the drug; converting the spectrum data into image data, inputting the image data into a defect detection model, and detecting the tightness of the encapsulated medicine to obtain a detection result; and if the detection result is unqualified, screening out the medicine. And acquiring surface information, thickness information and internal characteristic information of an encapsulation area of the medicine by using a spectrometer to obtain spectrum data. And converting the obtained spectrum data into image data, inputting the image data into a defect detection model, and detecting the sealing defect of the encapsulation area of the medicine to obtain a detection result. Because the image data obtained through conversion according to the spectrum data also contains the surface information, the thickness information and the internal characteristic information of the encapsulation area of the medicine, the defect detection model can detect the encapsulation thickness and the internal characteristic of the medicine, and the accuracy of detecting the sealing defect of the encapsulated medicine is improved. The medicines with unqualified detection results are timely screened out according to the obtained detection results.
Example III
Fig. 4 is a schematic structural diagram of a device for detecting a seal defect according to a third embodiment of the present application. The device for detecting the sealing defect comprises: a processor 41, a memory 42 and a computer program 43 stored in the memory 42 and executable on the processor 41, for example a program for a method of detecting a sealing defect. The processor 41 performs steps in the above-described embodiment of the method for detecting a seal defect, such as steps S110 to S140 shown in fig. 1, when executing the computer program 43.
Illustratively, the computer program 43 may be partitioned into one or more modules that are stored in the memory 42 and executed by the processor 41 to complete the present application. The one or more modules may be a series of computer program instruction segments capable of performing a specific function for describing the execution of the computer program 43 in the means for detecting a seal defect. For example, the computer program 43 may be divided into a spectral data acquisition module, a seal defect detection module and a drug screening module, each of which functions specifically as follows:
the spectrum data acquisition module is used for acquiring spectrum data of the medicine through the optical spectrometer; the spectral data includes surface information, thickness information, and internal characteristic information of an encapsulated region of the drug;
the sealing defect detection module is used for converting the spectrum data into image data, inputting the image data into a defect detection model, and detecting the sealing property of the encapsulated medicine to obtain a detection result;
and the medicine screening module is used for screening the medicines if the detection result is unqualified.
The means for detecting a seal defect may include, but is not limited to, a processor 41, a memory 42, and a computer program 43 stored in the memory 42. It will be appreciated by those skilled in the art that fig. 4 is merely an example of a seal defect detection apparatus, and is not intended to be limiting, and may include more or fewer components than shown, or may be combined with certain components, or different components, e.g., the seal defect detection apparatus may further include an input/output device, a network access device, a bus, etc.
The processor 41 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 42 may be an internal storage unit of the seal defect detecting device, for example, a hard disk or a memory of the seal defect detecting device. The memory 42 may also be an external storage device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the detecting device of the seal defect. Further, the memory 42 may also include both an internal memory unit and an external memory device of the seal defect detection device. The memory 42 is used to store the computer program and other programs and data required for the method of detecting a seal defect. The memory 42 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other manners. For example, the apparatus/terminal device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (5)

1. A method of detecting a seal defect, comprising:
collecting spectral data comprising surface information, thickness information and internal characteristic information of an encapsulated region of a drug by an optical spectrometer;
converting the spectrum data into image data, inputting the image data into a defect detection model, and detecting the tightness of the encapsulated medicine to obtain a detection result;
if the detection result is unqualified, screening out the medicine;
the step of converting the spectrum data into image data, inputting the image data into a defect detection model, and detecting encapsulation tightness of the medicine to obtain a detection result, wherein the detection result comprises the following steps:
after inputting the image data into a defect detection model, extracting a multi-scale characteristic image of the image data;
performing image classification according to the multi-scale characteristic images to obtain detection results;
before collecting the spectral data of the drug by the optical spectrometer, further comprising:
performing sealing defect detection training on the defect detection model according to training data; the training data includes a drug image sample having external or internal encapsulation defects;
the step of converting the spectrum data into image data, inputting the image data into a defect detection model, and detecting encapsulation tightness of the medicine to obtain a detection result, wherein the detection result comprises the following steps:
the spectral data is converted into image data by fourier transformation.
2. The method for detecting a seal defect according to claim 1, wherein if the detection result is failed, screening out the medicine comprises:
if the detection result is unqualified, the medicine is removed from the coating furnace by controlling a motor.
3. A seal defect detection apparatus, comprising:
the spectrum data acquisition module is used for acquiring spectrum data comprising surface information, thickness information and internal characteristic information of an encapsulated area of the medicine through the optical spectrometer;
the sealing defect detection module is used for converting the spectrum data into image data, inputting the image data into a defect detection model, and detecting the sealing property of the encapsulated medicine to obtain a detection result;
the medicine screening module is used for screening the medicines if the detection result is unqualified;
the sealing defect detection module comprises:
the multi-scale characteristic image extraction unit is used for extracting multi-scale characteristic images of the image data after the image data are input into a defect detection model;
the detection unit is used for carrying out image classification according to the multi-scale characteristic images to obtain detection results;
the apparatus further comprises:
the model training module is used for carrying out sealing defect detection training on the defect detection model according to training data; the training data includes a drug image having external or internal encapsulation defects;
the step of converting the spectrum data into image data, inputting the image data into a defect detection model, and detecting encapsulation tightness of the medicine to obtain a detection result, wherein the detection result comprises the following steps:
the spectral data is converted into image data by fourier transformation.
4. A seal defect detection device as recited in claim 3, wherein the medication screening module comprises:
and the rejecting unit is used for rejecting the medicine from the coating furnace by controlling the motor if the detection result is unqualified.
5. A sealing defect detection device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the sealing defect detection method according to any one of claims 1 to 2 when executing the computer program.
CN202010044176.2A 2020-01-15 2020-01-15 Method and device for detecting sealing defect Active CN111250429B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010044176.2A CN111250429B (en) 2020-01-15 2020-01-15 Method and device for detecting sealing defect

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010044176.2A CN111250429B (en) 2020-01-15 2020-01-15 Method and device for detecting sealing defect

Publications (2)

Publication Number Publication Date
CN111250429A CN111250429A (en) 2020-06-09
CN111250429B true CN111250429B (en) 2023-08-25

Family

ID=70944021

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010044176.2A Active CN111250429B (en) 2020-01-15 2020-01-15 Method and device for detecting sealing defect

Country Status (1)

Country Link
CN (1) CN111250429B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101713731A (en) * 2009-11-09 2010-05-26 北京中医药大学 Method for distinguishing coating quality of medicine preparation
CN102711713A (en) * 2009-11-13 2012-10-03 比利时胶囊公司 Method of inspection of sealed capsules with a process of determination of the quality of the seal and related equipment for in-line inspection
CN104523436A (en) * 2014-12-23 2015-04-22 安徽科鸣三维科技有限公司 Automatic capsule filling and detecting method based on machine vision
CN105600034A (en) * 2016-01-17 2016-05-25 陈吉美 Photoelectric detection pharmacy production line
CN106290386A (en) * 2016-08-25 2017-01-04 宁夏共享机床辅机有限公司 A kind of sealing quantitative NDT method based on image procossing
CN208390467U (en) * 2018-03-17 2019-01-18 成都奥康药用胶囊有限公司 A kind of capsule manufacture real-time vision detection device
CN109377457A (en) * 2018-09-28 2019-02-22 河北华讯方舟太赫兹技术有限公司 Pill is coated image processing method, device, computer equipment and storage medium
CN109894388A (en) * 2019-04-23 2019-06-18 无锡传奇科技有限公司 A kind of soft capsule automatic checkout system
CN110570422A (en) * 2019-09-18 2019-12-13 中国计量大学 Capsule defect visual detection method based on matrix analysis

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101713731A (en) * 2009-11-09 2010-05-26 北京中医药大学 Method for distinguishing coating quality of medicine preparation
CN102711713A (en) * 2009-11-13 2012-10-03 比利时胶囊公司 Method of inspection of sealed capsules with a process of determination of the quality of the seal and related equipment for in-line inspection
CN104523436A (en) * 2014-12-23 2015-04-22 安徽科鸣三维科技有限公司 Automatic capsule filling and detecting method based on machine vision
CN105600034A (en) * 2016-01-17 2016-05-25 陈吉美 Photoelectric detection pharmacy production line
CN106290386A (en) * 2016-08-25 2017-01-04 宁夏共享机床辅机有限公司 A kind of sealing quantitative NDT method based on image procossing
CN208390467U (en) * 2018-03-17 2019-01-18 成都奥康药用胶囊有限公司 A kind of capsule manufacture real-time vision detection device
CN109377457A (en) * 2018-09-28 2019-02-22 河北华讯方舟太赫兹技术有限公司 Pill is coated image processing method, device, computer equipment and storage medium
CN109894388A (en) * 2019-04-23 2019-06-18 无锡传奇科技有限公司 A kind of soft capsule automatic checkout system
CN110570422A (en) * 2019-09-18 2019-12-13 中国计量大学 Capsule defect visual detection method based on matrix analysis

Also Published As

Publication number Publication date
CN111250429A (en) 2020-06-09

Similar Documents

Publication Publication Date Title
CN110060237B (en) Fault detection method, device, equipment and system
TWI701605B (en) Living body detection method, device and computer readable storage medium
CN107665491B (en) Pathological image identification method and system
JP6868119B2 (en) Holographic anti-counterfeit code inspection method and equipment
CN106503724A (en) Grader generating means, defective/zero defect determining device and method
CN111444744A (en) Living body detection method, living body detection device, and storage medium
CN110827371B (en) Certificate generation method and device, electronic equipment and storage medium
CN112329702B (en) Method and device for rapid face density prediction and face detection, electronic equipment and storage medium
CN110909640A (en) Method and device for determining water level line, storage medium and electronic device
CN106530311B (en) Sectioning image processing method and processing device
CN110276831B (en) Method and device for constructing three-dimensional model, equipment and computer-readable storage medium
CN107172354A (en) Method for processing video frequency, device, electronic equipment and storage medium
CN111784675A (en) Method and device for processing article texture information, storage medium and electronic equipment
CN113240606B (en) Traditional Chinese medicine inspection image color correction method and system
CN110570442A (en) Contour detection method under complex background, terminal device and storage medium
CN111539311A (en) Living body distinguishing method, device and system based on IR and RGB double photographing
CN112700376B (en) Moire pattern removing method and device for image, terminal equipment and storage medium
CN113505682A (en) Living body detection method and device
CN111127358A (en) Image processing method, device and storage medium
CN116249015A (en) Camera shielding detection method and device, camera equipment and storage medium
CN108769521B (en) Photographing method, mobile terminal and computer readable storage medium
CN114170652A (en) Face image detection method and device, terminal equipment and storage medium
CN111250429B (en) Method and device for detecting sealing defect
CN110765875B (en) Method, equipment and device for detecting boundary of traffic target
CN116993654B (en) Camera module defect detection method, device, equipment, storage medium and product

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
TA01 Transfer of patent application right

Effective date of registration: 20230728

Address after: 408, Building 37, Chentian Industrial Zone, Chentian Community, Xixiang Street, Bao'an District, Shenzhen City, Guangdong Province, 518000

Applicant after: SHENZHEN INSTITUTE OF TERAHERTZ TECHNOLOGY AND INNOVATION Co.,Ltd.

Applicant after: Shenzhen Huaxun ark Photoelectric Technology Co.,Ltd.

Address before: 518000 East, 2nd floor, building 37, chentian Industrial Zone, Baotian 1st Road, Xixiang street, Bao'an District, Shenzhen City, Guangdong Province

Applicant before: SHENZHEN INSTITUTE OF TERAHERTZ TECHNOLOGY AND INNOVATION Co.,Ltd.

Applicant before: CHINA COMMUNICATION TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240729

Address after: Room 430, Building 37, Chentian Industrial Zone, Baotian 1st Road, Xixiang Street, Bao'an District, Shenzhen City, Guangdong Province 518100

Patentee after: Shenzhen Zhongtou Huaxun Terahertz Technology Co.,Ltd.

Country or region after: China

Address before: 408, Building 37, Chentian Industrial Zone, Chentian Community, Xixiang Street, Bao'an District, Shenzhen City, Guangdong Province, 518000

Patentee before: SHENZHEN INSTITUTE OF TERAHERTZ TECHNOLOGY AND INNOVATION Co.,Ltd.

Country or region before: China

Patentee before: Shenzhen Huaxun ark Photoelectric Technology Co.,Ltd.

TR01 Transfer of patent right