Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Image Analysis using Vision Assistant


I am using NI vision assistant and labview to try and analyze a series of images of a moving board. The board has a white dot and a black line. The length of the line needs to be measured in each image and the angle of the dot relative to a horizontal line needs to be measured in each image. This can be done on every image using NI Vision Assitant but I was hoping there would be a way to simply give Labview a folder of images and have it create a list of the data with the image name, lenght of the line, and then angle. Thanks for any help anyone can provide.

- Scott

0 Kudos
Message 1 of 7
(3,915 Views)

Scott,

If you haven't tried it, look at batch processing in Vision Assistant.  It allows you to process multiple images and store the results.  It may be adequate for your purposes.

If not, export the Vision Assistant script to LabVIEW, then put a loop around it.  Read the names of all the images in your folder (before the loop), then load each one within the loop, process it, and bundle the results.  Wire the bundle to the loop so it autoindexes and creates an array.  After the loop completes, write the results array to a file.

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 7
(3,887 Views)

Thanks Bruce for helping me out. That will definitely work by creating a loop in Labview. Once a loop is created I'm having trouble getting the program to recognize where to measure the angle from the horizontal and the length of the line. Is there a simple method to have LabView recognize what I am trying to measure in each frame without manually clicking on the points?

Thanks again, Scott

0 Kudos
Message 3 of 7
(3,874 Views)

Scott,

Could you please post a few sample images?  We may be able to post some suggestions on machine vision algorithms to use if we have a few images and some of your requirements to work with.


Regards,
Luke H

0 Kudos
Message 4 of 7
(3,838 Views)

Here are a few attached sample images from previous experimental work. The goal would simply to measure the length of the white line and determine the angle of the black middle spar from a horizontal. Thanks again for the help.

Scott

0 Kudos
Message 5 of 7
(3,826 Views)
Scott,

I played around with the image you posted a bit and came up with a script that finds the distance and angle I believe you are interested in for this image.  With only one image to work with I was able to create an algorithm that works for this image, though I'm not sure how well it would work for others you may have. 

For the distance of the white oval, I used a Shape Detection function that looks for an oval.  When it finds the oval it will also return the major and minor radius of the oval.  Doubling the major radius should give you the distance you are looking for.

For the angle of the black spar from horizontal, I used two vertical Edge Detection lines to find two points on the spar.  Next, I used a Caliper function to find the angle from horizontal based on these two points.

This script could be exported to LabVIEW or C code so that the values can be programmatically taken from the functions and displayed for the user.  You may have to modify the script a bit, depending on what your other images look like, but hopefully this will get you headed in the right direction.  Many times finding the best processing algorithm is simply a matter of playing with the script and functions until you find something that works.

Please note that you will need to use the 8 bit bitmap version of the image that I attached in order for this script to work.  Let us know if you have any further questions or concerns.

Regards,
Luke H
Download All
Message 6 of 7
(3,802 Views)

Thank you so much. I think the script will work. I am just going to play around with several other images to make sure that it will work for everything.

Thank you again! - Scott

0 Kudos
Message 7 of 7
(3,793 Views)