# From Analogue to Digital Photogrammetry: Documentation of Padise Abbey in Two Different Time Stages
## 3 Re-Processing of Original Images
### Processing  
For re-processing of the digitized glass plate negatives, we used structure from motion method and as a software tool, we chose commercial software Agisoft Metashape [22] in version 1.6.1. There are some freeware and opensource alternatives, e.g., MicMac [23]. By [24], it was shown that MicMac is suitable for processing digitized analogue photogrammetric images. There is also presented a comparison of the results between Agisoft Photoscan (predecessor of Agisoft Metashape) and MicMac. Based on the conclusions of the comparison, we chose Agisoft Metashape for our re-processing. The used workflow of processing images in Agisoft Metashape consisted of these steps:* Relative orientation
* Scaling
* Refinement of orientation
* Point cloud generation
* Textured 3D model generation
* Orthophoto generation  
At first, after uploading images to the software, it was necessary to insert focal length of the images and pixel size in mm in the image. In the case of digital images, this information is ordinarily stored in an EXIF file and the software reads the values automatically. The digitized images lack this information. The camera constant was written on the frame of the image and the physical size of 1 pixel in the image in millimeters, we were able to calculate from the known scanning resolution. We did not want to have the frame in the processing, so to cover the frame, a mask was created and applied on every image.  
The relative orientation was carried out by function \"Align Photos\" in Agisoft Metashape. During this process, the algorithm finds corresponding tie points between the images. Based on the tie points, the relative position and rotation of the images is found. The root-mean-square (RMS) error of reprojection of the tie points of the relative orientation was 0.9 pix. After the relative orientation, the signalized markers on the wall were found in the images. The relative orientation was scaled using the longest measured distance on the wall. The rest of measured distances were left as check distances for an accuracy check. Then refinement of relative orientation was carried out by function \"Optimize Cameras\".  
After these steps, the parameters of interior orientation were calculated by self-calibration. The considered parameters of the interior orientation were camera constant, coordinates of the principal point, and coefficients of the radial distortion, k\({}_{1}\), k\({}_{2}\), and k\({}_{3}\). The maximum of the radial distortion (Figure 5) is around 2 pix, which confirms the fact mentioned in chapter 1.2 that lenses of UMK cameras were designed to have low distortion. Unfortunately, due to the missing original calibration report, we could not compare all the computed parameters of the interior orientation to the calibrated parameters. The resulted parameters are presented in Table 1.  
Using \"Build Dense Cloud\" function, a colored point cloud was generated. For point cloud generation, parameter \"Medium\" was used, so each size of the images was divided by 4. These down-sampled images were enough to create a sufficiently dense point cloud (Figure 6) for the next steps.  
Figure 5: Radial distortion for camera used in re-processing determined by self-calibration in Agisoft Metashape.  
As a next step, a textured 3D model and orthophoto with resolution 0.002 m/pix were created. The resolution of the orthophoto was chosen according to the approximate GSD.