1. An image processing apparatus comprising a processor and a memory containing instructions that when executed by the processor, cause the processor to perform operations, comprising: acquiring a plurality of divided filters being configured such that a calculation result becomes a target filter to be applied to an input image; generating a plurality of intermediate images by applying the plurality of divided filters to the input image; and adding the plurality of intermediate images while shifting positions of the respective intermediate images so that positions of the respective intermediate images correspond to a position of a focused pixel of the target filter to generate an output image, wherein the generating generates the intermediate images while changing an area to be used for performing calculation, for each of the plurality of divided filters.