Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I find a distance on an incomming video feed?

I am trying to find strain during a tensile test with a small plastic specimen with using two tic marks as the end boundaries. I am working with Labview IMAQ.

If I take a frame grab and define a ROI afterwards, I can find the number of pixels between the two tic marks; however, I need to find the distance automatically (not defining the ROI, I assume that there is someway to specify that the entire window is the ROI).

Also, I need to do this constantly over a span of about a minute. I concidered taking snaps of the specimen with a small delay in between but I quickly ran into an error due to a lack of memory. Is there a way that I can find the distace between these two tics using the aquire vi (using a video fee
d rather than just a series of snap shots)?
0 Kudos
Message 1 of 2
(2,761 Views)
If your specimen doesn't move around much during the test, just display live video to an image window. Draw a line ROI that crosses your tic marks and press a start button. Have your program measure the initial distance between the tic marks (probably using peak detection like I suggested before). Your display can be in a loop that grabs an image, measures the distance, then loops to grab the next image. This should be a simple enough measurement that you will get 30 fps easily. If not, you should be able to get 15 fps without any trouble. There is no reason to save your images after you measure them, so you shouldn't have any memory problems.

If your part moves too much for the peak detection method, make two distinct marks on the specimen. Use patter
n matching to locate each mark, and calculate the distance between the two centers as the specimen is tested. This will be a little slower, but still should get about 10 fps or so.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 2
(2,761 Views)