Ask Your Question

Revision history [back]

Parallel Read/Write

I have found that encode and decode are what is taking the longest amount of time in my experiments, and I'm wondering if it's possible to speed this up at all. I'm using the standard OpenCV imread and imwrite function calls. I assume that OpenCV would already do any sort of parallelization when reading/writing if it was possible, but I am not familiar enough with the OpenCV code to figure out if it happens.

A) Is it possible to do any sort of parallelization of reading or writing JPG/PNG/etc in OpenCV?

B) Does OpenCV already do this, or does it need to be requested somehow?

Related, when reading, does OpenCV read the entire image first, and then decode, or is it possible to begin decoding before the entire image is read? (In a sort of batch processing manner) My understanding is that it reads the entire image, and then decodes, but I've been asked for proof. And again, I'm not familiar enough with OpenCV code to go through the code and determine what's going on.

Thanks!