LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI Vision Image analysis: distance changes in real time

Hi!  So I'm new to labview, and I'm using NI Vision assistant to try to generate code that will measure the distance between two edges (let's say of a cylinder--a stick, really)in real time.  actually what i'm doing is trying to measure the changes in diameter of a tube that i'm pumping fluid of different pressures through.  I've tried applying a clamp to the ROI, and I've also established 2 edges--but don't know how to get the distance between 2 separate edges (hence the clamp).  The truth is, I'm learning as I go along, and I'm running into several issues:

 

1) consistency:  the ROI that I initially establish on an image stays the same, but as the width of the object changes the clamp will only sometimes be able to detect the changing edges. 

 

2)  I need to be able to log these distances as they happen.  is there a way to continuously export to, say, an excel spreadsheet?

 

3) calibration:  

 

a) so I've used a cylinder with a known diameter and calibrated via ImageCalibration (Image pallette).  First of all, my calibration is always off, because the 2 points between the clamp never show up on the same horizontal--they're always diagonal--which I think may be normal for how the clamp operates; however my known diameter of the cylinder is the horizontal distance between 2 points, not the diagonal.  Is there a way to overcome this?

 

b)  so when I use the calibration I've established (even though it's incorrect, it's only slightly incorrect), the measurements are WAY off....can anyone give any general advice for calibration?

 

4) most of all, I've been scouring the internet for things that will help me figure this stuff out:  tutorials, lectures from classes at other universities, lab write-ups, etc.  I'm having a LOT of trouble finding sources for vision image acquisition and analysis.  I don't really need a resource that tells me what the palletes are; I need a source that tells me how to USE them to do what I want.  Basically I've just been playing around and trying stuff to see if it would get me what I needed; any resources (the NI resources I've found have been more along the general "this is what this is" but not along the "this is how you do this") would be very much appreciated. 

 

 

thanks a lot!

 

0 Kudos
Message 1 of 2
(2,393 Views)

Hi Lolo,

 

1) Have you tried this example already?  It's a good way to start for measurin distances between two edges :

              LabVIEW folder\examples\Vision\2. Functions\Caliper\Clamp Example.vi

2) Why would you log to file every time.  Put the distances in an array and log them when you are finished

3) if you find the angle of the tube, you can rotate the image.  This way you can find the correct distance

4) if you browse through the examples of LabVIEW, you can find a lot of ideas on how to do things.  Play with them to get the correct output

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
0 Kudos
Message 2 of 2
(2,375 Views)