| Medicines are one of the important means used by humans to fight against diseases.The quality of medicines is directly related to the effect of preventing and curing diseases,as well as the safety of patients taking medicines.Both the country and consumers attach great importance to the quality and safety of medicines.The research object in this paper is sodium hyaluronate injection,which is a kind of prefilled injection,which has the advantages of easy and fast operation and more accurate dosage.As the demand for medicines continues to grow,automation and intelligence have become the development trend of medicine detecting system.For the quality inspection of sodium hyaluronate injection,the hidden pains of traditional manual lamp inspection such as low efficiency and high labor cost are becoming increasingly prominent.The machine vision-based sodium hyaluronate injection quality detection algorithm proposed in this paper uses machine vision and image processing technology to complete the injection quality detection requirements and reduce the pressure of manual detection.Therefore,it will provide theoretical support and technical guidance for the automated sodium hyaluronate injection quality detecting instrument.This paper studied the relevant key technology of sodium hyaluronate injection quality detection,analyzed the quality inspection requirements and described the overall scheme of the detection system.In order to obtain the best effect of image collection,according to the characteristics of the detection target and the actual needs of the detection,the key equipment used in image collection was analyzed and selected,and a reasonable lighting scheme was set up to fully prepare for the detection.Then,the first step after medicine images collection is image preprocessing.The preprocessing method includes the method of removing the highlights on the glass bottle,the method of rotating image,in which use Hough transform to detect the straight line at the edge of the glass bottle to calculate the tilt angle,and the method of segmenting and cutting injection images based on projection,so that lays a solid foundation for further defect detection.The quality problems of sodium hyaluronate injection are divided into bottle defects and liquid impurities.Bottle defects include rubber cap defects and rubber plug leakage defects.According to the inspection requirements,a set of injection quality inspection algorithms were designed and the specific ideas were elaborated.First,the method of defect detection for injection bottle is described.By detecting the characteristic corner points and extracting the symmetry axis of the rubber cap,analyzing the position of the points and calculating the angle of the symmetry axis to determine whether the rubber cap is defective.Use the geometric feature statistics of rubber plugs with and without leakage as a reference to detect the plugs defects.This paper focuses on the detection of visible liquid impurities of the sodium hyaluronate injection image.By analyzing the impurities in the liquid,including all kinds of visible small impurities and bubbles.The impurities in the liquid have a small volume and the low contrast,which increase the detection difficulty.Therefore,this paper proposed a new method that combines morphology and structure similarity to improve the saliency of low-contrast small targets in the liquid image.Bilateral filtering is used to suppress the image background,and the iterative method is used to obtain the optimal segmentation threshold to realize the detection of impurities in liquid.And through the experiments to quantitatively evaluate and analyze the low contrast small target detection algorithm,thus proving the effectiveness of the algorithm in this paper.In addition,support vector machine(SVM)is used as a classifier to classify and recognize the impurities in sodium hyaluronate injection.To obtain the best parameters to train the model through cross-validation,and to select reliable and important features according to the classification accuracy.The classification experiment has achieved ideal results,which provides a basis for removing the injections containing liquid impurities.Finally,the research work of this paper is summarized,and the future research space related to this paper is prospected. |