OpenCV to use in memory buffers or file pointers

Posted by The Unknown on Stack Overflow See other posts from Stack Overflow or by The Unknown
Published on 2009-04-29T07:02:02Z Indexed on 2010/03/25 5:03 UTC
Read the original article Hit count: 293

Filed under:
|
|

The two functions in openCV cvLoadImage and cvSaveImage accept file path's as arguments.

For example, when saving a image it's cvSaveImage("/tmp/output.jpg", dstIpl) and it writes on the disk.

Is there any way to feed this a buffer already in memory? So instead of a disk write, the output image will be in memory.

I would also like to know this for both cvSaveImage and cvLoadImage (read and write to memory buffers). Thanks!


My goal is to store the Encoded (jpeg) version of the file in Memory. Same goes to cvLoadImage, I want to load a jpeg that's in memory in to the IplImage format.

© Stack Overflow or respective owner

Related posts about opencv

Related posts about memory