Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | List of all members
BIAS::MultipleDepthWarp Class Reference

#include <OpenGLFramework/SpecializedBatches/MultipleDepthWarp.hh>

Public Types

enum  DEPTH_COR_TYPE { NONE = 0, POLYNOM = 1, LINEAR = 2 }
 
enum  WARPING_TYPE { DISPARITY = 0, DEPTH = 1 }
 

Public Member Functions

void ChangeTargetCam (const ProjectionParametersPerspective &targetCam)
 
void FlipTextureCoordinates (bool flip)
 
void FlopTextureCoordinates (bool flop)
 
glfFramebufferObjectGetFrameBufferObject ()
 
int GetProjectedTexture (Image< unsigned char > &texture)
 
std::vector< glfTexture2D * > * GetResultDepthMapsFromNViewWarp ()
 
std::vector< glfTexture2D * > * GetResultTexturesFromNViewWarp ()
 
glfTexture2DGetTexture (unsigned int index)
 
int GetTextureAsImage (Image< float > &dispMap, unsigned int index)
 
int GetWarpedDisparity (Image< float > &dispMap)
 
gives the warped disparity / depth map as a bias image
More...
 
glfTexture2DGetWarpedDispTexture ()
 
int GetWarpedZBuffer (Image< float > &zbuffer)
 gives the warped zbuffer as bias image More...
 
int Init (const ProjectionParametersPerspective &targetCam, std::vector< Projection > &sourceCameras, bool createDepthMaps=true)
 
 MultipleDepthWarp ()
 
void SetBaseline (const float &baseline)
 Determines the baseline of the virtual standard stereo setup used for disparity calculation. More...
 
void SetDepthCorType (DEPTH_COR_TYPE type)
 
int SetDepthMap (glfTexture2D *depthMap, unsigned int index)
 sets a texture for depthMap More...
 
void SetDepthScaleBeforeWarping (float scale)
 
void SetDiscardAngle (float degree)
 
void SetDispForDistance (const float &dist_from_cam, const float &disp)
 if disparity output is required, then points with the distance (dist_from_cam) will get disparity (disp) More...
 
int SetProjectiveTextureCam (const ProjectionParametersPerspective &textureCam)
 sets the parameters for the camera for projective texturing this camera will be used to project the texture on the scene textureCam must be a perspective camera More...
 
int SetupNViewsWarp (const double &distToScreen, const double &zoom, const double &shift, unsigned int numberOfViews, unsigned int centralViewIndex, bool separate=true)
 
void SetWarpType (WARPING_TYPE type)
 
void SetZNearAndZFar (const float &zNear, const float &zFar)
 this function sets near and far clipping planes for the target camera default parameters defined in the constructor are zNear = 100, zFar = 8000 More...
 
void SwithToMultiStereoModus (bool stereo)
 
int UploadDepthMap (Image< float > &depthMap, unsigned int index)
 uploads the given depthMap to the gpu as texture depthMap is a depth map from source camera i More...
 
void UploadProjectiveTexture (const Image< unsigned char > &projectiveTexture)
 uploads the image which will be used for projective texturing of the scene to the corresponding texture projectiveTexture image for projective texturing More...
 
void UseProjectiveTexturing (bool enable)
 enable or disables use of projective texturing More...
 
int Warp ()
 
warps the depths maps for all sourceCameras to the target camera
view as disparity / depth map
More...
 
int Warp (unsigned int index)
 warps the depths maps for all sourceCameras to the target camera view as disparity map More...
 
int WarpNViews ()
 
 ~MultipleDepthWarp ()
 

Detailed Description

Examples:
ExampleMultipleDepthWarp.cpp.

Definition at line 40 of file MultipleDepthWarp.hh.

Member Enumeration Documentation

Enumerator
NONE 
POLYNOM 
LINEAR 

Definition at line 43 of file MultipleDepthWarp.hh.

Enumerator
DISPARITY 
DEPTH 

Definition at line 47 of file MultipleDepthWarp.hh.

Constructor & Destructor Documentation

MultipleDepthWarp::MultipleDepthWarp ( )

Definition at line 14 of file MultipleDepthWarp.cpp.

References BIAS::NONE.

MultipleDepthWarp::~MultipleDepthWarp ( )

Definition at line 41 of file MultipleDepthWarp.cpp.

Member Function Documentation

void MultipleDepthWarp::ChangeTargetCam ( const ProjectionParametersPerspective targetCam)
void BIAS::MultipleDepthWarp::FlipTextureCoordinates ( bool  flip)
inline

Definition at line 161 of file MultipleDepthWarp.hh.

void BIAS::MultipleDepthWarp::FlopTextureCoordinates ( bool  flop)
inline

Definition at line 157 of file MultipleDepthWarp.hh.

glfFramebufferObject* BIAS::MultipleDepthWarp::GetFrameBufferObject ( )
inline

Definition at line 186 of file MultipleDepthWarp.hh.

int MultipleDepthWarp::GetProjectedTexture ( Image< unsigned char > &  texture)
std::vector<glfTexture2D*>* BIAS::MultipleDepthWarp::GetResultDepthMapsFromNViewWarp ( )
inline

Definition at line 202 of file MultipleDepthWarp.hh.

std::vector<glfTexture2D*>* BIAS::MultipleDepthWarp::GetResultTexturesFromNViewWarp ( )
inline
Examples:
ExampleMultipleDepthWarp.cpp.

Definition at line 198 of file MultipleDepthWarp.hh.

glfTexture2D* BIAS::MultipleDepthWarp::GetTexture ( unsigned int  index)
inline

