|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.ac.sbg.cosy.soccerbot.recognition.splitmerge.QuadNode
public class QuadNode
Library for linear (array) representation of quadtree nodes
Constructor Summary | |
---|---|
QuadNode()
|
Method Summary | |
---|---|
static int |
calculateMaxHierarchy(int size)
Calculates the maximum hierarchy level if image is decomosed using quadtrees. |
static int |
calculateSize(int mayHierarchy)
Creates a new array of QuadNode int values that can be indexed using the method position() with the Quad_Tree format (quad_h, quad_x, quad_y). |
static int |
child_position(int child_num,
int position)
Returns all child positions (as linear array positions) of a given quadtree node (as linear array position). |
static int |
hierarchyNeighbor(int neighbor_num,
int position)
Calculates the position of neighbor situated at the right/lower/left/upper side of the quadtree node, if it exists, else returns -1 as error value. |
static int |
lowerRight(int position,
int imageHierarchy)
Calculates the lower right coordinate of a quadNode within the observed image. |
static int |
parent_position(int position)
Returns parent position (as linear array positions) of a given quadtree node (as linear array position). |
static int |
position(int quad_h,
int quad_x,
int quad_y)
Conversion Quad_Tree format (quad_h, quad_x, quad_y) -> Linear array. |
static int |
quad_h(int position)
Reversing the formula from QuadNode.position this calculates the first parameter quad_h of the Quad_Tree format (quad_h, quad_x, quad_y) out of the linear representation. |
static int |
quad_x(int quad_h,
int position)
Reversing the formula from QuadNode.position this calculates the second parameter quad_x of the Quad_Tree format (quad_h, quad_x, quad_y) out of the linear representation. |
static int |
quad_y(int quad_h,
int position)
Reversing the formula from QuadNode.position this calculates the second parameter quad_y of the Quad_Tree format (quad_h, quad_x, quad_y) out of the linear representation. |
static int |
upperLeft(int position,
int imageHierarchy)
Calculates the upper left coordinate of a quadNode within the observed image. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QuadNode()
Method Detail |
---|
public static int calculateMaxHierarchy(int size)
size
- > 0, has to be a power of 2 (1,2,4,8,16,32,64,128,256,512) image width of square image
public static int calculateSize(int mayHierarchy)
mayHierarchy
- maximum hierarchy
public static int position(int quad_h, int quad_x, int quad_y)
quad_h
- >= 0 Hierarchy level quad_h starting at 0 - whole imagequad_x
- >= 0, < 2^{quad_h} Quadtree node raster distance from left (column) x-position quad_x starting at 0 - leftmostquad_y
- >= 0, < 2^{quad_h} Quadtree node raster distance from top (line) y-position quad_y starting at 0 - top
public static int quad_h(int position)
position
- linear array position of quadtree node
public static int quad_x(int quad_h, int position)
quad_h
- >= 0 Hierarchy level quad_h starting at 0 - whole imageposition
- linear array position of quadtree node
public static int quad_y(int quad_h, int position)
quad_h
- >= 0 Hierarchy level quad_h starting at 0 - whole imageposition
- linear array position of quadtree node
public static int child_position(int child_num, int position)
child_num
- >= 0, < 4 child numberposition
- linear array position of quadtree node to which childs are to be calculated
public static int parent_position(int position)
position
- linear array position of quadtree node to which parent is to be calculated
public static int upperLeft(int position, int imageHierarchy)
position
- linear array position of quadtree node to which image coordinate is to be calculatedimageHierarchy
- Level, at which the image is contained (for which it starts at index 0)
public static int lowerRight(int position, int imageHierarchy)
position
- linear array position of quadtree node to which image coordinate is to be calculatedimageHierarchy
- Level, at which the image is contained (for which it starts at index 0)
public static int hierarchyNeighbor(int neighbor_num, int position)
neighbor_num
- >= 0, < 4 neighbor number (0: right, 1: lower, 2: left, 3: upper)position
- linear array position of quadtree node to which image coordinate is to be calculated
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |