Currently, most of the automated deburring trajectories are generated by the offline programming method, but the process results are not as expected due to lack of accuracy of the robotic arm, and the workpiece dimension errors. Hence the deburring process still relies on manpower. This article proposes a deburring trajectory generation method to detect the burr region and generate the trajectory by curve fitting: (1) using a linear contour scanning sensor to obtain the 2D contour information; (2) comparing with the CAD model to detect the burr position then generate the processing trajectory. This method solves the limitations of the existing methods that require manual adjustment or 3D point cloud analysis that is time-consuming and cannot be tracked in real time. The trajectory and workpiece dimension deviations can be compensated in real-time to improve the processing quality.