This study presents a novel approach for scanning and obtaining object contours within a workspace using a camera and subsequently following these 2-D contours to another region with the assistance of an end effector. The process begins with the determination of boundary lines of object images through advanced image processing methodologies. Subsequently, a conversion from camera pixel coordinates to robot metric coordinates is performed to facilitate trajectory planning for the robotic arm. The trajectory of the robot arm, and consequently, the path followed by the end effector, is determined based on these metric coordinates. The article provides a detailed exposition of the methodology, including the mathematical background and experimental study, showcasing the efficacy and accuracy of the proposed approach in real-world scenarios. This research contributes to the advancement of robotic systems capable of precise trajectory tracking and manipulation tasks in diverse applications.