Message Boards Message Boards

Avoid problem with the ImageAlign function?

Dear all,

I tried to register the movie posted below (compressed version here) using Mathematica but to no use. However I could manage to do the same very easily with another software (FIJI: https://fiji.sc/ ) with a plugin "StackReg" (http://bradbusse.net/sciencedownloads.html) enter image description here

The strategy that I used for the registration was as follows with both softwares:

  1. Inverting (ColorNegate) the image

  2. Applying a Gaussian Blur of radius 10

  3. Thresholding the image to obtain a mask for the object

  4. Registering the binarized image (mask) and saving the transformation matrices

  5. Using the transformation matrices to obtain a registered version of the image.

Result obtained from FIJI/plugin :

enter image description here

The code for Mathematica breaks when I do the same:

enter image description here

Can anyone please help me figure out why ImageAlign is breaking down?

This is a simple problem and I expect that the ImageAlign function should not break down on such a petty case. I checked my masks and they seem to be fine. I gave the masks that I generated from Mathematica to FIJI/StackReg which can successfully align them and yield the transformation matrices in a .txt file. This brings me to the second question, is there a way to get the transformation matrix (alignment matrix) from ImageAlign. Because I need the transformation matrices after alignment in order to align the original movie.

Note: StackReg aligns all the images relative to the first frame.

POSTED BY: Ali Hashmi
POSTED BY: Henrik Schachner
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract