s373.flob
Class Flob

java.lang.Object
  extended by s373.flob.Flob

public class Flob
extends Object

Fast multi-blob detector and simple skeleton tracker using flood-fill algorithms. http://s373.net/code/flob Flob is a continuous frame differencing algorithm using flood fill procedures to calculate blobs. Basic process is comparing incoming image to a background image. There are two main operating modes @om (flob.setOm()): -STATIC_DIFFERENCE (0) incoming image is compared to background. background is unchanged. -CONTINUOUS_DIFFERENCE (1) incoming image is compared to background. background is set to previous frame. -CONTINUOUS_EASE_DIFFERENCE (2) incoming image is compared to background. previous frame eased onto background pixels. Flob receives an ARGB Processing PImage as input and converts rgb->luma (luminance, greyscale image) using one of several methods specified through @colormode. The greyscale luminance image is then binarized (flob.binarize(Image)) using the @videothresh or @videothreshf value as reference. First the image is mirrored if specified through @mirrorX @mirrorY then the image is converted from argb->luma using @colormode possible @colormode values: @RED @GREEN @BLUE @LUMA601 @LUMA609 @LUMAUSER In openFrameworks, it's a similar procedure, you pass an image pixels array, and call the binarize method. To calculate the binary image, now Flob takes @thresholdmode to specify the operation to calculate the binary image. possible values include: - @ABS : absolute diference of incoming pixel versus background - @LESSER : if incoming pixel less than threshold, mark as white pixel in binary image - @GREATER : white if above @videothresh value You can also clamp the internal image (@clampGray) to focus on @nearGray and @farGray interval values. Usefull for kinect like clamping. Once you have the binary image essential for blob tracking, you can call the methods @flob.calc(PImage binImage), which returns a usable list of @ABlob's, or @flob.track(PImage binImage), @flob.tracksimple, @flob.calcsimple, which return a usable list of @TBlob's.


Field Summary
static int ABSDIF
           
 PApplet app
           
 float[] backgroundLuma
           
 int[] backgroundPixels
           
 int blobpixmax
           
 int blobpixmin
           
static int BLUE
           
static String bluestr
           
 int blur
           
 boolean clampGray
           
 int colormode
           
static int CONTINUOUS_DIFFERENCE
           
 float continuous_ease
           
static int CONTINUOUS_EASE_DIFFERENCE
           
 float[] currentLuma
           
 int farGray
           
 boolean floatmode
           
 float floatsmooth
           
static int GREATER
           
static int GREEN
           
static String greenstr
           
 ImageBlobs imageblobs
           
static int LESSER
           
static int LUMA601
           
static String luma601str
           
static int LUMA709
           
static String luma709str
           
static int LUMAUSER
           
 float[] lumausercoefs
           
static String lumausrstr
           
 boolean mirrorX
           
 boolean mirrorY
           
 int nearGray
           
 int numPixels
           
 int om
           
 int presence
           
 float presencef
           
 int pvideotexmode
           
static int RED
           
static String redstr
           
static int STATIC_DIFFERENCE
           
 boolean TBlobDoSorting
           
static int TBlobLifeTime
           
static float TBlobMaxDistSquared
           
 int thresholdmode
           
 boolean[] trackfeatures
           
static String VERSION
           
 int videofade
           
 float videofadef
           
 PImage videoimg
           
 int videoresh
           
 int videoresw
           
 PImage videotex
           
 PImage videotexbin
           
 PImage videoteximgmotion
           
 int videotexmode
           
 PImage videotexmotion
           
 int videothresh
           
 float videothreshf
           
 float worldheight
           
 float worldwidth
           
 
Constructor Summary
Flob(PApplet applet)
          Flob constructor usage summary: public Flob(PApplet applet): output dimensions of blob coords (PApplet.width, PApplet.height) & assumes incoming image 128px public Flob(PApplet applet, PImage video): output dimensions of blob coords (PApplet.width, PApplet.height) & assumes incoming image dimensions of @video public Flob(PApplet applet, PImage video, float w, float h): output dimensions of blob coords (@w, @h) & assumes incoming image dimensions of @video public Flob(PApplet applet, int srcW, int srcH, float dstW, float dstH): output dimensions of blob coords (@dstW, @dstH) & assumes incoming image dimensions of @srcW, @srcH
