Using auto-stabilization

Real-time auto-stabilization in Scanbox Yeti is achieved by tracking the displacement of 2D features in a number of small windows relative to a reference image.  We prefer tracking cells within a handful of small windows because slow gradients in the image can easily bias the resulting estimates for large regions.

Here are some step-by-step instructions on how to use the auto-stabilization feature:

  • Start by collecting ~100 frames or more during a period of relative quiescence using the “Accumulate” mode under the “Image Display” panel.  When you stop the acquisition Scanbox will display the average image.
  • In the “Real time processing” panel click the “Ref” button.  This will bring up, one after another, a  small local windows that you should position (drag) to image areas that have two-dimensional structure and do not change much over time.
  • Once a location has been selected for a window, you should double-click inside the window to place it.  A new window will then appear on the top left corner of the image.  Repeat this process until the last window is placed.  When you double-click the last window your reference images are defined.  Typically, 4 windows is sufficient for accurate tracking.
  • The number and size of these regions are stipulated by the variables nroi_auto and nroi_auto_size in the scanbox_config.m file.
  • Once all the reference images are defined you can click the “Stabilize” checkbox in the “Real-time processing” panel to enable tracking.
  • Stabilization will then take place both during focusing and grabbing.   However, you should not move the microscope with stabilization enabled as the result will be chaotic.
  • Scanbox uses the motion estimates using FFTs from these regions to compute an optimal global, rigid translation that it uses to compensate to align the individual frames to the reference image.  This alignment is saved to an *.align file, where data about the location of the windows and their estimated movement are saved at the end of an acquisition session.


  • You can use the “Accumulate” mode with stabilization enabled.  This will produce a new accumulated image that will be much sharper than the original one, as the images are now stabilized.  You can then refine the reference image by clicking the “Ref” button and re-positioning the windows one more time.   This process takes another minute or so, but it will result in better motion correction estimates and stabilization.
  • Image stabilization is typically a first step before proceeding with the definition of ROIs to be tracked or segmentation, which will be explained in separate posts.
  • Important: Do not try to run the microscope without finishing the placement of the reference windows, as you will get an error.   Future releases will force you to do so.