Patent ID: 8457423

Claim:
A method of pre-processing a defocused image of an object, the method comprising: defining grayscale thresholds d Thresh and U Thresh as values within a grayscale having a highest grayscale level and a lowest grayscale level; using a processor, applying an object-based sharpening filter on the defocused image to produce a sharper image; and using a processor, quantizing the sharper image using block-wise quantization, by: dividing the sharper image into a series of n×m blocks, wherein each n×m block is a block of image data pixels n pixels in height and m pixels in width; defining a supporting N×M block corresponding to each n×m block, wherein each N×M block is a block of image data pixels N pixels in height and M pixels in width, N>n and M>m, and the N×M block encompasses the n×m block; and for each specific n×m block: defining max I as a maximum pixel grayscale value within the supporting N×M block corresponding to the specific n×m block, defining min I as a minimum pixel grayscale value within the supporting N×M block corresponding to the specific n×m block, defining ⁢ ⁢ mean I = ∑ i , j ⁢ pixel ⁡ ( i , j ) N × M ⁢ ⁢ ⁢ for ⁢ ⁢ all ⁢ ⁢ pixels ⁢ ⁢ ( i , j ) ⁢ ⁢ in ⁢ ⁢ the ⁢ ⁢ N × M ⁢ ⁢ block , setting all pixels within the specific n×m block to the highest grayscale level, if (max I −min I )<d Thresh and mean I >U Thresh , and setting all pixels within the specific n×m block to the lowest grayscale level, if (max I −min I )<d Thresh and mean I ≦U Thresh .