Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

image analysis using LABVIEW and IMAQ for IEEE 1394 cameras

Hi Bruce,


0 Kudos
Message 11 of 19
(2,045 Views)
Hi Bruce,

I am in the process of building upon the help I got from you (in determining the centroid of an image) to compute the velocity of an emission spot that is seen by a CCD camera as the spot moves across the CCD plane.

To this end, I built upon your VI, wherein I am now dividing the difference between the current value of the X-coordinate of the centroid and the previous value by the difference between the corresponding current and previous millisecond timer values, thereby giving me a velocity in microns/sec (after multiplying the numerator by 4.65 which is the pixel size in microns and the denominator by 0.001 to convert it into seconds).  Here are my questions with regard to this VI:

1. I am not quite confident about the result of this VI: Even though I see that the position of the centroid continuously moves in the positive direction, I observe the computed velocity to be taking a roller-coaster ride between negative and positive values.  I am not sure if the way I used the millisecond timers is responsible for this.

2. With regard to the VI that calculates the coordinates of the centroid (Testing BA_Centroid of image.vi): After setting the ROI, when I start my process at let's say a laser power of 1 Watt to produce an emission spot in the ROI, I see a positive X-coordinate value (see attached picture "Centroid X-coordinate positive.jpg".  Now, if the ROI dimensions were kept the same and if the laser power is now increased to 2.5 Watts, I see that I am getting a negative value for the X-coordinate (see attached picture Centroid X-coordinate negative.jpg") which I believe is not possible considering the first row/column pixel on my CCD array starts at the top leftmost end.  By increasing the laser power, I am definetely increasing the size of the emission spot.  However, I don't understand as to why the centroid value should turn negative.  I would appreciate if you can provide me a clue as to why this might happen.

Thanks.

Ram
0 Kudos
Message 12 of 19
(2,045 Views)
Hi Bruce,

Forgot to add the attachments in my previous post.

Ram
0 Kudos
Message 13 of 19
(2,045 Views)

I assume you are running out of space in your I32 value for the centroid summation, and it wraps around from a positive value to a negative value.  Changing it to a U32 should fix the problem, but if it still comes out negative change it to a DBL.

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 14 of 19
(2,042 Views)
Thanks Very Much Bruce.  I will try out your suggestion and keep you posted.

Ram
0 Kudos
Message 15 of 19
(2,039 Views)
Hi Bruce,

Changing the data type in the VI that computes the coordinates of the centroid (Testing BA_Centroid of image.vi) helped in eliminating the negative coordinates that were being output by the VI.

As I mentioned in my earlier post, I am basically trying to monitor the centroid of an emission spot as it moves across the CCD plane of the camera.  Towards this end, I built the VI attached (25 October'05_Using Vision as feedback for growth rate computation.vi) to compute the velocity of the centroid movement. 

Upon running the VI with the process OFF (no emission spot/light on the CCD array), I noticed that the position of the "Current value of centroid" kept varying by a small amount (0 to +/- 0.4 pixels) continuously, resulting in an output (from 25 October'05_Using Vision as feedback for growth rate computation.vi)  that continuously varies between +/- 10 microns/sec.  Upon running the VI again with the process ON (with the emission spot moving across the CCD array), I observed a similar fluctuation between the positive and negative axes, albeit with a higher value of output this time.  Such fluctuation is not acceptable and negative velocities are impossible as the emission spot keeps moving forward (to the right of the CCD array).  At this point of time, I have run out of ideas as to what could be done to get a more stable centroid signal.  The logic I used to calculate the velocity of the centroid seems correct. 

It would be of immense help if you can provide your advice with regard to this.

Thanks.

Ram


0 Kudos
Message 16 of 19
(2,032 Views)

I'm not surprised that the centroid has the noise issue.  You will only get reasonable measurements if your measurement interval is long enough for the spot to move more than the noise level.  Otherwise, you need to apply a filter to your position output before you calculate your velocity.

Perhaps you don't want the centroid at all.  Would it make sense to track the leading edge of the bright spot instead?  That could easily be tracked using an edge detector.

Bruce
Bruce Ammons
Ammons Engineering
Message 17 of 19
(2,019 Views)
Hi Bruce,

You were right in that the sampling interval is the culprit, considering that the sampling speed is so fast.  I now have a VI that uses a filter to convert all intensity values less than the desired intensity to 0 (and all those above the desired intensity to 1) which means I now have a small region of interest (bit map array) with only my signals of interest.  I plan on running the VI with the modified logic.  If this doesn't work out, I believe the idea of monitoring the edge of the emission front to be the next logical step.

Thanks again for your timely response and I will keep you posted.

Ram
0 Kudos
Message 18 of 19
(2,017 Views)

can you upload this filter

 

 

many thanks

0 Kudos
Message 19 of 19
(1,370 Views)