at.ac.sbg.cosy.soccerbot.recognition
Class RegionList

java.lang.Object
  extended by at.ac.sbg.cosy.soccerbot.recognition.RegionList
All Implemented Interfaces:
IRegionCollector

public class RegionList
extends java.lang.Object
implements IRegionCollector

Static Region List

Author:
Peter Wild

Method Summary
 void addRegion(int id, int hsv, int center_x, int center_y, int height, int width, int size, boolean clipped)
          Adds a new region to a collection
static RegionList getInstance()
          Aquire private static singleton
 IRegion getRegion(int index)
          Returns the index-th region
 void increment()
          Increases the number of accessible elements by 1
 boolean isEmpty()
          Returns emptyness of list
 void reset()
          Shallow reset
 int size()
          Returns current size of list
 void sort()
          Does a region sorting of all accessible regions
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static RegionList getInstance()
Aquire private static singleton

Returns:
singleton region list

size

public int size()
Returns current size of list

Specified by:
size in interface IRegionCollector
Returns:
size of list

isEmpty

public boolean isEmpty()
Returns emptyness of list

Returns:
true, if this list is empty

getRegion

public IRegion getRegion(int index)
Returns the index-th region

Specified by:
getRegion in interface IRegionCollector
Parameters:
index - index which region to return
Returns:
region at position index

reset

public void reset()
Shallow reset


increment

public void increment()
Increases the number of accessible elements by 1


sort

public void sort()
Does a region sorting of all accessible regions


addRegion

public void addRegion(int id,
                      int hsv,
                      int center_x,
                      int center_y,
                      int height,
                      int width,
                      int size,
                      boolean clipped)
Description copied from interface: IRegionCollector
Adds a new region to a collection

Specified by:
addRegion in interface IRegionCollector
Parameters:
id - identification number of the region
hsv - average color in 32 bit hsv format
center_x - central x coordinate (with respect to full image)
center_y - central y coordinate (with respect to full image)
height - height of the region
width - width of the region
size - number of pixels within region
clipped - region is at boundary (clipped)
See Also:
IRegionCollector.addRegion(int, int, int, int, int, int, int, boolean)