Bayberry image segmentation based on homomorphic filtering and K-means clustering algorithm
-
-
Abstract
Abstract: For harvesting robot, fruit identification is the key step for accurate fruit positioning and successful picking. The primary task of fruit identification and picking is to separate fruit from complicated background of branches, trunk and sky by image segmentation. It is hard to accurately segment colorized bayberry image because there are fruits with low brightness or uneven illumination in nature scenes. In this study, RGB (red, green and blue) color space was transformed into HSV (hue, saturation and value) space. After that, the luminance component of image was strengthened by dynamic Butterworth homomorphism filter transfer function. Then, it was restored to RGB color space for colorized image illumination compensation and shadow removal. The bayberry image after shadow removal included red bayberry, green leave and white sky. Each pixel of colorized bayberry image to be segmented was considered as one point of data set X. These pixels were classified into red, green and white. According to the characteristics of the components a and b in Lab color space, RGB color space was transformed into CIELAB space. The K-means clustering algorithm was used for image segmentation, and the parameter K was selected as 3. In order to verify the effectiveness of the proposed algorithm, 15 bayberry images were selected from 100 images affected by different degrees of shadow under different growth conditions and uneven illumination conditions. Firstly,in order to prove effectiveness of illumination compensation, the K-means clustering algorithm was used to conduct image segmentation experiments before and after illumination compensation to shadow removal. Secondly, in order to validate segmentation effectiveness of images after illumination compensation based on different methods, this study applied adaptive 2*R-G-B grey threshold and K-means clustering segmentation algorithms to compare their effects of shadow removal. Thirdly, homomorphism filter algorithm was compared with linear enhancement and histogram equalization methods, and the K-means algorithm was applied to analyze image segmentation effectiveness based on different strengthen methods. The experiments showed that the segmentation result based on K-means clustering algorithm was without wrong segmentation after illumination compensation for shadow removal compared with that before illumination compensation. Although grey threshold based on color difference 2*R-G-B had better image segmentation effect after illumination compensation, some samples had large wrong segmentation and bright leaves were segmented and classified into bayberry. Therefore, image segmentation by grey threshold based on color difference 2*R-G-B was worse than that segmentation algorithm based on K-means clustering. Three criteria such as segmentation error, false positive rate (FPR) and false negative rate (FNR) were used to evaluate the segmentations results as quantitative analysis. Under the proposed method in this paper, the average segmentation error, FPR and FNR were 3.78%, 0.69% and 6.8%, respectively. Compared with the gray scale transform method, the segmentation error was reduced by 32.94 percent point, FPR by 6.85 percent point and FNR by 29.65 percent point for this proposed method. Then the average segmentation error was reduced by 24.92 percent point compared with the result obtained by histogram equalization method, FPR by 6.12 percent point and FNR by 20.40 percent point. All these results show that image illumination compensation by homomorphism filter algorithm presents better effect of shadow removal. K-means clustering segmentation algorithm has better image segmentation effect after shadow removal. This paper provides reference for the research on bayberry image segmentation and bayberry fruit recognition.
-
-