Thanks already a lot for your input!
The log window should print lots of information on the min,max,mean alignment error distances, for every pair of sections aligned. Isn’t that the case?
Yes this is the case. As I am aligning 100s of images in a scripted fashion I would like to extract these values automatically.
I have considered parsing the log as a ‘worst case’ approach, but was wondering if there would be a cleaner way.
Additionally, you could always apply the inverse of the image transformations to a grid of points on each section, and then find out how much the points move. When non-linear, the displacement will differ for each point in the grid, but you’ll get an idea.
This would indeed work, but would give me how much the transform displaces points.
However what I want is the ‘average displacement’ of inliers (an estimate of the alignment error).
I updated the title and try to give a bit of background:
The alignment in TrackEM2 is done by identifying landmark points and then matching them by RANSAC (https://en.wikipedia.org/wiki/Random_sample_consensus). This matches points between the two layers that are likely the same (inliers). The matched points (inliers) are typically still not perfectly overlapping after transformation. What I want to know is how far they are apart on average (displacement), as this is a rough estimate for how good the alignment is (i.e. if the transformation method has been sufficiently flexible).
Anyways, I really appreciate your input and think I will settle for the log-parsing approach.
In fact I have now translated the beanshell script to be run via PyImageJ, as this fits my workflow better. I found a working approach to capture the log within pyimagej, so this is working now quite OK (https://github.com/imagej/pyimagej/issues/35#issuecomment-492783346).
Cheers and thanks!