1. An image processing apparatus comprising: one or more processors; and a memory coupled to the one or more processors, the memory having stored thereon instructions which, when executed by the one or more processors, cause the image processing apparatus to: acquire image data; acquire distance information corresponding to the image data; detect one or more object regions, each representing an object, from the image data based on the distance information; set a specific three-dimensional region; extract an object region representing an object which does not overlap the specific three-dimensional region, from among detected object regions, based on the distance information; and perform image processing for synthesizing the extracted object region in the image data and a corresponding region in the background image at a predetermined ratio or replacing the extracted object region in the image data with the corresponding region in the background image.