I’m facing an issue when measuring chromatic aberration between two channels using @StephanPreibisch’s *Descriptor-based registration (2d/3d)* plugin.

When comparing two images of fluorescent beads acquired at different wavelengths, choosing an *Affine (3d)* model leads to erroneous results. These are the two stacks saved as ZIP from within ImageJ:

Channel1.zip (7.1 MB)

Channel2.zip (8.9 MB)

While using a *Rigid (3d)* model gives reasonable results:

```
3d-rigid: (0.9999995370077311, -9.619443093375998E-4, -2.5445359810519136E-5, -0.18273322111835735,
9.619420066700193E-4, 0.9999995332518842, -9.03525678586964E-5, 0.9090712305010016,
2.553226207243114E-5, 9.032804906567956E-5, 0.9999999955944722, 0.3712261063783586)
```

… using *Affine (3d)* shifts the first image off, such that the beads do not align at all any more:

```
3d-affine: (1.0021692039342023, -7.988350974716951E-4, 0.5824109663517447, -7.121635430846575,
0.0018053103497930323, 1.000650764791395, 1.2441180286114104, -13.215184111686032,
-2.736393668926716E-4, 9.479495003993435E-4, -0.12079485139830126, 12.53278056716039)
```

The following macro reproduces the issue:

```
open("http://forum.image.sc/uploads/imagej/original/1X/5fff97e62514000a26b0755d8f0671785cf77893.zip");
open("http://forum.image.sc/uploads/imagej/original/1X/ae956102724b30b7492d71ef7dcff5e0c0959e65.zip");
run("Descriptor-based registration (2d/3d)", "first_image=Channel1.tif second_image=Channel2.tif brightness_of=[Interactive ...] approximate_size=[Interactive ...] type_of_detections=[Interactive ...] subpixel_localization=[3-dimensional quadratic fit] transformation_model=[Affine (3d)] images_pre-alignemnt=[Approxmiately aligned] number_of_neighbors=3 redundancy=1 significance=3 allowed_error_for_ransac=5 choose_registration_channel_for_image_1=1 choose_registration_channel_for_image_2=1 create_overlayed");
```

This image (Channel1: green, Channel2: blue) illustrates how the beads are misaligned after running the plugin:

Digging through the source code to find a potential bug, I finally ended up at `process.Matching#pairwiseMatching`

, but I’m stuck how to best test this.

@StephanPreibisch, @axtimwalde any comments?

Thanks in advance for your help.