摘要 |
An image processing apparatus of an embodiment comprises: a setting unit that sets an operator consisting of a plurality of pixels including a target pixel in an image to be processed; a compilation unit that acquires gray-scale values of the respective pixels in the operator and generates, on the basis of the gray-scale values of the respective pixels, a histogram indicating the numbers of pixels corresponding to gray-scale values ranging from zero to a natural number N; and a conversion unit that, in the histogram, adds together the numbers of pixels corresponding to gray-scale values ranging from the gray-scale value 0 to the gray-scale value of the target pixel or subtracts, from the value N, the number of pixels corresponding to each of gray-scale values ranging from the gray-scale value N to the gray-scale value of the target pixel, thereby calculating a new gray-scale value and converting the gray-scale value of the target pixel to the new gray-scale value. |