Example Code

Minimum distance (ring thickness) finder for a ring within an image

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 code demonstrates how to use the NI Vision Development Module (VDM) VIs to locate the minimum ring thickness.

 

Description

It is necessary in some applications to determine the minimum distance (thickness) of a ring. This is especially important for goods like gaskets or pipes.

To do so, you can use a camera with the NI Vision Development Module (VDM).

The VDM provides a VI which is able to locate the inner and outer rim of a ring. This information can be used to calculate the minimum thickness of the given ring. This example demonstrates how to use the functions of the VDM and gives you an easy way to play with the different settings available.

 

Requirements

 Software

  • LabVIEW Base Development System 2012 (or compatible)
  • NI Vision Development Module 2012 (or compatible)
  • If running in a Real-Time context, you will need the LabVIEW Real-Time 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
Find Minimum Ring Thickness - Front Panel.png

 

Find Minimum Ring Thickness - 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.** 

--Michelle

National Instruments

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