Image processing device, image forming apparatus, image processing method, and non-transitory computer-readable storage medium
An image processing device includes: an image classifying section which, through a convolutional neural network, classifies each pixel of input image data as expressing or not expressing a handwritten image to calculate a classification probability of each pixel, the classification probability being a probability that the handwritten image is expressed; a threshold setting section which sets a first threshold when removal processing to remove the handwritten image is performed and a second threshold which is smaller than the first threshold when emphasis processing to emphasize the handwritten image is performed; and an image processor which adjusts a gradation value of pixels with a classification probability no smaller than the first threshold to remove the handwritten image when the removal processing is performed and adjusts the gradation value of pixels with a classification probability no smaller than the second threshold to emphasize the handwritten image when the emphasis processing is performed.