Object-specific allocator for cv::Mat

I would guess from the function signature

cv::imdecode (InputArray buf, int flags, Mat *dst)

that you can’t pass a HostMem object as dst because it is a Mat and not an OutputArray. That said I know VideoCapture::read works and I would expect all functions which the output is an OutputArray to allow you to pass in an empty HostMem object and internally alocate it for you.

1 Like