X

NV5 Geospatial Blog

Each month, NV5 Geospatial posts new blog content across a variety of categories. Browse our latest posts below to learn about important geospatial information or use the search bar to find a specific topic or author. Stay informed of the latest blog posts, events, and technologies by joining our email list!



Mapping Earthquake Deformation in Taiwan With ENVI

Mapping Earthquake Deformation in Taiwan With ENVI

12/15/2025

Unlocking Critical Insights With ENVI® Tools Taiwan sits at the junction of major tectonic plates and regularly experiences powerful earthquakes. Understanding how the ground moves during these events is essential for disaster preparedness, public safety, and building community resilience. But traditional approaches like field... Read More >

Comparing Amplitude and Coherence Time Series With ICEYE US GTR Data and ENVI SARscape

Comparing Amplitude and Coherence Time Series With ICEYE US GTR Data and ENVI SARscape

12/3/2025

Large commercial SAR satellite constellations have opened a new era for persistent Earth monitoring, giving analysts the ability to move beyond simple two-image comparisons into robust time series analysis. By acquiring SAR data with near-identical geometry every 24 hours, Ground Track Repeat (GTR) missions minimize geometric decorrelation,... Read More >

Empowering D&I Analysts to Maximize the Value of SAR

Empowering D&I Analysts to Maximize the Value of SAR

12/1/2025

Defense and intelligence (D&I) analysts rely on high-resolution imagery with frequent revisit times to effectively monitor operational areas. While optical imagery is valuable, it faces limitations from cloud cover, smoke, and in some cases, infrequent revisit times. These challenges can hinder timely and accurate data collection and... Read More >

Easily Share Workflows With the Analytics Repository

Easily Share Workflows With the Analytics Repository

10/27/2025

With the recent release of ENVI® 6.2 and the Analytics Repository, it’s now easier than ever to create and share image processing workflows across your organization. With that in mind, we wrote this blog to: Introduce the Analytics Repository Describe how you can use ENVI’s interactive workflows to... Read More >

Deploy, Share, Repeat: AI Meets the Analytics Repository

Deploy, Share, Repeat: AI Meets the Analytics Repository

10/13/2025

The upcoming release of ENVI® Deep Learning 4.0 makes it easier than ever to import, deploy, and share AI models, including industry-standard ONNX models, using the integrated Analytics Repository. Whether you're building deep learning models in PyTorch, TensorFlow, or using ENVI’s native model creation tools, ENVI... Read More >

1345678910Last
8867 Rate this article:
No rating

Making movies with IDL, part II

Anonym

Last week, I gave an example of making a movie with IDLffVideoWrite and DG. This week, I’ll use NG to make a similar movie. The example is again written as a procedure. Start the program by declaring some test data and making a simple visualization:

pro ng_movie_ex
   compile_opt idl2

   data = dist(30)

   s = surface(data, color='blue', /buffer)
   c = contour(data, n_levels=10, zvalue=0.0, /overplot)
   t = text(0.5, 0.9, 'IDL Movie Example - NG', alignment=0.5, font_size=16)

Note that the BUFFER property is set on the call to SURFACE. It forces the visualization to be rendered to an offscreen buffer; it’s the analog to the DG Z buffer device. Next, set up the IDLffVideoWrite object:

   video_file = 'ng_movie_ex.mp4'
   video = idlffvideowrite(video_file)
   framerate = 10
   wdims = s.window.dimensions
   stream = video.addvideostream(wdims[0], wdims[1], framerate)

As in last week’s example, I’ve chosen to output to an MPEG-4 video file. The dimensions of the movie are taken from the dimensions of the buffer (the default, 640 x 512) created in the call to the SURFACE function. The next step is to make and load frames into the movie file:

   nframes = 50
   for i=0, nframes-1 do begin
      s.rotate, 1.0, /yaxis               ; degrees
      c.zvalue = i*max(s.zrange)/nframes  ; data coordinates
      timestamp = video.put(stream, s.copywindow())
   endfor

On each iteration of the loop:

  1. The Rotate method rotates the surface by one degree about the global y-axis of the visualization (this is from Object Graphics; +x is right, +y is up, +z is pointed toward you)
  2. By modifying its ZVALUE property, the contour plot moves up by a fraction of the total height of the surface.
  3. The CopyWindow method (the analog to the TVRD function in DG) takes a picture of the visualization in the buffer. The picture is a pixel-interleaved RGB image, with dimensions 3 x 640 x 512.
  4. The Put method of IDLffVideoWrite loads this picture as a frame into the video stream.

End the program by destroying the video object and the buffered graphic:

   video.cleanup
   print, 'File "' + video_file + '" written to current directory.'
   s.close
end

Click below to see the resulting video on the VIS YouTube channel. [youtube http://www.youtube.com/watch?v=ixGJIViukDA]   Notes:

  1. I have a more complex NG movie example that uses the SetData method introduced in 8.1. You can download it from this [exelisvis.com] page; look for the “What's New in IDL 8.1” webinar files, grab them and look for the program called VIDEO_WRITE1. I may give this example the blog treatment at a later point.
  2. I also have two other fun examples that should get the blog treatment: a) creating an AVI movie that can be embedded in a PowerPoint presentation, and b) creating a SWF movie that, with an HTML+Javascript framework, can be viewed in a web browser. Both are included in the IDL 8.1 examples above; look for the program VIDEO_WRITE2 and its output.
Please login or register to post comments.