bUnwarpJ
bUnwarpJ copied to clipboard
Registration fails depending on final deformation setting
I have observed a seemingly erratic behavior when performing a registration with bUwarpJ
:
Example files:
Notice that all registrations without prior MOPS correspondence extraction fail, i.e. are significantly offset, for the given image pair.
The registrations with prior MOPS fail only for final_deformation
settings of Fine
, Very Fine
, and Super Fine
.
However, the registration with the Coarse
setting yields a reasonable result. Please see example macro:
// Runs an image registration using bUnwarpJ with two images of the same FoV
// with different final_deformation settings.
// toggle MOPS correspondence extraction
with_MOPS = false;
// load source and target images
open("source.tif");
run("Enhance Contrast", "saturated=0.35"); // improves MOPS performance
open("target.tif");
run("Enhance Contrast", "saturated=0.35");
if ( with_MOPS ) {
// identify registration points
run("Extract MOPS Correspondences",
"source_image=target.tif " +
"target_image=source.tif " +
"initial_gaussian_blur=1.60 " +
"steps_per_scale_octave=3 " +
"minimum_image_size=64 " +
"maximum_image_size=3744 " +
"feature_descriptor_size=16 " +
"closest/next_closest_ratio=0.92 " +
"maximal_alignment_error=" + 0.1 * 3744 + " " +
"inlier_ratio=0.05 " +
"expected_transformation=Rigid");
}
// perform registration with different final deformations
final_deformations = newArray("Coarse", "Fine", "Very Fine", "Super Fine");
for ( i = 0; i < final_deformations.length; i++ ) {
run("bUnwarpJ", "source_image=source.tif " +
"target_image=target.tif " +
"registration=Mono " +
"image_subsample_factor=0 " +
"initial_deformation=[Very Coarse] " +
"final_deformation=[" + final_deformations[i] +"] " +
"divergence_weight=0 " +
"curl_weight=0 " +
"landmark_weight=0 " +
"image_weight=1 " +
"consistency_weight=10 " +
"stop_threshold=0.01");
selectWindow("Registered Source Image");
if ( with_MOPS ) {
rename("MOPS + [" + final_deformations[i] + "] - Registered Source Image");
} else {
rename("[" + final_deformations[i] + "] - Registered Source Image");
}
}
This observation could be related to issue #13.
Software:
-
ImageJ
1.53s -
bUnwarpJ
2.6.13 -
Windows
10.0.19044.1826