2
votes

I am doing a Matlab project in which I have to track faces, it runs fine until I used:

% Track the face over successive video frames until the video is finished.
  while ~isDone(videoFileReader)

The above code gives the error

Undefined function 'isDone' for input arguments of type 'single'.

Is there is any substitute for this loop?

2
wouldn't it be simpler with a for-loop stopping when it reaches the last frame? - Benoit_11
videoFileReader should not be of type "single". The real problem must be elsewhere in your code (show where you use vision.VideoFileReader). - nkjt

2 Answers

0
votes

The most likely reason you are getting this error is that isDone function is not defined in your workspace.

Try adding the necessary path, i.e. addpath('requiredlibrarypath') where isDone function is defined.

2
votes

isDone() is a method of the vision.VideoFileReader object in the Computer Vision System Toolbox. You should make sure that you have the toolbox installed, and that videoFileReader is of type vision.VideoFileReader.