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

Home » Public Forums » archive » Re: fast image display
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: fast image display [message #30726] Wed, 15 May 2002 16:48 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Dan Larson (drl16@cornell.edu) writes:

> I'm not using a 486 :). However, I have tried the approach that
> several people suggested, Xinteranimate. This routine works fine
> for about 100 image frames. Larger number of frames leads to the
> following error message:
>
> "%window: unable to open pixmap" OR
> "unable to allocate memory for backing store. Window closing."
>
> This is a problem I have encountered before with Xinteranimate.
> Changing the backing store (RETAIN) doesn't really alleviate
> the problem. In addition, I don't know how to add color with
> Xinteranimate.
>
> It could be I'm asking for too much to use pixmaps on such
> large arrays...

Allocating pixmap memory is always an interesting
proposition. Pixmap memory is allocated against
the video driver. It is up to the video driver what
is done when more memory is asked for than it has
available. Many drivers can use system memory to
store extra pixmaps. Others can page virtual
memory. With these drivers you can create absolutely
huge pixmap files. Some drivers are extremely limited.
For example, Windows NT drivers cannot page virtual
memory, so you are strictly limited to system
memory.

In any case, it is probably more a hardware problem
than it is an IDL problem.

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: fast image display [message #30727 is a reply to message #30726] Wed, 15 May 2002 16:45 Go to previous messageGo to next message
Dan Larson is currently offline  Dan Larson
Messages: 21
Registered: March 2002
Junior Member
In article <abukaq$1n4k$1@nntp6.u.washington.edu>,
rtowler@u.washington.edu says...
>
>> I think you're wrong there, Rick. (Gee I never thought I'd get to say
>> that!) XINTERANIMATE generates off-screen pixmaps and then brings them
>> onto the screen with DEVICE, COPY=... and this is faster than calling
>> TV for every frame.
>
> That's the last time I make a guess! (Well, ok it isn't.) I assumed that
> the limiting factor would be bandwidth to the graphics buffer but obviously
> TV does something else to slow drawing down. And doing the math it doesn't
> really add up. But maybe Dan could be using a 486 with 1MB ISA video card.
> It's possible! ;)
>
> -Rick
>
>
>
>
Also Xmovie.pro gives the same error: "%window: unable to create pixmap"

dan
Re: fast image display [message #30728 is a reply to message #30727] Wed, 15 May 2002 16:33 Go to previous messageGo to next message
Dan Larson is currently offline  Dan Larson
Messages: 21
Registered: March 2002
Junior Member
In article <abukaq$1n4k$1@nntp6.u.washington.edu>,
rtowler@u.washington.edu says...
>
>> I think you're wrong there, Rick. (Gee I never thought I'd get to say
>> that!) XINTERANIMATE generates off-screen pixmaps and then brings them
>> onto the screen with DEVICE, COPY=... and this is faster than calling
>> TV for every frame.
>
> That's the last time I make a guess! (Well, ok it isn't.) I assumed that
> the limiting factor would be bandwidth to the graphics buffer but obviously
> TV does something else to slow drawing down. And doing the math it doesn't
> really add up. But maybe Dan could be using a 486 with 1MB ISA video card.
> It's possible! ;)
>
> -Rick
>
>
>
>
I'm not using a 486 :). However, I have tried the approach that
several people suggested, Xinteranimate. This routine works fine
for about 100 image frames. Larger number of frames leads to the
following error message:

"%window: unable to open pixmap" OR
"unable to allocate memory for backing store. Window closing."

This is a problem I have encountered before with Xinteranimate.
Changing the backing store (RETAIN) doesn't really alleviate
the problem. In addition, I don't know how to add color with
Xinteranimate.

It could be I'm asking for too much to use pixmaps on such
large arrays...

Dan
Re: fast image display [message #30733 is a reply to message #30728] Wed, 15 May 2002 14:35 Go to previous messageGo to next message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
> I think you're wrong there, Rick. (Gee I never thought I'd get to say
> that!) XINTERANIMATE generates off-screen pixmaps and then brings them
> onto the screen with DEVICE, COPY=... and this is faster than calling
> TV for every frame.

That's the last time I make a guess! (Well, ok it isn't.) I assumed that
the limiting factor would be bandwidth to the graphics buffer but obviously
TV does something else to slow drawing down. And doing the math it doesn't
really add up. But maybe Dan could be using a 486 with 1MB ISA video card.
It's possible! ;)

-Rick
Re: fast image display [message #30736 is a reply to message #30733] Wed, 15 May 2002 14:29 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning (david@dfanning.com) writes:

>> http://www.dfanning.com/programs/xmovie.pro
>
> Oh, hang on. That program doesn't even *use* pixmaps.
> It should. Well, check back tomorrow. I'm sure it will
> by then. :-)

Alright. Now this program uses pixmaps in a fashion similar
to XInterAnimate. *And* it is easier to understand. :-)

http://www.dfanning.com/programs/xmovie.pro

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: fast image display [message #30737 is a reply to message #30736] Wed, 15 May 2002 13:33 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning (david@dfanning.com) writes:

> I agree that pixmaps are the way to go. But, if you
> find RSI-written code as daunting as I do, I have
> a simplified version that was written specifically
> to be understood:
>
> http://www.dfanning.com/programs/xmovie.pro

Oh, hang on. That program doesn't even *use* pixmaps.
It should. Well, check back tomorrow. I'm sure it will
by then. :-)

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: fast image display [message #30738 is a reply to message #30737] Wed, 15 May 2002 13:30 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Mark Hadfield (m.hadfield@niwa.co.nz) writes:

> I think you're wrong there, Rick. (Gee I never thought I'd get to say
> that!) XINTERANIMATE generates off-screen pixmaps and then brings them
> onto the screen with DEVICE, COPY=... and this is faster than calling
> TV for every frame.
>
> So, as Reimar suggested, Dan should definitely check out
> XINTERANIMATE.

