1. An image processing apparatus comprising: a processor; and a memory including instructions that, when executed by the processor, cause the processor to: obtain a plurality of images; calculate correlation values between the plurality of images with respect to relative positions; detect a motion vector between the plurality of images based on the correlation values; determine reliability of the motion vector; and perform at least one of an anti-shake process and a moving object tracking process with the motion vector, wherein the processor determines the reliability based on a value indicating the highest correlation among the correlation values and a correlation value, among the correlation values, obtained at a position that is distant by a predetermined distance or longer from a position at which the value indicating the highest correlation is obtained.