I am trying to do the operations like rgb2gray(img)
on a live video read using vid=videoinput()
like rgb2gray(vid)
.
It is a type mismatch but I am stuck here. Should I convert the vid to any image format and store it in a matrix or is there any other way like to do rgb2gray
? I don't want to use vid.ReturnedColorSpace = 'grayscale'
, as I need to convert the video into images or matrix and do rgb2gray
operation.