Take User Drawn ROI for Image Processing VI's ROI Descriptor Input in LabVIEW

Updated Nov 7, 2023

Environment

Software

  • Vision Development Module
  • LabVIEW

I want to be able to draw different regions of interests (ROIs) on my image display on my front panel so that the vision processing VI that I an running only looks as portions of the image and not the whole image.  I want to be able to change the part of the image I am processing from the front panel without having to change my program.

You can use a Property Node for the image display to pull the ROI drawn on the image display.  The ROI can then be fed into the ROI Descriptor of your processing VI.  An example VI snippet is shown below where we provide the ROI Descriptor for the Detect Shape VI.

Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project.  To use a snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW block diagram.

Additional Information

You can create an ROI Property Node by:
  1. Right-click on the image indicator on the block diagram.
  2. Select Create
  3. Select Property Node
  4. Select ROI
  5. Drop the ROI Property Node down on the block diagram and wire it into the ROI Descriptor input.