1. An image processing apparatus comprising: a decision unit configured to decide a threshold value that is used to determine an edge portion based on at least a pixel value having a minimum density in pixel values of a plurality of pixels constituting a reference area, being a part of first image data, including a target pixel and peripheral pixels of the target pixel; a determination unit configured to obtain a contrast value indicating a contrast of the reference area based on the pixel values of the plurality of pixels in the reference area, and to compare the contrast value with the threshold value to determine whether or not the target pixel is included in the edge portion; a halftone processing unit configured to generate second image data by performing halftone processing on the first image data; and a correction unit configured to correct a pixel value of the second image data corresponding to the target pixel determined to be included in the edge portion using correction data generated based on a pixel value of the target pixel.