To download NI software, including the products shown below, visit ni.com/downloads.
Overview
The example demonstrates how to extract a free shape ROI and mask the image with that ROI.
Description
A ROI or region of interest is used to select the important area of an image for processing. ROIs can be used to greatly reduce image processing time. Recall that LabVIEW currently supports rectangular images; this means that image data must be stored in 2D array/ matrix form. This example describes the most robust means of extracting ROIs.
What happens when users want to use a freeform, non-rectangular, ROI?
The most common method of extracting an ROI is creating an ROI descriptor using the rectangle selection tool and the IMAQ Construct ROI(VI), from here the ROI is extracted from the original using IMAQ extract tetragon(VI). Freeform ROI descriptors are also made using IMAQ Construct ROI(VI). In order to extract non rectangular ROIs special steps are taken and are described in this example.
Requirements
Software
Hardware
Steps to Implement or Execute Code
Additional Information or References
Dialog VI that is displayed after the VI is launched
Main VI
**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text 'NIVerified'. Read here for more information about the new Example Guidelines and Community Platform.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.