video watermarking with an image using dct

1 view (last 30 days)
I am using dct2 to water mark a video using an image. After watermarking all the frames of the video i am trying to play back the watermarked image as a video. I am getting the following error-
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 ==> rupali at 114
M(re)=im2frame(wtrinage,colo);
The code used is--
re=1;
colo=colormap(gray);
for len=3:2:n
watermark_image=strcat('WatermarkImage ',num2str(len),'.jpg');
wtrinage=imread(watermark_image);
M(re)=im2frame(wtrinage,colo);
re=re+1;
end
movie(M)
I am not able to understand the error. Please help as soon as possible. Thanks

Answers (0)

Community Treasure Hunt

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

Start Hunting!