I agree that pixmaps are the way to go. But, if you
find RSI-written code as daunting as I do, I have
a simplified version that was written specifically
to be understood:

http://www.dfanning.com/programs/xmovie.pro

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: fast image display [message #30742 is a reply to message #30738] Wed, 15 May 2002 13:17 Go to previous messageGo to next message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
"Rick Towler" <rtowler@u.washington.edu> wrote in message
news:abu5nk$f0e$1@nntp6.u.washington.edu...
> The rate that TV can write images to the screen is dependent on your
> hardware and the images you are displaying. I just displayed a
> 768x512x24 image using tv at 25 fps so real-time playback is
> reasonable if you have sufficient juice in your PC. I don't think
> there is a faster way to display something other than using direct
> graphics...

I think you're wrong there, Rick. (Gee I never thought I'd get to say
that!) XINTERANIMATE generates off-screen pixmaps and then brings them
onto the screen with DEVICE, COPY=... and this is faster than calling
TV for every frame.

So, as Reimar suggested, Dan should definitely check out
XINTERANIMATE.

--
Mark Hadfield "Ka puwaha et tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
Re: fast image display [message #30751 is a reply to message #30742] Wed, 15 May 2002 10:26 Go to previous messageGo to next message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
The rate that TV can write images to the screen is dependent on your
hardware and the images you are displaying. I just displayed a 768x512x24
image using tv at 25 fps so real-time playback is reasonable if you have
sufficient juice in your PC. I don't think there is a faster way to display
something other than using direct graphics. Using object graphics will just
introduce more overhead.


Don't shy away from writing .AVIs. I highly recommend Ronn Kling's IDLtoAVI
windows only .dlm based on Oleg Kornilov's code. I have been using it and
loving it for about a month now. No wasting your time writing frames to
disk and using an external program to combine them. It does all the work
for you. (I can even let my users make their own .AVIs now!) I use it with
the ligos indeo 5 and divX codecs and get excellent results that far exceed
MPEG-1 in quality and compression rates. (just remember you need the codec
installed on your playback machine.)


The .dlm can be found here:
http://www.kilvarock.com/freesoftware/dlms/avi.htm

codecs here:
http://indeo.ligos.com/pi=103.php (best for x-platform support)
http://www.divx.com/divx/ (best compression rates)


-Rick


"Dan Larson" <drl16@cornell.edu> wrote in message
news:MPG.174c58eb5cdb33fd98968d@newsstand.cit.cornell.edu...
> I would like to display large (768 x 512) 24 bit color
> images at video rate in a graphics window. In the past,
> I have relied on writing AVIs or MPEGS, but this approach
> is time-consuming. The simple approach (using TV) reaches
> about 4 frames/s on my PC. Is there an easy way to
> accomplish fast display in a graphics window?
>
> Cheers,
>
> Dan
Re: fast image display [message #30753 is a reply to message #30751] Wed, 15 May 2002 09:43 Go to previous messageGo to next message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Dan Larson wrote:
>
> I would like to display large (768 x 512) 24 bit color
> images at video rate in a graphics window. In the past,
> I have relied on writing AVIs or MPEGS, but this approach
> is time-consuming. The simple approach (using TV) reaches
> about 4 frames/s on my PC. Is there an easy way to
> accomplish fast display in a graphics window?
>
> Cheers,
>
> Dan

Dear Dan,

how much images did you have?

If it's less than 128 the best rate you will get
by copying each image to a pixmap window.
Then each pixmap is copied to the actual window
by a device copy command.

This is the method of xinteranimate or cw_animate


Reimar


--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml
============================================================ =======
Re: fast image display [message #30863 is a reply to message #30728] Wed, 15 May 2002 17:27 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
"Dan Larson" <drl16@cornell.edu> wrote in message
news:MPG.174cba3ac610598c98968e@newsstand.cit.cornell.edu...
> I'm not using a 486 :). However, I have tried the approach that
> several people suggested, Xinteranimate. This routine works fine
> for about 100 image frames. Larger number of frames leads to the
> following error message:
>
> "%window: unable to open pixmap" OR
> "unable to allocate memory for backing store. Window closing."

Well in that case you may find it worth your while to look at the
image-sequence animator object in my MGH_Motley libray. It should do
everything you want provided you have enough RAM (and IDL 5.5). The
library is now available from either of these URLs...

ftp://ftp.niwa.cri.nz/incoming/m.hadfield/MGH_MOTLEY.tar.gz
ftp://ftp.niwa.cri.nz/incoming/m.hadfield/MGH_MOTLEY.zip

...(same code, different archive format). Take a look at...

mgh_example_image_sequence.pro
mgh_imagator__define.pro

> ...In addition, I don't know how to add color with
> Xinteranimate.

Me neither. With the mgh_imagator object you just select the "Edit
Palette" item in the Tools menu.

--
Mark Hadfield "Ka puwaha et tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: vector C++ version of IDL where statement?
Next Topic: Interactive IDL plots into Powerpoint

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

Current Time: Wed Oct 08 19:39:39 PDT 2025

Total time taken to generate the page: 0.00496 seconds