deepstream-services-library icon indicating copy to clipboard operation
deepstream-services-library copied to clipboard

how to pMapperedBuffer to opencv Mat?

Open kimsjpk1 opened this issue 8 months ago • 3 comments

i tried to apply super resolution in deepstream code

and i watched your github code

example/cpp/4file_custom_pph_using_opencv.cpp

// Transforming only one frame in the batch, so create a copy of the single // surface ... becoming our new source surface. This creates a new mono // (non-batched) surface copied from the "batched frames" using the batch id // as the index DSL::DslMonoSurface monoSurface(pMappedBuffer->pSurface, pFrameMeta->batch_id);

        // Coordinates and dimensions for our destination surface.
        int left(0), top(0);

        // capturing full frame
        int width = pMappedBuffer->GetWidth(pFrameMeta->batch_id);
        int height = pMappedBuffer->GetHeight(pFrameMeta->batch_id);

if pMappedBuffer with batch_id convert to opencv Mat, i can apply super resolution on Frame

please tell me how to convert it

thanks in advance

kimsjpk1 avatar May 31 '24 01:05 kimsjpk1