comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: working with IDLtoAVI.dlm
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: working with IDLtoAVI.dlm [message #36219] Thu, 28 August 2003 12:12 Go to next message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
"Edward Graves" wrote in message ...

> I've been trying to read in the frames of an AVI file, do some simple
> image processing, and write them into a new AVI file. I downloaded Ronn
> Kling's dll which has been great, but now I'm running into problems.
> (Specs: IDL 5.4 running under Windows XP).
>
> This:
>
> 1. Open AVI for writing
> 2. Write frames
> 3. Close AVI for writing
>
> Works wonderfully. However, this:
>
> 1. Open AVI1 for writing
> 2. Open AVI2 for reading
> 3. Write frames
> 4. Close AVI2 for reading
> 5. Close AVI1 for writing
>
> Causes the whole of IDLDE to crash when executing command 5 (closing AVI1
> for writing), sans error message. I've tried opening and closing the
> AVIs in different orders, but it always crashes when trying to close the
> write AVI. The only way it works is if the read AVI is closed before the
> write AVI is opened, however that doesn't help me because it's not
> feasible for me to read in all frames of the read AVI at once. I need to
> read and write frame-by-frame.

After a quick browsing of the source, I think your problem is that you can't
reliably have 2 AVI streams open at once. There are a few global vars that
seem to clash.

What happens when you:

Open AVI1 for read
Open AVI2 for write (set different dimensions than source)
Read AVI1 and display on screen.

I would guess IDL would crash.

Even if it doesn't and I don't know what I am talking about a workaround
would be to write the raw frames into a series of IDL .sav files each one
containing maybe 50 or 100 images. Then process the .sav files and write
the 2nd avi.

-Rick
Re: working with IDLtoAVI.dlm [message #36318 is a reply to message #36219] Thu, 28 August 2003 12:59 Go to previous message
edwardg is currently offline  edwardg
Messages: 5
Registered: August 2003
Junior Member
> After a quick browsing of the source, I think your problem is that you can't
> reliably have 2 AVI streams open at once. There are a few global vars that
> seem to clash.

That was my assessment also, but it's curious because the IDLtoAVI
documentation makes a point of mentioning how the file identifiers
returned by the open routines are unique and allow multiple AVI files to
be open at once.

> What happens when you:
>
> Open AVI1 for read
> Open AVI2 for write (set different dimensions than source)
> Read AVI1 and display on screen.

This actually works, it is only the close operation that causes the crash.
Your workaround is doable though. Thanks.






Ted
graves@reyes.stanford.edu
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: how to make polygons created by idlgrpolygon transparent?
Next Topic: Solving elliptic equation in IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 12:34:51 PDT 2025

Total time taken to generate the page: 0.64280 seconds