1. An apparatus comprising: a registration unit configured to register a person, in a database, in accordance with an instruction by a user; a detecting unit configured to detect information relating to image data; a grouping unit configured to perform person grouping, in a plurality of images, based on the information detected from the plurality of images by said detecting unit, wherein a result of the person grouping is registered in the database; a determination unit configured to determine one or more regions, in an image, corresponding to one or more persons; and a decision unit configured to, in a case where a first region corresponding to the person who has been registered in the database by the registration unit and a second region corresponding to a person who has not been registered in the database by the registration unit are both determined in one image by said determination unit, decide a portion of an output target in the one image based on the determination by said determination unit and the registration by said registration unit, so that the portion includes the first region and does not include the second region.