Flob(PApplet applet, int srcW, int srcH, float dstW, float dstH)
           
Flob(PApplet applet, PImage video)
           
Flob(PApplet applet, PImage video, float w, float h)
           
 
Method Summary
 PImage binarize(int[] pix)
           
 PImage binarize(PImage video)
          Flob.binarize() main image preprocessing stage.
 ArrayList<ABlob> calc(PImage img)
          calcs with current PImage.
 ArrayList<quadBlob> calcQuad(PImage img)
          calcs with current PImage.
 ArrayList<TBlob> calcsimple(PImage img)
          calcsimple is naive tracking.
 Flob easeBackground(PImage video)
          ease the background to compare to to this PImage.
 PImage fastblur(PImage img, int radius)
          PImage img = fastblur(PImage img, int radius); Super Fast Blur v1.1 by Mario Klingemann http://incubator.quasimondo.com
 ABlob getABlob(int i)
          getABlob returns the nth calc'ed blob of the tracker
returns one ABlob element

 float[] getABlobExtreme(int i)
           
 boolean getAnyFeatureActive()
          getAnyFeatureActive true if any feature points on
 int[] getBackground()
          gets the background image // todo: incorporate float here too, but not necessary, can access @backgroundPixelsF directly if needed
 int getBlur()
          get the blur amount on the image.
 String getColorMode()
          get selected colormode
 float getFade()
          get the fade value in flob.om > 0
 int getFarGray()
           
 float getFloatsmooth()
           
 PImage getImage()
          getImage gets the current video image worked inside flob
 float[] getLumaUserCoefs()
          get lumausercoefs
 int getMaxNumPixels()
          get max numpixels to be considered a blob
 int getMinNumPixels()
          get min numpixels to be considered a blob
 boolean[] getMirror()
          get mirror in XY axis
 int getNearGray()
           
 int getNumBlobs()
          getNumBlobs.
 int getNumQuadBlobs()
           
 int getNumTBlobs()
          getNumTBlobs.
 int getOm()
          get the current om, either CONTINUOUS_DIFFERENCE (1) or STATIC_DIFFERENCE (0)
 int getPresence()
          getPresence.
 float getPresencef()
          getPresencef.
 ABlob getPreviousABlob(int i)
          getPreviousABlob returns the nth calc'ed previous blob of the tracker
returns one ABlob element

 TBlob getPreviousTBlob(int i)
           
 TBlob getPreviousTrackedBlob(int i)
          getPreviousTrackedBlob returns the nth tracked previous blob of the tracker.
 quadBlob getQuadBlob(int i)
           
 float getSmooth()
          get smooth of blob speeds
 PImage getSrcImage()
          returns the updated videotex (in case it needs updating)
 TBlob getTBlob(int i)
           
 int getTBlobLifeTime()
          get the max lifetime for a TBlob
static float getTBlobMaxDistSquared()
           
 float getThresh()
          get the threshold value to the image binarization
 int getThresholdmode()
          get @thresholdmode
 TBlob getTrackedBlob(int i)
          getTrackedBlob returns the nth tracked blob of the tracker
returns the arraylist of trackedBlob elements

a tracked blob holds:

// pos & vel & dim results are local world coords

