Basic Image AlgorithmS Library
2.8.0
|
#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) |
glfFramebufferObject * | GetFrameBufferObject () |
int | GetProjectedTexture (Image< unsigned char > &texture) |
std::vector< glfTexture2D * > * | GetResultDepthMapsFromNViewWarp () |
std::vector< glfTexture2D * > * | GetResultTexturesFromNViewWarp () |
glfTexture2D * | GetTexture (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 imageMore... | |
glfTexture2D * | GetWarpedDispTexture () |
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 mapMore... | |
int | Warp (unsigned int index) |
warps the depths maps for all sourceCameras to the target camera view as disparity map More... | |
int | WarpNViews () |
~MultipleDepthWarp () | |
Definition at line 40 of file MultipleDepthWarp.hh.
Enumerator | |
---|---|
NONE | |
POLYNOM | |
LINEAR |
Definition at line 43 of file MultipleDepthWarp.hh.
Enumerator | |
---|---|
DISPARITY | |
DEPTH |
Definition at line 47 of file MultipleDepthWarp.hh.
MultipleDepthWarp::MultipleDepthWarp | ( | ) |
Definition at line 14 of file MultipleDepthWarp.cpp.
References BIAS::NONE.
MultipleDepthWarp::~MultipleDepthWarp | ( | ) |
Definition at line 41 of file MultipleDepthWarp.cpp.
void MultipleDepthWarp::ChangeTargetCam | ( | const ProjectionParametersPerspective & | targetCam | ) |
Definition at line 160 of file MultipleDepthWarp.cpp.
References BIAS::ProjectionParametersBase::GetImageSize().
|
inline |
Definition at line 161 of file MultipleDepthWarp.hh.
|
inline |
Definition at line 157 of file MultipleDepthWarp.hh.
|
inline |
Definition at line 186 of file MultipleDepthWarp.hh.
int MultipleDepthWarp::GetProjectedTexture | ( | Image< unsigned char > & | texture | ) |
Definition at line 544 of file MultipleDepthWarp.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), and BIAS::Image< StorageType >::Release().
|
inline |
Definition at line 202 of file MultipleDepthWarp.hh.
|
inline |
Definition at line 198 of file MultipleDepthWarp.hh.
|
inline |
Definition at line 178 of file MultipleDepthWarp.hh.
|
inline |
Definition at line 169 of file MultipleDepthWarp.hh.
int MultipleDepthWarp::GetWarpedDisparity | ( | Image< float > & | dispMap | ) |
gives the warped disparity / depth map as a bias image
Definition at line 530 of file MultipleDepthWarp.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), and BIAS::Image< StorageType >::Release().
|
inline |
Definition at line 165 of file MultipleDepthWarp.hh.
int MultipleDepthWarp::GetWarpedZBuffer | ( | Image< float > & | zbuffer | ) |
gives the warped zbuffer as bias image
Definition at line 557 of file MultipleDepthWarp.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), and BIAS::Image< StorageType >::Release().
int MultipleDepthWarp::Init | ( | const ProjectionParametersPerspective & | targetCam, |
std::vector< Projection > & | sourceCameras, | ||
bool | createDepthMaps = true |
||
) |
targetCam | must be a perspective camera |
sourceCameras | must be a vector of cameras |
createDepthMaps | determines 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. |
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.
|
inline |
Definition at line 190 of file MultipleDepthWarp.hh.
int MultipleDepthWarp::SetDepthMap | ( | glfTexture2D * | depthMap, |
unsigned int | index | ||
) |
sets a texture for depthMap
Definition at line 202 of file MultipleDepthWarp.cpp.
void MultipleDepthWarp::SetDepthScaleBeforeWarping | ( | float | scale | ) |
Definition at line 598 of file MultipleDepthWarp.cpp.
void MultipleDepthWarp::SetDiscardAngle | ( | float | degree | ) |
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)
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
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 |
||
) |
Definition at line 363 of file MultipleDepthWarp.cpp.
References BIAS::glfTexture::Create(), BIAS::ProjectionParametersBase::GetC(), BIAS::ProjectionParametersBase::SetC(), BIAS::ProjectionParametersPerspective::SetIntrinsics(), and BIAS::ProjectionParametersPerspective::UnProjectLocal().
|
inline |
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
Definition at line 585 of file MultipleDepthWarp.cpp.
|
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
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
Definition at line 185 of file MultipleDepthWarp.cpp.
|
inline |
enable or disables use of projective texturing
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 | ( | ) |
Definition at line 484 of file MultipleDepthWarp.cpp.