Wednesday, March 10, 2010

Activity 3 - Silhouette Processing

Silhouette processing involves the analysis of the properties of the outlines of different types of objects. This has significant applications in feature registrations as an additional classifier. It is therefore critical to provide the necessary parameters in silhouette processing. The technique applied in this activity is the Freeman vector code. The Freeman vector code gives an alternative way of describing the relative coordinates, as shown below. A 3x3 sub-array in a binary image may look like the figure below. Whether the code is derived in clockwise or counterclockwise direction, the relative coordinate of one of the adjacent white box to the central white box ranges from 1-8, based on the numbers as shown in the diagram. If clockwise, the Freeman vector code would be 3. If counterclockwise, it would be 6. The direction in which the Freeman vector code is derived should be consistent until the code is complete, or the initial position has been reached. This is helpful in describing the outlines of an object, which is the case in silhouette processing.

Freeman vector code diagram

To perform silhouette processing, an object of interest is first chosen. The object can be imaged against a background with high contrast to easily perform edge detection of the object. Edge detection can be done using functions in Matlab or Scilab with a binary image of the object as input. It is therefore important that the object is well-distinguished from the background so that the edge is crisp, and the silhouette processing is accurate. The coordinates of the edges are converted in Freeman vector code. The difference of the codes of adjacent pixels are taken and then a running sum of three of the adjacent results are obtained. This is plotted on the image to determine the properties of the outline that the output of algorithm represents.
The sample object chosen here is the image of a letter "B." The binary image was taken and edge detection was performed. Further post-processing was implemented to obtain only the outer outline of the letter "B." This is the main focus for this activity, but it can easily be extended on the inner outlines of the letter. The extension would provide more features to characterize the shape of the letter.
Figure: (a) original sample image: letter "B", (b) binary image, (c) edge detection and (d) post-processing to obtain Freeman vector code.
After performing the algorithm, the features of the outline can be classified. The result is displayed below, with the values plotted on the location along the outline that it describes. A zoom-in on the part on the intersection curve of the two lobes of "B" shows the meaning of the resulting values. The -3 value occurs at the outline that is largely curved outward. The positive values, on the other hand, occur on inward curvatures of the outline. Zero values occur if there are no curvature. This is an effective characterization of the silhouette shape. However, there are some irregularities in the results. The kinks produce false curves. This is a result of a pixelized outline image, because the lines are not perfectly smooth. This also shows how critical the pre-processing of the image is. If the silhouette is not well-defined from the background, many irregularities may occur along its edge.

Result (click for larger view)
Result: zoomed-in view
One possible application for this technique is by analyzing handwritings. Letters can be processed, like the one used in this activity. Silhouette processing can be performed on individual letters on a signature, to determine if it is forged or not, and also to know who has written a certain handwritten document.

No comments:

Post a Comment