C++ Java Unity
C++ Reference
RuntimeImageSource Class Referenceabstract

Detailed Description

A handle for creating a new Trackable from an image file in a DataSet.

The RuntimeImageSource class is used to add a Trackable object to a DataSet instance from existing data. Either images loaded from files or raw data created by other sources are supported.

Note
Images with width or height bigger than 2048 pixels are not supported!
Inheritance diagram for RuntimeImageSource:
NonCopyable

Public Member Functions

virtual bool setImage (void *pixels, PIXEL_FORMAT format, Vec2I size, float targetWidthMeters, const char *targetName)=0
 Set the RuntimeImageSource from raw image data. More...
 
virtual bool setFile (const char *path, STORAGE_TYPE storageType, float targetWidthMeters, const char *targetName)=0
 Set the RuntimeImageSource from file. More...
 

Member Function Documentation

virtual bool setImage ( void *  pixels,
PIXEL_FORMAT  format,
Vec2I  size,
float  targetWidthMeters,
const char *  targetName 
)
pure virtual

Set the RuntimeImageSource from raw image data.

Set the RuntimeImageSource to raw image data loaded by functions independent from Vuforia.

Note
currently only unpadded image sources are correctly supported
Parameters
pixelsthe pointer to the raw pixel data
formatthe pixel format used by the raw data. Currently supported formats are Vuforia::GRAYSCALE, Vuforia::RGB888 and Vuforia::RGBA8888
sizethe size of the image in pixel (width, height)
targetWidthMetersthe real world size of the target
targetNamethe name of the resulting trackable
Returns
returns true if the raw image data could be set, false otherwise
virtual bool setFile ( const char *  path,
STORAGE_TYPE  storageType,
float  targetWidthMeters,
const char *  targetName 
)
pure virtual

Set the RuntimeImageSource from file.

Set the RuntimeImageSource to the image found at the path provided.

Parameters
paththe location of the image to be used as target
storageTypethe type of the path provided
targetWidthMetersthe real world size of the target.
targetNamethe name of the resulting trackable
Returns
returns true if the image could be loaded, false otherwise