【问题标题】:MATLAB create movie from 16 bit imagesMATLAB 从 16 位图像创建电影
【发布时间】:2012-10-22 23:40:51
【问题描述】:

我有一个简单的 MATLAB 序列,旨在从 uint16 图像集合创建 AVI 电影:

video = VideoWriter( vidName );
video.FrameRate = ( frmRate );
open( video );
for i=1:size
    img = imread( picNames(i).name );
    writeVideo( video, img );
end
close( video );

这会产生错误IMG must be one of the following classes: double, single, uint8。关于如何在不损失精度或增加压缩的情况下解决这个问题的任何想法?

【问题讨论】:

    标签: matlab video image-processing


    【解决方案1】:

    您应该在writeVideo( video, img ); 之前添加以下行:

    img=im2double(img);
    

    您不会失去精确度。

    【讨论】:

      猜你喜欢
      • 2016-11-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-06-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多