NVIDIA DeepStream SDK API Reference

8.0 Release
nvdsinferserver::CropSurfaceConverter Class Reference

Detailed Description

Preprocessor for cropping, scaling and padding the inference input to required height, width.

Definition at line 113 of file sources/libs/nvdsinferserver/infer_preprocess.h.

Inheritance diagram for nvdsinferserver::CropSurfaceConverter:
Collaboration diagram for nvdsinferserver::CropSurfaceConverter:

Public Types

using PreprocessDone = std::function< void(NvDsInferStatus, SharedBatchArray)>
 
using PreprocessDone = std::function< void(NvDsInferStatus, SharedBatchArray)>
 

Public Member Functions

 CropSurfaceConverter (int32_t convertPoolSize)
 
 ~CropSurfaceConverter () override
 
void setParams (int outW, int outH, InferMediaFormat outFormat, int maxBatchSize)
 
void setMaintainAspectRatio (bool enable)
 
void setSymmetricPadding (bool enable)
 
void setScalingHW (NvBufSurfTransform_Compute compute_hw)
 
void setScalingFilter (NvBufSurfTransform_Inter filter)
 
 CropSurfaceConverter (int32_t convertPoolSize)
 
 ~CropSurfaceConverter () override
 
void setParams (int outW, int outH, InferMediaFormat outFormat, int maxBatchSize)
 
void setMaintainAspectRatio (bool enable)
 
void setSymmetricPadding (bool enable)
 
void setScalingHW (NvBufSurfTransform_Compute compute_hw)
 
void setScalingFilter (NvBufSurfTransform_Inter filter)
 
NvDsInferStatus transform (SharedBatchArray src, SharedCuStream mainStream, PreprocessDone done) override
 Perform the transformation on the input buffer from the buffer array, indexed using m_TransformIdx. More...
 
NvDsInferStatus transform (SharedBatchArray src, SharedCuStream mainStream, PreprocessDone done) override
 Perform the transformation on the input buffer from the buffer array, indexed using m_TransformIdx. More...
 

Member Typedef Documentation

◆ PreprocessDone [1/2]

◆ PreprocessDone [2/2]

Constructor & Destructor Documentation

◆ CropSurfaceConverter() [1/2]

nvdsinferserver::CropSurfaceConverter::CropSurfaceConverter ( int32_t  convertPoolSize)
inline

◆ ~CropSurfaceConverter() [1/2]

nvdsinferserver::CropSurfaceConverter::~CropSurfaceConverter ( )
override

◆ CropSurfaceConverter() [2/2]

nvdsinferserver::CropSurfaceConverter::CropSurfaceConverter ( int32_t  convertPoolSize)
inline

◆ ~CropSurfaceConverter() [2/2]

nvdsinferserver::CropSurfaceConverter::~CropSurfaceConverter ( )
override

Member Function Documentation

◆ setMaintainAspectRatio() [1/2]

void nvdsinferserver::CropSurfaceConverter::setMaintainAspectRatio ( bool  enable)
inline

◆ setMaintainAspectRatio() [2/2]

void nvdsinferserver::CropSurfaceConverter::setMaintainAspectRatio ( bool  enable)
inline

◆ setParams() [1/2]

void nvdsinferserver::CropSurfaceConverter::setParams ( int  outW,
int  outH,
InferMediaFormat  outFormat,
int  maxBatchSize 
)

◆ setParams() [2/2]

void nvdsinferserver::CropSurfaceConverter::setParams ( int  outW,
int  outH,
InferMediaFormat  outFormat,
int  maxBatchSize 
)

◆ setScalingFilter() [1/2]

void nvdsinferserver::CropSurfaceConverter::setScalingFilter ( NvBufSurfTransform_Inter  filter)
inline

◆ setScalingFilter() [2/2]

void nvdsinferserver::CropSurfaceConverter::setScalingFilter ( NvBufSurfTransform_Inter  filter)
inline

◆ setScalingHW() [1/2]

void nvdsinferserver::CropSurfaceConverter::setScalingHW ( NvBufSurfTransform_Compute  compute_hw)
inline

◆ setScalingHW() [2/2]

void nvdsinferserver::CropSurfaceConverter::setScalingHW ( NvBufSurfTransform_Compute  compute_hw)
inline

◆ setSymmetricPadding() [1/2]

void nvdsinferserver::CropSurfaceConverter::setSymmetricPadding ( bool  enable)
inline

◆ setSymmetricPadding() [2/2]

void nvdsinferserver::CropSurfaceConverter::setSymmetricPadding ( bool  enable)
inline

◆ setTransformIdx() [1/2]

void nvdsinferserver::BasePreprocessor::setTransformIdx ( int  idx)
inlineinherited

◆ setTransformIdx() [2/2]

void nvdsinferserver::BasePreprocessor::setTransformIdx ( int  idx)
inlineinherited

◆ setUniqueId() [1/2]

void nvdsinferserver::BasePreprocessor::setUniqueId ( int  id)
inlineinherited

◆ setUniqueId() [2/2]

void nvdsinferserver::BasePreprocessor::setUniqueId ( int  id)
inlineinherited

◆ transform() [1/2]

NvDsInferStatus nvdsinferserver::BasePreprocessor::transform ( SharedBatchArray  src,
SharedCuStream  mainStream,
PreprocessDone  done 
)
inlineoverridevirtualinherited

Perform the transformation on the input buffer from the buffer array, indexed using m_TransformIdx.

Parameters
[in]srcThe input batch buffer array.
[in]mainStreamThe main processing CUDA stream.
[in]doneThe call function to be called after transformation.
Returns
NVDSINFER_SUCCESS or NVDSINFER_RESOURCE_ERROR.

Implements nvdsinferserver::IPreprocessor.

Definition at line 103 of file 9.0/sources/libs/nvdsinferserver/infer_iprocess.h.

References NVDSINFER_RESOURCE_ERROR, and NVDSINFER_SUCCESS.

◆ transform() [2/2]

NvDsInferStatus nvdsinferserver::BasePreprocessor::transform ( SharedBatchArray  src,
SharedCuStream  mainStream,
PreprocessDone  done 
)
inlineoverridevirtualinherited

Perform the transformation on the input buffer from the buffer array, indexed using m_TransformIdx.

Parameters
[in]srcThe input batch buffer array.
[in]mainStreamThe main processing CUDA stream.
[in]doneThe call function to be called after transformation.
Returns
NVDSINFER_SUCCESS or NVDSINFER_RESOURCE_ERROR.

Implements nvdsinferserver::IPreprocessor.

Definition at line 103 of file sources/libs/nvdsinferserver/infer_iprocess.h.

References NVDSINFER_RESOURCE_ERROR, and NVDSINFER_SUCCESS.

◆ uniqueId() [1/2]

int nvdsinferserver::BasePreprocessor::uniqueId ( ) const
inlineinherited

◆ uniqueId() [2/2]

int nvdsinferserver::BasePreprocessor::uniqueId ( ) const
inlineinherited

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