[][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());

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.

Constants

AMBIENT
FONT_SIZE
IMMEDIATE_RENDERING
KeyboardEvent_ALT
KeyboardEvent_CTRL
KeyboardEvent_KEY_DOWN
KeyboardEvent_KEY_UP
KeyboardEvent_NONE
KeyboardEvent_SHIFT
LIGHTING
LINE_WIDTH
Mesh_LOAD_AUTO
Mesh_LOAD_OBJ
Mesh_LOAD_PLY
MouseEvent_LeftButton
MouseEvent_MiddleButton
MouseEvent_MouseButtonPress
MouseEvent_MouseButtonRelease
MouseEvent_MouseDblClick
MouseEvent_MouseMove
MouseEvent_MouseScrollDown
MouseEvent_MouseScrollUp
MouseEvent_NoButton
MouseEvent_RightButton
MouseEvent_VScroll
OPACITY
POINT_SIZE
REPRESENTATION
REPRESENTATION_POINTS
REPRESENTATION_SURFACE
REPRESENTATION_WIREFRAME
SHADING
SHADING_FLAT
SHADING_GOURAUD
SHADING_PHONG
WTrajectory_BOTH
WTrajectory_FRAMES
WTrajectory_PATH

Traits

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

is_nan

Checks float/double value for nan.

is_nan_1

Checks float/double value for nan.

read_cloud

Parameters

read_mesh
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.

vec3b
write_cloud

Parameters

write_trajectory

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

Type Definitions

KeyboardCallback
MouseCallback