Crops, scales, and converts tracker image patches with CUDA textures.
Definition at line 25 of file sources/libs/nvmultiobjecttracker/include/modules/cuDCFv2/cuDCFFrameTransformTexture.hpp.


Public Member Functions | |
| cuDCFFrameTransformTexture () | |
| Construct an uninitialized CUDA texture frame transform. More... | |
| ~cuDCFFrameTransformTexture () | |
| Release CUDA texture frame-transform resources. 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 bool needSecondaryScale=false, const float secondaryScaleFactor=1.0) |
| Initialize for image cropping and scaling. More... | |
| bool | frameTransformInBatch (const std::map< NvMOTStreamId, std::vector< std::pair< uint, NvMotDataTypes::Rect2f > > > &roisInBatch, const uint lastBboxInd) |
| Transform (crop, scale and color conversion) a set of bboxes for the given single frame. More... | |
| bool | frameTransformInBatch_NV12 (const std::map< NvMOTStreamId, std::vector< std::pair< uint, NvMotDataTypes::Rect2f > > > &roisInBatch, const uint lastBboxInd, bool doMosaicing) |
| Transform (crop, scale and color conversion) a set of bboxes for the given single frame. More... | |
| void | getOutputImagePatchPtrs (uint8_t *&dataPtr_d, uint &width, uint &height, uint2 &outBatchingGrid, uint &channels, uint &pitch, uint &imgNum, uint multiResInd) |
| Get the pointer to the output image patches on device memory with metadata. More... | |
| int | getMultiResScaleNum () const |
| Return the number of output scale levels. More... | |
| uint2 | getOutBatchingGrid () const |
| Return the two-dimensional output batching grid. More... | |
| bool | isInitialized () const |
| Report whether frame-transform initialization completed. More... | |
| cuDCFFrameTransformTexture () | |
| Construct an uninitialized CUDA texture frame transform. More... | |
| ~cuDCFFrameTransformTexture () | |
| Release CUDA texture frame-transform resources. 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 bool needSecondaryScale=false, const float secondaryScaleFactor=1.0) |
| Initialize for image cropping and scaling. More... | |
| bool | frameTransformInBatch (const std::map< NvMOTStreamId, std::vector< std::pair< uint, NvMotDataTypes::Rect2f > > > &roisInBatch, const uint lastBboxInd) |
| Transform (crop, scale and color conversion) a set of bboxes for the given single frame. More... | |
| bool | frameTransformInBatch_NV12 (const std::map< NvMOTStreamId, std::vector< std::pair< uint, NvMotDataTypes::Rect2f > > > &roisInBatch, const uint lastBboxInd, bool doMosaicing) |
| Transform (crop, scale and color conversion) a set of bboxes for the given single frame. More... | |
| void | getOutputImagePatchPtrs (uint8_t *&dataPtr_d, uint &width, uint &height, uint2 &outBatchingGrid, uint &channels, uint &pitch, uint &imgNum, uint multiResInd) |
| Get the pointer to the output image patches on device memory with metadata. More... | |
| int | getMultiResScaleNum () const |
| Return the number of output scale levels. More... | |
| uint2 | getOutBatchingGrid () const |
| Return the two-dimensional output batching grid. More... | |
| bool | isInitialized () const |
| Report whether frame-transform initialization completed. More... | |
| void | initialize_common (const int debugVerboseLevel, const int maxStreamNum, const int maxBufSurfAddrSize, const int maxTargetNum, const NvMotDataTypes::Size srcImgSize, const uint srcImgPitch, const NvBufSurfaceColorFormat colorFormatType) |
| Initialize common transform state and allocate output memory. More... | |
| void | initialize_common (const int debugVerboseLevel, const int maxStreamNum, const int maxBufSurfAddrSize, const int maxTargetNum, const NvMotDataTypes::Size srcImgSize, const uint srcImgPitch, const NvBufSurfaceColorFormat colorFormatType) |
| Initialize common transform state and allocate output memory. More... | |
| void | updateTextureObject (const std::map< NvMOTStreamId, NvMOTFrame * > &inputMeta) |
| Update texture objects from a batch of source frames. More... | |
| void | updateTextureObject (const std::map< NvMOTStreamId, NvMOTFrame * > &inputMeta) |
| Update texture objects from a batch of source frames. More... | |
| NvBufSurfaceColorFormat | getColorFormat () const |
| Get the input surface color format. More... | |
| NvBufSurfaceColorFormat | getColorFormat () const |
| Get the input surface color format. More... | |
| uint | getMaxVideoStreams () const |
| Get the maximum number of video streams in a batch. More... | |
| uint | getMaxVideoStreams () const |
| Get the maximum number of video streams in a batch. More... | |
| bool | isInitialized_common () const |
| Report whether common frame-transform state is initialized. More... | |
| bool | isInitialized_common () const |
| Report whether common frame-transform state is initialized. More... | |
Protected Member Functions | |
| void | allocateOutputMemories_common () |
| Allocate device and host memory for transform output. More... | |
| void | allocateOutputMemories_common () |
| Allocate device and host memory for transform output. More... | |
| void | deAllocateOutputMemories_common () |
| Release device and host memory for transform output. More... | |
| void | deAllocateOutputMemories_common () |
| Release device and host memory for transform output. More... | |
Protected Attributes | |
| bool | m_isInit_common |
| Indicates whether common transform state is initialized. More... | |
| std::shared_ptr< FrameInputTexture > | m_frameInput |
| Shared input-frame texture manager. More... | |
| float4 * | m_rois_h |
| float4 * | m_rois_d |
| Host and device regions of interest in x, y, width, and height order. More... | |
| uint2 * | m_dstOffsets_h |
| uint2 * | m_dstOffsets_d |
| Host and device byte offsets into transform output memory. More... | |
| std::map< uint, std::pair< NvMOTStreamId, uint > > | m_targetNumInd2RoisInBatchMapper |
| Stream and bounding-box indices keyed by batch target index. More... | |
| int | m_scaleFactor |
| Scale that restores values read through normalized CUDA texture mode. More... | |
| uint | m_lastInd |
| Number of targets in the latest transform. More... | |
| uint | m_numFramesInBatchMax |
| Maximum number of frames processed in a batch. More... | |
| int | m_maxTargetsToTrack |
| Maximum number of targets in a batch. More... | |
| const int | m_cudaBlockSize_2D |
| CUDA block width and height for two-dimensional kernels. More... | |
| cudaStream_t | m_cuStream |
| CUDA stream used for frame transformations. More... | |
| int | m_debugVerboseLevel |
| Debug verbosity level. More... | |
| cuDCFFrameTransformTexture::cuDCFFrameTransformTexture | ( | ) |
Construct an uninitialized CUDA texture frame transform.
| cuDCFFrameTransformTexture::~cuDCFFrameTransformTexture | ( | ) |
Release CUDA texture frame-transform resources.
| cuDCFFrameTransformTexture::cuDCFFrameTransformTexture | ( | ) |
Construct an uninitialized CUDA texture frame transform.
| cuDCFFrameTransformTexture::~cuDCFFrameTransformTexture | ( | ) |
Release CUDA texture frame-transform resources.
|
protectedinherited |
Allocate device and host memory for transform output.
|
protectedinherited |
Allocate device and host memory for transform output.
|
protectedinherited |
Release device and host memory for transform output.
|
protectedinherited |
Release device and host memory for transform output.
| bool cuDCFFrameTransformTexture::frameTransformInBatch | ( | const std::map< NvMOTStreamId, std::vector< std::pair< uint, NvMotDataTypes::Rect2f > > > & | roisInBatch, |
| const uint | lastBboxInd | ||
| ) |
Transform (crop, scale and color conversion) a set of bboxes for the given single frame.
| [in] | roisInBatch | The ROIs for each stream, as pairs of bbox index and rectangle. |
| [in] | lastBboxInd | The last bbox index in the batch. |
| bool cuDCFFrameTransformTexture::frameTransformInBatch | ( | const std::map< NvMOTStreamId, std::vector< std::pair< uint, NvMotDataTypes::Rect2f > > > & | roisInBatch, |
| const uint | lastBboxInd | ||
| ) |
Transform (crop, scale and color conversion) a set of bboxes for the given single frame.
| [in] | roisInBatch | The ROIs for each stream, as pairs of bbox index and rectangle. |
| [in] | lastBboxInd | The last bbox index in the batch. |
| bool cuDCFFrameTransformTexture::frameTransformInBatch_NV12 | ( | const std::map< NvMOTStreamId, std::vector< std::pair< uint, NvMotDataTypes::Rect2f > > > & | roisInBatch, |
| const uint | lastBboxInd, | ||
| bool | doMosaicing | ||
| ) |
Transform (crop, scale and color conversion) a set of bboxes for the given single frame.
| [in] | roisInBatch | The ROIs for each stream, as pairs of bbox index and rectangle. |
| [in] | lastBboxInd | The last bbox index in the batch. |
| [in] | doMosaicing | Whether to mosaic the cropped patches. |
| bool cuDCFFrameTransformTexture::frameTransformInBatch_NV12 | ( | const std::map< NvMOTStreamId, std::vector< std::pair< uint, NvMotDataTypes::Rect2f > > > & | roisInBatch, |
| const uint | lastBboxInd, | ||
| bool | doMosaicing | ||
| ) |
Transform (crop, scale and color conversion) a set of bboxes for the given single frame.
| [in] | roisInBatch | The ROIs for each stream, as pairs of bbox index and rectangle. |
| [in] | lastBboxInd | The last bbox index in the batch. |
| [in] | doMosaicing | Whether to mosaic the cropped patches. |
|
inlineinherited |
Get the input surface color format.
Definition at line 244 of file sources/libs/nvmultiobjecttracker/include/modules/FrameTransform/FrameTransform.hpp.
References FrameTransformTexture::m_frameInput.
|
inlineinherited |
Get the input surface color format.
Definition at line 244 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/FrameTransform/FrameTransform.hpp.
References FrameTransformTexture::m_frameInput.
|
inlineinherited |
Get the maximum number of video streams in a batch.
Definition at line 247 of file sources/libs/nvmultiobjecttracker/include/modules/FrameTransform/FrameTransform.hpp.
References FrameTransformTexture::m_numFramesInBatchMax.
|
inlineinherited |
Get the maximum number of video streams in a batch.
Definition at line 247 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/FrameTransform/FrameTransform.hpp.
References FrameTransformTexture::m_numFramesInBatchMax.
|
inline |
Return the number of output scale levels.
Definition at line 94 of file sources/libs/nvmultiobjecttracker/include/modules/cuDCFv2/cuDCFFrameTransformTexture.hpp.
|
inline |
Return the number of output scale levels.
Definition at line 94 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/cuDCFv2/cuDCFFrameTransformTexture.hpp.
|
inline |
Return the two-dimensional output batching grid.
Definition at line 97 of file sources/libs/nvmultiobjecttracker/include/modules/cuDCFv2/cuDCFFrameTransformTexture.hpp.
|
inline |
Return the two-dimensional output batching grid.
Definition at line 97 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/cuDCFv2/cuDCFFrameTransformTexture.hpp.
| void cuDCFFrameTransformTexture::getOutputImagePatchPtrs | ( | uint8_t *& | dataPtr_d, |
| uint & | width, | ||
| uint & | height, | ||
| uint2 & | outBatchingGrid, | ||
| uint & | channels, | ||
| uint & | pitch, | ||
| uint & | imgNum, | ||
| uint | multiResInd | ||
| ) |
Get the pointer to the output image patches on device memory with metadata.
| [out] | dataPtr_d | The pointer to the beginning of the device data. |
| [out] | width | The width of an image patch. |
| [out] | height | The height of an image patch. |
| [out] | outBatchingGrid | The dimensions of the batching grid. |
| [out] | channels | The number of image channels. |
| [out] | pitch | The byte length of one image line. |
| [out] | imgNum | The number of images in the batch. |
| [in] | multiResInd | The multi-resolution scale index. |
| void cuDCFFrameTransformTexture::getOutputImagePatchPtrs | ( | uint8_t *& | dataPtr_d, |
| uint & | width, | ||
| uint & | height, | ||
| uint2 & | outBatchingGrid, | ||
| uint & | channels, | ||
| uint & | pitch, | ||
| uint & | imgNum, | ||
| uint | multiResInd | ||
| ) |
Get the pointer to the output image patches on device memory with metadata.
| [out] | dataPtr_d | The pointer to the beginning of the device data. |
| [out] | width | The width of an image patch. |
| [out] | height | The height of an image patch. |
| [out] | outBatchingGrid | The dimensions of the batching grid. |
| [out] | channels | The number of image channels. |
| [out] | pitch | The byte length of one image line. |
| [out] | imgNum | The number of images in the batch. |
| [in] | multiResInd | The multi-resolution scale index. |
| void cuDCFFrameTransformTexture::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 bool | needSecondaryScale = false, |
||
| const float | secondaryScaleFactor = 1.0 |
||
| ) |
Initialize for image cropping and scaling.
| [in] | debugVerboseLevel | The debug level that selects which intermediate information is printed. |
| [in] | maxStreamNum | The maximum number of streams to extract. |
| [in] | maxBufSurfAddrSize | The maximum number of possible surface buffer addresses. |
| [in] | maxTargetNum | The maximum number of targets. |
| [in] | srcImgSize | The input image size. |
| [in] | srcImgPitch | The input image pitch. |
| [in] | colorFormatType | The color format of the input image. |
| [in] | dstImgSize | The image size after resizing. |
| [in] | needSecondaryScale | Whether the image needs a secondary scale level. |
| [in] | secondaryScaleFactor | The secondary scaling factor. |
| void cuDCFFrameTransformTexture::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 bool | needSecondaryScale = false, |
||
| const float | secondaryScaleFactor = 1.0 |
||
| ) |
Initialize for image cropping and scaling.
| [in] | debugVerboseLevel | The debug level that selects which intermediate information is printed. |
| [in] | maxStreamNum | The maximum number of streams to extract. |
| [in] | maxBufSurfAddrSize | The maximum number of possible surface buffer addresses. |
| [in] | maxTargetNum | The maximum number of targets. |
| [in] | srcImgSize | The input image size. |
| [in] | srcImgPitch | The input image pitch. |
| [in] | colorFormatType | The color format of the input image. |
| [in] | dstImgSize | The image size after resizing. |
| [in] | needSecondaryScale | Whether the image needs a secondary scale level. |
| [in] | secondaryScaleFactor | The secondary scaling factor. |
|
inherited |
Initialize common transform state and allocate output memory.
| [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. |
|
inherited |
Initialize common transform state and allocate output memory.
| [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. |
|
inline |
Report whether frame-transform initialization completed.
Definition at line 100 of file sources/libs/nvmultiobjecttracker/include/modules/cuDCFv2/cuDCFFrameTransformTexture.hpp.
|
inline |
Report whether frame-transform initialization completed.
Definition at line 100 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/cuDCFv2/cuDCFFrameTransformTexture.hpp.
|
inlineinherited |
Report whether common frame-transform state is initialized.
Definition at line 250 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/FrameTransform/FrameTransform.hpp.
References FrameTransformTexture::m_isInit_common.
|
inlineinherited |
Report whether common frame-transform state is initialized.
Definition at line 250 of file sources/libs/nvmultiobjecttracker/include/modules/FrameTransform/FrameTransform.hpp.
References FrameTransformTexture::m_isInit_common.
|
inherited |
Update texture objects from a batch of source frames.
| [in] | inputMeta | Source frames keyed by stream ID. |
|
inherited |
Update texture objects from a batch of source frames.
| [in] | inputMeta | Source frames keyed by stream ID. |
|
protectedinherited |
CUDA block width and height for two-dimensional kernels.
Definition at line 276 of file sources/libs/nvmultiobjecttracker/include/modules/FrameTransform/FrameTransform.hpp.
|
protectedinherited |
CUDA stream used for frame transformations.
Definition at line 277 of file sources/libs/nvmultiobjecttracker/include/modules/FrameTransform/FrameTransform.hpp.
|
protectedinherited |
Debug verbosity level.
Definition at line 278 of file sources/libs/nvmultiobjecttracker/include/modules/FrameTransform/FrameTransform.hpp.
|
protectedinherited |
Host and device byte offsets into transform output memory.
Definition at line 266 of file sources/libs/nvmultiobjecttracker/include/modules/FrameTransform/FrameTransform.hpp.
|
protectedinherited |
Definition at line 266 of file sources/libs/nvmultiobjecttracker/include/modules/FrameTransform/FrameTransform.hpp.
|
protectedinherited |
Shared input-frame texture manager.
Definition at line 262 of file sources/libs/nvmultiobjecttracker/include/modules/FrameTransform/FrameTransform.hpp.
Referenced by FrameTransformTexture::getColorFormat().
|
protectedinherited |
Indicates whether common transform state is initialized.
Definition at line 259 of file sources/libs/nvmultiobjecttracker/include/modules/FrameTransform/FrameTransform.hpp.
Referenced by FrameTransformTexture::isInitialized_common().
|
protectedinherited |
Number of targets in the latest transform.
Definition at line 271 of file sources/libs/nvmultiobjecttracker/include/modules/FrameTransform/FrameTransform.hpp.
|
protectedinherited |
Maximum number of targets in a batch.
Definition at line 273 of file sources/libs/nvmultiobjecttracker/include/modules/FrameTransform/FrameTransform.hpp.
|
protectedinherited |
Maximum number of frames processed in a batch.
Definition at line 272 of file sources/libs/nvmultiobjecttracker/include/modules/FrameTransform/FrameTransform.hpp.
Referenced by FrameTransformTexture::getMaxVideoStreams().
|
protectedinherited |
Host and device regions of interest in x, y, width, and height order.
Definition at line 265 of file sources/libs/nvmultiobjecttracker/include/modules/FrameTransform/FrameTransform.hpp.
|
protectedinherited |
Definition at line 265 of file sources/libs/nvmultiobjecttracker/include/modules/FrameTransform/FrameTransform.hpp.
|
protectedinherited |
Scale that restores values read through normalized CUDA texture mode.
Definition at line 270 of file sources/libs/nvmultiobjecttracker/include/modules/FrameTransform/FrameTransform.hpp.
|
protectedinherited |
Stream and bounding-box indices keyed by batch target index.
Definition at line 267 of file sources/libs/nvmultiobjecttracker/include/modules/FrameTransform/FrameTransform.hpp.