In this paper, an integration between a computer vision system and an industrial robot is simulated, in order to select and to position simple geometric shapes which are on a moving conveyor belt. To do so, a programming code was developed in the software Matlab®, capable to do the image processing tasks needed to obtain the desired object's centroid. Subsequently, an inverse kinematics analysis is made so the trajectory that the robot must follow to position the shape is generated. The code's main features is the possibility to choose among different shapes as triangles, rectangles, circles and so on; and that the found object's centroid is presented in world units (i.g. millimeters).