フィルターのクリア

Create a movie by a matrix (512*512*30)

2 ビュー (過去 30 日間)
Silvia Caruso
Silvia Caruso 2015 年 4 月 7 日
編集済み: Silvia Caruso 2015 年 4 月 8 日
I hade to create a movie in Matlab as temporal sequence of images of a matrix I(512*512*30) double , because I have 30 images(512*512). I tried to apply this code, but it doesn't work, and I don't know how to solve the problem
map=colormap(gray); [X,map]=gray2ind(I); mov=immovie(X,map) movie(X,n_rip,fps)
this is the error: %Error using immovie>parse_inputs (line 84) %Indexed image has to be an M-by-N-by-1-by-K array.

採用された回答

Image Analyst
Image Analyst 2015 年 4 月 7 日
See my two attached demos on how to make a movie/video.
  3 件のコメント
Image Analyst
Image Analyst 2015 年 4 月 8 日
The second line of your code starting with an equal sign won't execute. You say that you have a 3D image I (512,512,n_image) which is probably a color image. So in I(:,:,1,frame) the third dimension is the red channel. But what is frame? I is just a color image - it is not a video so it has no frame. Plus that assignment just won't work
[Im(:,:,:,frame),map] = I(:,:,1,frame);
because I is an array, not a function so you can't take something from teh I image/video and assign it to two things.
Tell me what are you trying to make a video of? What is changing as the frames go on?
Silvia Caruso
Silvia Caruso 2015 年 4 月 8 日
編集済み: Silvia Caruso 2015 年 4 月 8 日
I selected from a folder 30 rmi images dicom and I put all this 30 images in I, because I need to order images according to istance number, so now I have this matrix 512*512*30 and I should create the movie with all 30 images.I thought to create a 4-D matrix whit the command
A=cut(4,X(:,:,1),X(:,:,2),X(:,:,3),..,X(:,:,30))
and then
mov = immovie(A,map);
implay(mov,n_rip,fps)
but doesn't work..

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by