// int tb.id;
// float tb.cx;
// float tb.cy;
// float tb.velx;
// float tb.vely;
// float tb.prevelx;
// float tb.prevely;
// int tb.presencetime;
// float tb.dimx;
// float tb.dimy;
// int tb.birthtime;
 boolean[] getTrackFeatures()
          getTrackFeatures gets the boolean array with on/off's for searching feature points: armleft, armright, head, bottom for each blob
 float getTrackingMinDist()
          get tracking min dist to be the same blob
 boolean isClampGray()
           
 boolean isFloatmode()
          are you using floatmode?
 boolean isTBlobDoSorting()
           
 Flob mirrorX(boolean m)
          mirror video data along X axis?
 Flob mirrorY(boolean m)
          mirror video data along Y axis?
 Flob setBackground(PImage video)
          sets the background to compare to to this PImage.
 Flob setBlur(int blur)
          set the blur amount on the image.
 Flob setClampGray(boolean clampGray)
          new kinect specific code can clamp kinect image (or other rgbimages) between values of nearGray and farGray (works on 8bit 0-255 limits)
 Flob setColorMode(int t)
          set the colormode for the binarization stage.
 Flob setFade(float t)
          set the fade value in flob.om > 0
 Flob setFarGray(int farGray)
           
 void setFloatmode(boolean floatmode)
          activate floating point calculations in binarize image
 void setFloatsmooth(float floatsmooth)
           
 Flob setImage(int t)
          setImage sets the videotex returned by flob.videotex or flob.getSrcImage case 0: videotex = src videoimg as flob sees it (incoming image)
case 1: videotex = binary image result from om==0, incoming img vs static bg
case 2: videotex = binary image result from om>0, incoming img vs dynamic bg
case 3: videotex = image result from incoming img + binary image
 Flob setLumaUserCoefs(float[] data)
          set lumausercoefs
 Flob setMaxNumPixels(int t)
          set max numpixels to be considered a blob
 Flob setMinNumPixels(int t)
          set min numpixels to be considered a blob
 Flob setMirror(boolean m0, boolean m1)
          set mirror in XY axis with two booleans
 Flob setNearGray(int nearGray)
           
 Flob setOm(int t)
          set the om either CONTINUOUS_DIFFERENCE (1) or STATIC_DIFFERENCE (0) or CONTINUOUS_EASE_DIFFERENCE (2)
 Flob setSmooth(float s)
          set smooth factor for blob speeds changes
 Flob setSrcImage(int t)
          setSrcImage sets the videotex returned by flob.videotex or flob.getSrcImage
 Flob setTBlobDoSorting(boolean trackedBlobDoSorting)
           
 Flob setTBlobLifeTime(int t)
          set the max lifetime for a trackedblob
static void setTBlobMaxDistSquared(float trackedBlobMaxDistSquared)
          setTBlobMaxDistSquared
 Flob setThresh(float t)
          set the threshold value to the image binarization
 Flob setThresholdmode(int thresholdmode)
          set @thresholdmode - @flob.ABS (0): absolute diference of incoming pixel versus background - @flob.LESSER (1): if incoming pixel less than threshold, mark as white pixel in binary image - @flob.GREATER (2): white if above @videothresh value
 Flob setTrackFeatures(boolean[] tf)
          setTrackFeatures turns on/off searching for feature points: armleft, armright, head, bottom for each blob if (tflob.trackfeatures[0]) b = calc_feature_head(b); if (tflob.trackfeatures[1]) b = calc_feature_arms(b); if (tflob.trackfeatures[2])b = calc_feature_feet(b); if (tflob.trackfeatures[3])b = calc_feature_bottom(b);
 Flob setTrackingMinDist(float s)
          set tracking min dist to be the same blob
 Flob setTresh(float t)
          set the threshold value to the image binarization.
 Flob setVideoTex(int t)
          set the videotex returned by flob.videotex
case 0: videotex = src videoimg as flob sees it (incoming image)
case 1: videotex = binary image result from om==0, incoming img vs static bg
case 2: videotex = binary image result from om>0, incoming img vs dynamic bg
case 3: videotex = image result from incoming img + binary image
 boolean testPos(float x, float y)
          testPos float x, float y.
 boolean testPos(int x, int y)
          testPos int x, int y.
 ArrayList<TBlob> track(PImage img)
          calcs with current PImage.
 ArrayList<TBlob> tracksimple(PImage img)
          tracksimple is good tracking code, maintains id's, speed's, presencetime for each trackedBlob returns the arraylist of trackedBlob elements
 PImage updateVideoTex()
           
 String version()
          return the version of the library.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

