Patent ID: 8907972

Claim:
An image processing device comprising: a local mean image generating section configured to generate a local mean image of an image to be processed; a binarization image generating section configured to generate a binarization image of said image to be processed, where pixels corresponding to high frequency regions in said image to be processed have a first grey scale and pixels corresponding to low frequency regions in said image to be processed have a second grey scale; a ternarization image generating section configured to generate a ternarization image of said image to be processed by dividing, based on comparison between said image to be processed and the local mean image, regions having the first grey scale in the binarization image into regions having the first grey scale and regions having a third grey scale; a connected-component analyzing section configured to recognize connected regions having the second grey scale in the ternarization image; a filling section configured to fill the connected regions with the first grey scale when a ratio of an amount of pixels having the first grey scale to that of pixels having the third grey scale at boundaries of the connected regions is greater than a predetermined threshold, and to fill the connected regions with the third grey scale when a ratio of an amount of pixels having the third grey scale to that of pixels having the first grey scale at boundaries of the connected regions is greater than the predetermined threshold; and a recognizing section configured to recognize strokes and lines in said image to be processed according to consistency of grey scale at object boundaries in the filled ternarization image.