Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Image position analysis

To anyone that can help,
 
I am a researcher trying to measure wing kinematics. I am attempting to take several images of a moving wing that has a white line on it. I want to measure the length of the line on about 100 frames in the same frame of reference. I was hoping someone could give a hint of a VI to use so that I didn't have to go through and pick the end points of the segment for each image. Please let me know if there is a method in which to do this or any other suggestions.
 
Thanks!
Jon
0 Kudos
Message 1 of 6
(3,909 Views)
Hello Jon!

Thank you for using National Instruments discussion forums.  We do have a VI that does exactly that.  It is called "Clamp.vi".  This VI will search an area of an image, determined by the "rectangle" input of the VI, for two edges and then returns the distance between the two edges.  Note:  To use this VI you must have the Vision Development Module.

I hope this helps.  Let me know if you have anymore questions.  Thanks and have a great day.

Regards,
Mark T
Applications Engineer
National Instruments
0 Kudos
Message 2 of 6
(3,883 Views)
Thank you this is very helpful. My only hope is that there would be some way to make it tabulate the distance for maybe 100 or so images. Could this example be expanded on? Thanks again for your help!
0 Kudos
Message 3 of 6
(3,856 Views)
Hello Jon,

I assume by "tabulate" you mean you need to save the distance of the line for each image in some kind of spreadsheet file.  You need only to setup a for loop structure that contains the image processing, for example clamp.vi, and then iterate the loop for each image.  In each iteration you can easily insert the distance values into an array and pass it from one iteration to the next by means of a shift register.  After the for loop has finised executing you can then pass the array into the Write to Spreadsheet File.vi.  Customization and exact format for the input to this VI can be found by looking at the Help documentation for the Write To Spreadsheet File.vi.  Let me know if this is unclear.  Thanks and have a great day.

Regards,
Mark T
Applications Engineer
National Instruments
0 Kudos
Message 4 of 6
(3,838 Views)

Thanks Mark,

Yeah that is exactly what I need to do and I the examples look easy enough to complete. We were also hoping to tabulate angles from a horizontal line to a point on the image. Each image the line will remain the same but the point will change. The clamp example gives distances can this be modified for angles with an arbitrary horizontal line? Thanks again for your great and timely responses.

Sincerely,

Jon

0 Kudos
Message 5 of 6
(3,831 Views)
Hello Jon,

There is also a VI that does this very easily.  It is called "Caliper".  It performs measurements of selected points on an image.  Two of the measurement types are "angle from horizontal" and "angle from 3 points".  Angle from horizontal gives you the degrees from an arbitrary horizontal line to a defined point.  Angle from 3 points uses 3 points to measure the angle in between the connecting lines.  I have attached an example VI that shows how to use this function.  The best way to develop an algorithm such as this is to use Vision Assistant.  If you are not using it I would strongly suggest to use it for developing the image processing.  Let me know if this is unclear.  Thanks and have a great day.

Regards,
Mark T
Applications Engineer
National Instruments
0 Kudos
Message 6 of 6
(3,826 Views)