Journal of Soft Computing Exploration
Vol. 7 No. 2 (2026): June 2026

Image recognition based on combination of RGB–HSV color and shape features using PCA and K-nearest neighbor

Hadiq Hadiq (Informatics Management, Sekolah Tinggi Ilmu Komputer PGRI Banyuwangi, Indonesia)
Solehatin Solehatin (Information Technical, Sekolah Tinggi Ilmu Komputer PGRI Banyuwangi, Indonesia)
Much Aziz Muslim (Department of Computer Science, Universitas Negeri Semarang, Indonesia)
Dwika Ananda Agustina Pertiwi (Faculty Technology Management and Business, Universiti Tun Hussein Onn Malaysia, Malaysia)



Article Info

Publish Date
07 Jun 2026

Abstract

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.

Copyrights © 2026






Journal Info

Abbrev

journal

Publisher

Subject

Computer Science & IT Control & Systems Engineering Decision Sciences, Operations Research & Management Electrical & Electronics Engineering

Description

The journal focuses on publishing high-quality, original research and review articles in the field of Soft Computing, Informatics and Computer Science, emphasizing the development, application, and rigorous evaluation of Advanced Computational Methods, Artificial Intelligence (AI), Machine Learning ...