title: I am not getting exactly gray image on converting video to grayscale?
body: <p>This is my code. The output is not exactly gray. Can someone tell me what is the problem in the code ?</p>
  
  <pre><code> obj = VideoReader('shaky_cars.avi');
  height = obj.Height;
  width = obj.Width;
  
  factor = 200/height;
  num=10;
  intendedFrame = 20;
  video = read(obj , [intendedFrame , intendedFrame+num]);
  
  for i = 1:1+num
      grayVideo(:,:,i) = double(imresize((rgb2gray(video(:,:,:,i))) , factor));
  end
  
  [height , width] = size(grayVideo(:,:,1));
  figure(1);imagesc(grayVideo(:,:,1));
  </code></pre>
  
  <p>And this is the output<img src="https://i.stack.imgur.com/Q62K8.png" alt="enter image description here"></p>