A stroboscopic device, comprising: a camera for acquiring video frames; a
light source; and at least one hardware processor; and
software that is configured to, when executed by the at least one hardware processor, generating synthetic video frames of an object, providing real video frames of the object and the synthetic video frames to a
discriminator configured to detect the difference between the real video frames from the synthetic video frames, using feedback from the
discriminator to generate further synthetic video frames, providing real video frames of the object and the further synthetic video frames to the
discriminator and repeating until a convergence point is achieved where the discriminator can't reliably tell the real video frames from the synthetically generated video frames, generating a
data set comprising synthetic video frames and real vide frames of the object, using the
data set to
train a model, acquire a sequence of video frames via the camera, for a first and second frame in the sequence of video frames, compute the dense
optical flow field between the two frames, wherein the
optical flow field contains a flow vector for each pixel in each of the first and second frames, indicating the motion of that pixel from the first frame to the second frame, calculate the average magnitude (Average
Optical Flow or AOF) of all flow vectors for each pixel in the first and second frames, compare the AOF to a threshold, and store a result based on the comparison, repeat the process for all frames in the sequence of video frames, determine whether a
stroboscopic effect has been achieved based on the store results, control the activation of the
light source until the results indicate that the
stroboscopic effect has been achieved, and obtain a further sequence of video frames after the
stroboscopic effect is achieved, identify the object in the further sequence of video frames using the model, and automatically detect movement or vibration of the identified object using the model.