I have 70+ images of a coloured microsphere taken through a microscope. Between each image, I manually rotated the sphere by about 5°. In each picture, the position of the sphere is slightly different : the sphere seems to wobble around the center of the shot. The colours inside the sphere change slightly from one frame to the other, but the overall shape of the object stays the same in all frames.

I intend to create an animation out of these images, yet I can't find an automated way to align the different shots. The "Auto Align" tool between any consecutive frames won't work ; it says that the images differ to much from each other. Although the colors do change a little, I feel like there should be a way to use the information that the spherical shape is constant.

In this folder are a few consecutive shots so that you can see what I'm talking about.

Should anyone have an idea about how to proceed, I would be very grateful !

Many thanks in advance !

2 Answers 2


Short answer: you'll have to do this mostly by hand.

The reason Auto-Align won't work for you is based on how it works. The algorithm looks for things that match, image to image, such as the background elements in a series of group photographs or the overlapping sections of a panorama. It has no way for you to tell it "this is my point of interest". Your "foreground" and background change from image to image, so there's nothing invariable that the analysis can match.

The most efficient way to proceed with Photoshop is to load the images into layers, drag out guides to the vertical and horizontal center of your frame, then position each layer to place the bead as close to the center as you can. From there, it becomes a matter of blinking the top layer on and off to verify you have it lined up exactly with the one below, then repeating this process all the way down the stack.

Based on your sample images (the 2136 image is slightly smaller than the rest), there are some slight scale differences among your images which you'll also have to tweak by making them about 60% opaque and using Free Transform to scale and position.

  • Thanks for your quick answer. I had hoped, though, that since both my background and my foreground only slightly change from one frame to the next, that the algorithm would be able to handle it. The images are different, but not that different when you take them two at a time. I also believe that there is something invariable that the analysis can match : the spherical shape ! If I was able to fill each sphere with white, and each background with pitch black, then it would only be a case of aligning white disks. Sort of using masks, but I don't know how that works. Does this give you ideas ? Commented Jul 30, 2014 at 21:12

Note: There's going to have to be some manual labor here not matter how you look at it.


Try to figure out a way to take all of the photos so that the sphere is in the exact same location every time.

Possible Digital Solution

Create an action to crop the images.

  • Start with a selection like this

enter image description here

I used the magic wand with the Tolerance set to about 160

  • Now record an action that does the following
    1. Expand Selection by 20 pixels
    2. Image->Crop
    3. Selection->Deslect
    4. Save to a new location
    5. Close
  • Now you'll have to open all of the images and make a selection and run the action
  • Then select all of the images in Bridge
  • Choose Tools->Photoshop->Load Files Into Photoshop Layers
  • When Photoshop has stacked them all up you'll need to select all of the layers in the layer pallet and center them with each other using the center align buttons (enter image description here)

That should get them lined up pretty close.

  • Thanks for your elaborate answer, I really appreciate that you took the time to review my problem in depth. I like your idea... but I had been thinking about a way to automatize even the selection process. Using ImageJ, one can take the spatial derivative of a binarized image in order to find its edges, i.e. the areas where contrast varies the most. In my case, it is the border of the sphere, as shown here. Commented Jul 30, 2014 at 21:23
  • If I can do that in PS, and detect the uppermost, lowermost, leftmost and rightmost white pixels, draw a squared selection around that, and crop the image, i would be done. Do you think that would be feasible ? Thanks again for your help ! Commented Jul 30, 2014 at 21:29
  • @lutetiumphoto The main problem I see with that is that it not only highlights the edges of the bead, but also any dust in the image. It seems like, no matter how you look at it there is going to be some manual labor.
    – Circle B
    Commented Jul 30, 2014 at 22:14
  • My thought is that it will take more time trying to figure out how to load your b/w images into their respective full color images as a mask than it would take to make the manual selections and run an action...
    – Circle B
    Commented Jul 30, 2014 at 22:15
  • Of course, the dust is highlighted too. I reckon that's not a problem, since it can easily be filtered out (smoothing or whatever). The point is that if we manage to pull off a way to automate the full process, then I will be able to do many more of these animations, on other beads with interesting physical properties. ;-) Commented Jul 30, 2014 at 22:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.