Thank you for contacting National Instruments.
Several methods exist for subtracting images. The method to use depends on the software you have available. If you have the
LabVIEW Vision Development Module, either of the following methods will work:
- Use IMAQ Subtract.vi, which is located in the Vision>>Image Processing>>Operators palette. This VI will allow you to either subtract two images or subtract a constant from an image.
- Use a combination of IMAQ GetPixelValue.vi and IMAQ SetPixelValue.vi. Both are located in the Vision>>Vision Utilities>>Pixel Manipulation palette. With these VIs, you can subtract corresponding pixel values from two images, one pixel at a time. You would need to get the pixel
values from the two source images, subtract them, then set them on the destination image.
If you do not have the Vision Development Module, your best option is to convert the image to an array using
IMAQ ImageToArray.vi. This VI is located in the
Vision>>Vision Utilities>>Pixel Manipulation palette. Once the image is in array form, you can subtract either the entire array or one element at a time.
Regards,
Jesse D.
Applications Engineer
National Instruments