1. An image processing apparatus comprising: one or more processors; and a memory storing instructions which, when executed by the processor, cause the image processing apparatus to function as: a specifying unit configured to specify pixels to be processed in a scanned image, the pixels to be processed being included in a target area including a target pixel and pixels in a vicinity of the target pixel; a smoothing unit configured to smooth a pixel value of the target pixel by using pixels specified by the specifying unit; and a determination unit configured to determine whether the target pixel is a color pixel or monochrome pixel based on the smoothed pixel value, wherein a result of the determination by the determining unit is used for a process of determining whether the scanned image is a color image or a monochrome image, and wherein the specifying unit, in a case where the target area includes a plurality of background areas which are not adjacent, specifies pixels which are between the background areas and are included in other than the background area in the target area, and does not specify pixels which are not between the background areas in the target area.