Definition at line 178 of file MultipleDepthWarp.hh.

int BIAS::MultipleDepthWarp::GetTextureAsImage ( Image< float > &  dispMap,
unsigned int  index 
)
inline

Definition at line 169 of file MultipleDepthWarp.hh.

int MultipleDepthWarp::GetWarpedDisparity ( Image< float > &  dispMap)
glfTexture2D* BIAS::MultipleDepthWarp::GetWarpedDispTexture ( )
inline

Definition at line 165 of file MultipleDepthWarp.hh.

int MultipleDepthWarp::GetWarpedZBuffer ( Image< float > &  zbuffer)
int MultipleDepthWarp::Init ( const ProjectionParametersPerspective targetCam,
std::vector< Projection > &  sourceCameras,
bool  createDepthMaps = true 
)
Parameters
targetCammust be a perspective camera
sourceCamerasmust be a vector of cameras
createDepthMapsdetermines whether the depth map textures, which are used for generating the triangle meshes are generated by this object or if you pass pointers to already existent depth maps, in the later case UploadDepthMap will use the specified textures.
Examples:
ExampleMultipleDepthWarp.cpp.

Definition at line 50 of file MultipleDepthWarp.cpp.

References BIAS::glfTexture::Create().

void MultipleDepthWarp::SetBaseline ( const float &  baseline)

Determines the baseline of the virtual standard stereo setup used for disparity calculation.

Definition at line 579 of file MultipleDepthWarp.cpp.

void BIAS::MultipleDepthWarp::SetDepthCorType ( DEPTH_COR_TYPE  type)
inline

Definition at line 190 of file MultipleDepthWarp.hh.

int MultipleDepthWarp::SetDepthMap ( glfTexture2D depthMap,
unsigned int  index 
)

sets a texture for depthMap

Attention
can only be used if createDepthMaps = false by calling Init

Definition at line 202 of file MultipleDepthWarp.cpp.

void MultipleDepthWarp::SetDepthScaleBeforeWarping ( float  scale)
Examples:
ExampleMultipleDepthWarp.cpp.

Definition at line 598 of file MultipleDepthWarp.cpp.

void MultipleDepthWarp::SetDiscardAngle ( float  degree)
Examples:
ExampleMultipleDepthWarp.cpp.

Definition at line 594 of file MultipleDepthWarp.cpp.

void MultipleDepthWarp::SetDispForDistance ( const float &  dist_from_cam,
const float &  disp 
)

if disparity output is required, then points with the distance (dist_from_cam) will get disparity (disp)

Examples:
ExampleMultipleDepthWarp.cpp.

Definition at line 570 of file MultipleDepthWarp.cpp.

int MultipleDepthWarp::SetProjectiveTextureCam ( const ProjectionParametersPerspective textureCam)

sets the parameters for the camera for projective texturing this camera will be used to project the texture on the scene textureCam must be a perspective camera

Examples:
ExampleMultipleDepthWarp.cpp.

Definition at line 172 of file MultipleDepthWarp.cpp.

int MultipleDepthWarp::SetupNViewsWarp ( const double &  distToScreen,
const double &  zoom,
const double &  shift,
unsigned int  numberOfViews,
unsigned int  centralViewIndex,
bool  separate = true 
)
void BIAS::MultipleDepthWarp::SetWarpType ( WARPING_TYPE  type)
inline
Examples:
ExampleMultipleDepthWarp.cpp.

Definition at line 194 of file MultipleDepthWarp.hh.

void MultipleDepthWarp::SetZNearAndZFar ( const float &  zNear,
const float &  zFar 
)

this function sets near and far clipping planes for the target camera default parameters defined in the constructor are zNear = 100, zFar = 8000

Examples:
ExampleMultipleDepthWarp.cpp.

Definition at line 585 of file MultipleDepthWarp.cpp.

void BIAS::MultipleDepthWarp::SwithToMultiStereoModus ( bool  stereo)
inline

Definition at line 206 of file MultipleDepthWarp.hh.

int MultipleDepthWarp::UploadDepthMap ( Image< float > &  depthMap,
unsigned int  index 
)

uploads the given depthMap to the gpu as texture depthMap is a depth map from source camera i

Examples:
ExampleMultipleDepthWarp.cpp.

Definition at line 190 of file MultipleDepthWarp.cpp.

void MultipleDepthWarp::UploadProjectiveTexture ( const Image< unsigned char > &  projectiveTexture)

uploads the image which will be used for projective texturing of the scene to the corresponding texture projectiveTexture image for projective texturing

Examples:
ExampleMultipleDepthWarp.cpp.

Definition at line 185 of file MultipleDepthWarp.cpp.

void BIAS::MultipleDepthWarp::UseProjectiveTexturing ( bool  enable)
inline

enable or disables use of projective texturing

Examples:
ExampleMultipleDepthWarp.cpp.

Definition at line 84 of file MultipleDepthWarp.hh.

int MultipleDepthWarp::Warp ( )

warps the depths maps for all sourceCameras to the target camera
view as disparity / depth map

Definition at line 274 of file MultipleDepthWarp.cpp.

References BIAS::ProjectionParametersPerspectiveDepth::GetDepthCalibrationParameters().

int MultipleDepthWarp::Warp ( unsigned int  index)

warps the depths maps for all sourceCameras to the target camera view as disparity map

Definition at line 217 of file MultipleDepthWarp.cpp.

int MultipleDepthWarp::WarpNViews ( )
Examples:
ExampleMultipleDepthWarp.cpp.

Definition at line 484 of file MultipleDepthWarp.cpp.


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