OpenCV  3.4.1
Open Source Computer Vision
Public Member Functions | List of all members
cv::ovis::WindowScene Class Referenceabstract

#include "ovis.hpp"

Public Member Functions

virtual ~WindowScene ()
 
virtual Rect2d createCameraEntity (const String &name, InputArray K, const Size &imsize, float zFar, InputArray tvec=noArray(), InputArray rot=noArray())=0
 
virtual void createEntity (const String &name, const String &meshname, InputArray tvec=noArray(), InputArray rot=noArray())=0
 
virtual void createLightEntity (const String &name, InputArray tvec=noArray(), InputArray rot=noArray(), const Scalar &diffuseColor=Scalar::all(1), const Scalar &specularColor=Scalar::all(1))=0
 
virtual void fixCameraYawAxis (bool useFixed, InputArray up=noArray())=0
 
virtual void getCameraPose (OutputArray R=noArray(), OutputArray tvec=noArray(), bool invert=false)=0
 
virtual void getScreenshot (OutputArray frame)=0
 
virtual void removeEntity (const String &name)=0
 
virtual void setBackground (InputArray image)=0
 
virtual void setBackground (const Scalar &color)=0
 
virtual void setCameraIntrinsics (InputArray K, const Size &imsize)=0
 
virtual void setCameraLookAt (const String &target, InputArray offset=noArray())=0
 
virtual void setCameraPose (InputArray tvec=noArray(), InputArray rot=noArray(), bool invert=false)=0
 
virtual void setEntityPose (const String &name, InputArray tvec=noArray(), InputArray rot=noArray(), bool invert=false)=0
 
virtual void updateEntityPose (const String &name, InputArray tvec=noArray(), InputArray rot=noArray())=0
 

Detailed Description

A 3D viewport and the associated scene

Constructor & Destructor Documentation

§ ~WindowScene()

virtual cv::ovis::WindowScene::~WindowScene ( )
virtual

Member Function Documentation

§ createCameraEntity()

virtual Rect2d cv::ovis::WindowScene::createCameraEntity ( const String name,
InputArray  K,
const Size imsize,
float  zFar,
InputArray  tvec = noArray(),
InputArray  rot = noArray() 
)
pure virtual

convenience method to visualize a camera position

the entity uses a material with the same name that can be used to change the line color.

Parameters
nameentity name
Kintrinsic matrix
imsizeimage size
zFarfar plane in camera coordinates
rotRodrigues vector or 3x3 rotation matrix
tvectranslation
Returns
the extents of the Frustum at far plane, where the top left corner denotes the principal point offset

§ createEntity()

virtual void cv::ovis::WindowScene::createEntity ( const String name,
const String meshname,
InputArray  tvec = noArray(),
InputArray  rot = noArray() 
)
pure virtual

place an entity of an mesh in the scene

the mesh needs to be created beforehand. Either programmatically by e.g. createPointCloudMesh or by placing an Ogre .mesh file in a resource location.

See also
addResourceLocation
Parameters
nameentity name
meshnamemesh name
rotRodrigues vector or 3x3 rotation matrix
tvectranslation

§ createLightEntity()

virtual void cv::ovis::WindowScene::createLightEntity ( const String name,
InputArray  tvec = noArray(),
InputArray  rot = noArray(),
const Scalar diffuseColor = Scalar::all(1),
const Scalar specularColor = Scalar::all(1) 
)
pure virtual

creates a point light in the scene

Parameters
nameentity name
rotRodrigues vector or 3x3 rotation matrix
tvectranslation
diffuseColor
specularColor

§ fixCameraYawAxis()

virtual void cv::ovis::WindowScene::fixCameraYawAxis ( bool  useFixed,
InputArray  up = noArray() 
)
pure virtual

convenience method to force the "up" axis to stay fixed

works with both programmatic changes and SCENE_INTERACTIVE

Parameters
useFixedwhether to enforce the fixed yaw axis
upthe axis to be fixed

§ getCameraPose()

virtual void cv::ovis::WindowScene::getCameraPose ( OutputArray  R = noArray(),
OutputArray  tvec = noArray(),
bool  invert = false 
)
pure virtual

Retrieves the current camera pose

Parameters
R3x3 rotation matrix
tvectranslation vector
invertreturn the inverted pose

§ getScreenshot()

virtual void cv::ovis::WindowScene::getScreenshot ( OutputArray  frame)
pure virtual

read back the image generated by the last call to waitKey

§ removeEntity()

virtual void cv::ovis::WindowScene::removeEntity ( const String name)
pure virtual

remove an entity from the scene

Parameters
nameentity name

§ setBackground() [1/2]

virtual void cv::ovis::WindowScene::setBackground ( InputArray  image)
pure virtual

set window background to custom image

creates a texture named "<title>_Background"

Parameters
image

§ setBackground() [2/2]

virtual void cv::ovis::WindowScene::setBackground ( const Scalar color)
pure virtual

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

§ setCameraIntrinsics()

virtual void cv::ovis::WindowScene::setCameraIntrinsics ( InputArray  K,
const Size imsize 
)
pure virtual

set intrinsics of the camera

Parameters
Kintrinsic matrix
imsizeimage size

§ setCameraLookAt()

virtual void cv::ovis::WindowScene::setCameraLookAt ( const String target,
InputArray  offset = noArray() 
)
pure virtual

convenience method to orient the camera to a specific entity

Parameters
targetentity name
offsetoffset from entity centre

§ setCameraPose()

virtual void cv::ovis::WindowScene::setCameraPose ( InputArray  tvec = noArray(),
InputArray  rot = noArray(),
bool  invert = false 
)
pure virtual

Sets the current camera pose

Parameters
rotRodrigues vector or 3x3 rotation matrix
tvectranslation
invertuse the inverse of the given pose

§ setEntityPose()

virtual void cv::ovis::WindowScene::setEntityPose ( const String name,
InputArray  tvec = noArray(),
InputArray  rot = noArray(),
bool  invert = false 
)
pure virtual

set entity pose in the world coordinate space.

Parameters
nameenitity name
rotRodrigues vector or 3x3 rotation matrix
tvectranslation
invertuse the inverse of the given pose

§ updateEntityPose()

virtual void cv::ovis::WindowScene::updateEntityPose ( const String name,
InputArray  tvec = noArray(),
InputArray  rot = noArray() 
)
pure virtual

update entity pose by transformation in the parent coordinate space. (pre-rotation)

Parameters
nameentity name
rotRodrigues vector or 3x3 rotation matrix
tvectranslation

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