Functions for working with light field images.
More...
|
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...
|
|
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.
RXLF_API void Rx::ApiLF::RxRayBind |
( |
unsigned |
uRayHandle | ) |
|
RXLF_API void Rx::ApiLF::RxRayCalibLoadXML |
( |
unsigned |
uRayHandle, |
|
|
const Rx::CRxString & |
sxFilename |
|
) |
| |
Load calibration data of ray image from XML file.
- Parameters
-
uRayHandle | The ID of the ray image whose calibration data is to be overwritten by the loaded calibration data. |
sxFilename | The 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
-
uRayHandle | The ID of the ray image whose calibration data is to be saved. |
sxFilename | The 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
-
| uRayHandle | The ID of the ray image whose calibration data is to be saved. |
[out] | sxXml | On 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
-
uRayHandle | The ID of the ray image whose calibration data is to be saved. |
sxXml | The XML string specifying the calibration settings. |
RXLF_API void Rx::ApiLF::RxRayDelete |
( |
unsigned |
uRayHandle | ) |
|
Get the image format of a ray image.
- Halcon Plugin - Function Name:
- rx_ray_get_format
- Parameters
-
| uRayHandle | The ray image handle. |
[out] | xF | On 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
-
| uRayHandle | The ray image handle. |
[out] | xMetaData | Contains the ray image meta data on return. |
RXLF_API void Rx::ApiLF::RxRayGetRaw |
( |
unsigned |
uRayHandle, |
|
|
Rx::CRxImage & |
xRawImage |
|
) |
| |
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
-
| uRayHandle | The ray image handle. |
[out] | pRawImage | Pointer to an IImage interface. |
| bCreate | Flag whether to create image. |
RXLF_API unsigned Rx::ApiLF::RxRayLoad |
( |
const Rx::CRxString & |
sxFilename | ) |
|
Create a new ray image.
The allowed pixel types of ray images are
Returns the ray handle, which you can use in:
- Parameters
-
- Returns
- The ray image handle of the ray 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
-
uRayHandle | The ID of the ray image to save. |
sxFilename | The filename under which to save the ray image. |
RXLF_API void Rx::ApiLF::RxRaySave |
( |
const Rx::CRxString & |
sxFilename | ) |
|
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
-
uRayHandle | The ray image handle. |
xMetaData | The 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