Pleora Technologies Inc. eBUS SDK v7.0.1.7536 API



PvCudaBufferConverter Class Reference

Used to convert a PvBuffer to another pixel type. More...

#include <PvCudaBufferConverter.h>

Public Member Functions

 PvCudaBufferConverter ()
 Constructor.
 
virtual ~PvCudaBufferConverter ()
 Destructor.
 
PvCudaBayerFilterType GetCudaBayerFilter () const
 Retrieves current optional Bayer filtering. More...
 
PvResult SetCudaBayerFilter (PvCudaBayerFilterType aFilter)
 Set the optional Bayer filtering for this converter. More...
 
PvResult Convert (const PvBuffer *aSource, PvBuffer *aDestination, bool aEnableCudaUVM)
 Convert a PvBuffer from one format to another, with another PvBuffer to store the output. More...
 
PvResult Convert (const PvBuffer *aSource, PvCudaBuffer *aCudaDestination, bool aEnableCudaUVM)
 Convert a PvBuffer from one format to another, with another PvBuffer to store the output. More...
 

Static Public Member Functions

static bool IsConversionSupported (PvPixelType aSource, PvPixelType aDestination)
 Test if a pixel type can be converted to another type. More...
 

Detailed Description

Used to convert a PvBuffer to another pixel type.

To change an image's format:

- Acquire an image. See #PvStream::RetrieveBuffer.
- Create an image-format converter (#PvCudaBufferConverter object). Use
#PvCudaBufferConverter::PvCudaBufferConverter.
- Test if you can convert your image to your preferred pixel type. Use
#PvCudaBufferConverter::IsConversionSupported.
    For your source pixel type, use #PvImage::GetPixelType; for your destination, select an
    enumeration from PvPixelType.h.
- Create a destination PvBuffer if your later task need to be done on CPU side, or
PvCudaBuffer if on GPU side.
    See #PvBuffer and #PvCudaBuffer (you define the destination image's pixel type during
    this step).
- Optionally, configure options like Bayer filtering, use #SetCudaBayerFilter.
- Convert the image to the new pixel type. Use #Convert.

Consult the PvPixelType documentation in order to find which pixel types are supported as conversion destinations.

Member Function Documentation

◆ Convert() [1/2]

PvResult PvCudaBufferConverter::Convert ( const PvBuffer aSource,
PvBuffer aDestination,
bool  aEnableCudaUVM 
)

Convert a PvBuffer from one format to another, with another PvBuffer to store the output.

Parameters
[in]aSourceThe original Pvbuffer.
[out]aDestinationThe new PvBuffer.
[in]aEnableCudaUVMAllow allocating CUDA UVM for conversion.
Returns
Includes:

◆ Convert() [2/2]

PvResult PvCudaBufferConverter::Convert ( const PvBuffer aSource,
PvCudaBuffer aCudaDestination,
bool  aEnableCudaUVM 
)

Convert a PvBuffer from one format to another, with another PvBuffer to store the output.

Parameters
[in]aSourceThe original PvBuffer.
[out]aCudaDestinationThe new PvCudaBuffer.
[in]aEnableCudaUVMAllow allocating CUDA UVM for conversion.
Returns
Includes:

◆ GetCudaBayerFilter()

PvCudaBayerFilterType PvCudaBufferConverter::GetCudaBayerFilter ( ) const

Retrieves current optional Bayer filtering.

See #SetBayerFilter

Returns
The Bayer filter's type; a PvCudaBayerFilterType enumeration.

◆ IsConversionSupported()

static bool PvCudaBufferConverter::IsConversionSupported ( PvPixelType  aSource,
PvPixelType  aDestination 
)
static

Test if a pixel type can be converted to another type.

Converting from one pixel type to another isn't a trivial mathematical calculation - all conversions require specialized, dedicated algorithms.

The IsConversionSupported method tests if the Convert method has an available conversion algorithm.

Parameters
[in]aSourceThe original pixel type. For available pixel types, see PvPixelType.h.
[in]aDestinationThe new pixel type. See aSource.
Returns
True if Convert has an available conversion algorithm; otherwise, false.

◆ SetCudaBayerFilter()

PvResult PvCudaBufferConverter::SetCudaBayerFilter ( PvCudaBayerFilterType  aFilter)

Set the optional Bayer filtering for this converter.

Of course, only applies if the Convert method uses a PvBuffer having a Bayer pixel type. Simply ignored otherwise.

Parameters
[in]aFilterThe new filter settings; a PvCudaBayerFilterType enumeration.
Returns
Includes:

The documentation for this class was generated from the following file:

Copyright (c) 2002-2026 Pleora Technologies Inc.
www.pleora.com