Image Processing Reference
In-Depth Information
k
(k, histogram) := histogram
I=1
I-1
k
µ (k, histogram):= I histogram
I-1
I=1
256
µ T (histogram) := I histogram
I-1
I=1
Otsu(image):=
histogram(image)
rows(image) cols(image)
image hist
-
for k 1..255
2
( T(image hist) (k, image hist)- (k, image hist))
(k, image hist)(1- (k, image hist))
-
-
-
values
k
-
-
find - value(max(values),values)
Code 3.4
Optimal thresholding by Otsu's technique
Also, we have so far considered global techniques, methods that operate on the entire
image. There are also locally adaptive techniques that are often used to binarise document
images prior to character recognition. A recent survey (Trier, 1995) compares global and
local techniques with reference to document image analysis. These techniques are often
used in statistical pattern recognition: the thresholded object is classified according to its
statistical properties. However, these techniques find less use in image interpretation,
where a common paradigm is that there is more than one object in the scene, such as Figure
3.7 where the thresholding operator has selected many objects of potential interest. As
such, only uniform thresholding is used in many vision applications, since objects are often
occluded (hidden), and many objects have similar ranges of pixel intensity. Accordingly,
more sophisticated metrics are required to separate them, by using the uniformly thresholded
image, as discussed in later chapters.
3.4
Group operations
3.4.1
Template convolution
Group operations calculate new pixel values from pixels' neighbourhoods by using a
'grouping' process. The group operation is usually expressed in terms of template convolution
where the template is a set of weighting coefficients. The template is usually square, and
its size is usually odd to ensure that it can be positioned appropriately. The size is normally
used to describe the template; a 3 × 3 template is three pixels wide by three pixels long.
New pixel values are calculated by placing the template at the point of interest. Pixel values
are multiplied by the corresponding weighting coefficient and added to an overall sum. The
sum (usually) evaluates a new value for the centre pixel (where the template is centred) and
this becomes the pixel in a new output image. If the template's position has not yet reached
the end of a line, the template is then moved horizontally by one pixel and the process
repeats.
 
Search WWH ::




Custom Search