SPATMOD::IMAGE::FILTER_STEREO Class Reference

Filter to generate stereo image. More...

#include <spatmod/imagefilterstereo.h>

Inheritance diagram for SPATMOD::IMAGE::FILTER_STEREO:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 FILTER_STEREO (STAGE *pStageDrape, bool TakeOwnershipDrape, STAGE *pStageTerrain, bool TakeOwnershipTerrain, double DisplacementScale, double DisplacementZeroValue, const BASE &RefImage, RESAMPLEMETHOD ResampleMethod, bool InterlaceStartRight=false)
 FILTER_STEREO (STAGE *pStageDrape, bool TakeOwnershipDrape, STAGE *pStageTerrain, bool TakeOwnershipTerrain, double DisplacementScale, double DisplacementZeroValue, const DIMENSIONS &Dimensions, const GEOREFERENCE &Georeference, RESAMPLEMETHOD ResampleMethod, bool InterlaceStartRight=false)
virtual ~FILTER_STEREO ()
void SetAccuracy (double accuracy)
void SetStereoDevice (const STEREODEVICE &StereoDevice)

Detailed Description

Filter to generate stereo image.

This filter creates either a left or right epipolar image and then combines it with the "normal" image using the default or specified stereo combination methods (anaglyph or interlacing). This filter will avoid processing of any pixels or samples that are ultimately excluded from the rendering based on the stereo combination method. Further filtering of resulting image is not recommended as most filters will alter the image in ways unsuitable for stereo viewing.

The drape stage must have a pixel type of RGB for the analyph and Sharp stereo methods. All samples from the drape stage must have the same data type. The terrain stage must have a single component of any numeric data type.

The value for DisplacementScale should be chosen such that the maximum actual displacement is reasonably small, typically no more than 50 pixels, both in order to maintain visual stereo fusion, as well as for processing efficiency. This value effectively controls the "vertical exaggeration" and relative "depth" of the rendering. The value for DisplacementZeroValue must be within the range of the overall terrain value and typically will be near the maximum terrain value for a particular rendering. This may require implementation of user controls for adjustment, or a preprocessing pass may be made to estimate this value based on the portion of the terrain used in the rendering. Rendered pixels on the terrain "above" the "zero displacement" will appear "closer" to the viewer than the rendering plane (monitor screen). Pixels on the terrain far "below" the "zero displacement" level may appear with too much separation.

The coordinate transformation between resulting image and input stage is computed using georeference as specified in constructor, or georeference from specified reference image, along with the georeference from the input stage. An optional transformation accuracy may be specified via SetAccuracy() to allow use of efficient affine transformation if appropriate. Note that source image will not be processed "sequentially", and the sections specified in PullBegin for the source will overlap. It is recommended that this filter be placed early in the pipeline or that a suitable caching filter be placed ahead of it if the input requires significant computation or sequential iteration.


Constructor & Destructor Documentation

SPATMOD::IMAGE::FILTER_STEREO::FILTER_STEREO ( STAGE pStageDrape,
bool  TakeOwnershipDrape,
STAGE pStageTerrain,
bool  TakeOwnershipTerrain,
double  DisplacementScale,
double  DisplacementZeroValue,
const DIMENSIONS Dimensions,
const GEOREFERENCE Georeference,
RESAMPLEMETHOD  ResampleMethod,
bool  InterlaceStartRight = false 
)

Construct using specified dimensions and georeference.

Parameters:
pStageDrape Pointer to stage to "drape" onto terrain
TakeOwnershipDrape Filter takes ownership of drape stage and will delete when needed
pStageTerrain Pointer to stage for terrain elevation
TakeOwnershipTerrain Filter takes ownership of terrain stage and will delete when needed
DisplacementScale Terrain displacement scale in horizontal cells per vertical unit (-)left, (+)right
DisplacementZeroValue Terrain value having zero displacement
Dimensions Resulting image dimensions
Georeference Georeference for resulting image
ResampleMethod Resampling method
InterlaceStartRight First interlaced pixel (column or row) is Right if true, Left if false
SPATMOD::IMAGE::FILTER_STEREO::FILTER_STEREO ( STAGE pStageDrape,
bool  TakeOwnershipDrape,
STAGE pStageTerrain,
bool  TakeOwnershipTerrain,
double  DisplacementScale,
double  DisplacementZeroValue,
const BASE RefImage,
RESAMPLEMETHOD  ResampleMethod,
bool  InterlaceStartRight = false 
)

Construct to match specified reference image.

Parameters:
pStageDrape Pointer to stage to "drape" onto terrain
TakeOwnershipDrape Filter takes ownership of drape stage and will delete when needed
pStageTerrain Pointer to stage for terrain elevation
TakeOwnershipTerrain Filter takes ownership of terrain stage and will delete when needed
DisplacementScale Terrain displacement scale in horizontal cells per vertical unit (-)left, (+)right
DisplacementZeroValue Terrain value having zero displacement
RefImage Reference image to match
ResampleMethod Resampling method
InterlaceStartRight First interlaced pixel (column or row) is Right if true, Left if false
virtual SPATMOD::IMAGE::FILTER_STEREO::~FILTER_STEREO (  )  [virtual]

Member Function Documentation

void SPATMOD::IMAGE::FILTER_STEREO::SetAccuracy ( double  accuracy  )  [inline]

Set transformation accuracy in source cells.

If within the specified accuracy, a fast affine transformation will be used for computation. If used, must be done before Initialize(). Default accuracy is .5 cells.

Parameters:
accuracy Transformation accuracy in source cells.
void SPATMOD::IMAGE::FILTER_STEREO::SetStereoDevice ( const STEREODEVICE StereoDevice  ) 

Set rendering method parameters.

If not used then current global settings will be used.


The documentation for this class was generated from the following file:

Generated on Sun Oct 7 21:39:58 2012 for TNTsdk 2012 by  doxygen 1.6.1