1. An information processing apparatus comprising: an image acquisition unit configured to acquire a captured image obtained by an imaging unit that captures an image; a storage unit configured to store first information indicating a relationship between a luminance value of an image captured by the imaging unit and an amount of variation of the luminance value; a variation amount deriving unit configured to derive an amount of variation of a luminance value of a predetermined area of the acquired captured image based on a luminance value of the predetermined area of the acquired captured image and the first information; an acquisition unit configured to acquire an amount of variation of a luminance gradient value based on the derived amount of variation of the luminance value, wherein the luminance gradient value is a gradient value of the luminance value; and a threshold value deriving unit configured to derive a threshold value with which a luminance gradient value obtained from the acquired captured image is to be compared, based on the acquired amount of variation of the luminance gradient value.