OpenCV  3.4.18
Open Source Computer Vision
Classes | Enumerations | Functions
OGRE 3D Visualiser

Classes

class  cv::ovis::WindowScene
 

Enumerations

enum  cv::ovis::EntityProperty {
  cv::ovis::ENTITY_MATERIAL,
  cv::ovis::ENTITY_SCALE,
  cv::ovis::ENTITY_AABB_WORLD
}
 
enum  cv::ovis::MaterialProperty {
  cv::ovis::MATERIAL_POINT_SIZE,
  cv::ovis::MATERIAL_LINE_WIDTH,
  cv::ovis::MATERIAL_OPACITY,
  cv::ovis::MATERIAL_EMISSIVE,
  cv::ovis::MATERIAL_TEXTURE0,
  cv::ovis::MATERIAL_TEXTURE = MATERIAL_TEXTURE0,
  cv::ovis::MATERIAL_TEXTURE1,
  cv::ovis::MATERIAL_TEXTURE2,
  cv::ovis::MATERIAL_TEXTURE3
}
 
enum  cv::ovis::SceneSettings {
  cv::ovis::SCENE_SEPARATE = 1,
  cv::ovis::SCENE_INTERACTIVE = 2,
  cv::ovis::SCENE_SHOW_CS_CROSS = 4,
  cv::ovis::SCENE_AA = 8
}
 

Functions

void cv::ovis::addResourceLocation (const String &path)
 
void cv::ovis::createGridMesh (const String &name, const Size2f &size, const Size &segments=Size(1, 1))
 
void cv::ovis::createPlaneMesh (const String &name, const Size2f &size, InputArray image=noArray())
 
void cv::ovis::createPointCloudMesh (const String &name, InputArray vertices, InputArray colors=noArray())
 
Ptr< WindowScenecv::ovis::createWindow (const String &title, const Size &size, int flags=SCENE_INTERACTIVE|SCENE_AA)
 
void cv::ovis::setMaterialProperty (const String &name, int prop, const Scalar &value)
 
void cv::ovis::setMaterialProperty (const String &name, int prop, const String &value)
 
void cv::ovis::setMaterialProperty (const String &name, const String &prop, const Scalar &value)
 
void cv::ovis::updateTexture (const String &name, InputArray image)
 
int cv::ovis::waitKey (int delay=0)
 

Detailed Description

Enumeration Type Documentation

◆ EntityProperty

#include <opencv2/ovis.hpp>

Enumerator
ENTITY_MATERIAL 
ENTITY_SCALE 
ENTITY_AABB_WORLD 

◆ MaterialProperty

#include <opencv2/ovis.hpp>

Enumerator
MATERIAL_POINT_SIZE 
MATERIAL_LINE_WIDTH 
MATERIAL_OPACITY 
MATERIAL_EMISSIVE 
MATERIAL_TEXTURE0 
MATERIAL_TEXTURE 
MATERIAL_TEXTURE1 
MATERIAL_TEXTURE2 
MATERIAL_TEXTURE3 

◆ SceneSettings

#include <opencv2/ovis.hpp>

Enumerator
SCENE_SEPARATE 

the window will use a separate scene. The scene will be shared otherwise.

SCENE_INTERACTIVE 

allow the user to control the camera.

SCENE_SHOW_CS_CROSS 

draw coordinate system crosses for debugging

SCENE_AA 

Apply anti-aliasing. The first window determines the setting for all windows.

Function Documentation

◆ addResourceLocation()

void cv::ovis::addResourceLocation ( const String path)

#include <opencv2/ovis.hpp>

Add an additional resource location that is search for meshes, textures and materials

must be called before the first createWindow. If give path does not exist, retries inside Ogre Media Directory.

Parameters
pathfolder or Zip archive.

◆ createGridMesh()

void cv::ovis::createGridMesh ( const String name,
const Size2f size,
const Size segments = Size(1, 1) 
)

#include <opencv2/ovis.hpp>

creates a grid

creates a material with the same name

Parameters
namename of the mesh
sizeextents of the grid
segmentsnumber of segments per side

◆ createPlaneMesh()

void cv::ovis::createPlaneMesh ( const String name,
const Size2f size,
InputArray  image = noArray() 
)

#include <opencv2/ovis.hpp>

create a 2D plane, X right, Y down, Z up

creates a material and a texture with the same name

Parameters
namename of the mesh
sizesize in world units
imageoptional texture

◆ createPointCloudMesh()

void cv::ovis::createPointCloudMesh ( const String name,
InputArray  vertices,
InputArray  colors = noArray() 
)

#include <opencv2/ovis.hpp>

creates a point cloud mesh

creates a material with the same name

Parameters
namename of the mesh
verticesfloat vector of positions
colorsuchar vector of colors

◆ createWindow()

Ptr<WindowScene> cv::ovis::createWindow ( const String title,
const Size size,
int  flags = SCENE_INTERACTIVE|SCENE_AA 
)

#include <opencv2/ovis.hpp>

create a new rendering window/ viewport

Parameters
titlewindow title
sizesize of the window
flagsa combination of SceneSettings

Furthermore, the behavior is controlled by the following environment variables

  • OPENCV_OVIS_VERBOSE_LOG: print all of OGRE log output
  • OPENCV_OVIS_RENDERSYSTEM: the name of the OGRE RenderSystem to use
  • OPENCV_OVIS_NOVSYNC: disable VSYNC for all windows

◆ setMaterialProperty() [1/3]

void cv::ovis::setMaterialProperty ( const String name,
int  prop,
const Scalar value 
)

#include <opencv2/ovis.hpp>

set the property of a material to the given value

Parameters
namematerial name
propMaterialProperty
valuethe value

◆ setMaterialProperty() [2/3]

void cv::ovis::setMaterialProperty ( const String name,
int  prop,
const String value 
)

#include <opencv2/ovis.hpp>

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

◆ setMaterialProperty() [3/3]

void cv::ovis::setMaterialProperty ( const String name,
const String prop,
const Scalar value 
)

#include <opencv2/ovis.hpp>

set the shader property of a material to the given value

Parameters
namematerial name
propproperty name
valuethe value

◆ updateTexture()

void cv::ovis::updateTexture ( const String name,
InputArray  image 
)

#include <opencv2/ovis.hpp>

updates an existing texture

A new texture can be created with createPlaneMesh

Parameters
namename of the texture
imagethe image data

◆ waitKey()

int cv::ovis::waitKey ( int  delay = 0)

#include <opencv2/ovis.hpp>

update all windows and wait for keyboard event

Parameters
delay0 is the special value that means "forever". Any positive number returns after sync to blank (typically 16ms).
Returns
the code of the pressed key or -1 if no key was pressed