| Macroscopic supramolecular self-assembly is a research direction in supramolecular chemistry,which is expected to realize the preparation of novel heterogeneous materials.In the experimental study of macroscopic supramolecular self-assembly,it is necessary to select the self-assembled bodies that do not meet the assembly requirements in the experiment for reassembly.Manual experiments are time-consuming and difficult to implement large-scale parallel assembly experiments.In order to realize large-scale parallel assembly experiments,it is necessary to use automated technology to replace manual experiments.One of the keys in macroscopic supramolecular self-assembly experiments is to pick out inaccurate self-assemblies.In this paper,a visual inspection platform is built,a visual inspection algorithm is designed for the inspection of self-assembly,and the automated experiment is completed with the combination of automated experimental equipment.The main research contents are as follows:(1)Analyze the requirements for self-assembly detection,and design a detection scheme based on the experimental process.Build a visual inspection platform according to the inspection plan,select industrial cameras and lenses,and design image acquisition and processing software combined with HALCON and QT software.This software is used for image acquisition and subsequent image processing,as well as information interaction with automation equipment.(2)Based on image processing technology,a self-assembly detection algorithm is designed,which is divided into positioning algorithm and detection algorithm.In the localization algorithm,the different template matching methods are firstly analyzed,and the shape template matching method is selected for self-assembly localization;the influence of different preprocessing methods on the matching template is studied,and the method of enhancing contrast and median filtering is selected to make the matching template;Image grayscale and pyramid strategy are used to speed up the template matching process.Finally,the accuracy and matching speed of the positioning algorithm are tested through experiments.(3)In the detection algorithm,a method is proposed to distinguish the selfassembly by measuring the degree of assembly coincidence and angle.First,determine whether to assemble by locating the distance between the two assembled monomers,then perform histogram threshold segmentation on the positioning area,extract the assembled monomer area,and perform morphological processing;then compare different edge extraction methods,and use the sub-pixel edge extraction method.Edge extraction is performed in the assembly area,and the extracted edge is fitted into a rectangle by the least squares method;the assembly edge is determined by the distance of the contour vertices,and the assembly coincidence and angle are calculated.(4)In view of the shortcomings of image processing target detection algorithm with poor anti-interference,complex algorithm and the need to identify more complex self-assembled structures,a deep learning-based target detection algorithm is studied to identify self-assembled bodies.By analyzing the advantages and disadvantages of different target detection networks,the YOLOv5 network is selected as the detection model.And self-assembled data set is built,and Label Img software is used for image labeling,and the target detection model is trained and tested by using the labelled data set.According to the needs of small target detection,the network structure is improved to improve the accuracy of self-assembly detection.Finally,the trained model is deployed on the C++ platform for automated experiments.(5)Using the two detection algorithms designed in this paper combined with automated experimental equipment to conduct experiments,the results show that the detection algorithm designed in this paper is feasible and can complete 88% accurate assembly within 9 cycles of experiments.The experimental results of the two detection algorithms were compared,and the YOLOv5 target detection algorithm was selected for subsequent experiments. |