Raytrix Light Field SDK  v3.1
Logo
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Events Groups Pages
Light Field Image API functions

Functions for working with light field images. More...

Functions

RXLF_API void Rx::ApiLF::RxRayBind (unsigned uRayHandle)
 Bind a ray image to perform computations on. More...
 
RXLF_API void Rx::ApiLF::RxRayCalibLoadXML (unsigned uRayHandle, const Rx::CRxString &sxFilename)
 Load calibration data of ray image from XML file. More...
 
RXLF_API void Rx::ApiLF::RxRayCalibSaveXML (unsigned uRayHandle, const Rx::CRxString &sxFilename)
 Save calibration data of ray image in XML format. More...
 
RXLF_API void Rx::ApiLF::RxRayCalibXmlGet (unsigned uRayHandle, Rx::CRxString &sxXml)
 Get the calibration data of the given ray image as XML string. More...
 
RXLF_API void Rx::ApiLF::RxRayCalibXmlSet (unsigned uRayHandle, const Rx::CRxString &sxXml)
 Set the calibration data of the given ray image from a XML string. More...
 
RXLF_API void Rx::ApiLF::RxRayDelete (unsigned uRayHandle)
 Delete the image with the given ID. More...
 
RXLF_API void Rx::ApiLF::RxRayGetFormat (unsigned uRayHandle, Rx::CRxImageFormat &xF)
 Get the image format of a ray image. More...
 
RXLF_API void Rx::ApiLF::RxRayGetMetaData (unsigned uRayHandle, Rx::CRxMetaData &xMetaData)
 Get meta data of a ray image. More...
 
RXLF_API void Rx::ApiLF::RxRayGetRaw (unsigned uRayHandle, Rx::CRxImage &xRawImage)
 Get the ray image as Rx::CRxImage instance. More...
 
RXLF_API void Rx::ApiLF::RxRayGetRaw (unsigned uRayHandle, Rx::Interop::Runtime28::IImage *pRawImage, bool bCreate)
 Get the ray image. More...
 
RXLF_API unsigned Rx::ApiLF::RxRayLoad (const Rx::CRxString &sxFilename)
 Load a ray image. More...
 
RXLF_API unsigned Rx::ApiLF::RxRayNew (const Rx::CRxImageFormat &xF)
 Create a new ray image. More...
 
RXLF_API void Rx::ApiLF::RxRaySave (unsigned uRayHandle, const Rx::CRxString &sxFilename)
 Saves the ray image described by ID uRayHandle. More...
 
RXLF_API void Rx::ApiLF::RxRaySave (const Rx::CRxString &sxFilename)
 Saves the currently bound ray image. More...
 
RXLF_API void Rx::ApiLF::RxRaySetMetaData (unsigned uRayHandle, const Rx::CRxMetaData &xMetaData)
 Set meta data of a ray image. More...
 
RXLF_API void Rx::ApiLF::RxRayUnbind ()
 Unbind the currently bound ray image. More...
 

Detailed Description

Functions for working with light field images.

Light field images, called ray images in the following, are always held internally by the API. The user can reference the internal ray images by using handles that are returned by the API.Since all processing of ray images is performed on a CUDA device, the ray images have to be copied to the CUDA device at some point. Since this copying process is fairly time consuming, the Raytrix API is designed such that this copying process only has to be done once for each image.

A ray image can be create either by loading it from disc, for example with Rx::ApiLF::RxRayLoad or by capturing into it with a Raytrix camera or by loading a image sequence. For more information: Programming with the Raytrix Light Field API. In every way a ray image handle is returned, which can be used for further processing. If a ray image has been loaded with Rx::ApiLF::RxRayLoad it initially only resides in host memory. Before any processing can be done with it, it has to be copied to the CUDA device.This is done by binding the ray image. In case of a image source instead of a camera source you can use the function Rx::ApiLF::RxRayBind. In the sections Raytrix Light Field API Computation - Detailed or Using the Rayrix Light Field API you can learn all about the essential steps of Raytrix Light Field API.

The results of the light field algorithms are stored in result images on the CUDA device.These result images can then either be copied into host memory or to an OpenGL texture for immediate display. All available images (Rx::ApiLF::EImgID) are illustrated here: Using the Rayrix Light Field API

If images are captured from a Raytrix camera the ray image handle returned by Rx::ApiLF::RxCamBind is automatically bound. Whenever a new image is captured the image is captured into the bound ray image referenced by the returned ray image handle and it is directly copied to the CUDA device.

Function Documentation

RXLF_API void Rx::ApiLF::RxRayBind ( unsigned  uRayHandle)

Bind a ray image to perform computations on.

Halcon Plugin - Function Name:
rx_ray_bind
Parameters
uRayHandleThe ID of the light field image that is to be used for calculations.
See also
Bind Image.
RXLF_API void Rx::ApiLF::RxRayCalibLoadXML ( unsigned  uRayHandle,
const Rx::CRxString sxFilename 
)

Load calibration data of ray image from XML file.

