1. A detection apparatus for detecting feature points in an image, the detection apparatus comprising a processor and a memory storing instructions which, when executed by the processor, cause the detection apparatus to: receive a shooting mode for shooting the image; set a number of feature points to be detected from first and second regions of the image when the shooting mode is a first mode such that a ratio between a number of feature points detected from the first region of the image when the shooting mode is the first mode and a number of feature points detected from the second region of the image when the shooting mode is the first mode is larger than a ratio between a number of feature points detected from the first region of the image when the shooting mode is a second mode and a number of feature points detected from the second region of the image when the shooting mode is the second mode; and detect the feature points of the number set in accordance with the shooting mode.