Example Code

IMAQ zoom to 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

Download All

Overview

The example demonstrates how to zoom an image with a user selected ROI.

 

Description

With the ROI tool it is possible to easily select a rectangle shaped section of an image and then copy that image section to another image buffer and display that section. The image part automatically stretches so the image displayed is fully filled.

 

Requirements

 Software

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

 Hardware

  • No hardware is necessary to use this example VI

 

Steps to Implement or Execute Code

  1. Run the VI
  2. Select a ROI (region of interest) in the left image display by clicking and dragging the mouse

 

Additional Information or References

Zoom in ROI LV2012 NIVerified.vi - Front Panel.png

 

Zoom in ROI LV2012 NIVerified.vi - 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.**

Kevin R
Applications Engineer
National Instruments UK&Ireland

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

Comments
zahidkjatoi
Member
Member
on

Dear Kev_R,

 

I am having problem running this VI. It gives error 'IMAQ Extract 2 missing'. Can you help me with this?

 

Thanks,

Khan.

eduardochinen
Member
Member
on

Kev_R,

 

I use your example together with this Bounding Box to Rectangle ROI from alcava.cr and I was able to zoom on a QR Code read from a jpg file. Thanks a lot.

 

Here is my code with a jpg file to test in labview 2013

https://www.dropbox.com/s/7rc92csuxayuxnj/QRcode.zip?dl=0