NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to keep the first edge coordinate as reference?

Hi..

 

My program is to detect movement of an object using a webcam and Labview 8.5.1.

 

I used an IMAQ RAKE with 'top to bottom' scan direction to find the first edge of my object and I want to keep the coordinate of this first edge (X1,Y1). Then when the object moves, the IMAQ RAKE will find the first edge with same scan direction and the coordinates (Xi,Yi) are needed to calculate the distance of the movement (X1-Xi,Y1-Yi). And this calculation is running in real-time.

 

My problem is, when the IMAQ RAKE detect the very first edge (X1,Y1), how can I store this as a reference coordinate that I'm going to use in the calculation? Because in my current program, the coordinate will follow the current first edge detection, thus the distance will always be 0.

 

Many thanks.

Message Edited by Amila on 02-25-2009 05:43 PM
0 Kudos
Message 1 of 3
(3,133 Views)

Hi,

 

Is this a TestStand related question or would it be best to re-post to one of the other forums such as Machine Vision

http://forums.ni.com/ni/board?board.id=200

 

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 3
(3,108 Views)

Hi Amila,

 

I assume that you are using the output of the function 'first edges'.  Depending on your architecture there are different ways to go about doing this.  From your problem I assume that you are usign a loop with the function on the inside meaning that on the second itteration the result of the first is being overwritten.  My suggestion would be to use a shift register so that the result from the first itteration can be fed back around into the second.

 

If you need any help in implementing this please don't hesitate to ask.


Regards,

 

Thomas Clark

Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 3 of 3
(3,079 Views)