1. An apparatus comprising: a processor; and a memory storing a program including instructions executed by the processor, wherein the processor and the memory are operatively coupled to function as units comprising: (1) a first input unit configured to input a two-dimensional image of a measurement object captured by an image capturing apparatus; (2) an obtaining unit configured to obtain distance data of the measurement object measured by a distance sensor; (3) a second input unit configured to input a user's instruction; (4) a mode selecting unit configured to select a usage mode based on the user's instruction from (a) a first mode, in which a measurement is performed using the two-dimensional image and the distance data, and (b) a second mode, in which a measurement is performed using only one of the two-dimensional image and the distance data; and (5) a measurement unit configured to measure a position and orientation of the measurement object in accordance with the usage mode selected by the mode selecting unit.