| Plant factory was an advanced stage of agricultural,which could produce more food and vegetables on limited land resources,and could effectively solve the problems of food security,seasonal vegetable shortage and regional restrictions.Hydroponic lettuce was growing in the plant factory because of its high yield,short production cycle and large market demand.Due to the crispy and tender texture of hydroponic lettuce,it is easy to be damaged.After being damaged,hydroponic lettuce will rot rapidly under the influence of microorganisms,which affects the commodity value and food safety of lettuce.Therefore,hydroponic lettuce was sold after packaging in the market,and a series of packaging machinery was also launched for the packaging process.However,the sorting detection before packaging still depends on manual.The manual sorting was cost high labor,time-consuming,low efficiency,and unstable sorting quality after long-time work.In order to solve the problem of heavy sorting task and low mechanization degree before packaging of hydroponic lettuce,this study taken hydroponic lettuce as the research object,used machine vision to detect abnormal leaves,and designed sorting mechanism to detect and sort hydroponic lettuce before packaging.The main research contents and conclusions were as follows:(1)The image data set of hydroponic lettuce was constructed.According to the appearance characteristics and the mechanized harvesting mode of hydroponic lettuce,three high-definition cameras were used to capture the image of hydroponic lettuce from the bottom to the top.The period of image acquisition was all-weather,and there was no light supplement during image acquisition,so as to restore the working environment in the plant factory to the greatest extent.Because of the limited number of manually acquired images,the collected images were rotated clockwise by 90°,180° and 270°,and the original image data was amplified by the method of up-down mirror image and left-right mirror image.After data amplification,the whole lettuce,yellow leaf,dry leaf and rotten leaf of hydroponic lettuce data set were labeled and given corresponding labels.The JSON file generated in the process of labeling data was encoded,and the corresponding PNG image was generated as the truth map of the original image,which was randomly divided into training set and test set according to the ratio of 4:1.(2)Research on segmentation method of abnormal leaves of hydroponic lettuce based on DeepLabV3+.Because of the irregular shape of the abnormal leaves,discontinuous abnormal areas and the unclear edges,the semantic segmentation method was more suitable for segmentation and detection.In this chapter,DeepLabV3+ semantic segmentation network was used to carry out the research.Because of the serious data imbalance problem of hydroponic lettuce data set,background and normal lettuce pixels occupy the vast majority of the image,while yellow leaf,dry leaf and rotten leaf pixels only occupy a small part of the image.In view of this situation,this study introduced two kinds of weights setting rules: uniform weight and medium frequency weight.Four backbones,Xception-65,Xception-71,Res Net-50 and Res Net-101,were used to train the network under two weight setting rules,and the performance indexes of the eight models were compared.The experimental results show that the mIoU of DeepLabV3+ semantic segmentation model based on Res Net-101 was 0.8326,PA was 99.24%,and theIoU of rotten leaf segmentation was 0.6138,which was the best among all models.Therefore,this model was used for segmentation and recognition in the subsequent sorting system.(3)The overall scheme and key components design of hydroponic lettuce sorting device.According to the actual harvesting scene and the appearance characteristics of hydroponic lettuce,the picking scheme and lifting scheme were proposed,respectively.After analyzing and comparing the two schemes,the transmission mechanism of the clip type sorting method was complex,and its applicability was low,while the lifting type sorting method was simple,has strong applicability,and has less damage to lettuce.After the overall scheme was determined,the end effector was designed,the ring type and bracket type end effector were compared and analyzed,and the more stable bracket type end effector was selected.Then,combined with the function and performance requirements of the hydroponic lettuce sorting device,the overall control system was designed.The computer and Arduino UNO microcontroller were used for data communication by serial communication.The hardware models of stepping motor,solenoid valve,relay and cylinder are determined.The flow chart and circuit diagram of the control system were designed.On this basis,the control program was written by C language.(4)Trial production and verification test of hydroponic lettuce sorting device.In this chapter,according to the overall scheme of hydroponic lettuce automatic sorting device and the design of key mechanism and control system,the prototype was trial produced and debugged.Second rotation orthogonal test was carried out on the prototype to optimize the angle of longitudinal / transverse support rod and the speed of stepper motor.The experimental results shown that when the angle of the support rod was fixed,the success rate decreases with the increase of the speed of the stepper motor.When the speed of the stepper motor was fixed and the angle of the support rod changes from 140° to 160°,the success rate first increases and then decreases,and the success rate reaches the maximum at144°.Finally,the optimal parameter combination was used to test the automatic separation device of lettuce.The final results shown that the success rate of the sample sorting was93%,the separation efficiency was 4 trees / min. |