1. An image processing apparatus for recording an image on a unit region of a recording medium by performing a plurality of relative scanning operations of the recording medium and a recording head including a plurality of recording elements arranged in a predetermined direction, with ejecting a recording agent for forming dots on the unit region by each of a plurality of recording element groups formed by one or more recording elements, the image processing apparatus comprising: one or more processors; and one or more non-transitory computer-readable media storing instructions that, when executed by the one or more processors, cause the one or more processors to perform operations comprising: a first obtaining step of obtaining image data corresponding to the image to be recorded on the unit region; a second obtaining step of obtaining a first dot count value corresponding to the image recorded on the unit region based on the image data obtained in the first obtaining step; a third obtaining step of obtaining a plurality of contribution ratios corresponding to the plurality of recording element groups, wherein each of the plurality of contribution ratios is a use ratio of the respective plurality of recording element groups for recording the image on the unit region; a fourth obtaining step of obtaining a plurality of second dot count values corresponding to the plurality of recording element groups based on the first dot count value obtained in the second obtaining step and the plurality of contribution ratio corresponding to the plurality of recording element groups obtained in the third obtaining step; and determining, based on the plurality of second dot count values obtained in the fourth obtaining step, whether density correction data for correcting the image data needs to be generated.