fmov = aviread('x.avi',1:50); %read the AVI file
tdata = fmov(1,1).cdata; %indexed
tmap = fmov(1,1).colormap;
tt3 = ind2rgb(tdata, tmap);
image(tt3);
tt = tt3(:,:,1);
tt = double(tt);
figure
imshow(tt)