I would use a buffer with more than two images. Ten to thirty images would work better. Keep the array of images that you generate when you are filling the ring buffer. During acquisition, you can use IMAQ status to find out what the last completed image buffer is. You can figure out the previous image easily by subtracting one and checking for wrap when it is -1. Index these images out of the image array and feed them into the IMAQ subtract vi along with an image allocated for the result. Display your results and continue to loop.
Bruce
Bruce Ammons
Ammons Engineering