Example Code

Interactively set a Region of Interest (ROI) in an image and calculate a histogram for the ROI

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • Vision Development Module
  • LabVIEW

Code and Documents

Attachment

Overview

This example demonstrates how to enable the user to select interactively a ROI (Region Of Interest) and calculate a histogram based on the ROI.

 

Description

The Vision Development Module (VDM) offers different ways to the user to select a Region of Interest (ROI). This example shows how to use the Select Region of Interest VIs to show a separate window where the user can interactively select the RIO.

Select Region of Interest - NI Vision 2016 for LabVIEW Help - National Instruments

http://zone.ni.com/reference/en-XX/help/370281AC-01/imaqvision/select_region_of_interest_pal/

The example use the RIO to calculate a histogram for the RIO.

 

Requirements

 Software

  • LabVIEW Base Development System 2012 (or compatible)
  • NI Vision Development Module 2012 (or compatible)

 Hardware

  • No hardware is necessary to use this example VI

 

Steps to Implement or Execute Code

  1. Download and open the attached ZIP-file
  2. Open the VI and follow the instructions inside

 

Additional Information or References

Select ROI And Calculate Histogram - Front Panel.png
 Select ROI And Calculate Histogram - Block Diagram.png

 

**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.**

Francisco Arellano

National Instruments Mexico
Field Systems Engineer - Energy Segment
www.ni.com/soporte

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.