if (FALSE) {
caim <- read_caim() %>% normalize()
z <- zenith_image(ncol(caim), lens())
a <- azimuth_image(z)
m <- !is.na(z)
ecaim <- enhance_caim(caim, m)
bin <- apply_thr(ecaim, thr_isodata(ecaim[m]))
plot(bin)
seg <- polar_qtree(caim, z, a)
synth <- obia(caim$Blue, z, a, bin, seg)
plot(synth)
foliage <- !is.na(synth)
hist(synth[foliage])
synth <- terra::cover(synth, bin)
plot(synth)
hist(synth[foliage])
}
Run the code above in your browser using DataLab