Ask Your Question

JedLeggett's profile - activity

2017-04-12 14:11:08 -0600 commented answer returning a Mat from a function

Can you get OpenCV to allocate memory in a way that will be reference counted without incurring a penalty? In my case, I need to read data from a binary file and store it as a cv::Mat. I'd like to be able to pass the memory address from the cv::Mat to an ifstream::read call and have the data written directly into the referenced counted memory without having to do a memcpy or the like.