Detecting motion by video frames taken from camera