Menu

reader not letting go of files

Help
bryan
2009-05-28
2013-02-21
  • bryan

    bryan - 2009-05-28

    hi,

    first off, let me offer my sincere appreciation for this toolbox. it actually makes video processing matlab tolerable in linux.  for the most part. :)

    one thing i have found is that video reader objects that are opened with VideoReader() are not properly released (or whatever is the appropriate term), even if i explicitly close or clear the object.  in case i am not being clear...

    i have written some code that loops over a set of directories that have avi files in them to be processed.  first directory works great, no problems.  when it goes to the second directory, it throws an error, saying something about not being able to open the file, make sure the file name is correct, etc...  well, the file name is correct, and it is readable.  but the reader has not closed the previous file that was opened.  even though i explicitly say "close(vidObj)" and even "clear vidObj" in my code.  the ONLY thing that allows video reader to read the second file is if i "clear all" in matlab.  then all is well.

    i am sure it would be useful to have more information than what i have provided, so whatever that information may be, please feel free to let me know.  for now, i have just hacked it so that i save my looping index into a temp matlab file, issue a "clear all; close all" in matlab, reload the looping index, and go along my merry way.  but clearly, there is some issue that should ideally be resolved at some point.

    this is on ubuntu 9.10, 64-bit running matlab 2009a.

    regards,
    bryan

     
    • Gerald Dalley

      Gerald Dalley - 2009-05-28

      That does sound like a bug.  Thanks for reporting it.

      It'll be a little while before I can take a look at it.  In the mean time, try "clear mex" instead of "clear all".  This will just unload mex functions and it should reset the readers without clearing all of your variables.

      Do you know what version of videoIO you're using?  If not, run videoIoSysInfo and send me the resulting text file (either posted here or directly to me at dalleyg@ieee.org).

       

Log in to post a comment.