app

public PApplet app

imageblobs

public ImageBlobs imageblobs

videoimg

public PImage videoimg

videotex

public PImage videotex

videotexmotion

public PImage videotexmotion

videotexbin

public PImage videotexbin

videoteximgmotion

public PImage videoteximgmotion

backgroundPixels

public int[] backgroundPixels

numPixels

public int numPixels

videoresw

public int videoresw

videoresh

public int videoresh

presence

public int presence

presencef

public float presencef

videotexmode

public int videotexmode

pvideotexmode

public int pvideotexmode

videothresh

public int videothresh

videothreshf

public float videothreshf

videofade

public int videofade

videofadef

public float videofadef

mirrorX

public boolean mirrorX

mirrorY

public boolean mirrorY

worldwidth

public float worldwidth

worldheight

public float worldheight

blur

public int blur

trackfeatures

public boolean[] trackfeatures

floatmode

public boolean floatmode

floatsmooth

public float floatsmooth

backgroundLuma

public float[] backgroundLuma

currentLuma

public float[] currentLuma

om

public int om

STATIC_DIFFERENCE

public static final int STATIC_DIFFERENCE
See Also:
Constant Field Values

CONTINUOUS_DIFFERENCE

public static final int CONTINUOUS_DIFFERENCE
See Also:
Constant Field Values

CONTINUOUS_EASE_DIFFERENCE

public static final int CONTINUOUS_EASE_DIFFERENCE
See Also:
Constant Field Values

continuous_ease

public float continuous_ease

colormode

public int colormode

RED

public static final int RED
See Also:
Constant Field Values

GREEN

public static final int GREEN
See Also:
Constant Field Values

BLUE

public static final int BLUE
See Also:
Constant Field Values

LUMA601

public static final int LUMA601
See Also:
Constant Field Values

LUMA709

public static final int LUMA709
See Also:
Constant Field Values

LUMAUSER

public static final int LUMAUSER
See Also:
Constant Field Values

redstr

public static String redstr

greenstr

public static String greenstr

bluestr

public static String bluestr

luma601str

public static String luma601str

luma709str

public static String luma709str

lumausrstr

public static String lumausrstr

lumausercoefs

public float[] lumausercoefs

thresholdmode

public int thresholdmode

ABSDIF

public static final int ABSDIF
See Also:
Constant Field Values

LESSER

public static final int LESSER
See Also:
Constant Field Values

GREATER

public static final int GREATER
See Also:
Constant Field Values

blobpixmin

public int blobpixmin

blobpixmax

public int blobpixmax

TBlobLifeTime

public static int TBlobLifeTime

TBlobMaxDistSquared

public static float TBlobMaxDistSquared

TBlobDoSorting

public boolean TBlobDoSorting

clampGray

public boolean clampGray

nearGray

public int nearGray

farGray

public int farGray

VERSION

public static String VERSION
Constructor Detail

Flob

public Flob(PApplet applet)
Flob constructor usage summary: public Flob(PApplet applet): output dimensions of blob coords (PApplet.width, PApplet.height) & assumes incoming image 128px public Flob(PApplet applet, PImage video): output dimensions of blob coords (PApplet.width, PApplet.height) & assumes incoming image dimensions of @video public Flob(PApplet applet, PImage video, float w, float h): output dimensions of blob coords (@w, @h) & assumes incoming image dimensions of @video public Flob(PApplet applet, int srcW, int srcH, float dstW, float dstH): output dimensions of blob coords (@dstW, @dstH) & assumes incoming image dimensions of @srcW, @srcH


Flob

public Flob(PApplet applet,
            PImage video)

Flob

public Flob(PApplet applet,
            PImage video,
            float w,
            float h)

Flob

public Flob(PApplet applet,
            int srcW,
            int srcH,
            float dstW,
            float dstH)
Method Detail

binarize

public PImage binarize(int[] pix)

binarize

