Font Size: a A A

Research On The Key Technology Of Drug Packaging Detection Based On Machine Vision

Posted on:2022-05-12Degree:MasterType:Thesis
Country:ChinaCandidate:B S ZhaoFull Text:PDF
GTID:2491306338978339Subject:Mechanical and electrical engineering
Abstract/Summary:PDF Full Text Request
At present,most domestic pharmaceutical equipment manufacturers generally adopt foreign machine vision systems or manual inspection methods to detect defects in pharmaceutical packaging.The method of manual visual inspection is easily affected by the inspection personnel’s own conditions.This method has low inspection efficiency and high cost.It not only wastes a lot of labor resources,but also the quality of drug packaging cannot be fundamentally guaranteed.Using a vision system to replace humans for defect detection of pharmaceutical packaging can improve production efficiency and reduce costs.However,the introduction of mature machine vision systems from abroad is very expensive and the cost is too high.Therefore,it is of great significance to study drug packaging inspection technology based on machine vision.In this paper,different detection methods are designed for two different types of drugs,tablets and capsules,and the reliability of the algorithm is verified through experiments.The main research is as follows:(1)The camera,lens,light source and industrial computer were selected according to the working distance and field of view of the drug packaging defect detection,and a drug packaging detection device was built in the laboratory.(2)In order to reduce the amount of detection calculations and improve the detection accuracy,an algorithm based on least squares fitting of the medicine board image area extraction algorithm is adopted.This algorithm can obtain the accurate medicine board area faster and reduce the detection range.Meet the requirements of real-time detection.(3)For capsule-type drugs,through comparing various methods,a drug packaging inspection program based on the block Otsu algorithm under the Lab color space is finally designed.First,the slab-shaped capsule image extracted by least square fitting is preprocessed in Lab color space by grayscale transformation,histogram equalization,and filtering.After experimental comparison,a mean filter and grayscale are used.Linear transformation combined denoising preprocessing method;Secondly,several typical region segmentation methods are analyzed.The bimodal method,adaptive iterative method,region growing method,edge detection method,and Otsu algorithm segmentation all have certain deficiencies.Aiming at the deficiencies of the Otsu algorithm in eliminating noise residuals,a block-based Otsu method is proposed to segment the capsule image,and the morphological opening operation is incorporated to properly denoise the segmented image;finally,it is judged in each image.The maximum gray value and the size of the connected domain area determine whether the medicine is qualified.(4)For the medicine of the tablet type,a medicine packaging inspection scheme based on the template fusion block threshold is designed.The algorithm mainly includes two aspects:the acquisition of template threshold and the defect detection of slab tablets.In terms of obtaining the template threshold,firstly,the template image of the tablet-shaped pill extracted by least square fitting is transferred from the RGB color space to the Lab color space,and then image preprocessing operations such as gray value linear transformation are performed,and then the template fusion is used.The block threshold segmentation method divides the template image into several blocks and obtains the template threshold,and adds it to the template feature library.In terms of defect detection of slab tablets,the image of slab tablets to be tested extracted by least square fitting is preprocessed,segmented by threshold segmentation,and the template threshold stored in the template feature library is called to apply to the tiles to be tested.In the block threshold segmentation,by judging the number of connected domains in each area to determine whether there are defects in the plate-shaped medicine.
Keywords/Search Tags:machine vision, drug packaging testing, block threshold of template fusion, block Otsu, defect identification
PDF Full Text Request
Related items