Example Code

Dynamically Change Acquisition Parameters in VBAI

Code and Documents

Attachment

Overview

Demonstrates how to dynamically adjust image acquisition parameters based on the results of analysis performed downstream in the inspection process by making use of variables in Vision Builder for Automated Inspection (VBAI).

 

Description

When setting up an image acquisition step in VBAI, you normally adjust the camera parameters and then go about creating a script to perform a task. Since many vision processing algorithms are very sensitive to lighting conditions, the environmental lighting has to be strictly controlled for predictable algorithm results, or the inspection must be modified to account for the change in lighting conditions.

Many users assume that you will have to change these parameters manually every time the environment changes, but it is possible to update the acquisition parameters based on the results of an inspection step. This allows your application to respond to changing environmental conditions without direct user input.

 

Hardware and Software Requirements

  1. One of the following types of cameras:
    • Gigabit Ethernet Cameras Supporting GigE Vision
    • FireWire IEEE 1394 Cameras
    • USB 2.0 Cameras Supporting Microsoft DirectShow
    • USB 3.0 Cameras Supporting USB3 Vision
  2. Vision Builder Automated Inspection 2015 or compatible

 

Steps to Implement or Execute Code

  1.  Connect compatible camera to the computer
  2.  Run this inspection

 

Regards,

 

Alyssa H.

Applications Engineer

National Instruments

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

Contributors