From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Time Lapse Frame / Video Capture

Code and Documents

Attachment

Overview

This time lapse program can be set to capture images at a set time frame which are then stored on disk. These can then be converted to an AVI file.

Description

This example acquires images from a camera at a given time interval which can be changed while the program is running. A base path is provided by the user which is where the images are written to disk. The image format can be either jpg, bmp or png.

Once the images have been written to disk, Convert img to AVI.vi converts the static image files stored on disk to a single AVI video file.

Steps to Implement or Execute Code

  1. Connect a camera to your computer.
  2. Open the Grab_IMGs.vi and change the base path in the code to store the images in a set location.
  3. Set the parameters such as the file format and the ms to wait between each image
  4. Run the Grab_IMGs.vi.

Optional:

   5. Open and configure the Convert Img to AVI to convert the static images to a single AVI File.

Requirements

Software

LabVIEW 2013

IMAQdx

Hardware

Camera

Additional Images or Video


Code.PNG

fp.PNG


__________________________
Aidan H

Applications Engineer
National Instruments UK & Ireland

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

Contributors