I am currently working on a computer program that tracks particles under a microscope. I have already figured out how to find the x and y locations of the particle. I am currently trying to figure out how to find the z location of the particle. I am trying to incorporate spectral entropy into my computer program to help me do that. I am trying to determine the location of the particle by finding how focused it is.
As you can see above, there is a single focus position (optimal focus) that provides the sharpest picture. As you move left or right, the sharpness decreases. In my experiment, I will be looking at a single particle under the microscope. I will focus the microscope so that the particle is at its optimal focus so it provides the sharpest image. In my experiment, I will be looking at particles that are constantly moving. As the particle moves around, the sharpness of the particle will change. The further the particle drifts away, the less sharp it would be. In other words, the sharpness of the particle is proportional to the distance the particle traveled on the z axis. To sum it up, I will determine the z axis location of the particle by determining how focused the particle is.
My problem right now is I do not know how to add spectral entropy into my computer program.
Here is a copy of my computer program:
http://www.mediafire.com/?tkdk4jymmon *You must have Matlab to open up this file*