Overview
This code takes two images from IMAQdx compatible cameras and will take the absolute difference of the images and multiply that difference by an RGB gain.
Description
This is a relatively simple VI with a state machine architecture. There are three states; Snap, Process, and Close. The initial state is the Snap state, which will snap images from both cameras, or one camera if desired, and then pass these images into the Process state. The Process state waits for a value change event on any of the R, G, B gain values and then processes the image. The Process state loops back into the same state, unless the Snap or Stop buttons are pressed. The final state is the Close state which disposes of all the image references.
Steps to Implement or Execute Code
Requirements
Software
LabVIEW 8.6 or later and the associated Vision Development Module and Vision Acquisition Software
Hardware
Any IMAQdx Compatible camera, you can use two cameras if you would like however the delay in the sequence structure should allow you to snap an image from the same camera twice.
Additional Images or Video
VI Snippet

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