1

私は約持っています。100枚の画像、それらの画像を読みたい、サイズを変更して、matlabを使用してパワーポイントに保存したい、各スライドにタイトルを付けてパワーポイントにそれらの画像を保存する方法はありますか. 私はこのコードを使用して画像を読んでいます:

for i = 1:numel(pngfiles)
   im{i} = imread(pngfiles{i});
  imrgb{i} = rgb2gray(im{i});
   imrgb_z{i} = imrgb{i}(160:350,280:450);
end
4

3 に答える 3

2

あなたはこれを試すことができます:

MATLAB を使用して PowerPoint スライドを作成する例はありますか?

例えば:

% before the following, you have to create the ppt as explained, see link above!
% I prefer using some name instead of i or j
for img_ind = 1:numel(pngfiles)
    % this depends on the ppt-version (see link above)-> here for 2007 and higher
    mySlide = Presentation.Slides.Add(1,'ppLayoutBlank')
    % Note: Change the image file full path names to where you save them
    Image1 = mySlide.Shapes.AddPicture('<full path>\name_of_image(img_ind).png','msoFalse','msoTrue',100,20,500,500)      
end
% then you have to save it, see link above!

あなたの場合、例に示すように、最初に画像を保存する必要があると思います:

print('-dpng','-r150','<full path>\test1.png')

編集

COM が必要なため、これは Windows で Matlab を使用する場合にのみ機能します。Floris answer のコメントを参照してください。

于 2013-07-29T12:51:11.013 に答える
1

このパーティーに遅刻します: 「Matlab Pick of the Week」ツールは次のとおりです。

http://www.mathworks.com/matlabcentral/fileexchange/30124-smart-powerpoint-exporter

どうやらこのツールは数年間更新されていないため、そのページのコメントに注意してください。

于 2014-04-18T12:29:19.563 に答える