Introduction: Tracking Motion in NI Vison Assistant

This tutorial is assuming that you have already saved a series of images that you would like to track.

Once you have NI Vision Assistant up and running, click on "Browse Images" in the upper right, and then click on the file icon to open up files.

Step 1: Find Your Files and Choose All

Go to the folder where you saved your images and mark the "Select all files" box. Open them.

Step 2: Process Images

You will now want to "process images". Do this by clicking the process images button in the upper right, next to the browse images button.

Step 3: Creating a Script

You must create a script in the program. This is basically a very simplified version of coding. First we must calibrate the image and give the program a conversion rate from pixels to micrometers. Do this by hitting the "Image Calibration" option in the left menu.

Step 4: Image Calibration

Once you have clicked the "Image Calibration" option, you need to go through a few steps that are mostly self-explanatory, but I'll walk you through them anyway.

1. If this is a new calibration, choose "new calibration". If you have done a calibration in the past that will work for this one, you may click on the file button to search for that calibration data.

2. Assuming you chose "New Calibration", you will be given a pop-up. Choose the first option, "Point Distance Calibration" and hit Next.

3. On the next page, select an image which contains the object you wish to track and go on.

4. You will want to zoom in on the object until it takes up a good portion of the screen. This is so you can see more easily when you choose edge points on the sphere.

5. Click once on one edge of the object, and again on the opposite edge. Then, provide information for what that distance is in the "Real World".

6. Skip the lens correction. Now you are given the option to specify a calibration axis. Go ahead and do so. I chose the center of the ball to be the origin, more or less.

7. Now you should be finished with the calibration. Hit OK, at the bottom of the left menu.

Step 5: Pattern Matching

There are a few different ways to track an object in Vision Assistant, but in this case we are using Pattern Matching.

1. In the left menu, click on the 5th option which is a magnifying glass and some cross-hairs. This will give you a new menu. From this menu, choose "pattern matching".

2. Make a new template.

3. Draw a box around the object you want to track and click next.

4. If there are superfluous pixels, you can highlight them out. Hit finish.

5. Constrain the large green box the area that your object will be during the entire series of images.

6. You will be asked to save the pattern matching data. Do so. You may offset the center so that the cross-hairs are at the center of your object. When you are done, hit OK at the bottom of the left menu.

Step 6: Save Your Script

Now your script is done. Save it by hitting the save icon in the bottom menu.

Step 7: Batch Processing

To make the script run for many images, we need to do a batch process.

1. Select "Batch Processing" under "tools" in the top menu bar.

2. Specify a path to your images. Find the folder in which your images are located and choose "Current Folder".

3. You will need to select the Pattern Matching step, and mark the "save results" box. Then click "setup".

4. From here, you will be asked to choose a save location. Be sure to choose a folder that ALREADY EXISTS. Vision Assistant will not create anything if the folder isn't already there. Now run the script!

5. The program will run the script for every image in the folder that you specified. Data will be saved to a new file in the folder that you specified in sub-step 4. You will need to parse this data to get only the information that you want eg. position data. This can be done with filters in microsoft excel.

All done!