Example Code

Time-Lapse Creator

Code and Documents

Attachment

Overview
This example is an application that can build a time lapse video from a heap of images with various preferences including frame rate, resolution and compression type.

 

 

Description
The application takes the field "Image Root Folder" and finds all the .JPG image files inside it and orders them based on the file attribute "Date Modified". It then takes the ordered images and user preferences and writes each of the images into an AVI file.

Depending on computer and OS the "Compression Type" Enum will be populated by a number of .avi compression filters. It was found that "Microsoft Video 1" works best; the image quality is OK and the file size is reduced by around 80%. To see the pros and cons of each of the compression types which have on the computer there is a really neat example in the NI Example Finder (in LabVIEW»Help»Find Example»Serach "AVI"»Select the "AVI Compressor Comparison Example"), which shows the time to write, resulting quality and memory usage for each.

 


Requirements

  • LabVIEW 2012 (or compatible)
  • Vision Development Module


Steps to Implement or Execute Code

  1. Download and unzip the file
  2. Open the project and open the main.vi
  3. Set the parameter in front panel
  4. Run the VI

 

Additional Information or References
VI Block Diagram of "main.vi"

 BLock Diagram.PNG

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

 

Jack. W
Applications Engineer
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
reto
Member
Member
on

Hi Jack¨

Can you please add the code in LabView version 2010?

Thank you

Reto