1. An image processing device, which drives an imaging device positioned toward a conveying path of a target object and which processes a captured image acquired from the imaging device for observation of the target object, the image processing device comprising: a detection signal input unit that receives a detection signal from a sensor positioned toward the conveying path; a command output unit that outputs an imaging command to the imaging device; an operation input unit that receives an operation from an outside source; an image output unit that outputs an image to a display device; and a delay amount setting unit that sets the delay time between the time when the detection signal input unit receives the detection signal as input and the time when the command output unit outputs the imaging command, wherein the delay amount setting unit causes output of the imaging command a plurality of times at a time interval set in advance after the detection signal input unit receives the detection signal as input; causes the image output unit to output at least one of a plurality of captured images obtained according to the plurality of imaging commands; and derives the amount of delay for the subsequent observing process based on the time when the imaging command matching the captured image is output and operation contents are received by the operation input unit.