Example Code

Identify Multiple "Perfection" Pieces Using Geometric Edge Matching

Code and Documents

Attachment

Download All

Overview

This VI uses a camera and Geometric Matching functions to determine the location of each "Perfection" piece in an image.


Description

First, a Geometric Matching template was created for each piece using the NI Template Editor that comes with the Vision Development Module. Within the VI itself, an array of these template images is created. When the pieces are placed in the camera's view and the program is run, the camera takes an image and compares the image to the 25 piece templates using the Match Geometric Pattern 2 VI. The program then attempts to find each piece within the image, and returns the location, rotation, and scale (in relation to the template image) of each piece within an array.


Steps to Implement Code

  1. Download Identify Pieces.zip
  2. Make sure the VI and the Perfection Templates folder are both contained in the same directory
  3. Place the Perfection pieces under a camera or select a sample image
  4. Run the program

Requirements

Software

LabVIEW 2009 or later

Vision Development Module

Hardware

Vision Acquisition Software compatible camera (optional but recommended)

Perfection (Board Game) or Perfection Pieces


Additional Images

Front Panel:

Identify Pieces FP.PNG

Block Diagram:

Identify Pieces BD.PNG

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

Contributors