An image processing apparatus obtains a plurality of radiation images generated by causing a plurality of radiation detectors to detect radiation with which a subject is irradiated, and generates an elongated image by synthesizing the plurality of radiation images. The image processing apparatus estimates a direction of the subject in each of the plurality of radiation images, and determines a direction of the subject in the elongated image based on a direction estimation result on each of the plurality of radiation images.