MATLAB Answers


how to track beam light motion in X-ray microscope?

Asked by Alex
on 6 Jun 2013

In X-ray microscopy we acquire several frames at each X-ray energy point and merge them together with an aim to improving signal to noise ratio of the final image. The evil comes from the fact that beam is unstable and in the state of flux. Thus, due to the beam motion there is a limit to the number of frames we can acquire and merge to increase SNR. Is there any way to track beam motion using MATLAB and eventually take the motion into account during data acquisition? Any help is much appreciated. Thank you in advance.

Two flat field images taken at different period of time are here:

I am not sure that beam motion in the two flat field images is noticeable visually though, because the beam moves around the image center following an unknown trajectory with a shift of a few pixels. Also, I am not sure it is possible to outline beam boundaries precisely because of light diffusion.


I wonder if we could get a few images so we could see the effect of the beam motion ?

I would be grateful for your advice, I posted a link to two flat field images. Thank you.

Please, let me know if you would need more details (experimental setup, images, etc.)

Log in to comment.

1 Answer

Answer by Image Analyst
on 8 Jun 2013
 Accepted Answer

What do you get if you simply find the weighted centroid of each image?


Why do you have no decimal places of accuracy? You should get subpixel resolution on the centroid. For another method, you could try to fit the image to a model, like a 2D quadratic, and look for the peak. Try this:

Thank you, it was a bad idea to use round to coordinates. From your expertise, do you think it is possible eventually to describe the motion using some function (polynomial, etc.)? Also, do you think it is possible to predict the motion? Thank you very much!

It may or may not be possible to describe the motion, with a polynomial or anything else. I don't know what causes the shift in the beam. Is it a periodic/cyclic motion, or is it chaotic? Try plotting the centroid and see what its path looks like.

Log in to comment.

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today