Patent ID: 8155445

Claim:
An image processing method comprising: using an image processing apparatus to perform steps including: a first pixel block sampling step of recursively sampling black pixel blocks and white pixel blocks from a binary image; a tree structure creating step of creating tree structure data indicating a positional relation between the black pixel blocks and white pixel blocks sampled in said first pixel block sampling step; a determining step of determining whether a black pixel density of the black pixel blocks is low, wherein the black pixel density is calculated using the number of black pixels included in the black pixel blocks and the number of all pixels included in the black pixel blocks; an inverted image creating step of creating an inverted image of the black pixel blocks included in the tree structure data by white-black-inverting the insides of black pixel blocks that can include inverted characters when it is determined in said determining step that the black pixel density of the black pixel blocks is not low, wherein said inverted image creating step is not performed when it is determined in said determining step that the black pixel density of the black pixel blocks is low; a second pixel block sampling step of sampling white pixel block and black pixel blocks from the inverted image created in said inverted image creating step; and a tree structure addition step of adding nodes corresponding to the white pixel blocks sampled in said second pixel block sampling step as child nodes of nodes corresponding to the white-black-inverted black pixel blocks of the tree structure data, and adding nodes corresponding to the black pixel blocks sampled in said second pixel block sampling step as child nodes of nodes corresponding to the white pixel blocks sampled in said second pixel black sampling step.