VisionWorks Toolkit Reference

April 8, 2016 | 1.4 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

Detailed Description

This is a common interface for rendering 2D images and some primitive 2D graphic objects, like lines, circles, text boxes, on the screen, to video file or single image.

Note
Render interface implementations are not thread-safe and are bound to the thread where they are created.

Data Structures

struct  nvxio::Render::CircleStyle
 Defines circle style. More...
 
struct  nvxio::Render::DetectedObjectStyle
 Defines the detected object's rectangle style. More...
 
struct  nvxio::Render::FeatureStyle
 Defines the features parameters. More...
 
struct  nvxio::Render::LineStyle
 Defines line style. More...
 
struct  nvxio::Render::MotionFieldStyle
 Defines motion field style. More...
 
class  nvxio::Render
 Render interface. More...
 
struct  nvxio::Render::TextBoxStyle
 Defines the text box parameters. More...
 

Functions

NVXIO_EXPORT std::unique_ptr
< Render > 
nvxio::createDefaultRender (vx_context context, const std::string &title, vx_uint32 width, vx_uint32 height, vx_uint32 format=VX_DF_IMAGE_RGBX, bool doScale=true, bool fullScreen=nvxio::Application::get().getFullScreenFlag())
 Render factory that creates UI render with a window by default. More...
 
NVXIO_EXPORT std::unique_ptr
< Render > 
nvxio::createImageRender (vx_context context, const std::string &path, vx_uint32 width, vx_uint32 height, vx_uint32 format=VX_DF_IMAGE_RGBX)
 Creates a render for image sequence. More...
 
NVXIO_EXPORT std::unique_ptr
< Render > 
nvxio::createVideoRender (vx_context context, const std::string &path, vx_uint32 width, vx_uint32 height, vx_uint32 format=VX_DF_IMAGE_RGBX)
 Creates a render for writing video. More...
 
NVXIO_EXPORT std::unique_ptr
< Render > 
nvxio::createWindowRender (vx_context context, const std::string &title, vx_uint32 width, vx_uint32 height, vx_uint32 format=VX_DF_IMAGE_RGBX, bool doScale=true, bool fullscreen=nvxio::Application::get().getFullScreenFlag())
 Creates a Window render. More...
 

Data Structure Documentation

struct nvxio::Render::CircleStyle
Data Fields
vx_uint8 color[4] Holds the line color in RGBA format.
int thickness Holds the line thickness.
struct nvxio::Render::DetectedObjectStyle
Data Fields
vx_uint8 color[4] Holds the line color in RGBA format.
bool isHalfTransparent Holds a flag indicating whether the detected object should be filled with half-transparent color.
string label Holds the text label.
vx_uint8 radius Holds the radius of the corners.
vx_uint8 thickness Holds the line thickness.
struct nvxio::Render::FeatureStyle
Data Fields
vx_uint8 color[4] Holds the feature color in RGBA format.
float radius Holds the radius of the feature.
struct nvxio::Render::LineStyle
Data Fields
vx_uint8 color[4] Holds the line color in RGBA format.
int thickness Holds the thickness of the line.
struct nvxio::Render::MotionFieldStyle
Data Fields
vx_uint8 color[4] Holds the color of the motion field in RGBA format.
struct nvxio::Render::TextBoxStyle
Collaboration diagram for nvxio::Render::TextBoxStyle:
Data Fields
vx_uint8 bgcolor[4] Holds the background color of the box.
vx_uint8 color[4] Holds the text color in RGBA format.
vx_coordinates2d_t origin Holds the coordinates of the top-left corner of the box.

Function Documentation

NVXIO_EXPORT std::unique_ptr<Render> nvxio::createDefaultRender ( vx_context  context,
const std::string &  title,
vx_uint32  width,
vx_uint32  height,
vx_uint32  format = VX_DF_IMAGE_RGBX,
bool  doScale = true,
bool  fullScreen = nvxio::Application::get().getFullScreenFlag() 
)

Render factory that creates UI render with a window by default.

Parameters
[in]contextSpecifies the VisionWorks context.
[in]titleA reference to the title of the render.
[in]widthSpecifies the width of the render.
[in]heightSpecifies the height of the render.
[in]formatSpecifies the format of the render.
[in]doScaleSpecifies whether render should scale the image to fit the window (used only in window mode).
[in]fullScreenSpecifies whether render should be fullscreen.
Returns
Render implementation or nullptr if this one cannot be created.
See also
NVXIO APIs
NVXIO_EXPORT std::unique_ptr<Render> nvxio::createImageRender ( vx_context  context,
const std::string &  path,
vx_uint32  width,
vx_uint32  height,
vx_uint32  format = VX_DF_IMAGE_RGBX 
)

Creates a render for image sequence.

Parameters
[in]contextSpecifies the VisionWorks context.
[in]pathA reference to the output image sequence path.
[in]widthSpecifies the width of the render.
[in]heightSpecifies the height of the render.
[in]formatSpecifies the format of the render.
Returns
Render implementation or nullptr if this one cannot be created.
See also
NVXIO APIs
NVXIO_EXPORT std::unique_ptr<Render> nvxio::createVideoRender ( vx_context  context,
const std::string &  path,
vx_uint32  width,
vx_uint32  height,
vx_uint32  format = VX_DF_IMAGE_RGBX 
)

Creates a render for writing video.

Use NVXIO_VIDEO_RENDER_BITRATE environment variable to specify the target video bitrate in bit/s.

Parameters
[in]contextSpecifies the VisionWorks context.
[in]pathA references to the path to output video file.
[in]widthSpecifies the width of the render.
[in]heightSpecifies the height of the render.
[in]formatSpecifies the format of the render.
Returns
Render implementation or nullptr if this one cannot be created.
See also
NVXIO APIs
NVXIO_EXPORT std::unique_ptr<Render> nvxio::createWindowRender ( vx_context  context,
const std::string &  title,
vx_uint32  width,
vx_uint32  height,
vx_uint32  format = VX_DF_IMAGE_RGBX,
bool  doScale = true,
bool  fullscreen = nvxio::Application::get().getFullScreenFlag() 
)

Creates a Window render.

You can use NVXIO_DISPLAY environment variable to specify display to use in full screen mode.

Parameters
[in]contextSpecifies the VisionWorks context.
[in]titleA reference to the title of the window.
[in]widthSpecifies the width of the render.
[in]heightSpecifies the height of the render.
[in]formatSpecifies the format of the render.
[in]doScaleWhether render should scale image to fit the window (used only in window mode).
[in]fullscreenWhether render should be fullscreen.
Returns
Render implementation or nullptr if this one cannot be created.
See also
NVXIO APIs