开发者

Matlab Video of logical images

开发者 https://www.devze.com 2023-02-18 08:37 出处:网络
I have a video where I apply chroma key to each frame to extract color. newImage = (checkR)&(checkG)&(checkB);% for each frame

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 st开发者_StackOverflow社区ruct 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?


You can convert it to uint8 by

b=uint8(b);

then call movie

0

精彩评论

暂无评论...
验证码 换一张
取 消