The main focus of this paper is to design and develop a system of two robot arms for classifying and sorting objects based on shape and size using machine vision. The system uses a low-cost and high-performance hierarchical control system including one master and two slaves. Each slave is a robot controller based on a microcontroller that receives commands from the master to control the robot arm independently. The master is an embedded computer used for image processing, kinematic calculations, and communication. A simple and efficient image processing algorithm is proposed that can be implemented in real-time, helping to shorten the time of the sorting process. The proposed method uses a series of algorithms including contour finding, border extraction, centroid algorithm, and shape threshold to recognize objects and eliminate noise. The 3D coordinates of objects are estimated just by solving a linear equation system. Movements of the robot's joints are planned to follow a trapezoidal profile with the acceleration/deceleration phase, thus helping the robots move smoothly and reduce vibration. Experimental evaluation reveals the effectiveness and accuracy of the robotic vision system in the sorting process. The system can be used in the industrial process to reduce the required time to achieve the task of the production line, leading to improve the performance of the production line.