public class GaussianPyramidOperation extends java.lang.Object implements DatasetOperation
Constructor and Description |
---|
GaussianPyramidOperation()
Creates a new GaussianPyramidOperation with a GaussianBlur of radius 5, halves the size of the input at each
step, and stops if the width and/or height of a step is less than 1.
|
GaussianPyramidOperation(BlurOperation blurOperation)
Creates a new GaussianPyramidOperation with the specified blur op, halves the size of the input at each step,
and stops if the width and/or height of a step is less than 1.
|
GaussianPyramidOperation(BlurOperation blurOp,
int scaleFactor,
int windowSize)
Creates a new GaussianPyramidOperation
|
GaussianPyramidOperation(int scaleFactor,
int windowSize)
Creates a new GaussianPyramidOperation with no blur, halving the size at each step, and stopping if the width
and/or height of a step is less than the specified window size.
|
Modifier and Type | Method and Description |
---|---|
BlurOperation |
getBlur()
Blur operation
|
java.util.Map<java.lang.String,java.lang.Object> |
getObjectMap()
Creates a map of the important fields for the instance, suitable for serialization.
|
int |
getScaleFactor()
Decimation factor - typically 2 to make each level of the pyramid 1/2 the size of its predecessor.
|
long |
getSerializationVersion()
Returns the current version of the serialization format.
|
int |
getVersion()
Returns the current class version.
|
int |
getWindowSize()
Size of the smallest level of the pyramid - stops when this threshold is reached.
|
void |
initCurrentVersion(java.util.Map<java.lang.String,java.lang.Object> objectMap)
Initializes an instance with a current-version object graph.
|
Dataset |
run(Dataset input)
Blurs and subsamples the input data.
|
void |
setBlur(BlurOperation blur) |
void |
setScaleFactor(int scaleFactor)
Decimation factor - typically 2 to make each level of the pyramid 1/2 the size of its predecessor.
|
void |
setWindowSize(int windowSize)
Sets the cutoff size of the pyramid - operation is complete when this threshold is reached
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
init, initPreviousVersion, initUnknownVersion, load, read, save, write
public GaussianPyramidOperation(BlurOperation blurOp, int scaleFactor, int windowSize)
blurOp
- blur operationscaleFactor
- scaling factor to use e.g. 2 to halve the size at each stepwindowSize
- size of the smallest steppublic GaussianPyramidOperation()
public GaussianPyramidOperation(BlurOperation blurOperation)
blurOperation
- blur operation to usepublic GaussianPyramidOperation(int scaleFactor, int windowSize)
scaleFactor
- scaling factor between successive steps, typically 2 for halving at each stepwindowSize
- size of the windowpublic Dataset run(Dataset input)
run
in interface DatasetOperation
input
- Dataset on which to operatepublic BlurOperation getBlur()
public void setBlur(BlurOperation blur)
public int getScaleFactor()
public void setScaleFactor(int scaleFactor)
scaleFactor
- scaling factor between succesive levels of the pyramidpublic int getWindowSize()
public void setWindowSize(int windowSize)
windowSize
- new thresholdpublic long getSerializationVersion()
ObjectMap
getSerializationVersion
in interface ObjectMap
public int getVersion()
ObjectMap
getVersion
in interface ObjectMap
public java.util.Map<java.lang.String,java.lang.Object> getObjectMap()
ObjectMap
getObjectMap
in interface ObjectMap
public void initCurrentVersion(java.util.Map<java.lang.String,java.lang.Object> objectMap)
ObjectMap
initCurrentVersion
in interface ObjectMap
objectMap
- object graph for initialization