PURPOSE: To obtain a circuit which performs stable binary coding operation by generating a histogram from many-valued data extracted by removing intermediate gradation levels through an extreme value extracting circuit, and obtaining a threshold value from the gradation level corresponding to the extreme value of the histogram.
CONSTITUTION: The extreme value extracting circuit 1 makes a raster scanning on a gradational image to extract extreme values of many-valued data distributed in one or two dimensions which are obtained by converting the density of respective two-dimensional picture elements into 256 gradations. A histogram generating circuit 2 generates the histogram on the basis of the extracted extreme values and this is smoothed by a movement averaging circuit 3 and stored in a buffer 4. A minimum extracting circuit 5 extracts the gradation level corresponding to the minimum value of the obtained histogram. A converting circuit 6 converts input many-valued data into binary data on the basis of the obtained gradation level as a threshold value. Consequently, a histogram having clear indentations is obtained, so the stable threshold value is obtained, thereby performing the stable binary coding operation.