diewald_CV_kit.blobdetection
Class Blob

java.lang.Object
  extended by diewald_CV_kit.blobdetection.Blob

public final class Blob
extends Object

the class Blob represents the blobs/labels/regions found in an image.

Author:
thomas diewald (c) 2011

Method Summary
 PixelColor getColor()
          get the blobs current color.
 ArrayList<Contour> getContours()
          returns a list of all contours of this blob.
 int getID()
          returns the id of the blob.
 int getNumberOfPixels()
          get the total number of pixels of this blob. which is also the area-size of the blob.
 ArrayList<PixelRow> getPixelRows()
          get all the pixelrows of this blob.
 Pixel[] getPixels()
          get the list of blob-pixels.
 void setColor(PixelColor color)
          set this blobs color.
 void setID(int ID)
          give the blob a new ID.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setColor

public final void setColor(PixelColor color)
set this blobs color.

Parameters:
color - the new color of the blob.

getColor

public final PixelColor getColor()
get the blobs current color.

Returns:
the current blob-color.

getPixelRows

public final ArrayList<PixelRow> getPixelRows()
get all the pixelrows of this blob. usually there's no need for this.

Returns:
a list of all the pixelrows

setID

public final void setID(int ID)
give the blob a new ID.

Parameters:
ID - the new id.

getID

public final int getID()
returns the id of the blob.

Returns:
the id of the blob.

getContours

public final ArrayList<Contour> getContours()
returns a list of all contours of this blob.
there's only ONE outer contour, and there can be endless inner contours.
the outer contour has a clockwise rotation. All the inner ones have a counter-clockwise rotation.

Returns:
list of contours.

getNumberOfPixels

public final int getNumberOfPixels()
get the total number of pixels of this blob. which is also the area-size of the blob.

Returns:
number of pixels

getPixels

public final Pixel[] getPixels()
get the list of blob-pixels.

Returns:
list of blob-pixels


Processing library diewald_CV_kit by Thomas Diewald. (C) 2012