v0.6.5.2 Release

v0.6.5.2
This commit is contained in:
jdsouza90
2021-09-13 08:59:44 -07:00
parent 3df6c37852
commit 7f69da2ee4
41 changed files with 2816 additions and 503 deletions

View File

@@ -58,21 +58,22 @@ inline void CVWrapperForNvCVImage(const NvCVImage *nvcvIm, cv::Mat *cvIm) {
// Wrap a cv::Mat in an NvCVImage.
inline void NVWrapperForCVMat(const cv::Mat *cvIm, NvCVImage *nvcvIm) {
static const NvCVImage_PixelFormat nvFormat[] = { NVCV_FORMAT_UNKNOWN, NVCV_Y, NVCV_YA, NVCV_BGR, NVCV_BGRA };
static const NvCVImage_ComponentType nvType[] = { NVCV_U8, NVCV_TYPE_UNKNOWN, NVCV_U16, NVCV_S16, NVCV_S32, NVCV_F32, NVCV_F64 };
static const NvCVImage_ComponentType nvType[] = {NVCV_U8, NVCV_TYPE_UNKNOWN, NVCV_U16, NVCV_S16,
NVCV_S32, NVCV_F32, NVCV_F64, NVCV_TYPE_UNKNOWN};
nvcvIm->pixels = cvIm->data;
nvcvIm->width = cvIm->cols;
nvcvIm->height = cvIm->rows;
nvcvIm->pitch = (unsigned)cvIm->step1();
nvcvIm->pixelFormat = nvFormat[cvIm->channels()];
nvcvIm->componentType = nvType[cvIm->depth()];
nvcvIm->pitch = (int)cvIm->step[0];
nvcvIm->pixelFormat = nvFormat[cvIm->channels() <= 4 ? cvIm->channels() : 0];
nvcvIm->componentType = nvType[cvIm->depth() & 7];
nvcvIm->bufferBytes = 0;
nvcvIm->deletePtr = nullptr;
nvcvIm->deleteProc = nullptr;
nvcvIm->pixelBytes = (unsigned char)cvIm->elemSize();
nvcvIm->pixelBytes = (unsigned char)cvIm->step[1];
nvcvIm->componentBytes = (unsigned char)cvIm->elemSize1();
nvcvIm->numComponents = (unsigned char)cvIm->channels();
nvcvIm->planar = 0;
nvcvIm->gpuMem = 0;
nvcvIm->planar = NVCV_CHUNKY;
nvcvIm->gpuMem = NVCV_CPU;
nvcvIm->reserved[0] = 0;
nvcvIm->reserved[1] = 0;
}