[vtkusers] continuous saving of image frames

Wylie, Brian bnwylie at sandia.gov
Mon Apr 16 17:19:50 EDT 2007


My suggestion would be to at least investigate the SQUIRT compression
that used in ParaView. It's simply a lossy (or lossless) run-length
encoding scheme...

C:\Work\vtk_stuff\ParaView\Servers\Filters
- vtkSquirtCompressor.cxx
- vtkSquirtCompressor.h

  Brian Wylie - Org 1424
  Sandia National Laboratories
  MS 0822 - Building 880/A1-J
  (505)844-2238 FAX(505)845-0833    
       _______ __
      /_  __(_) /_____ _____
       / / / / __/ __ `/ __ \
      / / / / /_/ /_/ / / / /
     /_/ /_/\__/\__,_/_/ /_/
            VTK Informatics Toolkit
  

> -----Original Message-----
> From: vtkusers-bounces+bnwylie=sandia.gov at vtk.org 
> [mailto:vtkusers-bounces+bnwylie=sandia.gov at vtk.org] On 
> Behalf Of Sean Ziegeler
> Sent: Monday, April 16, 2007 3:14 PM
> To: Tim Soper
> Cc: vtkusers at vtk.org
> Subject: Re: [vtkusers] continuous saving of image frames
> 
> One source of latency is usually the compression.  You might 
> consider either cranking it down or turning it off (if the 
> classes expose methods for that, I can't recall off of the 
> top of my head).  Or using a very basic format without 
> compression like PPM.  I also can't remember if VTK has a PPM writer.
> 
> However, you can write your own PPM files.  It's basically a 
> dump of raw binary RGB's (probably what you've already done 
> with fwrite) with a small header at the top.  Use the binary 
> format, not the ASCII one.
> 
> Tim Soper wrote:
> > Hi-
> >    I've been writing a subclass for vtkVideoSource to grab 
> frames in a custom application. I'm at the point where I 
> would like to continuously save captured frames to individual 
> files. While continuous display of video frames works nicely 
> (30Hz+), saving the images using vtkPNGWriter or vtkBMPWriter 
> (those are the two I tried) is drastically slowing my 
> application. At most I can save 2-4 frames per second. To 
> compare, I tried writing the bitmap data to files directly in 
> a raw format using the c++ command fwrite( ) and was able to 
> save images easily at 10 fps. Is there a way to speed up the 
> process using a vtkImageWriter subclass. Any help would be 
> greatly appreciated.
> >  
> > Tim Soper
> > 
> > Research Assistant
> > University of Washington
> > Department of Bioengineering
> > Box 352142
> > 
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: 
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> 
> 




More information about the vtkusers mailing list