1. An electronic device having a function based on a motion vector, comprising: one or more processors; a memory that stores a program, which is executable by the one or more processors and causes, when executed by the one or more processors, the one or more processors to function as: a detection unit configured to detect a plurality of motion vectors between a first image and a second image based on a correlation between the first image and the second image; a determination unit configured to determine a degree of reliability for each of the plurality of motion vectors based on a corresponding evaluation value regarding the correlation; and a control unit configured to control the function based on a motion vector the degree of reliability of which is evaluated as being high, from among the plurality of motion vectors, wherein the determination unit determines the degree of reliability for each of the plurality of motion of vectors further based on a corresponding difference in amount of bokeh between the first image and the second image, and wherein the function includes at least one of an image stabilization function and a subject tracking function.