title: Detecting faces in video file. Error in using data type
body: <p>I have the following question.
  I'm working with matlab 2016.
  I want to detect faces in a video file, using the Viola-Jones algorithm.
  When I try to enter a video file in the <code>step</code> statement, I get the following error:</p>
  
  <pre><code>Error using
     vision.CascadeObjectDetector/validateInputsImpl
     (line 330)
     Expected input number 2 to be
     one of these types:
  
     uint8, uint16, double, single,int16
  
     Instead its type was
     vision.VideoFileReader.
  
     Error in VJ1_video (line 12)
     bboxes = step(faceDetector, videoFReader);
  </code></pre>
  
  <p>I understand that somehow the type of VideoFileReader should be converted to one of the types: uint8, uint16, double, single, int16.
  But I do not understand how this can be done. Tell me please. 
  Here is my program code:</p>
  
  <pre><code>clear all;
  %Load the video using a video reader object
    videoFReader = vision.VideoFileReader('D:\465.avi');
  %Create a detector object.
    faceDetector = vision.CascadeObjectDetector;
  %Detect faces.
    bboxes = step(faceDetector, videoFReader);
  %Annotate detected faces
    IFaces = insertObjectAnnotation(videoFReader, 'rectangle', bboxes, 'Лицо');
  %Create a video player object to play the video file.
    videoPlayer = vision.VideoPlayer;
  
  %Use a while loop to read and play the video frames.
    while ~isDone(videoFReader)
      videoFrame = videoFReader();
      videoPlayer(videoFrame);
    end
  %Release the objects.
    release(videoPlayer);
    release(videoFReader);
  </code></pre>