Ask Your Question

Revision history [back]

Write out mat to stream / print to screen

I have a mat, and I can save it to the filesystem with something like:

cv.SaveImage("/tmp/out.png", mat)

But I'm using opencv with a web server, and I want to write out the image data directly to the client. The equivalent would be writing out the image data to stdout. Is there a way to do this?

click to hide/show revision 2
retagged

updated 2014-08-18 16:57:37 -0600

berak gravatar image

Write out mat to stream / print to screen

I have a mat, and I can save it to the filesystem with something like:

cv.SaveImage("/tmp/out.png", mat)

But I'm using opencv with a web server, and I want to write out the image data directly to the client. The equivalent would be writing out the image data to stdout. Is there a way to do this?

Write out mat to stream / print to screen

I have a mat, and I can save it to the filesystem with something like:

cv.SaveImage("/tmp/out.png", mat)

But I'm using opencv with a web server, and I want to write out the image data directly to the client. The equivalent would be writing out the image data to stdout. Is there a way to do this?