与im2frame函数有关的错误

时间:2014-09-22 06:01:31

标签: matlab

我正在尝试将一系列图像写入视频。我收到以下错误:

In VideoWriter.VideoWriter>VideoWriter.close at 307
  In VideoWriter.VideoWriter>VideoWriter.delete at 256


Error using im2frame
Indexed movie data values must be legal colormap indices:
1.0 <= value <= length(colormap) for double-precision movie data, and 0 <=
value <= length(colormap)-1 for uint8 movie data

Error in VideoStabilization1 (line 134)
   writeVideo(writerObj,im2frame(I,cmap));

我该如何解决?

我使用以下代码行来编写视频:

 writeVideo(writerObj,im2frame(I,cmap));

I是彩色图片。

1 个答案:

答案 0 :(得分:1)

它是彩色视频,rgb的像素强度平均在0-250之间