Example Code

Data Matrix Reader

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

  • LabVIEW

Code and Documents

Attachment

Overview
This example demonstrates how to identify a data matrix within the image, at any angle of rotation.
Description
This is an example that reads an image containing a data matrix. The IMAQ functions are used to identify a data matrix within the image, at any angle of rotation. Once the data matrix is identified and read, the top left corner is marked with a red dot.
Requirements

  • LabVIEW 2012 (or compatible)
  • Vision Acquisition Software (IMAQ driver)

Steps to Implement or Execute Code

 

1.Insert file path.

  1. Run the VI and the image file will be read.
  2. Rotates by input angle (for demo)
  3. Read Data Matrix
  4. Calculate top-left corner from bounding box
  5. Draw red circle on top-left corner

 

Additional Information or References
VI Block Diagram

 1.png

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

 

 

Regards,


Imtiaz Chowdhury
Project Manager
Green Running / Austin Consultants

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