Hello everybody,

I am not sure how to convert my AVI video into Black and White or in
matlab terms gray scale.

I have the following code which tells me the no of frames, fame height,
frame width etc but am not exactly sure how to use this information
to convert the video into grayscale

I know there is a function 'rgb2gray' but again not sure how I would
apply this?!?!

Please advice

Thanks

Code:
vidTest=textread('.\test_input\list_test.txt','%s');
for x=1:length(vidTest)%for each video of that speaker...
   
   video_obj=mmreader(['.\test_input\',vidTest{x}]);
   frames = read(video_obj);
   
   no_frames = video_obj.NumberOfFrames;
   frames_width = video_obj.Width;
   frames_height = video_obj.Height;
     
end