1. An image processing apparatus comprising a generator that compares, in pixel units, sixth image data with seventh image data or second image data, and generates a determination image, wherein the sixth image data is obtained by selecting, in pixel units, a minimum value of a value of first image data of a determination target and a value of fifth image data obtained by performing edge enhancement processing to the first image data, the seventh image data is obtained by performing preset first processing with respect to second image data for comparison representing the same image as the first image data, and the generator sets in the determination image a preset third value for pixels where a value of the sixth image data is equal to or less than a value of the seventh image data or the second image data, or is equal to or less than a sum of the value of the seventh image data or the second image data and a preset first value, and sets a value different from the third value for all other pixels.