# Example of finding the best overlap of two matrices.
overlap <- findOverlap(imgs = list(matrix(c(1,0,0,0,
0,1,0,0,
0,0,1,1), ncol = 4, nrow = 3,
byrow = TRUE),
matrix(c(0,0,0,0,
1,0,0,1,
0,1,1,0), ncol = 4, nrow = 3,
byrow = TRUE)),
overlap_px = 1, max_shift_px = 2,
return_all_results = TRUE)
# Example of computing the similarity of two images/matrices.
imageCorr(imgs = list(matrix(c(1,0,0,1,
1,1,1,1,
0,1,1,1), ncol = 4, nrow = 3, byrow = TRUE),
matrix(c(1,0,0,0,
1,1,1,1,
0,1,1,1), ncol = 4, nrow = 3, byrow = TRUE)),
corr_formula = "weighted_matches_colors")
Run the code above in your browser using DataLab