org.marvinproject.image.color.skinColorDetection
Class SkinColorDetection

java.lang.Object
  extended by marvin.plugin.MarvinAbstractImagePlugin
      extended by org.marvinproject.image.color.skinColorDetection.SkinColorDetection
All Implemented Interfaces:
marvin.plugin.MarvinImagePlugin, marvin.plugin.MarvinPlugin

public class SkinColorDetection
extends marvin.plugin.MarvinAbstractImagePlugin

Locates skin color pixels in an image.


Constructor Summary
SkinColorDetection()
           
 
Method Summary
protected  double calculateVectorAngle(int[] a_Vector1, int[] a_Vector2)
          Get the angle between two, two dimensional vectors
protected  void checkRule0(int a_currentRed, int a_currentGreen, int a_currentBlue, boolean[] a_rules)
           
protected  void checkRule1(int a_currentRed, int a_currentGreen, int a_currentBlue, boolean[] a_rules)
           
protected  void checkRule2(int a_currentRed, int a_currentGreen, int a_currentBlue, boolean[] a_rules)
           
protected  double findMagnitude(int[] a_Vector)
          Find the magnitude of a 2 element 'vector'
protected  void findMinMax(marvin.image.MarvinImage a_imageIn, int[] a_minMax)
          Find the minimum and maximum component of all the R, G and B values in an image.
 void load()
           
 int max3nums(int a_red, int a_green, int a_blue)
           
 int min3nums(int a_red, int a_green, int a_blue)
           
 void process(marvin.image.MarvinImage a_imageIn, marvin.image.MarvinImage a_imageOut, marvin.util.MarvinAttributes a_attributesOut, marvin.image.MarvinImageMask a_mask, boolean a_previewMode)
          Initiate the process of finding skin
 void show()
           
 
Methods inherited from class marvin.plugin.MarvinAbstractImagePlugin
getAttribute, getAttributes, getImagePanel, setAttribute, setImagePanel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SkinColorDetection

public SkinColorDetection()
Method Detail

load

public void load()

show

public void show()

process

public void process(marvin.image.MarvinImage a_imageIn,
                    marvin.image.MarvinImage a_imageOut,
                    marvin.util.MarvinAttributes a_attributesOut,
                    marvin.image.MarvinImageMask a_mask,
                    boolean a_previewMode)
Initiate the process of finding skin

Parameters:
MarvinImage - - the image to be rotated
boolean - - to display a preview

checkRule2

protected void checkRule2(int a_currentRed,
                          int a_currentGreen,
                          int a_currentBlue,
                          boolean[] a_rules)

max3nums

public int max3nums(int a_red,
                    int a_green,
                    int a_blue)

min3nums

public int min3nums(int a_red,
                    int a_green,
                    int a_blue)

checkRule1

protected void checkRule1(int a_currentRed,
                          int a_currentGreen,
                          int a_currentBlue,
                          boolean[] a_rules)

checkRule0

protected void checkRule0(int a_currentRed,
                          int a_currentGreen,
                          int a_currentBlue,
                          boolean[] a_rules)

findMinMax

protected void findMinMax(marvin.image.MarvinImage a_imageIn,
                          int[] a_minMax)
Find the minimum and maximum component of all the R, G and B values in an image.

Parameters:
a_imageIn -
a_minMax -

calculateVectorAngle

protected double calculateVectorAngle(int[] a_Vector1,
                                      int[] a_Vector2)
Get the angle between two, two dimensional vectors

Parameters:
a_Vector1, - a_Vector2 - the vectors who's angle of difference needs to be calculated

findMagnitude

protected double findMagnitude(int[] a_Vector)
Find the magnitude of a 2 element 'vector'

Parameters:
a_Vector -
Returns: