Contents
Initialize API - Prepare Image Source - Bind Image
Raytrix Light Field API - Initialize - Prepare Image Source - Bind Image to API
The Raytrix Light Field API can be seen as a state machine. This means that each computational step requires a specific state of the API to be in, to perform its task.
In the first section of this page the three essential initial states are explained:
- Initialized API
- Prepared Image Source
- Image Bound
The diagram above illustrates which Raytrix Light Field API functions to one of the states, mentioned above, lead.
For example to get the API state machine into the Initialized API state you have to call: Rx::ApiLF::RxInit . Thereafter you must select a CUDA device with Rx::ApiLF::RxCudaSelectDevice to make sure you have a CUDA device referenced on which all image processing is done.
Coming from state 1. you have the opportunity to select an image source. The Raytrix Light Field API can work with three different sources. To get to state 2. Prepared Images Source you can use the corresponding API calls for your image source of choice:
- Raytrix Image Source (*.ray)
- Raytrix Image Sequence Source (*.rays)
- Camera Source Lastly the final step, before you can start the actual image processing, is state 3. Image Bound. This step is essential because it copies the raw image (Rx::ApiLF::EImg::Raw) onto the CUDA device. This allows the Raytrix Light Field API user to benefit from the fast and efficient image processing computations already implemented on the graphical card.
- See also
- Image Processing State Machine
Image Processing State Machine
The following image illustrates a flow chart of image processing with the Raytrix Light Field API including all API calls and images that are needed for each processing step.
Raytrix Light Field API - Flow Chart of Image Processing
Starting from the initial state Image Bound the diagram shows nearly every path to a processed image. For example the task is to compute a total focus image of the view camera. The following steps have to be executed:
Rx::ApiLF::RxPreProcess();
Rx::ApiLF::RxDepthRay();
Rx::ApiLF::RxSetPar(Rx::ApiLF::EPar::Proj_CurrentTargetView, Rx::LF::ESpace::ViewCamera);
Rx::ApiLF::RxDepthMap();
Rx::ApiLF::RxTotalFocus();
Rx::Net::ApiLF::RxPreProcess();
Rx::Net::ApiLF::RxDepthRay();
Rx::Net::ApiLF::RxSetPar((Rx::Net::ApiLF::EPar::Proj_CurrentTargetView, Rx::LF::ESpace::ViewCamera);
Rx::Net::ApiLF::RxDepthMap();
Rx::Net::ApiLF::RxTotalFocus();
Rx.
Net.ApiLF.RxPreProcess();
Rx.
Net.ApiLF.RxDepthRay();
Rx.
Net.ApiLF.RxSetPar(
Rx.
Net.ApiLF.EPar.Proj_CurrentTargetView,
Rx.LF.ESpace.ViewCamera);
Rx.
Net.ApiLF.RxDepthMap();
Rx.
Net.ApiLF.RxTotalFocus();
- See also
- Image Processing with the Raytrix Light Field API