Milestones
| 1 | 2 | 3 |

2. Extraction of image information along patch boundaries

The second task is to get information of image data along the boundaries of the segment patches. To achieve this several preprocessing steps are neccesary.


a) Postprocessing of the patch boundaries

The boundaries of the image patches we get from the getBoundaries function of SA_Image have to be processed in order to remove unnecessary information and to bring them in a desired form.
The class SA_VectorArray offers the function removeSmallerThan that removes all boundaries that are shorter than a specified treshold value. This is useful to remove too short boundaries that contain few information and thus unneccesary slow down further processing.

The function SA_prepareBoundaries first removes all positions of the each boundary that lie on the image frame. These positions are undesired as they are not actually boundaries of the patches. Second the function also removes the boundary with the longest part along the image frame as this information is redundant. As a last step each boundary is rotated such that the position with the largest y value is the begin of the boundary. These sanctions should help to get better alignment results in later processing.

A third postprocessing is done using the function SA_extendBoundaries. This method takes a SA_VectorArray with boundary information and a factor between 0 (without) and 1 (with). The factor denotes the percentage with which the boundary should be extendet. This should also lead to better alignment results as this step can lead to possible alignment of boundary information independent of the start and end point.




b) Creation of Polar Scales

A second prerequisite to extract information along the boundaries is a proper scale where to extract the information. For this pupose SA_getPolarScale or SA_getLogPolarScale is used. Both functions return an instance of SA_VectorArray with all the positions of each sector in an element. See the image below for an example of SA_getPolarScale(30,4,2):

The positions in each element of the vector array are with respect to (0,0). This means all the positions can be applied to boundary positions by simply adding them together and thus generating offset positions.

The log polar scale generates similar masks as the polar scale except that the radii of the circles increase by a delta with respect to each previous one:

The generated vector array of both SA_getPolarScale and SA_getLogPolarScale are sorted in such a way that it starts from the outermost circle and goes counterclockwise through each segment untill the innermost. See the picture above of SA_getPolarScale(30,4,2) to see in which oder they are stored. With this order we also hope to increase the alignment scores for similar boundaries.




c) Extracting information into strings

The final step is to use these above documented functions to extract information along the boundaries. For now the only information extracted is the sum of all grey values of a generated edge detection image of the original image. The values are summed up over all positions in one sector - thus over all position in one element of the vector array given by the (log) polar scale. This task is done by the function SA_evaluateEdgeSum and results in an instance of SA_VectorArray containing the corresponding [N x k] strings for each boundary. These strings can now be used for alignment.

The whole process of extracting boundaries and the information along these boundaries is combined in the function SA_extract. This function takes an Image and the corresponding edge sum image and returns the boundaries and the corresponding strings.




Copyright © 2007 Thomas Oskam, ETH Zürich. All rights reserved.