org.openimaj.image.processing.pyramid
Class Pyramid<OPTIONS extends PyramidOptions<OCTAVE,IMAGE>,OCTAVE extends Octave<OPTIONS,?,IMAGE>,IMAGE extends Image<?,IMAGE> & SinglebandImageProcessor.Processable<Float,FImage,IMAGE>>

java.lang.Object
  extended by org.openimaj.image.processing.pyramid.Pyramid<OPTIONS,OCTAVE,IMAGE>
Type Parameters:
OPTIONS - Type of options object
OCTAVE - Type of underlying octave
IMAGE - Type of underlying image
All Implemented Interfaces:
Iterable<OCTAVE>, ImageProcessor<IMAGE>
Direct Known Subclasses:
GaussianPyramid

public abstract class Pyramid<OPTIONS extends PyramidOptions<OCTAVE,IMAGE>,OCTAVE extends Octave<OPTIONS,?,IMAGE>,IMAGE extends Image<?,IMAGE> & SinglebandImageProcessor.Processable<Float,FImage,IMAGE>>
extends Object
implements ImageProcessor<IMAGE>, Iterable<OCTAVE>

An image pyramid consisting of a stack of octaves. Octaves are processed by an OctaveProcessor as they are created if the processor is set in the options object. The pyramid will only hold onto its octaves if either the keepOctaves option is set to true, or if a PyramidProcessor is set in the options. The PyramidProcessor will called after all the octaves are created. Pyramids are Iterable for easy access to the octaves; however this will only work if the pyramid has already been populated with the octaves retained.

Author:
Jonathon Hare

Field Summary
protected  List<OCTAVE> octaves
          A list of all the octaves should you want to keep them.
protected  OPTIONS options
          Options for the pyramid
 
Constructor Summary
Pyramid(OPTIONS options)
          Construct a Pyramid with the given options.
 
Method Summary
 List<OCTAVE> getOctaves()
          Get the octaves of this pyramid if they have been retained by the processing.
 OPTIONS getOptions()
          Get the options used to initialise this pyramid
 Iterator<OCTAVE> iterator()
           
abstract  void process(IMAGE img)
          Process the image and construct a pyramid applying any specified OctaveProcessor and/or PyramidProcessor along the way.
 void processImage(IMAGE image, Image<?,?>... otherimages)
          Process an image with an optional set of other images as inputs.
 void setOptions(OPTIONS options)
          Set the options used to initialise this pyramid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

options

protected OPTIONS extends PyramidOptions<OCTAVE,IMAGE> options
Options for the pyramid


octaves

protected List<OCTAVE extends Octave<OPTIONS,?,IMAGE>> octaves
A list of all the octaves should you want to keep them.

See Also:
PyramidOptions.keepOctaves
Constructor Detail

Pyramid

public Pyramid(OPTIONS options)
Construct a Pyramid with the given options.

Parameters:
options - the options
Method Detail

process

public abstract void process(IMAGE img)
Process the image and construct a pyramid applying any specified OctaveProcessor and/or PyramidProcessor along the way. If a PyramidProcessor is specified or the options have keepOctaves set to true, then the octaves of the pyramid will be retained.

Parameters:
img - image to build pyramid from.

processImage

public void processImage(IMAGE image,
                         Image<?,?>... otherimages)
Description copied from interface: ImageProcessor
Process an image with an optional set of other images as inputs. Implementing classes must alter the image passed in-place.

Specified by:
processImage in interface ImageProcessor<IMAGE extends Image<?,IMAGE> & SinglebandImageProcessor.Processable<Float,FImage,IMAGE>>
Parameters:
image - The image to process in place.
otherimages - An optional set of other images.

getOptions

public OPTIONS getOptions()
Get the options used to initialise this pyramid

Returns:
the options

setOptions

public void setOptions(OPTIONS options)
Set the options used to initialise this pyramid

Parameters:
options - the options

getOctaves

public List<OCTAVE> getOctaves()
Get the octaves of this pyramid if they have been retained by the processing.

Returns:
the octaves

iterator

public Iterator<OCTAVE> iterator()
Specified by:
iterator in interface Iterable<OCTAVE extends Octave<OPTIONS,?,IMAGE>>


Copyright © 2011 The University of Southampton. All Rights Reserved.