if (FALSE) {
caim <- read_caim()
r <- caim$Blue
z <- zenith_image(ncol(caim), lens())
a <- azimuth_image(z)
m <- !is.na(z)
bin <- ootb_bin(caim, z, a, m, TRUE)
set.seed(7)
gs <- list(
#high res
sky_grid_segmentation(z, a, 2.25, first_ring_different = TRUE),
sky_grid_segmentation(z, a, 2.8125, first_ring_different = TRUE),
#medium res
sky_grid_segmentation(z, a, 9, first_ring_different = TRUE),
sky_grid_segmentation(z, a, 10, first_ring_different = TRUE),
#low res
sky_grid_segmentation(z, a, 15, first_ring_different = FALSE),
sky_grid_segmentation(z, a, 18, first_ring_different = FALSE)
)
sky_cie <- ootb_sky_cie(r, z, a, m, bin, gs,
method = c("Nelder-Mead", "BFGS", "CG", "SANN"),
min_spherical_dist = seq(0, 12, 3),
parallel = TRUE)
sky_cie$rr_raster
plot(sky_cie$rr_raster)
sky_cie$model_validation$rmse
plot(sky_cie$model_validation$pred, sky_cie$model_validation$obs)
abline(0,1)
ratio <- r/sky_cie$rr_raster/sky_cie$model$rr$zenith_dn
plot(ratio)
plot(select_sky_region(ratio, 0.95, 1.05))
plot(select_sky_region(ratio, 1.15, max(ratio[], na.rm = TRUE)))
plot(bin)
points(sky_cie$sky_points$col,
nrow(caim) - sky_cie$sky_points$row, col = 2, pch = 10)
}
Run the code above in your browser using DataLab