# NOT RUN {
p <- system.file('exdata', 'soybean.tif', package = 'hyperbrick')
im <- brick(p)
print(im)
# see how layer 1 is misregistered
plot(im[[3]], col = gray.colors(20), asp = 0)
plot(im[[1]], add = TRUE, legend = FALSE,
col = adjustcolor(terrain.colors(20), 0.6))
# remove the #s to run
# b1_reg <- registerBand3(slave = im[[1]], master = im[[3]],
# start_affine = c(0, 0, -2.5))
# attr(b1_reg, "affine_pars")
# plot(im[[3]], col = gray.colors(20), asp = 0)
# plot(b1_reg, add = TRUE, legend = FALSE,
# col = adjustcolor(terrain.colors(20), 0.6))
# }
Run the code above in your browser using DataLab