## 2 Materials and Methods
### Step 2: Fagade Image (Orthophoto) Generation  
In this step, instead of searching for graffiti markings on individual images, generating a high-resolution facade image (orthophoto) of the TOC enabled the detection and localization of up-to-date graffiti presence. The full process would include estimating their sizes and locations or potentially implementing a remote monitoring system. The orthophoto was generated by projecting multiple images on a facade plane, while also removing perspective distortion [43; 44; 45]. It had a uniform scale in each direction defining its plane, so it truly represented an accurate view of the facades of the TOC. The wall planes of the TOC were automatically estimated by fitting a plane after a point cloud of the TOC was first constructed. Then, each image was projected onto that plane, followed by typical stitching and blending procedures. The number of orthophotos here depended on the number of facades in the TOC to be assessed. In Figure 4, we describe the step-by-step process needed to generate the necessary orthophotos from collected visual data that satisfied the data quantity and overlap requirements. First, a projection matrix for each image was estimated. It was expressed in homogeneous coordinates, which was a 3 \(\times\) 4 matrix for an ideal pinhole camera. The projection matrix was derived while considering both intrinsic parameters (focal length, principal points, and camera center) and extrinsic parameters (a relative camera location in 3D and rotation angle) of the image [25; 26; 27]. This process, which included large, iterative computations, could be greatly accelerated by SfM by computing shared keypoints between images [28]. The two important outputs generated from this step were: (i) a projection matrix of each image; and (ii) a point cloud describing the 3D scene of the TOC. By satisfying the data requirements outlined in Step 1, SfM yielded those two outputs without prior knowledge of either the geolocation or camera parameters. Considering each (\(i\)-th) image, the following relation held:  
\[\mathbf{P}_{i}=\mathbf{K}_{i}\big{[} \begin{array}{cc}\mathbf{R}_{i}& \mathbf{T}_{i}\end{array} \big{]} \tag{1}\]  
where \(\mathbf{P}\) is the projection matrix (3 \(\times\) 4 matrix), and the rotation matrix \(\mathbf{R}\) (3 \(\times\) 3 matrix) and translation matrix \(\mathbf{T}\) (3 \(\times\) 1 vector) represent the camera orientation and translation, respectively. \(\mathbf{K}\) represents an upper triangular camera calibration matrix of the form:  
\[K=\left[ \begin{array}{ccc}\alpha_{u}&s&u_{0}\\ 0&\alpha_{v}&v_{0}\\ 0&0&1\end{array} \right]\]  
where \(\alpha_{u}\) and \(\alpha_{v}\) are scale factors, \(s\) is skew, and \(\mathbf{u}_{0}=\big{[} \begin{array}{cc}u_{0}&v_{0}\end{array} \big{]}^{ \mathbf{T}}\) is the principal point of the image. The relative locations and orientation of each image could be simply expressed with the projection matrix, \(\mathbf{P}\), as expressed in Equation (1) [27]. Second, the facade planes on the TOC were estimated. The goal in this step was to automatically search for the major planes in the point cloud onto which the collected images  
Figure 4: Several high-resolution facade images (orthophotos) generated for each TOC by automatically detecting major planes from a point cloud generated from collected images. were to be projected. The feature matches, in most cases, were the ones on the surface of the TOC. Thus, this can be allowed as a simple plane-fitting problem on a set of points in space. Here, we integrated the Maximum Likelihood Estimation Sample and Consensus (MLESAC) algorithm, which is widely used in estimating either a complex surface or a more general manifold from point data [46]. MLESAC follows the same sampling strategy as the Random Sample Consensus (RANSAC) algorithm, but more weight is placed on inlier samples by maximizing the likelihood for a better fitting. The facade plane estimated with the MLESAC was denoted as **S** (a 1 \(\times\) 4 vector).