I try to create Laplacian Pyramid with VPI using Jetson Nano, but failed when I use CUDA backend. I show my code.
- VPI: 1.2
- Jetson Nano
int w, h;
VPIPyramid pyr;
vpiStreamCreate(bak, &stream);
vpiImageGetSize(input, &w, &h);
vpiPyramidCreate(w, h, VPI_IMAGE_FORMAT_F32, 4, 0.5, bak, pyr);
vpiSubmitLaplacianPyramidGenerator(stream, bak, input,
pyr, NULL, VPI_BORDER_CLAMP);
vpiStreamSync(stream);
VPIPyramidData out;
vpiPyramidLock(levels, VPI_LOCK_READ, &out);
int len_pyr = out.numLevels;
std::cout << "len " << out.numLevels << std::endl;
vpiPyramidUnlock(levels);
result
- bak = VPI_BACKEND_CPU
len 4
- bak = VPI_BACKEND_CUDA (Num is change)
len -196990272
When bak is VPI_BACKEND_CUDA, pyramid lenth si 0. How to fix?