public class ColorBackgroundSubtractor extends BackgroundSubtractor
BackgroundSubtractor
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected int |
background |
protected int[] |
filterInteger |
protected double |
threshold |
filterByte, filterFloat, filterShort, frames, height, ip, otherFilters, width
Constructor and Description |
---|
ColorBackgroundSubtractor(java.util.List<AbstractFilter> otherFilters) |
Modifier and Type | Method and Description |
---|---|
void |
addFrame(ij.process.ImageProcessor ip)
Adds a new frame to the general background.
|
void |
clearFilters()
Removes the general background.
|
protected float |
convertRGBtoFloat(int pix) |
protected void |
generateFilter()
Generates the general background from the added frames.
|
int |
getBackground()
Returns the RGB value of the background.
|
java.lang.String |
getName()
Returns the name of the process.
|
AbstractFilter |
getNewInstance()
Returns a new Instance of the original object.
|
double |
getThreshold()
Returns the threshold value.
|
ij.process.ImageProcessor |
processImage(ij.process.ImageProcessor ip)
This function carries out the filtering.
|
void |
setBackground(int background)
Sets the color background to the specified combined RGB value.
|
void |
setThreshold(double threshold)
Sets the threshold value.
|
void |
showGUI()
Shows the GUI if it exists.
|
getFilterImage, getSupportedImageType
isSupported, isSupported, processImage, toString
protected int[] filterInteger
protected double threshold
protected int background
public ColorBackgroundSubtractor(java.util.List<AbstractFilter> otherFilters)
public void addFrame(ij.process.ImageProcessor ip)
BackgroundSubtractor
addFrame
in class BackgroundSubtractor
protected void generateFilter()
BackgroundSubtractor
generateFilter
in class BackgroundSubtractor
public void clearFilters()
BackgroundSubtractor
clearFilters
in class BackgroundSubtractor
public ij.process.ImageProcessor processImage(ij.process.ImageProcessor ip)
AbstractFilter
processImage
in class BackgroundSubtractor
ip
- original image.protected float convertRGBtoFloat(int pix)
public double getThreshold()
public void setThreshold(double threshold)
threshold
- between 0-1.public int getBackground()
Color
public void setBackground(int background)
background
- Color.Color(int)
public java.lang.String getName()
CustomisableProcess
getName
in interface CustomisableProcess
getName
in class BackgroundSubtractor
public void showGUI()
CustomisableProcess
showGUI
in interface CustomisableProcess
showGUI
in class BackgroundSubtractor
public AbstractFilter getNewInstance()
CustomisableProcess
getNewInstance
in interface CustomisableProcess
getNewInstance
in class BackgroundSubtractor