Image recognition based on combination of RGB–HSV color and shape features using PCA and K-nearest neighbor - Much Aziz Muslim; Dwika Ananda Agustina Pertiwi; Hadiq Hadiq; Solehatin Solehatin (SHM Publisher, 2026)
This study aims to accurately separate flower objects from complex backgrounds in artificial intelligence (AI)-based plant management systems. Previous studies have shown limitations in preprocessing techniques and often did not explicitly report classification accuracy. To address these issues, the proposed framework consists of eight stages. The process begins with image size standardization to 150 × 150 pixels, followed by low-pass filtering and image sharpening to enhance object boundaries. Segmentation is then performed sequentially using RGB and HSV color models to achieve more precise object separation. Subsequently, Sobel edge detection and thinning are applied to extract geometric features, such as distances between petal tips and flower perimeter measurements. The extracted features are optimized using Principal Component Analysis (PCA), which reduces the original ten attributes to four principal components, thereby eliminating data redundancy before classification using the Euclidean distance-based K-Nearest Neighbor (KNN) algorithm. Experimental results show that PCA preserves 86.7% of the original data variance, while the proposed system achieves an overall average classification accuracy of 88% at k = 5. Specifically, the recognition accuracies obtained for the four flower categories were 93.33% for Flower A, 86.67% for Flower B, 90.00% for Flower C, and 80.00% for Flower D. The main contribution of this research is the integration of intensive preprocessing techniques, the combination of RGB-HSV color features with geometric shape features, and PCA-based feature optimization, which collectively improve the stability and computational efficiency of KNN classification.