1. An image processing apparatus, comprising: a zero class detecting unit that detects a zero class in which an appearance frequency of a pixel value is zero from among a plurality of classes into which pixel values of an image are classified according to pixel value magnitude; and a non-zero class converting unit that converts the zero class into a non-zero class in which the appearance frequency of the pixel value is one or more, without updating a total number of the classes, by updating a range of the zero class detected by the zero class detecting unit.