I am trying to align images from a time laps recording to compensate for very small shifts in X,Y dimensions. There is an example worflow available on the KNIME hub that should work in principle
However, this example is for a multi-channel coloured image. My time laps images are grey scale. I tried several options to merge my images to obtain stacks of either a reference images (the first frame) and a subsequent images or by creating a stack of all images and then aligning among the time channel.
In both cases I received error messages, e.g.
Problem occured in rowRow0 : Wrong number of valid shift dimensions ‘2’ or dimensions do not exist in Image! Skipping Image Img1 01 01_034–t01.tif Missing cell has been inserted
Problem occured in rowImage : Wrong number of valid shift dimensions ‘2’ or dimensions do not exist in Image! Skipping Image Img1 01 01_034–t20.tif Missing cell has been inserted
The appropriate workflow I tried to set up can be downloaded here (190 MB, the Link-password is “knimeforum”): https://nc.ufz.de/s/Er8nMtb8wNJGLaa
I assume that the way how I merged the images to obtain a multichannel object is not correct. Do I really need channels with different colours? Hope there is a simple answer to solve this problem. Thanks a lot in advance and kind regards.
You can use an approach like the following to try on your images: link.
You will have to reload your data to this workflow as it was a little too large to upload. In this case, I just I merge your images using the “groupby” node and label the dimensions with the “set image metadata” node. The align node is setup to align relative to the first image with the shift dimension being time.
This works okay for your images but doesn’t fully remove the small jittering that you mention. Maybe someone else has a better approach or idea as to how to remove those.
thanks a lot for your quick response. Indeed, with your proposal I was able to use the align node for image stabilisation. But as you said it does not remove the small jittering. I also compared it to the stabilisation plugin of imageJ and included this via a macro and external tool node into my workflow. It seems that the imageJ stabiliation macro is working slightly better, but a bit of jitter is still their and might be difficult to remove. I will also consult other imaging specialist but if anyone has an idea how small jittering can be removed, this would be great.