public PImage binarize(PImage video)
Flob.binarize() main image preprocessing stage. outputs prepocessed PImage for tracking algorithms. incorporates fast blur code by Mario Klingemann thanks Eduardo Pinto & Fausto Fonseca for feedback during osomdopensamento.wordpress.com @ fbaul, 2009 thanks Mahesh Viswanathan for feedback, feb 2013. updated in 0024a to accomodate kinect clamping. Flob receives an ARGB Processing PImage as input and converts rgb->luma (luminance, greyscale image) using one of several methods specified through @colormode. binarize steps include: receives argb PImages @video; fastblurs' the Image using Mario Klingemann fast blur 1.1 code according to @blur parameter; mirrors if @mirrorX / @mirrorY activated; converts argb->luma derived from @colormode and from @clampGray values; compares luma image to @videothresh value according do @thresholdmode; returns binary output image;

Parameters:
PImage -
Returns:
PImage

getSrcImage

public PImage getSrcImage()
returns the updated videotex (in case it needs updating)

Returns:
PImage

updateVideoTex

public PImage updateVideoTex()

setVideoTex

public Flob setVideoTex(int t)
set the videotex returned by flob.videotex
case 0: videotex = src videoimg as flob sees it (incoming image)
case 1: videotex = binary image result from om==0, incoming img vs static bg
case 2: videotex = binary image result from om>0, incoming img vs dynamic bg
case 3: videotex = image result from incoming img + binary image

Returns:
void

setImage

public Flob setImage(int t)
setImage sets the videotex returned by flob.videotex or flob.getSrcImage case 0: videotex = src videoimg as flob sees it (incoming image)
case 1: videotex = binary image result from om==0, incoming img vs static bg
case 2: videotex = binary image result from om>0, incoming img vs dynamic bg
case 3: videotex = image result from incoming img + binary image

Parameters:
t -
Returns:
void

getImage

public PImage getImage()
getImage gets the current video image worked inside flob

Returns:
PImage

setSrcImage

public Flob setSrcImage(int t)
setSrcImage sets the videotex returned by flob.videotex or flob.getSrcImage

Returns:
void

setTrackFeatures

public Flob setTrackFeatures(boolean[] tf)
setTrackFeatures turns on/off searching for feature points: armleft, armright, head, bottom for each blob if (tflob.trackfeatures[0]) b = calc_feature_head(b); if (tflob.trackfeatures[1]) b = calc_feature_arms(b); if (tflob.trackfeatures[2])b = calc_feature_feet(b); if (tflob.trackfeatures[3])b = calc_feature_bottom(b);

Returns:
void

getTrackFeatures

public boolean[] getTrackFeatures()
getTrackFeatures gets the boolean array with on/off's for searching feature points: armleft, armright, head, bottom for each blob

Returns:
boolean[]

getAnyFeatureActive

public boolean getAnyFeatureActive()
getAnyFeatureActive true if any feature points on

Returns:
boolean

setOm

public Flob setOm(int t)
set the om either CONTINUOUS_DIFFERENCE (1) or STATIC_DIFFERENCE (0) or CONTINUOUS_EASE_DIFFERENCE (2)

Returns:
this

getOm

public int getOm()
get the current om, either CONTINUOUS_DIFFERENCE (1) or STATIC_DIFFERENCE (0)

Returns:
int

isFloatmode

public boolean isFloatmode()
are you using floatmode?

Returns:
@floatmode

setFloatmode

public void setFloatmode(boolean floatmode)
activate floating point calculations in binarize image

Parameters:
floatmode -

getFloatsmooth

public float getFloatsmooth()
Returns:
the floatsmooth

setFloatsmooth

public void setFloatsmooth(float floatsmooth)
Parameters:
floatsmooth - the floatsmooth to set

getThresholdmode

public int getThresholdmode()
get @thresholdmode

Returns:
thresholdmode

setThresholdmode

public Flob setThresholdmode(int thresholdmode)
set @thresholdmode - @flob.ABS (0): absolute diference of incoming pixel versus background - @flob.LESSER (1): if incoming pixel less than threshold, mark as white pixel in binary image - @flob.GREATER (2): white if above @videothresh value

Parameters:
thresholdmode -

