|
|
NVIDIA DeepStream SDK API Reference
|
9.2 Release
|
Go to the documentation of this file.
18 #ifndef cuDCFFrameTransform_HPP_
19 #define cuDCFFrameTransform_HPP_
21 #include "modules/FrameTransform/FrameTransform.hpp"
22 #include "modules/utility/dataTypes.hpp"
48 const int debugVerboseLevel,
const int maxStreamNum,
const int maxBufSurfAddrSize,
51 const bool needSecondaryScale =
false,
const float secondaryScaleFactor = 1.0
61 const std::map<
NvMOTStreamId, std::vector<std::pair<uint, NvMotDataTypes::Rect2f> > > &roisInBatch,
62 const uint lastBboxInd
73 const std::map<
NvMOTStreamId, std::vector<std::pair<uint, NvMotDataTypes::Rect2f> > > &roisInBatch,
74 const uint lastBboxInd,
bool doMosaicing
89 uint8_t* &dataPtr_d,
uint &
width,
uint &height, uint2 &outBatchingGrid,
102 #if defined(VIZ_DEBUG)
104 const std::map<NvMOTStreamId, cv::Mat> &getSourceImagesAtHost()
const
108 throw std::runtime_error(
"frameInput is invalid");
110 const std::map<NvMOTStreamId, cv::Mat> & srcFramesAtHost =
m_frameInput->getSrcFramesAtHost();
111 if(srcFramesAtHost.size() == 0)
113 throw std::runtime_error(
"srcFramesAtHost is not prepared");
117 return srcFramesAtHost;
126 std::map<NvMOTStreamId, std::map<uint, cv::Mat > > getImagePatches2Host_OCV_mosaic(
uint multiResInd = 0);
133 std::map<NvMOTStreamId, std::map<uint, cv::Mat > > getImagePatches2Host_OCV_batch(
uint multiResInd = 0);
144 void allocateOutputMemories();
147 void deAllocateOutputMemories();
154 uint2 m_outBatchingGrid;
155 int m_multiResScaleNum;
164 #endif // cuDCFFrameTransform_HPP_
~cuDCFFrameTransformTexture()
Release CUDA texture frame-transform resources.
JDIMENSION JDIMENSION * width
Crops, scales, and converts tracker image patches with CUDA textures.
cuDCFFrameTransformTexture()
Construct an uninitialized CUDA texture frame transform.
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.
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.
Provides common CUDA texture state for frame transformations.
std::shared_ptr< FrameInputTexture > m_frameInput
Shared input-frame texture manager.
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.
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.
Represents a two-dimensional integer size.
uint2 getOutBatchingGrid() const
Return the two-dimensional output batching grid.
int getMultiResScaleNum() const
Return the number of output scale levels.
bool isInitialized() const
Report whether frame-transform initialization completed.
NvBufSurfaceColorFormat
Defines color formats for NvBufSurface.