Skip to contents

Here is a short example to guide you step by step through the orthomosaic generating process with the functions generate_Mosa() and align_Mosa(). These functions required, arosics(AROSICS), the Metashape python API and a valid Metashape license.

  • First you will need to download the test data and unzip it. Test data contains, 2 sets of drones images from the same area obtained from 2 differents dates and a DTM digital terrain model from the the area which is the reference.

  • Then run the following code, more details about the functions generate_Mosa() and align_Mosa().

library(managecrownsdata)
library(reticulate)

use_condaenv('managecrownsdata_env')

my_path <- 'XXXX/test_data'

generate_Mosa(path_in = file.path(directory, 'my_drone_data'),
          out_dir_ortho = file.path(directory, 'orthomosaics'),
          data_type = "RGB",
          resol_ref = 0.5,
          site_name = "Bouamir",
          crs = "EPSG::32633",
) # Export Time_SFIFT outputs into 'outputs_arosics' folder

align_Mosa(path_in = file.path(directory, 'orthomosaics'),
        ref_filepath = file.path(directory, 'Bouamir_LiDAR_ref.tif'),
        out_dir_path = file.path(directory, 'aligned_orthomosaics'),
        corr_type = "global",
        #grid_res = 200,
        window_size = 500,
        window_pos = list(258131, 352973),
        apply_matrix = TRUE,
        save_data = FALSE
) # Export arosics outputs into 'outputs_TS' folder
Generate orthomosaics

Generate orthomosaics