Functions for working with light field images.
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::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.
static void Rx::Net::ApiLF::RxRayBind |
( |
unsigned |
uRayHandle | ) |
|
|
static |
Bind a ray image to perform computations on.
- Halcon Plugin - Function Name:
- rx_ray_bind
- Parameters
-
uRayHandle | The 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 void Rx::Net::ApiLF::RxRayCalibLoadXML |
( |
unsigned |
uRayHandle, |
|
|
System::String^ |
sFilename |
|
) |
| |
|
static |
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. |
[in] | sFilename | The filename of the XML file from which to load the data. |
static void Rx::Net::ApiLF::RxRayCalibSaveXML |
( |
unsigned |
uRayHandle, |
|
|
System::String^ |
sFilename |
|
) |
| |
|
static |
Save calibration data of ray image in XML format.
- Parameters
-
| uRayHandle | The ID of the ray image whose calibration data is to be saved. |
[in] | sFilename | The filename under which to save the data. |
static void Rx::Net::ApiLF::RxRayCalibXmlGet |
( |
unsigned |
uRayHandle, |
|
|
System::String^ % |
sXml |
|
) |
| |
|
static |
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. |
[in] | sXml | On successful return contains the XML string. |
static void Rx::Net::ApiLF::RxRayCalibXmlSet |
( |
unsigned |
uRayHandle, |
|
|
System::String^ |
sXml |
|
) |
| |
|
static |
Set the calibration data of the given ray image from an XML string.
- Parameters
-
| uRayHandle | The ID of the ray image whose calibration data is to be saved. |
[in] | sXml | The XML string specifying the calibration settings. |
static void Rx::Net::ApiLF::RxRayDelete |
( |
unsigned |
uRayHandle | ) |
|
|
static |
Get the image format of a ray image.
- Halcon Plugin - Function Name:
- rx_ray_get_format
- Parameters
-
uRayHandle | The ray image handle. |
- Returns
- The image format of the ray image.
static Rx::Net::MetaData ^ Rx::Net::ApiLF::RxRayGetMetaData |
( |
unsigned |
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 String
. You can get, set and add elements to the meta data instance and store this together with the ray image.
- Parameters
-
uImgID | The ray image handle. |
- Returns
- The ray image meta data .
static void Rx::Net::ApiLF::RxRayGetRaw |
( |
unsigned |
uRayHandle, |
|
|
Rx::Net::Image^ % |
xRawImage |
|
) |
| |
|
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
-
| uRayHandle | The ray image handle. |
[out] | IRawImage | Pointer to an IImage interface. |
| bCreate | Flag whether to create image. |
static unsigned Rx::Net::ApiLF::RxRayLoad |
( |
System::String^ |
sFilename | ) |
|
|
static |
Load a ray image.
- Halcon Plugin - Function Name:
- rx_ray_load.
- Parameters
-
[in] | sFilename | The filename of the ray image. |
- Returns
- the ray image handle of the ray image.
Create a new ray image.
The allowed pixel types of ray images are
Returns the ray handle, which you can use in:
- Parameters
-
[in] | xF | The ray image format. |
- Returns
- the ray image handle of the ray image.
static void Rx::Net::ApiLF::RxRaySave |
( |
unsigned |
uRayHandle, |
|
|
System::String^ |
sFilename |
|
) |
| |
|
static |
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. |
[in] | sFilename | The filename under which to save the ray image. |
static void Rx::Net::ApiLF::RxRaySave |
( |
System::String^ |
sFilename | ) |
|
|
static |
Saves the currently bound ray image.
- Halcon Plugin - Function Name:
- rx_ray_save.
- Parameters
-
[in] | sFilename | The filename under which to save the ray image. |
static void Rx::Net::ApiLF::RxRaySetMetaData |
( |
unsigned |
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 String
. You can get, set and add elements to the meta data instance and store this together with the ray image.
- Parameters
-
| uImgID | The ray image handle. |
[in] | xMetaData | The ray image meta data to set. |
static 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