Patent ID: 8457415

Claim:
A method for post-processing a pixel-classified binary image for determination of a number of objects in the image comprising a material of interest, the method comprising: receiving a binary image containing pixels which have been classified using a pixel classification method, each pixel in said image has an intensity value, each of said pixels has a binary value depending on whether said pixel was classified as a material of interest or not; defining a block of pixels of size m×n, where any of: m≧2 and n≧2; (A) calculating a density value using intensity values collected for pixels in a block of pixels of said size, said block encompassing a current pixel; (B) comparing said density to a pre-determined threshold value; and (C) in response to said density being less than said threshold, setting all pixels in this block to zero, otherwise setting all pixels in this block to a non-zero value; and shifting said block by k pixels, where k is less than m or n; repeating steps (A)-(C) until all pixels in said image have been processed; grouping together connected pixels having a same binary value to form objects; and counting a number of said formed objects in said image.