First time here? Check out the FAQ!
answered 2013-02-07 07:17:50 -0600
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.