Journal of Fuzzy Systems and Control, Vol. 4, No 3, 2026 |
Sorting Model using Robotic Arm with Image Processing
Nguyen-Khoa Tran 1, Dinh-Khang Nguyen 2, Phong-Luu Nguyen 3,*, Nhat-Anh Huynh 4, Thanh-Hung Tran 5,
Khac-Dinh Nguyen 6, Xuan-Anh Dinh 7, Binh-Hau Nguyen 8, Gia-Phu Nguyen 9, Minh-Phuoc Cu 10
1, 2, 3, 4, 7, 9 Ho Chi Minh City University of Technology and Engineering (HCM-UTE), Ho Chi Minh City (HCMC), Vietnam
5, 8 Posts and Telecommunication Institute of Technology (PTIT), Ho Chi Minh City (HCMC), Vietnam
6 Hyosung Dong Nai Company, Dong Nai Province, Vietnam
10 Cao Thang Technical College, Ho Chi Minh City (HCMC), Vietnam
Email: 1 22851009@student.hcmute.edu.vn, 2 22851007@student.hcmute.edu.vn, 3 luunp@hcmute.edu.vn,
4 22144049@student.hcmute.edu.vn, 5 hungtt@ptit.edu.vn, 6 khacdinh07054@gmail.com, 7 23151049@student.hcmute.edu.vn,
8 haunb@ptit.edu.vn, 9 23151157@student.hcmute.edu.vn, 10 cuminhphuoc@caothang.edu.vn
*Corresponding Author
Abstract—This paper presents the design and implementation of a product sorting model using a robotic arm integrated with image processing techniques. The system consists of a conveyor belt, a vision module, and robotic manipulators that work together to identify and classify objects through a camera and computer vision algorithms that detect product characteristics. The robotic arm then performs the corresponding sorting operation according to product quality requirements. The hardware design includes the construction of the robotic arm, control circuits, and integration with actuators, while the software design focuses on developing image processing algorithms and communication between the vision system and the robot controller. Experimental results show that the system achieves an average size measurement error of approximately ±2 mm, a classification accuracy of about 95%, and an average processing time of 2–3 seconds per product. These results demonstrate reliable recognition and classification performance compared to some previous research models. The proposed model emphasizes the feasibility of combining robotic manipulation and computer vision for automated sorting tasks in industrial applications such as food processing, household tools, and medical instruments, while also serving as a practical training platform for students in technical education. Future improvements may include optimizing vision algorithms, enhancing the mechanical design of the robotic arm, integrating artificial intelligence to improve safety, and expanding the system’s capability to handle more complex classification tasks.
Keywords—Automation; Computer Vision; Image Processing; Industrial Applications; Object Sorting; Robotic Arm
Automated object classification using robotic arms has become an important approach in modern manufacturing, where accuracy, repeatability, and operational flexibility are required. Traditional manual sorting is labor-intensive and may be inconsistent for repetitive, high-throughput tasks. Early studies [1]-[4], demonstrated the feasibility of color- and dimension-based sorting with image processing and robotic systems, while related computer-vision research has also addressed visual alignment and measurement tasks [5].
Subsequent research improved detection reliability by applying HSV-based color segmentation and contour-based shape recognition [6]. Other studies investigated low-cost OpenCV-based robotic systems [7], multi-feature classification using sensors and embedded platforms [8], and camera-based image-processing systems using platforms such as Raspberry Pi [9]-[11]. Camera calibration and vision-guided robot coordination have also been investigated to improve positioning accuracy in robotic integration [12]-[15]. Recent vision-guided robotic research has increasingly incorporated learning-based perception and explicit robot-camera calibration for grasping and localization [16]-[18].
Nevertheless, many existing solutions remain focused on laboratory-scale implementations and may face limitations related to real-time performance, dimensional accuracy, or integration with industrial controllers. To address these issues, the present research develops an integrated system combining OpenCV-based computer vision, a PLC-based motion-control architecture, a three-joint robotic arm, and an HMI interface. The system performs object detection, dimension measurement, coordinate transformation, and size-based robotic sorting. Unlike recent learning-based approaches [16]-[18], the present study deliberately uses a deterministic OpenCV pipeline to provide a low-cost and computationally simple laboratory platform. The proposed model is intended primarily for laboratory and small-scale production applications; therefore, performance under diverse industrial conditions remains a limitation of the present study.
This section presents the kinematic formulation and physical design of the three-degree-of-freedom robotic arm. The robot specification is listed in Table 1.
Parameter | Meaning |
L1=240mm | Length of link 1 |
L2=177mm | Length of link 2 |
L3=134mm | Length of link 3 |
d1=270mm | Base-to-Joint 1 offset |
d3=55mm | Joint 3 offset |
The forward and inverse kinematics are formulated using the Denavit-Hartenberg (DH) representation of the robot (Fig. 1). The Denavit–Hartenberg parameters for the three-joint robotic arm are listed in Table 2.
Using the D-H convention in Table 2, the homogeneous transformation matrix
:
| (1) |
| (2) |
| (3) |
| (4) |
| (5) |
i | ai | αi | di | θi |
1 | L1 | 90° | d1 | θ1 |
2 | L2 | 0 | 0 | θ2 |
3 | L3 | 0 | d3 | θ3 |
The inverse-kinematic solution is obtained by rearranging the transformation relationship and comparing the corresponding matrix elements. To derive the inverse kinematic equations, we premultiply both sides of (2) by
, yields:
| (6) |
By evaluating the elements of the corresponding transformation matrices on both sides, the position components are mapped into intermediate expressions as shown in (7):
| (7) |
Equating the position vectors from both sides gives the set of simplified (8):
| (8) |
From the matrix identity in (7), the third row of the position vector implies
. Substituting the expressions
from (8) into this equality leads to the trigonometric equation for
:
| (9) |
To solve (9), we apply the auxiliary angle technique. By dividing both sides by
and introducing an auxiliary angle
, the equation can be rewritten using the sine addition formula in (10):
| (10) |
Where the auxiliary angle
is determined based on the signs of
and
as described in (11):
| (11) |
Once
is obtained, the remaining joint variables
and
can be calculated.
Let:
|
Represent the combined angle of links 2 and 3. Substituting
into the
position equation (5), we obtain (12).
| (12) |
The final joint variable is obtained in (13) from the relationship between the total end-effector angle and the two planar joint angles.
| (13) |
The robotic arm is designed to pick and place workpieces from the conveyor to the sorting area while providing sufficient workspace coverage, positional accuracy, and stable operation. The mechanism has three Degrees of Freedom (3 DOF): a base joint for horizontal rotation, a shoulder joint for vertical movement, and an elbow joint for adjusting the reach of the end-effector. The projected views and three-dimensional representation of the robotic arm are shown in Fig. 2 and Fig. 3.
The structural components are manufactured from lightweight mica to reduce moving mass while maintaining adequate rigidity. Sliding bearings are used at the joints to reduce friction, and the joints are actuated by stepper motors through gear or belt transmission. This arrangement is intended to support stable motion and positioning of the end-effector.
The control system uses one workpiece-presence sensor, three limit switches, and one ON push button as input signals. The outputs include six pulse-and-direction signals for the three robot axes, together with control signals for the conveyor motor, vacuum pump, and suction lifting actuator. Because the controller must generate high-speed pulses for the stepper motors, the Mitsubishi FX3U-24MT PLC is selected for the proposed system. The selected PLC and motion-control hardware are shown together in Fig. 4.
The PLC wiring and actuator connections are arranged to provide the required input and output interfaces for the robot axes, conveyor, sensors, and suction subsystem. The corresponding wiring arrangement is shown in Fig. 5.
The main mechanical and actuation components used in the prototype are shown together in Fig. 6. The transmission components include the GT2 pulleys and timing belt, while the actuation components include the robot stepper motor, conveyor motor, vacuum pump, and suction actuator.
The 17HS4401 motor used for the robot axes is a 2-phase hybrid stepper motor with a step angle of 1.8° per step (200 steps per revolution), a rated voltage of 3 V, and a rated current of 1.5 A per phase. Based on these specifications, the TB6600 driver is used to provide adjustable output current from 0.5 A to 4 A, with microstepping selectable from full step to 1/16 step. The conveyor is driven by the JGA25-370 DC motor, while the YYP370-12E pump supplies the vacuum for the suction actuator.
The vision and operator-interface components provide the sensing and monitoring functions of the system. The DAHUA HTI-UC320 camera is used for image acquisition, the E3F-DS30C4 sensor detects workpiece presence, and the Weintek MT8071iP HMI provides an interface for monitoring and setting operating parameters. These components are shown together in Fig. 7.
HMI display provides the operator with access to operating parameters and system status during system operation. Corresponding HMI display is shown in Fig. 8.
The first method converts camera observations into robot coordinates and object descriptors for sorting. The procedure comprises calibration, planar coordinate transformation, image processing, contour measurement, and classification, following the implementation documented in the thesis.
Prior to object detection, camera calibration is performed using a checkerboard pattern and OpenCV's cv2.calibrateCamera() function to determine the intrinsic matrix
and distortion coefficients (distCoeffs) isn
shown in (14):
| (14) |
where
represent the focal lengths in pixels, and
is the principal point. The estimated intrinsic matrix and distortion coefficients are then applied to correct image distortion before converting 2D image coordinates to 3D real-world space.
Since all workpieces lie on a fixed working plane, a planar homography transformation maps image pixel in (15) coordinates
to the robot coordinate space
:
| (15) |
Here,
is a
matrix estimated using nine reference points on the work table, exceeding the theoretical minimum of four points to enhance accuracy. This transformation accounts for both rotation and translation between the camera calibration pattern and the robot base frame.
The vision pipeline applies background differencing, grayscale conversion, and Gaussian filtering before segmenting the image with Otsu's thresholding (sensitivity threshold set to 22). Contours are then extracted from the resulting binary image and filtered based on surface area, aspect ratio, and boundary constraints.
For each valid contour, the pixel centroid
is derived from spatial moments in (16):
| (16) |
| (17) |
Contour area, computed via cv2.contourArea() in (18) is scaled to physical dimensions using a conversion factor
:
| (18) |
The centroid is transformed to robot coordinates and the measured area is used to classify small, medium, or large objects before PLC sorting. The complete vision-to-robot processing sequence and its implementation flow are summarized in Fig. 9 and Fig. 10, respectively.
The second method extends the same D-H model to velocity-level Cartesian trajectory generation. For a desired Cartesian position trajectory
, the translational velocity satisfies the formula (19):
| (19) |
Using the pseudoinverse, the corresponding joint velocity is shown in (20):
| (20) |
The resulting joint trajectory can be integrated subject to joint limits and Jacobian conditioning; for this 3-DOF robot, the formulation targets Cartesian position rather than full 6D pose.
The geometric Jacobian of the D-H model is shown in (21):
| (21) |
The Jacobian provides a basis for trajectory tracking and velocity-level control, but the present experiment uses coordinate transformation, inverse kinematics, and PLC commands; no Jacobian-based tracking result is claimed.
The prototype was evaluated under laboratory conditions using the fabricated robotic sorting model and the measurement procedures described below. The fabricated prototype used for the experimental evaluation is shown in Fig. 11.
The experimental evaluation covers coordinate localization, object-area measurement, and size-based classification. The corresponding results are summarized in Table 3 and Table 4.
Point | Real Coordinates (mm) | Camera Coordinates (mm) | Error | |||
X | Y | X | Y | X | Y | |
1 | 150 | 40 | 157 | 35 | 7 | 5 |
2 | 150 | 80 | 154 | 77 | 4 | -3 |
3 | 150 | 120 | 155 | 110 | 5 | -10 |
4 | 200 | 40 | 210 | 42 | 10 | 2 |
5 | 200 | 80 | 207 | 85 | 7 | 5 |
6 | 200 | 120 | 212 | 124 | 12 | 4 |
7 | 200 | 40 | 216 | 45 | 16 | 5 |
8 | 200 | 80 | 219 | 88 | 19 | 8 |
9 | 200 | 120 | 218 | 134 | 18 | 14 |
10 | 200 | 150 | 225 | 160 | 25 | 10 |
Ratio | 1.31 | 1.28 | ||||
Table 3 compares the reference coordinates with the camera-derived coordinates and reports the corresponding localization errors. Point 10 shows the largest X-coordinate deviation, 25 mm, whereas the corresponding Y-coordinate deviation is 10 mm. Across the ten points, the mean absolute X- and Y-coordinate deviations are 12.3 mm and 6.6 mm, respectively. These localization errors should not be conflated with the reported ±2 mm average size-measurement error. The present experiment does not isolate lens distortion, illumination, contour localization, and calibration residuals separately; therefore, no single cause is assigned to the Point 10 outlier.
The comparison quantifies the deviation between the reference coordinates and the coordinates estimated from the camera-based system. The measured object areas at four rotation angles for the three tested object sizes are reported in Table 4.
Product | Nominal Area (mm²) | Classification Range (mm²) | Error | Type |
Product A | 30x45 1350 | 1350-1450 | 10% | Small |
Product B | 35x45 1575 | 1475-1575 | 10% | Medium |
Product C | 40x50 2000 | 2000-2100 | 10% | Large |
The classification ranges used for the three product groups are summarized in Table 5. These intervals are treated as the experimental decision ranges; the available material does not provide a derivation that would justify interpreting the listed limits as formal ±10% tolerance bounds.
Object | Shape | Rotation (°) | Area (mm²) |
Object 1 | Rectangle | 0 | 1355 |
45 | 1362 | ||
60 | 1401 | ||
90 | 1360 | ||
Object 2 | Rectangle | 0 | 1601 |
45 | 1573 | ||
60 | 1653 | ||
90 | 1581 | ||
Object 3 | Rectangle | 0 | 2004 |
45 | 2052 | ||
60 | 2043 | ||
90 | 2009 |
The measured areas remain close to the nominal areas across the tested rotation angles, providing the basis for the size-based classification used in the experiment.
The reported experimental results indicate an average size-measurement error of approximately ±2 mm, a classification accuracy of about 95%, and an average processing time of 2-3 s per product. The available thesis material does not specify the number of classification trials underlying the approximately 95% figure; therefore, this value is presented as a reported experimental accuracy rather than as a statistically estimated performance measure. The observed residual errors may be influenced by calibration residuals, illumination, and image-localization effects; however, these factors were not isolated experimentally.
Under the laboratory conditions evaluated, the integrated vision, PLC, HMI, and robotic subsystems provide a practical workflow for automated size-based sorting. The combination of image processing and robotic manipulation demonstrates the feasibility of the proposed laboratory-scale system, while broader industrial deployment requires additional validation under varied operating conditions.
Recent studies demonstrate a shift toward learning-based perception and explicit robot-camera calibration. Li et al. [16] presented a learning-based 3D hand-eye calibration method for estimating the camera-to-robot transformation. Dirr et al. [17] demonstrated CNN-based instance segmentation integrated with robotic picking for industrial parts, while Deng et al. [18] reported a dual-stream YOLO-based grasping system for box-shaped objects. In contrast, the present study uses a three-DOF arm and deterministic OpenCV processing with checkerboard calibration. The comparison is qualitative because the referenced studies use different robots, sensors, datasets, object classes, and evaluation protocols.
The reported 2-3 s processing time was obtained under laboratory conditions. Systematic experiments at multiple conveyor speeds were not included in the available dataset; therefore, dynamic pick accuracy, speed-dependent processing latency, and throughput under moving-conveyor conditions are not claimed. Future experiments should report conveyor speed, image-acquisition time, processing time, communication delay, robot motion time, and successful pick rate.
In this study, an image-processing-based robotic arm classification system was designed and implemented by integrating camera-based image acquisition, OpenCV-based object detection and size measurement, coordinate transformation, robotic control, and an HMI interface for monitoring. Under the reported laboratory conditions, the system achieved a classification accuracy of approximately 95% and demonstrated size-based sorting using the integrated vision and robotic subsystems. These results support the feasibility of the proposed laboratory-scale system for automated sorting applications. However, the present implementation remains limited to size-based classification and fixed camera conditions, and its performance under broader industrial conditions has not yet been established. Future work will focus on improving robustness through multi-feature recognition, including color, shape, and defect detection, incorporating 3D vision for improved spatial measurement, optimizing image processing for real-time operation, and developing more flexible interfaces for expanded applications.
We want to give thanks to Ph.D. Van-Dong-Hai Nguyen (HCM-UTE) for his supervision. Link to the operation is: https://www.youtube.com/watch?v=IjtEABiRqMg&feature=youtu.be.
Nguyen-Khoa Tran, Sorting Model using Robotic Arm with Image Processing