Ask Your Question
0

fwrite in pgm file in open cv

asked 2013-02-07 07:04:22 -0600

BMR gravatar image

plz i have a code in matlab which write in a pgm file "fwrite(f, image', 'uint8');" and i convert it to open cv as fwrite(image,CV_8UC1,sizeof(image),pFile);

but it doesn't write anything in a file

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2013-02-07 07:17:50 -0600

unxnut gravatar image

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.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-02-07 07:04:22 -0600

Seen: 636 times

Last updated: Feb 07 '13