SA_getPolarScale


Usage:

PolarScale = SA_getPolarScale(Radius, Segments, Sectors)

Radius: Uint; The radius of the mask.
Segments: Uint; The number of segments the circle should be divided into.
Sectors: Uint; The number of Sectors wich each segment should be devided into.

PolarScale: SA_VectorArray; A list of position arrays.


Description

SA_getPolarScale generates a mask that divies all pixel with a distance smaller than Radius from the center into (Sectors*Segments) bins. Each bin is an element in the SA_VectorArray structure (PolarScale). The bins are sorted from the outmost circle counter clock wise to the inner most one. The sector at the bottom right is always the first.

Sectors defines the number into which the angle of the point to the center closes to [1,0] is divided.
Segments defines the number of circles. This means the number of sectors into which each segment is divided.

The following image shows a visualisation of the result of SA_getPolarScale(30,4,2):

The numbers 1 through 8 show the order in which the segments (actually a list of the points in space that belong to it) are stored in the VectorArray.

NOTE: The generation of the mask uses [-0.5,-0.5] as center (and not [0,0]). This is such that the center lies on the cornerpoint of four pixel. This guarantees a more accurate assigning for points that are close to the center.




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