Tony
Tony

Reputation: 11

Matlab Video of logical images

I have a video where I apply chroma key to each frame to extract color.

newImage = (checkR)&(checkG)&(checkB);% for each frame   

In the end I put all frames in similar video container like: 1x39(frames) of type struct where each struct now contains cdata not in int, but in logical. I get an error when I try to play the new video. I can view individual frames by extracting them, but I need a video.

movie(b); % doesnt work  

gives error:

??? Error using ==> movie
Movie cdata must be of type uint8 array    

Do I have to convert it to int?

OR

apply some binary mask which I do not know how to do?

Upvotes: 1

Views: 959

Answers (1)

mor22
mor22

Reputation: 1372

You can convert it to uint8 by

b=uint8(b);

then call movie

Upvotes: 3

Related Questions