1. An image processing apparatus comprising: a count unit that counts the number of black pixels or the number of white pixels of an original binary image; a transform unit that transforms the original binary image into a transformed image based on a given transform level, each pixel value of the transformed image being represented as a multiple value; a first calculation unit that calculates the number of black pixels or the number of white pixels of the transformed image, based on the given transform level and the number of black pixels or the number of white pixels of the original binary image counted by the count unit; a second calculation unit that calculates a threshold level based on the number of pixels for each pixel value of the transformed image and the number of black pixels or the number of white pixels of the transformed image calculated by the first calculation unit; a binarization unit that binarizes the transformed image based on the threshold level.