| alignment of images within the stack [img shiftsXY] = ib_alignstack(S1, options, shiftsXY) OUT: img -> aligned dataset shiftsXY -> vector with absolute shifts, shiftsXY(1,:) - for x and shiftsXY(2,:) - for y. The shifts are calculated vs the slice with the minimum shift, i.e. the shiftsXY are always positive IN: S1 -> stack in (format, height:width:color:thickness) options -> optional, defines a center and halfwidth of the searching window options.centerX -> center of the search window options.centerY -> center of the search window options.templateWidth -> half-width of the searching window options.colorCh -> color channel to use in multicolor images options.backgroundColor -> background color: black , white , mean , or a number options.method -> method: cc - the normalized cross correlation sq - the normalized sum of squared difference xcMatlab - beta of using matlab normxcorr2 options.gradientSw = 1 or 0, use gradient image or the original intensity image options.step, step for comparison of images, default=1 shiftsXY -> optional, a matrix of [2, size(S1,3)]. When provided the function generates aligned stack using this provided coordinates of shifts
|
| align 2 stacks together [img shiftsXY] = ib_alignstacks(S1, S2, options, shiftsXY) OUT: img -> aligned image stacks shiftsXY -> shift coefficients IN: S1 and S2 -> two stacks, that have (height x width x color x layers) or (height x width x layers) format options -> optional options.centerX -> center of the search window options.centerY -> center of the search window options.templateWidth -> half-width of the searching window options.backgroundColor -> background color: black , white , mean , or a value options.colorCh -> color channel options.method -> method: cc - the normalized cross correlation sq - the normalized sum of squared difference xcMatlab - beta of using matlab normxcorr2 options.gradientSw = 1 or 0, use gradient image or the original intensity image shiftsXY -> optional, when provided the function generates aligned stack using this provided coordinates of shifts
|