setTBlobLifeTime

public Flob setTBlobLifeTime(int t)
set the max lifetime for a trackedblob

Returns:
void

getTBlobLifeTime

public int getTBlobLifeTime()
get the max lifetime for a TBlob

Returns:
int

getTBlobMaxDistSquared

public static float getTBlobMaxDistSquared()
Returns:
the TBlobMaxDistSquared

setTBlobMaxDistSquared

public static void setTBlobMaxDistSquared(float trackedBlobMaxDistSquared)
setTBlobMaxDistSquared

Parameters:
the - trackedBlobMaxDistSquared to set

setColorMode

public Flob setColorMode(int t)
set the colormode for the binarization stage. how to consider a diff pix from background on which channel. red, green, blue, luma possible @colormode values:

Returns:
this

getColorMode

public String getColorMode()
get selected colormode

Returns:
String

setLumaUserCoefs

public Flob setLumaUserCoefs(float[] data)
set lumausercoefs

Returns:
this

getLumaUserCoefs

public float[] getLumaUserCoefs()
get lumausercoefs

Returns:
float[]

setBackground

public Flob setBackground(PImage video)
sets the background to compare to to this PImage. video param image *must* be <= internal flob dims.

Returns:
this

easeBackground

public Flob easeBackground(PImage video)
ease the background to compare to to this PImage. video param image *must* be <= internal flob dims.

Returns:
this

getBackground

public int[] getBackground()
gets the background image // todo: incorporate float here too, but not necessary, can access @backgroundPixelsF directly if needed

Returns:
int[]

setTresh

public Flob setTresh(float t)
set the threshold value to the image binarization. missing h for backwards compatibility

Returns:
this

setThresh

public Flob setThresh(float t)
set the threshold value to the image binarization

Returns:
this

getThresh

public float getThresh()
get the threshold value to the image binarization

Returns:
float @videothresh

setFade

public Flob setFade(float t)
set the fade value in flob.om > 0

Returns:
this

getFade

public float getFade()
get the fade value in flob.om > 0

Returns:
float @videofade

mirrorX

public Flob mirrorX(boolean m)
mirror video data along X axis?

Returns:
this

mirrorY

public Flob mirrorY(boolean m)
mirror video data along Y axis?

Returns:
this

setMirror

public Flob setMirror(boolean m0,
                      boolean m1)
set mirror in XY axis with two booleans

Returns:
this

getMirror

public boolean[] getMirror()
get mirror in XY axis

Returns:
boolean[]

setMinNumPixels

public Flob setMinNumPixels(int t)
set min numpixels to be considered a blob

Returns:
this

setMaxNumPixels

public Flob setMaxNumPixels(int t)
set max numpixels to be considered a blob

Returns:
this

getMinNumPixels

public int getMinNumPixels()
get min numpixels to be considered a blob

Returns:
int

getMaxNumPixels

public int getMaxNumPixels()
get max numpixels to be considered a blob

Returns:
int

setTrackingMinDist

public Flob setTrackingMinDist(float s)
set tracking min dist to be the same blob

Returns:
this

getTrackingMinDist

public float getTrackingMinDist()
get tracking min dist to be the same blob

Returns:
float

setSmooth

public Flob setSmooth(float s)
set smooth factor for blob speeds changes

Returns:
this

getSmooth

public float getSmooth()
get smooth of blob speeds

Returns:
float

setBlur

public Flob setBlur(int blur)
set the blur amount on the image. 0 = off, > 5 high blur

Returns:
void

getBlur

public int getBlur()
get the blur amount on the image. 0 = off, > 5 high blur

Returns:
int

isTBlobDoSorting

public boolean isTBlobDoSorting()
Returns:
the trackedBlobDoSorting

setTBlobDoSorting

public Flob setTBlobDoSorting(boolean trackedBlobDoSorting)
Parameters:
trackedBlobDoSorting - the trackedBlobDoSorting to set

isClampGray

public boolean isClampGray()
Returns:
the clampGray

setClampGray

