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