Ask Your Question

Revision history [back]

Are you trying to write an image to a file? Just use the OpenCV call

cv::imwrite ( "filename.pgm", cvmat );

where cvmat is your cv::Mat image in OpenCV.