Parameters
uRayHandleThe ID of the ray image whose calibration data is to be overwritten by the loaded calibration data.
sxFilenameThe filename of the XML file from which to load the data.
RXLF_API void Rx::ApiLF::RxRayCalibSaveXML ( unsigned  uRayHandle,
const Rx::CRxString sxFilename 
)

Save calibration data of ray image in XML format.

Parameters
uRayHandleThe ID of the ray image whose calibration data is to be saved.
sxFilenameThe filename under which to save the data.
RXLF_API void Rx::ApiLF::RxRayCalibXmlGet ( unsigned  uRayHandle,
Rx::CRxString sxXml 
)

Get the calibration data of the given ray image as XML string.

Parameters
uRayHandleThe ID of the ray image whose calibration data is to be saved.
[out]sxXmlOn successful return contains the XML string.
RXLF_API void Rx::ApiLF::RxRayCalibXmlSet ( unsigned  uRayHandle,
const Rx::CRxString sxXml 
)

Set the calibration data of the given ray image from a XML string.

Parameters
uRayHandleThe ID of the ray image whose calibration data is to be saved.
sxXmlThe XML string specifying the calibration settings.
RXLF_API void Rx::ApiLF::RxRayDelete ( unsigned  uRayHandle)

Delete the image with the given ID.

Attention
If the ray image referenced by uRayHandle is currently bound by a previous call to Rx::ApiLF::RxRayBind or Rx::ApiLF::RxCamStartCapture, the image is not deleted and an exception is thrown.
Halcon Plugin - Function Name:
rx_ray_delete
Parameters
uRayHandleThe handle of the ray image to delete.
RXLF_API void Rx::ApiLF::RxRayGetFormat ( unsigned  uRayHandle,
Rx::CRxImageFormat xF 
)

Get the image format of a ray image.

Halcon Plugin - Function Name:
rx_ray_get_format
Parameters
uRayHandleThe ray image handle.
[out]xFOn return contains the image format of the ray image.
RXLF_API void Rx::ApiLF::RxRayGetMetaData ( unsigned  uRayHandle,
Rx::CRxMetaData xMetaData 
)

Get meta data of a ray image.

Attention
The meta data class Rx::CRxMetaData can contain any number of meta data elements of types unsigned, double and Rx::CRxString. You can get, set and add elements to the meta data instance and store this together with the ray image.
Parameters
uRayHandleThe ray image handle.
[out]xMetaDataContains the ray image meta data on return.
RXLF_API void Rx::ApiLF::RxRayGetRaw ( unsigned  uRayHandle,
Rx::CRxImage xRawImage 
)

Get the ray image as Rx::CRxImage instance.

Halcon Plugin - Function Name:
rx_ray_get_raw
Parameters
uRayHandleThe ray image handle.
[out]xRawImageOn return contains the ray image.
RXLF_API void Rx::ApiLF::RxRayGetRaw ( unsigned  uRayHandle,
Rx::Interop::Runtime28::IImage pRawImage,
bool  bCreate 
)

Get the ray image.

Attention
If bCreate is true, the necessary memory for the image is created with a call to Rx::Interop::Runtime28::IImage::Create, otherwise it is expected that pRawImage is already allocated with the correct amount of memory.
Halcon Plugin - Function Name:
rx_ray_get_raw
Parameters
uRayHandleThe ray image handle.
[out]pRawImagePointer to an IImage interface.
bCreateFlag whether to create image.
RXLF_API unsigned Rx::ApiLF::RxRayLoad ( const Rx::CRxString sxFilename)

Load a ray image.

Halcon Plugin - Function Name:
rx_ray_load.
Parameters
sxFilenameThe ray image filename.
Returns
The ray image handle of the ray image.
See also
Load an Image
RXLF_API void Rx::ApiLF::RxRaySave ( unsigned  uRayHandle,
const Rx::CRxString sxFilename 
)

Saves the ray image described by ID uRayHandle.

Halcon Plugin - Function Name:
rx_ray_save.
Parameters
uRayHandleThe ID of the ray image to save.
sxFilenameThe filename under which to save the ray image.
RXLF_API void Rx::ApiLF::RxRaySave ( const Rx::CRxString sxFilename)

Saves the currently bound ray image.

Halcon Plugin - Function Name:
rx_ray_save
Parameters
sxFilenameThe filename under which to save the ray image.
RXLF_API void Rx::ApiLF::RxRaySetMetaData ( unsigned  uRayHandle,
const Rx::CRxMetaData xMetaData 
)

Set meta data of a ray image.

Attention
The meta data class Rx::CRxMetaData can contain any number of meta data elements of types unsigned, double and Rx::CRxString.You can get, set and add elements to the meta data instance and store this together with the ray image.
Parameters
uRayHandleThe ray image handle.
xMetaDataThe ray image meta data to set.
RXLF_API void Rx::ApiLF::RxRayUnbind ( )

Unbind the currently bound ray image.

Warning
If no ray image is bound the function does nothing. If a ray sequence or a camera is bound, the function throws an exception.
Halcon Plugin - Function Name:
rx_ray_unbind
See also
Unbind an Image