Automated decoration of food products holds significant potential for consistent quality and fully unattended operation. In this thesis, an image-based algorithm is presented for generating continuous icing trajectories on gingerbread cookies. First, the cookie silhouette is detected by contour extraction, after which inner contours corresponding to decorative features are identified. Each contour is approximated by a sequence of segments that are chained into continuous centerline paths. To align the generated trajectory with the physical cookie, ellipse parameters of both the template and the real-world object are computed and the path is scaled accordingly. A motion-planning module then sequences arm movements reducing unnecessary stops and enabling end-to-end automation without human intervention. The resulting trajectories are produced in under 5 seconds per decoration and are transmitted to a six-axis robotic arm. Although the generated paths faithfully reproduce the decoration template, limitations in the open-loop pump system lead to variability in icing thickness, indicating the need for closed-loop flow control in future work. This pipeline — combining contour detection, geometric alignment and hardware-aware sequencing — provides a scalable framework for fully automated, high-throughput decoration