rcaiman: rcaiman: An R package for CAnopy IMage ANalysis

rcaimanR Documentation

rcaiman: An R package for CAnopy IMage ANalysis


Solutions for binarizing canopy images, particularly hemispherical photographs, including non-circular ones, such as certain pictures taken with auxiliary fisheye lens attached to smartphones.


apply_thr, defuzzify, find_sky_pixels_nonnull, find_sky_pixels, obia, ootb_mblt, ootb_obia, regional_thresholding, and thr_image.


read_manual_input, read_opt_sky_coef, row_col_from_zenith_azimuth, write_sky_points, write_sun_coord, and zenith_azimuth_from_row_col.


azimuth_image, calc_diameter, calc_zenith_raster_coord, calibrate_lens, expand_noncircular, fisheye_to_equidistant, fisheye_to_pano, lens, test_lens_coef, and zenith_image.


enhance_caim, gbc, local_fuzzy_thresholding, membership_to_color, and normalize.


chessboard, mask_hs, mask_sunlit_canopy, polar_qtree, qtree, rings_segmentation, sectors_segmentation, and sky_grid_segmentation.

Sky reconstruction

extract_sun_coord, fit_cie_sky_model, fit_coneshaped_model, fit_trend_surface, fix_reconstructed_sky, interpolate_sky_points, and ootb_sky_reconstruction.


colorfulness, extract_feature, extract_dn, extract_rl, extract_sky_points, masking, read_bin, read_caim, write_bin, and write_caim.

Batch Processing

Batch processing can be easily performed with standard R programming. Below is an example that can be used as a template.


input_folder <- "c:/Users/janedoe/pics/"
output_folder <- "c:/Users/janedoe/bins/"
files <- dir(input_folder, full.names = TRUE)

for (i in 1:length(files)) {
 caim <- read_caim(file.path(files[i]))
 blue <- gbc(caim$Blue)
 bin <- apply_thr(blue, thr_isodata(blue[]))
 write_bin(bin, file.path(output_folder, basename(files[i])))

rcaiman documentation built on Sept. 20, 2022, 1:05 a.m.

Related to rcaiman in rcaiman...