# Example of finding the best overlap of two sets of two matrices.
overlap <- findAvgOverlap(list_imgs = list(
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)),
list(matrix(c(0,0,0,0,
0,0,0,0,
0,0,1,1), ncol = 4, nrow = 3,
byrow = TRUE),
matrix(c(0,0,0,0,
0,0,0,0,
1,1,1,0), ncol = 4, nrow = 3,
byrow = TRUE))),
overlap_px = 1, max_shift_px = 2,
corr_formula = "weighted_matches_b_w")
overlap$best_overlaps
Run the code above in your browser using DataLab