SA_prepareBoundaries


Usage:

PrepVA = SA_prepareBoundaries(VecArr, Framewidth, ImgSize)

VecArr: SA_VectorArray; A list of position arrays. The k dimension (row size) of the elements must be 2.
Framewidth: Uint; The width of the image border (in pixel)
ImgSize: [1 x 2] Uint; Height and width of the image from which de border is computed.

PrepVA: SA_VectorArray; The prepared version of VecArr.


Description

SA_prepareBoundaries applies some precomputations and selections to the boundary list (VecArr). Parts of the algorithm require the elements in the SA_VectorArray to be of row widh 2 (see k dimension in SA_VectorArray).

The changes that are done to the boundaries in VecArr are listed below:

All points of each boundary that lie within (Framewidt+1) pixel of the border of the image are removed.

The boundary with the most positions within (Framewidth+1) pixel of the border of the image is completely removed.

Each boundary is rotated such that the first position is the one with the highest y value (if there is more than one the first to occur in the list is used).




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