Digital Signal Processing Reference
In-Depth Information
19
SEGMENTATION AND FOCUS
Steve Fielding, Base2Designs
CHAPTER OUTLINE
19.1 Measuring Focus 182
19.1.1 Gradient Techniques
182
19.1.2 Variance Techniques
184
19.2 Segmentation 185
19.2.1 Template Matching
185
19.2.2 FPGA Implementation
190
The majority of image-processing algorithms require a prop-
erly focused image for best results. For some applications this may
not be difficult to achieve because the camera capturing the image
will have a large depth of field: objects at a wide range of distances
from the camera will all appear in focus without having to adjust
the focus of the camera. However, for cameras that have narrow
depth of field, the image will not always be in focus, and there
needs to be some way of assigning a focus score to an image
e
a measure of focus “goodness”. The focus score serves two
purposes:
Out-of-focus images with low focus score can be rejected. This
improves the results from image processing algorithms that
require focused images and reduces the processing load on
these algorithms.
The focus score can be used in the feedback control of
a camera autofocus mechanism.
Because focus-score assessment is at the front end of any
image-processing system, it has a large impact on system
performance. For example, imagine a video stream that contains
focused and unfocused images, and feeding these to an image
processor that takes one second to process each video frame. The
system would be generating a lot of bad results, and also taking
a long time to generate a good result. In fact, if the image
processor is randomly sampling the incoming video frames (i.e.
there is no video storage), it may never produce a good result.
 
 
Search WWH ::




Custom Search