Raytrix Light Field SDK  v3.0
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

static System::Void Rx::Net::ApiLF::RxRayBind (System::UInt32 uRayHandle)
 Bind a ray image to perform computations on. More...
 
static System::Void Rx::Net::ApiLF::RxRayCalibLoadXML (System::UInt32 uRayHandle, System::String^ sFilename)
 Load calibration data of ray image from XML file. More...
 
static System::Void Rx::Net::ApiLF::RxRayCalibSaveXML (System::UInt32 uRayHandle, System::String^ sFilename)
 Save calibration data of ray image in XML format. More...
 
static System::Void Rx::Net::ApiLF::RxRayCalibXmlGet (System::UInt32 uRayHandle, System::String^ %sXml)
 Get the calibration data of the given ray image as XML string. More...
 
static System::Void Rx::Net::ApiLF::RxRayCalibXmlSet (System::UInt32 uRayHandle, System::String^ sXml)
 Set the calibration data of the given ray image from an XML string. More...
 
static System::Void Rx::Net::ApiLF::RxRayDelete (System::UInt32 uRayHandle)
 Delete the image with the given ID. More...
 
static Rx::Net::ImageFormatRx::Net::ApiLF::RxRayGetFormat (System::UInt32 uRayHandle)
 Get the image format of a ray image. More...
 
static Rx::Net::MetaData^ Rx::Net::ApiLF::RxRayGetMetaData (System::UInt32 uImgID)
 Get meta data of a ray image. More...
 
static System::Void Rx::Net::ApiLF::RxRayGetRaw (System::UInt32 uRayHandle, Rx::Net::Image^ %xRawImage)
 Get the ray image as Rx::Net::Image instance. More...
 
static System::Void Rx::Net::ApiLF::RxRayGetRaw (System::UInt32 uRayHandle, Rx::InteropNet::Runtime28::IImage^ IRawImage, System::Boolean bCreate)
 Get the ray image. More...
 
static System::UInt32 Rx::Net::ApiLF::RxRayLoad (System::String^ sFilename)
 Load a ray image. More...
 
static System::UInt32 Rx::Net::ApiLF::RxRayNew (Rx::Net::ImageFormat^ xF)
 Create a new ray image. More...
 
static System::Void Rx::Net::ApiLF::RxRaySave (System::UInt32 uRayHandle, System::String^ sFilename)
 Saves the ray image described by ID uRayHandle. More...
 
static System::Void Rx::Net::ApiLF::RxRaySave (System::String^ sFilename)
 Saves the currently bound ray image. More...
 
static System::Void Rx::Net::ApiLF::RxRaySetMetaData (System::UInt32 uImgID, Rx::Net::MetaData^ xMetaData)
 Set meta data of a ray image. More...
 
static System::Void Rx::Net::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::Net::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::Net::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::Net::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::Net::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::Net::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

static System::Void Rx::Net::ApiLF::RxRayBind ( System::UInt32  uRayHandle)
static

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. If uRayHandle is set to zero, then any previously bound light field image is unbound.
See also
Bind Image.
static System::Void Rx::Net::ApiLF::RxRayCalibLoadXML ( System::UInt32  uRayHandle,
System::String^  sFilename 
)
static

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.
[in]sFilenameThe filename of the XML file from which to load the data.
static System::Void Rx::Net::ApiLF::RxRayCalibSaveXML ( System::UInt32  uRayHandle,
System::String^  sFilename 
)
static

Save calibration data of ray image in XML format.

Parameters
uRayHandleThe ID of the ray image whose calibration data is to be saved.
[in]sFilenameThe filename under which to save the data.
static System::Void Rx::Net::ApiLF::RxRayCalibXmlGet ( System::UInt32  uRayHandle,
System::String^ %  sXml 
)
static

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.
[in]sXmlOn successful return contains the XML string.
static System::Void Rx::Net::ApiLF::RxRayCalibXmlSet ( System::UInt32  uRayHandle,
System::String^  sXml 
)
static

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

Parameters
uRayHandleThe ID of the ray image whose calibration data is to be saved.
[in]sXmlThe XML string specifying the calibration settings.
static System::Void Rx::Net::ApiLF::RxRayDelete ( System::UInt32  uRayHandle)
static

Delete the image with the given ID.

Attention
If the ray image referenced by uRayHandle is currently bound by a previous call to Rx::Net::ApiLF::RxRayBind or Rx::Net::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.
static Rx::Net::ImageFormat ^ Rx::Net::ApiLF::RxRayGetFormat ( System::UInt32  uRayHandle)
static

Get the image format of a ray image.

Halcon Plugin - Function Name:
rx_ray_get_format
Parameters
uRayHandleThe ray image handle.
Returns
The image format of the ray image.
static Rx::Net::MetaData ^ Rx::Net::ApiLF::RxRayGetMetaData ( System::UInt32  uImgID)
static

Get meta data of a ray image.

Attention
The meta data class Rx::Net::MetaData can contain any number of meta data elements of types unsigned, double and System::String. You can get, set and add elements to the meta data instance and store this together with the ray image.
Parameters
uImgIDThe ray image handle.
Returns
The ray image meta data .
static System::Void Rx::Net::ApiLF::RxRayGetRaw ( System::UInt32  uRayHandle,
Rx::Net::Image^ %  xRawImage 
)
static

Get the ray image as Rx::Net::Image instance.

Halcon Plugin - Function Name:
rx_ray_get_raw
Parameters
uRayHandleThe ray image handle.
[out]xRawImageOn return contains the ray image.
static System::Void Rx::Net::ApiLF::RxRayGetRaw ( System::UInt32  uRayHandle,
Rx::InteropNet::Runtime28::IImage IRawImage,
System::Boolean  bCreate 
)
static

Get the ray image.

Attention
If bCreate is true, the necessary memory for the image is created with a call to Rx::InteropNet::Runtime28::IImage::Create, otherwise it is expected that pRawImage is already allocated with the correct amount of memory.
Parameters
uRayHandleThe ray image handle.
[out]IRawImagePointer to an IImage interface.
bCreateFlag whether to create image.
static System::UInt32 Rx::Net::ApiLF::RxRayLoad ( System::String^  sFilename)
static

Load a ray image.

Halcon Plugin - Function Name:
rx_ray_load.
Parameters
[in]sFilenameThe filename of the ray image.
Returns
the ray image handle of the ray image.
static System::Void Rx::Net::ApiLF::RxRaySave ( System::UInt32  uRayHandle,
System::String^  sFilename 
)
static

Saves the ray image described by ID uRayHandle.

Halcon Plugin - Function Name:
rx_ray_save.
Parameters
uRayHandleThe ID of the ray image to save.
[in]sFilenameThe filename under which to save the ray image.
static System::Void Rx::Net::ApiLF::RxRaySave ( System::String^  sFilename)
static

Saves the currently bound ray image.

Halcon Plugin - Function Name:
rx_ray_save.
Parameters
[in]sFilenameThe filename under which to save the ray image.
static System::Void Rx::Net::ApiLF::RxRaySetMetaData ( System::UInt32  uImgID,
Rx::Net::MetaData^  xMetaData 
)
static

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 System::String. You can get, set and add elements to the meta data instance and store this together with the ray image.
Parameters
uImgIDThe ray image handle.
[in]xMetaDataThe ray image meta data to set.
static System::Void Rx::Net::ApiLF::RxRayUnbind ( )
static

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