public Flob setClampGray(boolean clampGray)
new kinect specific code can clamp kinect image (or other rgbimages) between values of nearGray and farGray (works on 8bit 0-255 limits)

Parameters:
clampGray - the clampGray to set

getNearGray

public int getNearGray()
Returns:
the nearGray

setNearGray

public Flob setNearGray(int nearGray)
Parameters:
nearGray - the nearGray to set

getFarGray

public int getFarGray()
Returns:
the farGray

setFarGray

public Flob setFarGray(int farGray)
Parameters:
farGray - the farGray to set

calc

public ArrayList<ABlob> calc(PImage img)
calcs with current PImage. PImage must be binary image by this stage. returns the arraylist of the blobs

Returns:
ArrayList

track

public ArrayList<TBlob> track(PImage img)
calcs with current PImage. PImage must be binary image by this stage. returns the arraylist of trackedBlob elements

Returns:
ArrayList

tracksimple

public ArrayList<TBlob> tracksimple(PImage img)
tracksimple is good tracking code, maintains id's, speed's, presencetime for each trackedBlob returns the arraylist of trackedBlob elements

Returns:
ArrayList

calcsimple

public ArrayList<TBlob> calcsimple(PImage img)
calcsimple is naive tracking. works good in stable configs. returns the arraylist of trackedBlob elements

Returns:
ArrayList

calcQuad

public ArrayList<quadBlob> calcQuad(PImage img)
calcs with current PImage. PImage must be binary image by this stage. returns the arraylist of the blobs

Returns:
ArrayList

getTrackedBlob

public TBlob getTrackedBlob(int i)
getTrackedBlob returns the nth tracked blob of the tracker
returns the arraylist of trackedBlob elements

a tracked blob holds:

// pos & vel & dim results are local world coords

// int tb.id;
// float tb.cx;
// float tb.cy;
// float tb.velx;
// float tb.vely;
// float tb.prevelx;
// float tb.prevely;
// int tb.presencetime;
// float tb.dimx;
// float tb.dimy;
// int tb.birthtime;

Returns:
trackedBlob

getTBlob

public TBlob getTBlob(int i)

getPreviousTrackedBlob

public TBlob getPreviousTrackedBlob(int i)
getPreviousTrackedBlob returns the nth tracked previous blob of the tracker. returns one trackedBlob element


getPreviousTBlob

public TBlob getPreviousTBlob(int i)

getABlobExtreme

public float[] getABlobExtreme(int i)

getABlob

public ABlob getABlob(int i)
getABlob returns the nth calc'ed blob of the tracker
returns one ABlob element

Returns:
ABlob

getQuadBlob

public quadBlob getQuadBlob(int i)

getPreviousABlob

public ABlob getPreviousABlob(int i)
getPreviousABlob returns the nth calc'ed previous blob of the tracker
returns one ABlob element

Returns:
ABlob

getNumBlobs

public int getNumBlobs()
getNumBlobs. should be called after calc.

Returns:
int

getNumTBlobs

public int getNumTBlobs()
getNumTBlobs. should be called after calc.

Returns:
int

getNumQuadBlobs

public int getNumQuadBlobs()

getPresence

public int getPresence()
getPresence. returns the number of active pixels

Returns:
int

getPresencef

public float getPresencef()
getPresencef. returns the normalized number of active pixels

Returns:
float

testPos

public boolean testPos(int x,
                       int y)
testPos int x, int y. tests a point coords x + y in the image map returns true if on a blob, false if not on a blob x and y should be constrained to src video dimensions

Returns:
boolean

testPos

public boolean testPos(float x,
                       float y)
testPos float x, float y. tests a point normalized coords x + y in the image map returns true if on a blob, false if not on a blob

Returns:
boolean

fastblur

public PImage fastblur(PImage img,
                       int radius)
PImage img = fastblur(PImage img, int radius); Super Fast Blur v1.1 by Mario Klingemann http://incubator.quasimondo.com

Returns:
PImage

version

public String version()
return the version of the library.

Returns:
String


Processing library flob by AndrŽ Sier. (C) 2008-2013