Crops and rescales target regions with VPI for network input.
Definition at line 39 of file sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDCropScaler.hpp.
Public Member Functions | |
| ReIDCropScaler () | |
| Construct a ReIDCropScaler instance. More... | |
| ~ReIDCropScaler () | |
| Release resources owned by the ReIDCropScaler instance. More... | |
| void | initialize (const int debugVerboseLevel, const int maxStreamNum, const int maxBufSurfAddrSize, const int maxTargetNum, const NvMotDataTypes::Size srcImgSize, const uint srcImgPitch, const NvBufSurfaceColorFormat colorFormatType, const NvMotDataTypes::Size dstImgSize, const NvBufSurfaceColorFormat dstColorFormatType, const int dimOrder) |
| Initialize for image cropping and scaling. More... | |
| bool | frameTransformInBatch (const std::map< NvMOTStreamId, std::vector< std::pair< uint, NvMotDataTypes::Rect2f > > > &roisInBatch, const int lastBboxInd, const float outputScaleFactor, const std::vector< float > outputOffsets, const std::map< NvMOTStreamId, NvMOTFrame * > &inputMeta) |
| Transform (crop, scale and color conversion) a set of bboxes for the given single frame, all the bboxes will be scaled to the same size. More... | |
| float * | getOutputImagePatchPtrs () |
| Get the pointer to the output image patches on device memory with metadata. More... | |
| ReIDCropScaler () | |
| Construct a ReIDCropScaler instance. More... | |
| ~ReIDCropScaler () | |
| Release resources owned by the ReIDCropScaler instance. More... | |
| void | initialize (const int debugVerboseLevel, const int maxStreamNum, const int maxBufSurfAddrSize, const int maxTargetNum, const NvMotDataTypes::Size srcImgSize, const uint srcImgPitch, const NvBufSurfaceColorFormat colorFormatType, const NvMotDataTypes::Size dstImgSize, const NvBufSurfaceColorFormat dstColorFormatType, const int dimOrder) |
| Initialize for image cropping and scaling. More... | |
| bool | frameTransformInBatch (const std::map< NvMOTStreamId, std::vector< std::pair< uint, NvMotDataTypes::Rect2f > > > &roisInBatch, const int lastBboxInd, const float outputScaleFactor, const std::vector< float > outputOffsets, const std::map< NvMOTStreamId, NvMOTFrame * > &inputMeta) |
| Transform (crop, scale and color conversion) a set of bboxes for the given single frame, all the bboxes will be scaled to the same size. More... | |
| float * | getOutputImagePatchPtrs () |
| Get the pointer to the output image patches on device memory with metadata. More... | |
| ReIDCropScaler::ReIDCropScaler | ( | ) |
Construct a ReIDCropScaler instance.
| ReIDCropScaler::~ReIDCropScaler | ( | ) |
Release resources owned by the ReIDCropScaler instance.
| ReIDCropScaler::ReIDCropScaler | ( | ) |
Construct a ReIDCropScaler instance.
| ReIDCropScaler::~ReIDCropScaler | ( | ) |
Release resources owned by the ReIDCropScaler instance.
| bool ReIDCropScaler::frameTransformInBatch | ( | const std::map< NvMOTStreamId, std::vector< std::pair< uint, NvMotDataTypes::Rect2f > > > & | roisInBatch, |
| const int | lastBboxInd, | ||
| const float | outputScaleFactor, | ||
| const std::vector< float > | outputOffsets, | ||
| const std::map< NvMOTStreamId, NvMOTFrame * > & | inputMeta | ||
| ) |
Transform (crop, scale and color conversion) a set of bboxes for the given single frame, all the bboxes will be scaled to the same size.
| [in] | roisInBatch | The set of ROIs of interest {videoStreamID, a vector of {bboxInd, bbox} }. |
| [in] | lastBboxInd | Last bbox index. |
| [in] | outputScaleFactor | Scale applied to output pixel values. |
| [in] | outputOffsets | Parameter of each channel's offset. |
| [in] | inputMeta | Input frames keyed by stream ID. |
| bool ReIDCropScaler::frameTransformInBatch | ( | const std::map< NvMOTStreamId, std::vector< std::pair< uint, NvMotDataTypes::Rect2f > > > & | roisInBatch, |
| const int | lastBboxInd, | ||
| const float | outputScaleFactor, | ||
| const std::vector< float > | outputOffsets, | ||
| const std::map< NvMOTStreamId, NvMOTFrame * > & | inputMeta | ||
| ) |
Transform (crop, scale and color conversion) a set of bboxes for the given single frame, all the bboxes will be scaled to the same size.
| [in] | roisInBatch | The set of ROIs of interest {videoStreamID, a vector of {bboxInd, bbox} }. |
| [in] | lastBboxInd | Last bbox index. |
| [in] | outputScaleFactor | Scale applied to output pixel values. |
| [in] | outputOffsets | Parameter of each channel's offset. |
| [in] | inputMeta | Input frames keyed by stream ID. |
|
inline |
Get the pointer to the output image patches on device memory with metadata.
Definition at line 83 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDCropScaler.hpp.
|
inline |
Get the pointer to the output image patches on device memory with metadata.
Definition at line 83 of file sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDCropScaler.hpp.
| void ReIDCropScaler::initialize | ( | const int | debugVerboseLevel, |
| const int | maxStreamNum, | ||
| const int | maxBufSurfAddrSize, | ||
| const int | maxTargetNum, | ||
| const NvMotDataTypes::Size | srcImgSize, | ||
| const uint | srcImgPitch, | ||
| const NvBufSurfaceColorFormat | colorFormatType, | ||
| const NvMotDataTypes::Size | dstImgSize, | ||
| const NvBufSurfaceColorFormat | dstColorFormatType, | ||
| const int | dimOrder | ||
| ) |
Initialize for image cropping and scaling.
| [in] | debugVerboseLevel | Debug verbosity level. |
| [in] | maxStreamNum | Maximum number of input streams. |
| [in] | maxBufSurfAddrSize | Maximum number of cached surface-buffer addresses. |
| [in] | maxTargetNum | Maximum number of targets in a batch. |
| [in] | srcImgSize | Input image dimensions. |
| [in] | srcImgPitch | Input image pitch in bytes. |
| [in] | colorFormatType | Input surface color format. |
| [in] | dstImgSize | Size of image after resizing. |
| [in] | dstColorFormatType | Output color format RGB or BGR. |
| [in] | dimOrder | Output tensor dimension order. |
| void ReIDCropScaler::initialize | ( | const int | debugVerboseLevel, |
| const int | maxStreamNum, | ||
| const int | maxBufSurfAddrSize, | ||
| const int | maxTargetNum, | ||
| const NvMotDataTypes::Size | srcImgSize, | ||
| const uint | srcImgPitch, | ||
| const NvBufSurfaceColorFormat | colorFormatType, | ||
| const NvMotDataTypes::Size | dstImgSize, | ||
| const NvBufSurfaceColorFormat | dstColorFormatType, | ||
| const int | dimOrder | ||
| ) |
Initialize for image cropping and scaling.
| [in] | debugVerboseLevel | Debug verbosity level. |
| [in] | maxStreamNum | Maximum number of input streams. |
| [in] | maxBufSurfAddrSize | Maximum number of cached surface-buffer addresses. |
| [in] | maxTargetNum | Maximum number of targets in a batch. |
| [in] | srcImgSize | Input image dimensions. |
| [in] | srcImgPitch | Input image pitch in bytes. |
| [in] | colorFormatType | Input surface color format. |
| [in] | dstImgSize | Size of image after resizing. |
| [in] | dstColorFormatType | Output color format RGB or BGR. |
| [in] | dimOrder | Output tensor dimension order. |