Raytrix Light Field SDK  v3.1
Logo
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Events Groups Pages
Light Field Image Sequence API functions

Functions for working with light field sequences. More...

Functions

RXLF_API unsigned Rx::ApiLF::RxRaySeqBind (unsigned uRaySeqHandle)
 Bind a ray sequence for use by other API functions. More...
 
RXLF_API unsigned Rx::ApiLF::RxRaySeqClose (unsigned uRaySeqHandle)
 Close a ray sequence. More...
 
RXLF_API void Rx::ApiLF::RxRaySeqGetFileSize (unsigned uRaySeqHandle, unsigned __int64 &uFileSize)
 Get the total file size of the ray sequence in bytes. More...
 
RXLF_API unsigned Rx::ApiLF::RxRaySeqGetFrameBufferUsedCount (unsigned uRaySeqHandle)
 Get number of frame buffers in use. More...
 
RXLF_API void Rx::ApiLF::RxRaySeqGetFrameCount (unsigned uRaySeqHandle, unsigned &uFrameCount)
 Get number of frames in ray sequence. More...
 
RXLF_API unsigned Rx::ApiLF::RxRaySeqGetFrameCount (unsigned uRaySeqHandle)
 Receive ray sequence get frame count. More...
 
RXLF_API unsigned Rx::ApiLF::RxRaySeqGetFrameCount ()
 Get number of frames in ray sequence that is currently bound in read mode. More...
 
RXLF_API unsigned Rx::ApiLF::RxRaySeqGetFrameIndex (unsigned uRaySeqHandle)
 Get current frame index of ray sequence. More...
 
RXLF_API bool Rx::ApiLF::RxRaySeqIsBound ()
 Determines if a sequence is bound for reading to the API. More...
 
RXLF_API void Rx::ApiLF::RxRaySeqMoveFrameIndex (unsigned uRaySeqHandle, int iStep)
 Move the frame index relative to the current position in the ray sequence. More...
 
RXLF_API unsigned Rx::ApiLF::RxRaySeqOpen (const Rx::CRxString &sxFilename, unsigned uMode, unsigned uFrameBufferCount)
 Open a ray sequence. Depending on the mode a ray sequence can be opened for reading or writing. More...
 
RXLF_API void Rx::ApiLF::RxRaySeqRead ()
 Read a frame from the currently bound ray sequence. More...
 
RXLF_API void Rx::ApiLF::RxRaySeqSetFrameIndex (unsigned uRaySeqHandle, unsigned uFrameIdx)
 Set the current frame index of ray sequence. More...
 
RXLF_API void Rx::ApiLF::RxRaySeqUnbind (unsigned uRaySeqHandle)
 Unbind a ray sequence. If a ray sequence in write mode is unbound, the currently bound ray image stays bound. No more images can be written to the ray sequence once it has been unbound, however, the ray sequence has not been closed. It can be bound again to write further ray images to it. More...
 
RXLF_API void Rx::ApiLF::RxRaySeqWrite ()
 Write currently bound ray image to currently bound ray sequence. More...
 

Detailed Description

Functions for working with light field sequences.

Function Documentation

RXLF_API unsigned Rx::ApiLF::RxRaySeqBind ( unsigned  uRaySeqHandle)

Bind a ray sequence for use by other API functions.

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, then 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 Rx::ApiLF::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.

Halcon Plugin - Function Name:
rx_ray_seq_bind.
Parameters
uRaySeqHandleThe id of the ray sequence.
Returns
the currently bound ray image handle.
See also
Bind an Image Sequence.
RXLF_API unsigned Rx::ApiLF::RxRaySeqClose ( unsigned  uRaySeqHandle)

Close a ray sequence.

Warning
Closing a ray sequence also unbinds the corresponding ray image. The ray sequence ID becomes invalid once the ray sequence has been closed.
Halcon Plugin - Function Name:
rx_ray_seq_close.
Parameters
uRaySeqHandleThe id of the ray sequence.
Returns
The number of frames written (if sequence was in write mode).
See also
Close Image Sequences.
RXLF_API void Rx::ApiLF::RxRaySeqGetFileSize ( unsigned  uRaySeqHandle,
unsigned __int64 &  uFileSize 
)

Get the total file size of the ray sequence in bytes.

Halcon Plugin - Function Name:
rx_ray_seq_get_file_size.
Parameters
uRaySeqHandleThe ray sequence id.
[out]uFileSizeContains the total size of the ray sequence in bytes.
RXLF_API unsigned Rx::ApiLF::RxRaySeqGetFrameBufferUsedCount ( unsigned  uRaySeqHandle)

Get number of frame buffers in use.

Halcon Plugin - Function Name:
rx_ray_seq_get_frame_buffer_user_count.
Parameters
uRaySeqHandleThe ray sequence id.
Returns
The number of frames in use in the frame buffer.
RXLF_API void Rx::ApiLF::RxRaySeqGetFrameCount ( unsigned  uRaySeqHandle,
unsigned &  uFrameCount 
)

