We're talking here about the values tagged as <RegistrationParameters> and <BrightnessCorrectionParameters> in a .zsj file, and the corresponding values printed into the console log.
Registration Parameters
The parameters describe a scale+rotate+shift transformation that converts the corresponding source image from its original form to its form as aligned within the stack.
Scale is a ratio: 1.181 would turn a 2000 pixel line into a 2362 pixel line (because 1.181*2000 = 2362).
Rotate is in radians clockwise: 0.080247 gives 4.6 degrees (because 0.080247*180/pi = 4.6 [approximately]).
XOffset and YOffset are shifts (offsets) expressed as a fraction of frame dimension: 0.006 with 2500 pixels gives a 15 pixels shift (because 0.006*2500 = 15).
Scale and rotation are done around the image center, followed by the shifts.
A good way to confirm what these values mean is to use Photoshop to transform an image by specific numeric amounts, then feed into ZS the original and transformed images, have ZS do an Align All Frames, and see what parameter values ZS ends up recovering. Appropriate Photoshop operations are Image > Image Size... with Resample and Percent for scale, Image > Canvas Size... with a corner selected for shift, and Image > Image Rotation > Arbitrary for rotate.
In doing these tests, there are three things to watch out for.
1) You have to make sure that the final transformed image has the same pixel dimensions as the original, or ZS will refuse to process them. Image > Canvas Size... is a convenient way to do this.
2) Corrupted border regions can mess up the alignment. A good way to avoid this is to scale up and then crop to the center of the enlarged image.
3) If you test with multiple transformations at once then be aware that for some parameter values Photoshop may produce unexpected partial pixel shifts. These are due to Photoshop's adjustment of canvas size when rotating and resizing. They are difficult to avoid, so just expect them to be there and don't agonize over say a half-pixel discrepency between the shifts you intended to create and the ones recovered by ZS.
Limit flags indicate whether the final parameter values ended up being constrained by the associated limits. The value is the sum of 1, 2, 4, 8 for xoffset, yoffset, rotation, and scale respectively. Non-zero limit flags should be considered an error condition because the associated registration parameters will not bring the source image into best alignment.
Brightness Correction Parameters
The adjusted pixel value is computed as
Code: Select all
result = Math.pow(pixelValue*mScale,mGammaAdjustment);
--Rik
Edit 9/27/2020: to fix formula that got HTML encoded in forum software upgrade earlier this year.