Batch Utilities#

The following utility functions in BatchUtilities.cpp help you to work with image batches:

  • AllocateBatchBuffer() can be used to allocate a buffer for a batch of images.

  • NthImage() can be used to set a view into the nth image in a batched buffer.

  • ComputeImageBytes() can be used to determine the number of bytes for each image to advance the pixel pointer from one image to the next.

  • TransferToNthImage() makes it easy to call NvCVImage_Transfer() to set one of the images in a batch.

  • TransferFromNthImage() makes it easy to call NvCVImage_Transfer() to copy one of the images in a batch to a regular image.

  • TransferToBatchImage() transfers multiple images from different locations to a batched image.

  • TransferFromBatchImage() can be used to retrieve the images in a batch to different images in different locations.

  • TransferBatchImage() transfers all images in a batch to another compatible batch of images.

The last three functions can also be accomplished by repeatedly calling the nth image APIs, but the source code illustrates an alternative method of accessing images in a batch.