Drawing System with Dobot Magician Manipulator Based on Image Processing
In this paper, the robot arm Dobot Magician and the Raspberry Pi development platform were used to integrate image processing and robot-arm drawing. For this system, the Python language built into Raspberry Pi was used as the working platform, and the real-time image stream collected by the camera was used to determine the contour pixel coordinates of image objects. We then performed gray-scale processing, image binarization, and edge detection. This paper proposes an edge-point sequential arrangement method, which arranges the edge pixel coordinates of each object in an orderly manner and places them in a set. Orderly arrangement means that the pixels in the set are arranged counterclockwise to the closed curve of the object shape. This arrangement simplifies the complexity of subsequent image processing and calculation of the drawing path. The number of closed curves represents the number of strokes in the drawing of the manipulator. In order to reduce the complexity of the drawing of the manipulator, a fewer number of closed curves will be necessary. To achieve this goal, we not only propose the 8-NN (abbreviation for eight-nearest-neighbor) search, but also use to the 16-NN search and the 24-NN search methods. Drawing path points are then converted into drawing coordinates for the Dobot Magician through the Raspberry Pi platform. The structural design of the Dobot reduces the complexity of the experiment, and its attitude and positioning control can be accurately carried out through the built-in API function or the underlying communication protocol, which is more suitable for drawing applications than other fixed-point manipulators. Experimental results show that the 24-NN search method can effectively reduce the number of closed curves and the number of strokes drawn by the manipulator.