To download NI software, including the products shown below, visit ni.com/downloads.
Overview
The example demonstrates how to apply a ROI and mask an image at run-time.
Description
Using a Region of Interest (ROI) can significantly reduce computation time and allow for better image processing performance. There may be times when the ROI needs to be changed during a continuous image grab. A user can update an ROI on a front panel using the ROI tools. This example shows how to continuously update the ROI based on a user's input on the front panel, then mask the image and find the centroid of the area inside the ROI.
Requirements
Software
Hardware
Steps to Implement or Execute Code
Additional Information or References
KnowledgeBase: What Is the Difference Between NI-IMAQ, NI-IMAQdx, and NI-IMAQ I/O?
http://digital.ni.com/public.nsf/allkb/0564022DAFF513D2862579490057D42E
**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.