An image processing apparatus configured to separate at least one group of pixels during binarization processing for subsequent processing, comprising: first binarization means for performing first binarization processing (S603, S604) on an input image to convert pixels darker than a first two-dimensional array of binarization thresholds into black pixels and convert pixels lighter than or equal to the first two-dimensional array of binarization thresholds to white pixels to generate a first binary image, the first two-dimensional array of binarization thresholds having the same size as the input image; and characterized by comprising: second binarization means for performing second binarization processing (S605, S606) on the input image to convert pixels darker than a second two-dimensional array of binarization thresholds into black pixels and convert pixels lighter than or equal to the second two-dimensional array of binarization thresholds to white pixels to generate a second binary image, the second two-dimensional array of binarization thresholds having the same size as the input image and being respectively larger than the first two-dimensional array of binarization thresholds used in the first binarization processing with respect to a same pixel of the input image; separation means for separating at least one group of black pixels out of the groups of black pixels included in the second binary image by generating a difference image obtained by calculating a difference between the first binary image (7b, 9a) and the second binary image (7c, 9b), and separating, in a case where a black pixel exists in a contracted binary image as a result of contraction processing that is performed on the difference image and which converts a black pixel adjacent to a white pixel into a white pixel, a group of black pixels included in the second binary image corresponding to the remaining black pixel in the contracted binary image as a group of black pixels not to be used in the subsequent processing; and processing means for converting into white pixels, from the second binary image, the group of black pixels separated as the group of black pixels not to be used in the subsequent processing. second binarization means for performing second binarization processing (S605, S606) on the input image to convert pixels darker than a second two-dimensional array of binarization thresholds into black pixels and convert pixels lighter than or equal to the second two-dimensional array of binarization thresholds to white pixels to generate a second binary image, the second two-dimensional array of binarization thresholds having the same size as the input image and being respectively larger than the first two-dimensional array of binarization thresholds used in the first binarization processing with respect to a same pixel of the input image; separation means for separating at least one group of black pixels out of the groups of black pixels included in the second binary image by generating a difference image obtained by calculating a difference between the first binary image (7b, 9a) and the second binary image (7c, 9b), and separating, in a case where a black pixel exists in a contracted binary image as a result of contraction processing that is performed on the difference image and which converts a black pixel adjacent to a white pixel into a white pixel, a group of black pixels included in the second binary image corresponding to the remaining black pixel in the contracted binary image as a group of black pixels not to be used in the subsequent processing; and processing means for converting into white pixels, from the second binary image, the group of black pixels separated as the group of black pixels not to be used in the subsequent processing.