calculateCCFmax: Compute maximum correlation for two images, taking into...

Description Usage Arguments Value Examples

Description

Given two processed images, the images are first resized to 1/4 of their original dimension. The smaller image is zero-padded to make the two images the same size. Then the second image is rotated through all rotation angles 2.5 degrees apart, and for each rotation we compute the maximum correlation between the two images, considering all integer-valued translations in the x- and y-dimensions. We then choose the rotation angle that results in the largest correlation. We then rotate 0.5 degrees around this best rotation angle, and again compute the maximum correlation. This serves as a similarity metric for the two input images.

Usage

1
calculateCCFmax(image1, image2, pad = TRUE)

Arguments

image1

first image matrix

image2

second image matrix. The two images do not need to be the same size.

pad

logical value for whether the smaller image should be zero-padded. The default is TRUE. Only set this to FALSE if the images are of the same size and are square.

Value

A list with four items: 1) maximum correlation taking into account many possible rotations and translations of the second image, 2) the corresponding dx, the horizontal translation, 3) dy, the vertical translation, and 4) theta, the corresponding rotation angle.

Examples

1
2
3
4
## Not run: 
calculateCCFmax(processedExample, processedExample2)

## End(Not run)

xhtai/cartridges documentation built on June 1, 2019, 2:58 p.m.