| With the promotion of rural revitalization and the arrival of an aging population,agriculture is increasingly relying on intelligent production to reduce human investment and improve production efficiency.Crop image acquisition and image processing is an important part of intelligent agriculture.Image segmentation of crop flowers,leaves,and fruits based on computer technology is crucial for crop image processing,which improves work efficiency and accuracy of crop data collection,It has great application prospects in intelligent agriculture.Rape is widely distributed in China,and is one of the main crops cultivated nationwide.It is also an important source of pressed vegetable oil and protein.The flowering period of rapeseed is an important stage of its growth,and the management of rapeseed during the flowering period directly determines the yield and quality of rapeseed.During the flowering period of rapeseed,the requirements for growth temperature,soil and water nutrients,and soil moisture content are relatively strict.Therefore,various types of image information during the flowering period of rapeseed are of great significance for the subsequent formulation of rapeseed conservation and management plans.In order to achieve accurate and automated management of rape flowering,the focus of this research work is to propose efficient and accurate segmentation methods for rape flowers based on crop image processing,collection,and computer image automatic processing technology.Aiming at the needs of rape flower segmentation in various scenarios and different needs,this paper mainly studies and carries out the following work(1)A threshold segmentation method combining color space and K-means clustering is proposed,which can achieve more accurate segmentation of rape flowers.Firstly,the original rape flower image is transformed into HSI color space,and a wide target area to be processed is extracted by setting the color threshold in the H channel.Then,all pixels in the corresponding processing area in the original image are converted into Lab color space.Finally,a K-means clustering algorithm is used to further segment the region to be processed,and the segmentation results are obtained.(2)An automatic segmentation method combining HSI spatial color threshold and local super-pixel is proposed.Convert the original image into HSI color space.Then,the candidate target regions are located using color thresholds.The image is converted back to an RGB color image with a black background marker.At the same time,the original rape flower image is segmented to obtain an appropriate amount of super pixels.The results of the above two processes are combined into the final segmentation result,and the candidate target region is refined using local super-pixel results to obtain the target rape flower region.(3)A segmentation method based on the combination of color space threshold and automatic constrained clustering algorithm is proposed to effectively improve the accuracy of rape flower segmentation.Firstly,the original rape flower image is transformed into HSI color space,and a wide target area to be processed is extracted by setting the color threshold in the H channel.Then,the pixels in the target area to be processed corresponding to the original image are converted into the Lab color space,and the mean and variance of the channels in the candidate area are calculated.Finally,the obtained mean and variance are used as constraints for subsequent clustering and segmentation,and an automatic mean clustering algorithm is used to cluster the channels of the original image to obtain more accurate segmentation results. |