Get number of frames in ray sequence.

Halcon Plugin - Function Name:
rx_ray_seq_get_frame_count.
Parameters
uRaySeqHandleThe ray sequence id.
[out]uFrameCountContains the number of frames on return.
RXLF_API unsigned Rx::ApiLF::RxRaySeqGetFrameCount ( unsigned  uRaySeqHandle)

Receive ray sequence get frame count.

Halcon Plugin - Function Name:
rx_ray_seq_get_frame_count.
Parameters
uRaySeqHandleIdentifier for the ray sequence.
Returns
Number of frames.
RXLF_API unsigned Rx::ApiLF::RxRaySeqGetFrameCount ( )

Get number of frames in ray sequence that is currently bound in read mode.

Halcon Plugin - Function Name:
rx_ray_seq_get_frame_count.
Returns
Number of frames.
RXLF_API unsigned Rx::ApiLF::RxRaySeqGetFrameIndex ( unsigned  uRaySeqHandle)

Get current frame index of ray sequence.

Halcon Plugin - Function Name:
rx_ray_seq_get_frame_index.
Parameters
uRaySeqHandleThe ray sequence id.
Returns
The frame index on return.
RXLF_API bool Rx::ApiLF::RxRaySeqIsBound ( )

Determines if a sequence is bound for reading to the API.

Halcon Plugin - Function Name:
rx_ray_seq_is_bound
Returns
True if a sequence in read mode is bound, false if not.
See also
Bind an Image Sequence.
RXLF_API void Rx::ApiLF::RxRaySeqMoveFrameIndex ( unsigned  uRaySeqHandle,
int  iStep 
)

Move the frame index relative to the current position in the ray sequence.

Halcon Plugin - Function Name:
rx_ray_seq_move_frame_index.
Parameters
uRaySeqHandleThe ray sequence id.
iStepThe number of frames to move. Negative values move frame index backward.
RXLF_API unsigned Rx::ApiLF::RxRaySeqOpen ( const Rx::CRxString sxFilename,
unsigned  uMode,
unsigned  uFrameBufferCount 
)

Open a ray sequence. Depending on the mode a ray sequence can be opened for reading or writing.

Attention
Returns the ray sequence handle
Halcon Plugin - Function Name:
rx_ray_seq_open.
Parameters
sxFilenameThe ray sequence filename.
uModeThe ray sequence mode. This is a combination of elements of ERaySeqMode .
uFrameBufferCountThe number of frame buffers used for buffered writing/reading.
Returns
The ray sequence id. This id is used in other functions to reference the ray sequence.
See also
Open Image Sequences.
RXLF_API void Rx::ApiLF::RxRaySeqRead ( )

Read a frame from the currently bound ray sequence.

Precondition
A ray sequence in read mode must have been bound beforehand.
Attention
This function reads the current frame from the ray sequence and advanced the frame pointer by one frame.The ray image is read into the currently bound ray image and the image is automatically copied onto the CUDA device. This means that the function Rx::ApiLF::RxRaySeqGetFrameIndex returns a frame index higher than before after calling Rx::ApiLF::RxRaySeqRead
Halcon Plugin - Function Name:
rx_ray_seq_read.
RXLF_API void Rx::ApiLF::RxRaySeqSetFrameIndex ( unsigned  uRaySeqHandle,
unsigned  uFrameIdx 
)

Set the current frame index of ray sequence.

Halcon Plugin - Function Name:
rx_ray_seq_set_frame_index.
Parameters
uRaySeqHandleThe ray sequence id.
uFrameIdxThe frame index.
RXLF_API void Rx::ApiLF::RxRaySeqUnbind ( unsigned  uRaySeqHandle)

Unbind a ray sequence. If a ray sequence in write mode is unbound, the currently bound ray image stays bound. No more images can be written to the ray sequence once it has been unbound, however, the ray sequence has not been closed. It can be bound again to write further ray images to it.

If a ray sequence in read mode is unbound, the currently bound ray image stays bound. The ray image is therefore also not removed from memory.

Warning
You will have to unbind the ray image and then delete it to free all memory.
Halcon Plugin - Function Name:
rx_ray_seq_unbind.
Parameters
uRaySeqHandleThe ray sequence ID of the ray sequence to unbind.
See also
Unbind an image Sequence
RXLF_API void Rx::ApiLF::RxRaySeqWrite ( )

Write currently bound ray image to currently bound ray sequence.

This function appends the currently bound ray image to the bound ray sequence.

Attention
To automatically write frames captured from a camera device to the bound ray sequence, set the parameter Rx::ApiLF::EPar::RaySeq_AutoStoreCamFrames to 1.
Halcon Plugin - Function Name:
rx_ray_seq_write.