1. An image processing device comprising: a processor configured to: identify a plurality of first pixels and a plurality of second pixels included in a target image represented by target image data, the plurality of first pixels representing an object, the plurality of second pixels representing a background; set, in the target image, a target range of pixels in which at least one first pixel and at least one second pixel are included; change, to a second pixel, a first pixel that is included in the target range and is adjacent to the second pixel, thereby classifying the plurality of first pixels into at least one changed first pixel and remaining first pixels, the changed first pixel being a first pixel that has been changed to a second pixel, each of the remaining first pixels being a first pixel that has been unchanged; and determine a characteristic quantity by using pixel values of the remaining first pixels, the characteristic quantity relating to a number of colors in the object.