Segmentation is a critical problem in the system at hand, because the results determine the quality of any subsequent feature estimation task. As the setup used for image acquisition is not fixed and lighting conditions may vary, performance with changes in scale, perspective distortion and non-uniform lighting is particularly important. Since it is necessary to estimate the size of arbitrarily colored pills, a marker-based target of known geometry and background is used. For reasons of practicability, the dimensions of this target are chosen to fit into a wallet. Using a checkerboard background (see Figure 1), it is possible to robustly segment objects with reasonable requirements
in processing speed. Applicable images may be obtained from an autofocus camera, since fixed focus cameras are unable to give a sharp image of suitable size.