Example Program Drafts

cancel
Showing results for 
Search instead for 
Did you mean: 

Create Vision Template from an Image in LabVIEW

Overview

This VI creates a Vision Template programmatically in LabVIEW from a selected image file. This example can be useful because the template file that is created can be used in Vision Assistant.

Description

Once the desired image is loaded into LabVIEW, the user defines a ROI on the image for which the template file will be created from. The ROI template is then extracted and saved as a PNG file with the Vision Pattern Information included with it. The Vision Assistant Express VI is then used to look for matches of the newly created template in the UUT image.

Steps to Implement or Execute Code

  1. Set the destination path for the template to be created
  2. Specify the path to the image from which the template will be extracted from
  3. Specify the path of the UUT image
  4. Run the VI once to load the image
  5. Select the desired Region of Interest (ROI) on the "UUT Image" indicator
  6. Run the VI again

Requirements

Software

LabVIEW 8.6 or later

IMAQ (part of Vision Acquisition Software) - Compatibility Link

Vision Development Module - Compatibility Link

Additional Images or Video

Template.jpg

**This document has been updated to meet the current required format for the NI Code Exchange. For more details visit this discussion thread**

Salvador Mikel
National Instruments
Ingeniería de Aplicaciones
www.ni.com/soporte
Comments
Member MarkBalla-Tecnova
Member

This vi is saved in version 8.6 and not 8.5 as stated

Member shadowsboy
Member

muy buen aporte gracias

Member phenominafree
Member

what is the uut image?

Member Rick_J.
Member

We are unable to make this work as is.

We get error -1074396077 "incompatible file type" from "IMAQ Learn pattern 2.vi".

Do you have any suggestions?

Member omarbedair
Member

Same here...

Have you found the source of error ?

Thanks

Member meraj0525
Member

what file formats of image will this vi program above supports. when i loaded a jpg image an converted png to jpg in the IMQ WRITE FILE it is not supporting the image. displays cannot read.

Member neil_lan@hotmail.com
Member

error.jpg

Member neil_lan@hotmail.com
Member

what migt be wrong with my JPEG files?

Member DanMad
Member

Hi,

The vi is a bit outdated. I fixed it (no more error) removing the type input from the "IMAQ create" and updating the vi using this example:

LabView\examples\Pattern Matching\Pattern Matching (All).vi

It is a default labview example but it works well and it is helpful to understand how the pattern matching works.

 

Hope it helps,

Cheers

Contributors