| XiLin injection is one of the commonly used drugs,and its safety will be related to the health of patients.However,in the production of XiLin injection,it is inevitable that it will be mixed with visible foreign substances such as rubber,glass etc.In the production of XiLin injection,the foreign substances detection rate is related to the patient’s health and safety.Commonly used liquid detection methods for foreign substances detection in complex medical automation scenarios have problems such as high missed detection rate and high false detection rate.This article focuses on the above problems,and the foreign substances detection method in this paper has been verified through experiments.First,this paper introduces the background and significance of the research on the detection of XiLin injection,introduces the difficulties existing in the detection of XiLin injection,introduces the liquid detection equipment developed at home and abroad based on machine vision,and investigates the common method of liquid detection based on machine vision.Secondly,the mechanical part,imaging scheme and machine vision equipment selection of XiLin injection detection system were introduced.Then,this paper focuses on the image registration method of XiLin injection.In order to solve the problem of static interference and dynamic back interference in the registration process of XiLin injection,the registration method based on pure phase correlation and feature-based registration often fails,and the image registration method based on distance measure combined intensity and spatial information is not sensitive to the above interference.This method is used for image registration of XiLin injection.However,the method has long running time and can not meet the requirement of realtime detection,so it is improved.The calculation process of point-to-set distance and gradient in this method is improved,and the bilinear interpolation method is changed to the nearest neighbor interpolation method to reduce the running time.Experiments show that the improved method can retain the ability of anti-interference,at the same time,the registration effect is better in the complex scene,the improved method is robust,insensitive to noise,and the detection speed can meet the requirements of realtime detection,and the registration accuracy of XiLin injection is greatly improved.Finally,the identification method of visible foreign substances in XiLin injection was studied.First of all,the visible foreign substances are extracted by sequence frame difference method.The noise will remain in the background of the image after the sequence frame difference.The common image filtering method suppresses the weak foreign substances while suppressing the noise.Based on wavelet transform and P-M diffusion theory,this paper proposes an improved image filtering method combining wavelet transform with reverse P-M diffusion.First,the image is wavelet decomposed,the high-frequency part of the decomposition is reverse PM diffused,the low-frequency part remains unchanged.Finally,the invariant low-frequency part and the highfrequency part after diffusion are reconstructed by wavelet reconstruction.The experimental results show that the method can suppress the residual noise,reduce the missed detection rate and reduce the subsequent computation while preserving the tiny visible foreign substances target in the residual image.Finally,the common image segmentation method is compared,and the maximum entropy threshold segmentation method is used to separate the visible foreign substances from the complex background.Experiments show that this method can improve the robustness and accuracy of XiLin injection detection. |