imwrite to full (screen) size

Hi all, Im using imwrite to save images to disk and then later on imread, im2frame and movie2avi to create an avi movie file.
imwrite does not save the file to the full size and leaves a blank frame around the image, I could'nt find a good answer in the web or answers database.
P.S : I just care that the final movie result would be in full screen so if I can define it somewhere else in the process its fine as well. Thanks !

回答 (1 件)

Walter Roberson
Walter Roberson 2012 年 5 月 9 日

0 投票

imwrite() saves however-many pixels you pass to it. It does not introduce a border.
How are you creating the data that you are saving as an image? If you are using a screen snapshot such as getsnap() or getframe(), then those are not necessarily full screen.

3 件のコメント

Elad
Elad 2012 年 5 月 9 日
Thanks for your reply, Im not using a screen snapshot but Im reading some images, reducing their resolution, aligning and also croping them and just then writing them to disk. Nevertheless I still want the final movie result to appear in full screen.
Elad
Elad 2012 年 5 月 9 日
I guess I could do imresize before saving to disk, but I prefer from other reasons not to, any suggestions ?
Walter Roberson
Walter Roberson 2012 年 5 月 9 日
The alignment can introduce a border.
Run a check: before you imwrite(), display size() of the image to be written. After you have written the image, display imfinfo() of the file you just wrote.
Are you sure that it is the individual saved images that have the border and are written at the "wrong" size? Or could it be whatever mechanism you are using to display the images or to construct the movie?

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeConvert Image Type についてさらに検索

質問済み:

2012 年 5 月 9 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by