Image Utilities (IU)
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Groups Pages
Public Slots | Public Member Functions | Protected Member Functions | Protected Attributes
iu::Qt5DisparitymapGpuWidget Class Reference

Allows to display disparity or depth maps in 3D with a built-in mouse and keyboard interaction. More...

#include <qt5disparitymapgpuwidget.h>

Inheritance diagram for iu::Qt5DisparitymapGpuWidget:

Public Slots

void update_vertices (iu::ImageGpu_32f_C1 *depth, iu::ImageGpu_32f_C1 *im)
 

Public Member Functions

 Qt5DisparitymapGpuWidget (const iu::Size< 2 > sz, float translation_z, float f, float cx, float cy, float B=0.f, QWidget *parent=NULL)
 

Protected Member Functions

void paintGL ()
 
void initializeGL ()
 
void resizeGL (int w, int h)
 
void mousePressEvent (QMouseEvent *event)
 
void mouseMoveEvent (QMouseEvent *event)
 
void wheelEvent (QWheelEvent *event)
 
void keyPressEvent (QKeyEvent *event)
 
void init_cuda ()
 

Protected Attributes

cudaGraphicsResource_t cuda_positions_
 
QOpenGLBuffer vbo_
 
iu::Size< 2 > image_size_
 
QOpenGLShaderProgram * shader_program_
 
QOpenGLVertexArrayObject * vao_
 
QMatrix4x4 r_mat_
 
QPoint rot_pos_
 
QPoint trans_pos_
 
float translation_z_
 
float translation_x_
 
float translation_y_
 
float initial_translation_z_
 
float point_size_
 
bool data_set_
 
float f_
 
float cx_
 
float cy_
 
float B_
 

Detailed Description

Allows to display disparity or depth maps in 3D with a built-in mouse and keyboard interaction.

All data is kept on the graphics card, OpenGL is responsible for rendering the generated point-cloud.

Constructor & Destructor Documentation

iu::Qt5DisparitymapGpuWidget::Qt5DisparitymapGpuWidget ( const iu::Size< 2 >  sz,
float  translation_z,
float  f,
float  cx,
float  cy,
float  B = 0.f,
QWidget *  parent = NULL 
)
explicit

The non-default constructor

Parameters
szOutput image size
translation_zWhere to put the camera initially? [0,0,translation_z]
fFocal length of virtual camera
cxx-coordinate of principal point
cyy-coordinate of principal point
BBaseline in the case of disparity maps. If 0, then the input is expected to be a depth map
parentParent widget

Member Function Documentation

void iu::Qt5DisparitymapGpuWidget::update_vertices ( iu::ImageGpu_32f_C1 depth,
iu::ImageGpu_32f_C1 im 
)
slot

Set a new disparity/depthmap

Parameters
depthA depthmap in float format
imA grayscale image in float format, registered to depth

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