1. An image processing device comprising: circuitry configured to: detect a global motion indicating a motion of an image resulting from movement of a camera; process the image to detect a local motion indicating motion of each area of a plurality of areas of the image, each area being less than a whole of the image; determine one of the plurality of areas as including a main subject based on the global motion and local motion of each of the plurality of areas; and when image data that is subjected to a change of an imaging direction is set as a target of a main subject determination process, use a first mode to determine the main subject as an area that has a local motion that is different from the global motion, wherein when the global motion is detected to be larger than the local motion, the circuitry determines the main subject based on an area of which a difference between the local motion and the global motion exceeds a predetermined threshold for a predetermined amount of time.