Stabilization of Thermal Medical Images based on user-selected area of interest. 

I’ve converted a powerpoint presentation I made in 2006 about the algorithm we developed in the CWU imaging lab for alignment of brain images to HTML. Here it is!

Image Registration

  • Image registration is the process of aligning images in such a way that their features can be related
  • For medical purposes, accurately registering images is essential for proper diagnosis

Uses of Image Registration

  • Characterization of normal vs. abnormal Shape/variation
  • Functional brain mapping/removing shape variation
  • Surgical planning and evaluation
  • Image guided surgery
  • Pre-surgical Simulation

Methods of Image Registration

  • Manual
  • Automatic
      • Rigid
        • Global autocorrelation
        • Affine transform using points
        • Area ratios
    • Non-rigid
      • Mathematical models


  • We have a sequence of thermal images with local movement, global movement, and temperature changes
  • Movement can be indistinguishable from temperature change
  • The global movement needs to be removed
  • Local movement needs to be preserved


  • A thermal image is a set of discrete pixels
  • In a sequence of thermal images, each pixel intensity can be defined in terms of the previous slide in the sequence
  • pi,j,k+1= GlobalMotionPixel(pa,b,k) + ThermalImpact(pa,b,k)+ LocalMotion(pa,b,k)


  • Global movement can only be solved when local movement and the temperature impact from surrounding pixels is known. Otherwise, the components are indistinguishable by observing the intensity of the destination pixels.

Other sources of information

  • Heartbeat
    • Detectable by looking at changes in blood vessel size
    • Can be used to find the temperature effects of blood flow
  • Ruler
    • Is detectable by using nonlinear color filters
    • Known to not have global movement
  • Bones
    • Easily seen and resistant to both local movement and temperature change



  • Not visible in grayscale
  • Very low resolution
  • Influence from other pixels heavily distorts ruler’s edge
  • Use of an artificial ruler may help



  • Easy to see in grayscale
  • No local movement
  • Very little temperature change
  • Temperature influence from outside pixels is small

Basics of Autocorrelation


Image A
Image A
Image B
Image B
Image A minus Image B
Image A minus Image B
  • Place image A on image B
  • Subtract pixels (or subpixels)
  • Move image B in some direction then do step 2 again
  • The location where image B had the least difference from image A is the position where image B is registered with image A


  • Autocorrelation of whole images takes too long
  • Correlation of the entire image will remove some desired movement-like effects
  • Some global movement remains

Enhancements to Autocorrelation

  • Let user select most important features using different color mappings to bring out details
  • Do autocorrelation at a subpixel level on the parts that the user selected rather than the whole image
Unfiltered image with no selections
Same image as before showing selected regions with various filters applied
Same image as before showing selected regions with various filters applied


  • Letting user chose the most stable areas minimizes the chance of the desired movement being removed
  • Much faster than autocorrelation
  • Experimentally shown to produce better shifts

Measuring results

  • Compute pixel differences for selected area before and after shifts
  • Compute max, average, and min difference for each pixel
  • Average improvement =(Average difference before shifts) / (Average difference after shifts)




  • Average improvement of 1.66 for selected area
  • Experiments using an artificial ruler showed slightly less improvement

Comparison with Area Ratio Conflation Algorithm

  • Regions were chosen in areas with large amounts of temperature change
  • Best regions not considered.

    Comparison with Area ratio conflation algorithm.
    Comparison with Area ratio conflation algorithm.

Comparison with UCSB WebReg

  • Our algorithm
  • UCSB method
  • Worst pixel difference: 15.5 average pixel difference: 4.77259 best pixel difference: 0
  • worst pixel difference: 30.45 average pixel difference: 10.29 best pixel difference: 0.08
Points chosen by UCSB method
Points chosen by UCSB method
  • Our algorithm’s average improvement over UCSB WebReg method: 2.715
User selected area of interest in brain image used.
User selected area of interest in brain image used.

Future research

  • Use predictive thermal models to better match images
  • Try to learn parameters that users choose to identify stable image areas
  • Use a database of known anatomical features to help in identifying points that should remain stable

This blog post is based on a paper I coauthored called “An algorithm to stabilize a sequence of thermal brain images” and published in Proceedings of SPIE – The International Society for Optical Engineering 6512 · February 2007.

You can read the full paper here:

Kovalerchuk, Boris, Joseph Lemley, and Alexander M. Gorbach. “An algorithm to stabilize a sequence of thermal brain images.” Medical Imaging. International Society for Optics and Photonics, 2007.