Image Processing Reference
In-Depth Information
picture points to be processed in the outer for loops that give the co-ordinates of all points
resulting from template convolution. The template is convolved at each picture point by
generating a running summation of the pixel values within the template's window multiplied
by the respective template weighting coefficient. Finally, the resulting image is normalised
to ensure that the brightness levels are occupied appropriately.
Template convolution is usually implemented in software. It can of course be implemented
in hardware and requires a two-line store, together with some further latches, for the
(input) video data. The output is the result of template convolution, summing the result of
multiplying weighting coefficients by pixel values. This is called pipelining, since the
pixels essentially move along a pipeline of information. Note that two line stores can be
used if the video fields only are processed. To process a full frame, one of the fields must
be stored if it is presented in interlaced format.
Processing can be analogue, using operational amplifier circuits and a Charge Coupled
Device (CCD) for storage along bucket brigade delay lines. Finally, an alternative
implementation is to use a parallel architecture: for Multiple Instruction Multiple Data
(MIMD) architectures, the picture can be split into blocks (spatial partitioning); Single
Instruction Multiple Data (SIMD) architectures can implement template convolution as a
combination of shift and add instructions.
3.4.2
Averaging operator
For an averaging operator , the template weighting functions are unity (or 1/9 to ensure that
the result of averaging nine white pixels is white, not more than white!). The template for
a 3 × 3 averaging operator, implementing Equation 3.17, is given by the template in Figure
3.13 . The result of averaging the eye image with a 3 × 3 operator is shown in Figure 3.14 .
This shows that much of the detail has now disappeared revealing the broad image structure.
The eyes and eyebrows are now much clearer from the background, but the fine detail in
their structure has been removed.
1/ 9
1/ 9
1/ 9
1/ 9
1/ 9
1/ 9
1/ 9
1/ 9
1/ 9
Figure 3.13
3 ×
3 averaging operator template coefficients
For a general implementation, Code 3.6 , we can define the width of the operator as
winsize , the template size is winsize × winsize . We then form the average of all
points within the area covered by the template. This is normalised (divided by) the number
of points in the template's window. This is a direct implementation of a general averaging
operator (i.e. without using the template convolution operator in Code 3.5 ).
In order to implement averaging by using the template convolution operator, we need to
define a template. This is illustrated for direct averaging in Code 3.7 , even though the
simplicity of the direct averaging template usually precludes such implementation. The
application of this template is also shown in Code 3.7 . (Note that there are averaging
operators in Mathcad and Matlab that can be used for this purpose too.)
Search WWH ::




Custom Search