A control device being characterized in that the control device generates a corrected path (C') which is obtained by correcting a target path for a control object moving along a surface of a workpiece using an imaging result of the workpiece, the control device comprising: an acquisition part configured to acquire the target path for each control cycle; and a generation part configured to generate the corrected path (C') for each control cycle from the target path for each control cycle so that a length of the corrected path (C') for each control cycle matches a length of the target path for each control cycle, wherein the generation part adjusts the corrected path (C') either by adjusting an execution frequency of the control cycle of the corrected path (C') while keeping a speed of the control object constant for each control cycle or by adjusting the execution frequency of the control cycle of the corrected path (C') while keeping a moving distance of the control object constant for each control cycle, wherein the control device further comprises a result acquiring part configured to start acquisition of the imaging result corresponding to a target position of the target path (C') of an (i+2k)-th control cycle repeatedly in k times the control cycle at the latest at a time point at which the control object reaches the target position of the corrected path (C') of an i-th control cycle where i is an integer equal to or greater than 1 and k is an integer such that k times the control cycle is larger than a time required from the capturing of the image to the acquiring of the imaging result, wherein the generation part generates the corrected paths (C') of (i+k+1)-th to (i+2k)-th control cycles using the imaging result acquired by the result acquiring part. an acquisition part configured to acquire the target path for each control cycle; and a generation part configured to generate the corrected path (C') for each control cycle from the target path for each control cycle so that a length of the corrected path (C') for each control cycle matches a length of the target path for each control cycle, wherein the generation part adjusts the corrected path (C') either by adjusting an execution frequency of the control cycle of the corrected path (C') while keeping a speed of the control object constant for each control cycle or by adjusting the execution frequency of the control cycle of the corrected path (C') while keeping a moving distance of the control object constant for each control cycle, wherein the control device further comprises a result acquiring part configured to start acquisition of the imaging result corresponding to a target position of the target path (C') of an (i+2k)-th control cycle repeatedly in k times the control cycle at the latest at a time point at which the control object reaches the target position of the corrected path (C') of an i-th control cycle where i is an integer equal to or greater than 1 and k is an integer such that k times the control cycle is larger than a time required from the capturing of the image to the acquiring of the imaging result, wherein the generation part generates the corrected paths (C') of (i+k+1)-th to (i+2k)-th control cycles using the imaging result acquired by the result acquiring part.