[][src]Module opencv::viz

3D Visualizer

This section describes 3D visualization window as well as classes and methods that are used to interact with it.

3D visualization window (see Viz3d) is used to display widgets (see Widget), and it provides several methods to interact with scene and widgets.

Widget

In this section, the widget framework is explained. Widgets represent 2D or 3D objects, varying from simple ones such as lines to complex ones such as point clouds and meshes.

Widgets are implicitly shared. Therefore, one can add a widget to the scene, and modify the widget without re-adding the widget.

This example is not tested
// Create a cloud widget
viz::WCloud cw(cloud, viz::Color::red());
// Display it in a window
myWindow.showWidget("CloudWidget1", cw);
// Modify it, and it will be modified in the window.
cw.setColor(viz::Color::yellow());

Modules

prelude

Structs

Camera

This class wraps intrinsic parameters of a camera.

Color

This class represents color in BGR order.

KeyboardEvent

This class represents a keyboard event.

Mesh

This class wraps mesh attributes, and it can load a mesh from a ply file. :

MouseEvent

This class represents a mouse event.

Viz3d

The Viz3d class represents a 3D visualizer window. This class is implicitly shared.

WArrow

This 3D Widget defines an arrow.

WCameraPosition

This 3D Widget represents camera position in a scene by its axes or viewing frustum. :

WCircle

This 3D Widget defines a circle.

WCloud

This 3D Widget defines a point cloud. :

WCloudCollection

This 3D Widget defines a collection of clouds. :

WCloudNormals

This 3D Widget represents normals of a point cloud. :

WCone

This 3D Widget defines a cone. :

WCoordinateSystem

This 3D Widget represents a coordinate system. :

WCube

This 3D Widget defines a cube.

WCylinder

This 3D Widget defines a cylinder. :

WGrid

This 3D Widget defines a grid. :

WImage3D

This 3D Widget represents an image in 3D space. :

WImageOverlay

This 2D Widget represents an image overlay. :

WLine

This 3D Widget defines a finite line.

WMesh

Constructs a WMesh.

WPaintedCloud
WPlane

This 3D Widget defines a finite plane.

WPolyLine

This 3D Widget defines a poly line. :

WSphere

This 3D Widget defines a sphere. :

WText

This 2D Widget represents text overlay.

WText3D

This 3D Widget represents 3D text. The text always faces the camera.

WTrajectory

This 3D Widget represents a trajectory. :

WTrajectoryFrustums

This 3D Widget represents a trajectory. :

WTrajectorySpheres

This 3D Widget represents a trajectory using spheres and lines

WWidgetMerger

This class allows to merge several widgets to single one.

Widget

Base class of all widgets. Widget is implicitly shared.

Widget2D

Base class of all 2D widgets.

Widget3D

Base class of all 3D widgets.

Enums

KeyboardEvent_Action
MouseEvent_MouseButton
MouseEvent_Type
RenderingProperties

////////////////////////////////////////////////////////////////////////// Widget rendering properties

RepresentationValues
ShadingValues

Constants

AMBIENT
FONT_SIZE
IMMEDIATE_RENDERING
KeyboardEvent_ALT
KeyboardEvent_CTRL
KeyboardEvent_NONE
KeyboardEvent_SHIFT
LIGHTING
LINE_WIDTH
Mesh_LOAD_AUTO
Mesh_LOAD_OBJ
Mesh_LOAD_PLY
OPACITY
POINT_SIZE
REPRESENTATION
REPRESENTATION_POINTS
REPRESENTATION_SURFACE
REPRESENTATION_WIREFRAME
SHADING
SHADING_FLAT
SHADING_GOURAUD
SHADING_PHONG
WTrajectory_BOTH
WTrajectory_FRAMES
WTrajectory_PATH

Traits

CameraTrait

This class wraps intrinsic parameters of a camera.

ColorTrait

This class represents color in BGR order.

KeyboardEventTrait

This class represents a keyboard event.

MeshTrait

This class wraps mesh attributes, and it can load a mesh from a ply file. :

MouseEventTrait

This class represents a mouse event.

Viz3dTrait

The Viz3d class represents a 3D visualizer window. This class is implicitly shared.

WArrowTrait

This 3D Widget defines an arrow.

WCameraPositionTrait

This 3D Widget represents camera position in a scene by its axes or viewing frustum. :

WCircleTrait

This 3D Widget defines a circle.

WCloudCollectionTrait

This 3D Widget defines a collection of clouds. :

WCloudNormalsTrait

This 3D Widget represents normals of a point cloud. :

WCloudTrait

This 3D Widget defines a point cloud. :

WConeTrait

This 3D Widget defines a cone. :

WCoordinateSystemTrait

This 3D Widget represents a coordinate system. :

WCubeTrait

This 3D Widget defines a cube.

WCylinderTrait

This 3D Widget defines a cylinder. :

WGridTrait

This 3D Widget defines a grid. :

WImage3DTrait

This 3D Widget represents an image in 3D space. :

WImageOverlayTrait

This 2D Widget represents an image overlay. :

WLineTrait

This 3D Widget defines a finite line.

WMeshTrait

Constructs a WMesh.

WPaintedCloudTrait
WPlaneTrait

This 3D Widget defines a finite plane.

WPolyLineTrait

This 3D Widget defines a poly line. :

WSphereTrait

This 3D Widget defines a sphere. :

WText3DTrait

This 3D Widget represents 3D text. The text always faces the camera.

WTextTrait

This 2D Widget represents text overlay.

WTrajectoryFrustumsTrait

This 3D Widget represents a trajectory. :

WTrajectorySpheresTrait

This 3D Widget represents a trajectory using spheres and lines

WTrajectoryTrait

This 3D Widget represents a trajectory. :

WWidgetMergerTrait

This class allows to merge several widgets to single one.

Widget2DTrait

Base class of all 2D widgets.

Widget3DTrait

Base class of all 3D widgets.

WidgetTrait

Base class of all widgets. Widget is implicitly shared.

Functions

compute_normals

//////////////////////////////////////////////////////////////////////////////////////////// Computing normals for mesh

get_window_by_name

Retrieves a window by its name.

imshow

Displays image in specified window

make_camera_pose

Constructs camera pose from position, focal_point and up_vector (see gluLookAt() for more information).

make_transform_to_global

Takes coordinate frame data and builds transform to global coordinate frame.

read_cloud

Parameters

read_mesh

//////////////////////////////////////////////////////////////////////////////////////////// Reads mesh. Only ply format is supported now and no texture load support

read_pose

Parameters

read_trajectory

takes vector<Affine3> with T = float/dobule and loads poses from sequence of files

unregister_all_windows

Unregisters all Viz windows from internal database. After it 'getWindowByName()' will create new windows instead of getting existing from the database.

write_cloud

Parameters

write_pose

Parameters

write_trajectory

takes vector<Affine3> with T = float/dobule and writes to a sequence of files with given filename format

Type Definitions

Viz3d_Color
Viz3d_KeyboardCallback
Viz3d_MouseCallback