The fundamental concept behind the Raytrix Light Field API is shown in the following diagram.
The workflow can be divided into three basic steps:
After an image has been copied from the CUDA device it can be processed in a custom program or it can be displayed on screen.
There are three different image sources for the Raytrix Light Field API:
The Raytrix Light Field API allows you to load a various number of images.
This function does not return the ray image itself, but a handle to the ray image.
A valid ray image handle can be used in:
All the image processing of the Raytrix Light Field API requires a bound image.
All the operations are performed on the graphical card which has to be a CUDA device.
Before the actual image processing can be started the bound image has to be preprocessed:
After the image has been processed it can be copied back to the host device which allows you to process them with a custom program, by just using:
They are then available for further processing by an image processing library of your choice.
If a ray image is unbound it is not deleted internally. That is, it can be bound again, or saved.
This function returns a handle to the ray sequence.
A valid ray image sequence handle can be used in:
Only one ray sequence for reading and one ray sequence for writing can be bound at a time. When a ray sequence is bound for reading, any currently bound ray image is unbound, a new prototype ray image of the format of the ray sequence is created and bound and the first image of the ray sequence is loaded into the bound ray image.The ID of the newly created ray image is returned.No new ray image can be bound until the ray sequence is unbound using RaySeqUnbind().If a camera capture is started while a ray sequence is bound for reading, the ray sequence is automatically unbound. While a camera is in capture mode, no ray sequence can be bound for reading.
When a ray sequence is bound for writing a ray image must already be bound. If the ray sequence is empty up to now, the ray sequence is created for the currently bound image type and only ray images of the same format can be written to the ray sequence.Also only ray images of the same format can be bound while the ray sequence is bound. If the ray sequence already contains images, it can only be bound if the currently bound ray image format is of the same format as the ray sequence. If a ray sequence in write mode is bound and camera capture is started the ray sequence is also unbound if the image formats do not agree.To capture frames from a camera, first start the camera capture, then bind the ray sequence in write mode and set the parameter Rx::ApiLF::EPar::RaySeq_AutoStoreCamFrames to 1. The value returned is the ray image ID of the currently bound ray image.
Close a ray sequence by calling Rx::ApiLF::RxRaySeqClose.
Before you can capture images from a Raytrix camera you have to do the following preparations:
The first function uses the path given in Rx::ApiLF::RxInit to search for the camera driver DLLs (RaytrixCamera_*.dll), then to load and to initialize them.
This functions registers all cameras that are currently available. Only registered cameras can be used by the Raytrix API. This function can be called repeatedly to update the list of available cameras.
After you have prepared your camera(s) you can proceed with the opening:
When you open a camera you receive the handle of this camera. More than one camera can be opened. They are addressed by their camera handle.
A valid camera handle can be used in:
When you bind a camera you receive the image handle that refers to the bound image in the Raytrix Light Field API.
Before you can bind a camera you have to preprocess all camera sources (Prepare a Camera), subsequently you have to open the camera (Open a Camera).
After a camera is bound to the Raytrix Light Field API you can start capturing images.
Unbinds a currently bound camera. If the bound camera is still capturing images, the capturing is stopped and then the camera is unbound.
If the given camera is currently bound, the camera is un-bound before closing. Also, if the camera is in capture mode, the capturing is stopped before un-binding.
You can set the capturing mode by the parameter
When all of this was successful, images can be captured with Rx::ApiLF::RxCamRetrieveImage.