J-Innovation
Vol. 14 No. 2 (2025): Jurnal J Innovation

Implementation of the K-Nearest Neighbor Algorithm on a 4-DoF Manipulator Robot for Color-Based Object Retrieval

Rendyansyah Rendyansyah (Teknik Elektro Universitas Sriwijaya)
Irmawan (Teknik Elektro UNSRI)
Hera Hikmarika (Teknik Elektro UNSRI)
Caroline (Teknik Elektro UNSRI)



Article Info

Publish Date
31 Dec 2025

Abstract

This study discusses implementing the K-Nearest Neighbor (K-NN) algorithm on a 4-DoF manipulator robot to pick up objects based on color. The main objective of this study is to design and test a robot control system capable of automatically recognizing, picking up, and moving objects according to color classification. The color detection process is carried out using a camera that extracts color component values in RGB space, which are then classified using the K-NN algorithm with parameter k = 5. The classification results form the basis for the movement of the manipulator robot, which is controlled through cubic trajectory-based trajectory planning, so that the movement of each servo motor joint is smooth and coordinated. Testing was conducted 30 times with three object color categories: red, green, and blue. The experimental results showed that the system could classify colors and pick up objects with a success rate of 96%. Minor failures occurred due to lighting variations that affected color detection results. Overall, the results of this study indicate that the integration of the K-NN algorithm and cubic trajectory is effective in improving the performance of manipulator robots for color-based object recognition and picking tasks and has the potential to be applied in computer vision-based industrial automation systems.

Copyrights © 2025






Journal Info

Abbrev

jinnovation

Publisher

Subject

Computer Science & IT Control & Systems Engineering Electrical & Electronics Engineering Engineering Industrial & Manufacturing Engineering

Description

Journal contains information about Mechatronics, Electronics Engineering, and Software Engineering. The Journal J-Innovation is a journal that is published twice a year, in June and December. Focus and Scope: 1. Robotics 2. Electrical and electronic 3. Energy convertion 4. Sensor technology 5. ...