| With the rapid development of computer hardware and image algorithms,machine vision technology has been gradually applied to all aspects of the agricultural field.The technology has the characteristics of non-contact,high precision,high speed,etc.,showing great advantages in the field of agriculture.which makes it difficult to meet the needs of agricultural applications with complex terrain and diverse objects.In order to obtain reliable agricultural images quickly and efficiently,a new zoom imaging method must be introduced.Liquid lens is a newly emerging optical zoom element in recent years.It has compact size,fast zoom response and excellent optical performance.Integrating the liquid lens into the optical system for agricultural image acquisition can greatly improve the acquisition efficiency and imaging quality of agricultural images,effectively overcome the limitations of the depth of field of traditional lenses,and promote the application of machine vision technology in agriculture.This thesis integrates the liquid lens into the optical imaging system,proposes a large depth of field imaging method using the liquid lens,and conducts extended research on distance estimation and automatic tracking focusing,which provides a solution for the agricultural application of the liquid lens.The main research work is as follows:Analyze the working principle and hardware characteristics of the liquid lens,build a zoom image acquisition system based on the liquid lens.The data transmission and program control among the liquid lens,industrial camera and computer are realized.The theoretical knowledge of depth of field and defocus blur in optical imaging is expounded,a defocus estimation algorithm is introduced,and the defocus map is obtained from the image to obtain the depth information of the image.In addition,five different sharpness evaluation functions are introduced,and a comparative experiment is designed based on the knowledge of image processing.The experimental results are analyzed to select a suitable sharpness evaluation function for the imaging application research of liquid lens.According to the zoom characteristics of the liquid lens,two imaging methods with large depth of field are designed.Defocus estimation and sharpness evaluation function are used to obtain focused images of different regions,and a large depth-of-field map is obtained by image stitching.Defocus estimation and sharpness evaluation function are used to obtain focused images of different regions,and a large depth-of-field map is obtained by image stitching.The two methods are used to conduct multiple sets of large depth of field imaging experiments in different scenes.The experimental results prove that the method proposed in this thesis overcomes the limitation of lens depth of field.The function relationship curve between the driving current value of the liquid lens and the depth of focus is established,and the distance estimation of the focus target is realized.The accuracy of the method is analyzed through verification experiments and actual experiments.It provides a new feasible method for contactless distance estimation in agriculture.The automatic focusing algorithm of the liquid lens is designed according to the current adjustment range of the liquid lens.Focusing experiments are carried out on the actual target,and the image acquisition effect of the traditional camera system and the system in this thesis on the moving target is compared.The experimental results show that the method in this thesis effectively expands the depth of field of the lens imaging,realizes the focused imaging of moving targets,and has potential application value in crop sorting and fruit recognition. |