** 5 Texturing with Thermal Data**

**5.6 Quality Assessment of Extracted Textures**

**5.6.1 Geometric Quality Measures**

The geometric qualities are qualities derived from the acquisition geometry, including the camera and object pose, as well as the inner orientation parameters of the camera. Therefore, these qualities can be used to assess the expected quality of textures in the planning stage or to assess the achieved textures after the flight.

**Resolution**

The texture’s level of detail depends on its resolution. The resolution of 3D objects seen on the image plane is usually not unique along their surfaces. Unique resolution is possible only for planar objects that are parallel to the image plane. In nadir view photogrammetry, the ground resolution of the images is usually expressed using a ground sample distance (GDS), which is the distance between the pixel centers on the ground. It is calculated using the intercept theorem:

*c*_{k}*s*^{0} = *H*

*s*, (5.1)

where*s* is a distance on the ground,*s*^{0} is its image in the sensor, *c** _{k}* is the camera constant, and

*H*is the flight height (see Fig.5.10a). If

*s*

^{0}= 1

*pix*, then

*s*is the ground sampling distance. Here, it is assumed that the ground is parallel to the sensor; therefore, all pixels have the same ground resolution. In oblique view, the GSD varies within the image significantly; it is smaller in the foreground and bigger in the background (Fig. 5.10b). The GSD does not give any information about the resolution of the 3D objects, such as fa¸cade or roofs, which is the most interesting aspect for texture mapping. Therefore, in this thesis, a local resolution for every object is defined as the length of a line segment placed on this object, which is depicted within one pixel. This line segment is parallel to one of the axes of the image coordinate system. Accordingly, two resolutions for one pixel can be calculated: in

*x*- and in

*y*-direction of the camera coordinate system.

An oblique view is equivalent to a nadir view of a sloped surface as shown in Fig. 5.10:

Fig.5.10b is equivalent to Fig. 5.10c.

*y* *x*
*z*

*H* *H* *D**1* *D**2*

*D**3*

*D**4*

*c**k*

*c**k*

a *b*

*c*

*c**k*

*s’*

*s*

*s’ s’ s’*

*s* *s* *s*

*s**’**s’**s’**s’*

*l**1* *l**2* *l**3* *l**4*

*s’ s’ s’ s’*

*s**1*

*s**2*

*s**3*

*s**4*

*l*_{1}*l**2*

*l*_{3}

*l*_{4}

*Figure 5.10: Geometry of nadir and oblique view: a) nadir view; b) oblique view ; c) nadir view of a sloped*
*surface, which is equivalent to an oblique view of a flat surface.*

This representation is suitable not only for the ground surfaces but also for other surfaces, e.g. fa¸cades or roofs. In this representation, a planar surface can be defined for each pixel. This

72 5. Texturing with Thermal Data

surface is parallel to the sensor and intersects with the photographed surface in the intersection point of the ray from the middle of the pixel with the photographed surface (Fig. 5.11a).

*O*

*O'*

*D*_{i}

*c*_{k}

*s ’*_{i}

*½·s**i*

*l*_{i-1}

*l*_{i-2}*r**i-2*

*r**i*

*r**i-1*

*l**i-1*

*l*_{-i2}

*½·s*

*½·s*
*φ*_{i}

*φ**i-2*

*φ**i-1*

*γ**i*

*γ*_{i}

γi

γ_{i}
αi-1

βi-1

αi-2

βi-2

*½·s**i*

*n*^{→}

*z*^{→}
*z*^{→}

*δ**i-1*

*δ*_{i-2}*γ**i*

a b

*P'*

*A**2*

*A**1*

*B**1*

*B**2*

*P*

*Figure 5.11: Detailed geometry for calculations of the resolution*

If the distance*D** _{i}*, which is the distance from the projection center to the photographed surface
is known, the resolution of this parallel surface can be easily calculated using (5.1) by replacing

*H*with

*D*

*i*, which results in

*c**k*

*s*^{0} = *D**i*

*s** _{i}* =⇒

*s*

*i*=

*D*

*i*

*s*

^{0}

*c** _{k}* . (5.2)

Here, the index *i*denotes the pixel; however, in many cases, the photographed object is rotated
by an angle

*γ**i* = arccos(

−→

−z◦ −→*n*

k−→*z*kk−→*n*k), (5.3)

where −→*n* is the normal vector of the photographed surface and −→*z* = [0, 0, 1]. For every *γ**i* *>* 0,
the length of the line segment on the photographed object is *l*_{i}*> s** _{i}*. The ray from middle of
the pixel does not intersect the line segment on the photographed object in the middle of this
segment, but instead divides this segment into two line segments with the lengths

*l*

*i−1*and

*l*

*i−2*

respectively (Fig.5.11b). To calculate*l** _{i}*, the triangles

*∆A*

_{1}

*B*

_{1}

*P*and

*∆A*

_{2}

*B*

_{2}

*P*should be solved.

Using the Law of Sines, *l**i−1* is calculated from *∆A*_{1}*B*_{1}*P*
*l**i−1* = *s**i*sin(*α**i−1*)

2 sin(*β**i−1*), (5.4)

where*α**i−1*= 180^{◦}−(90^{◦}−*φ** _{i}*)−

*δ*

*i−1*= 90

^{◦}+

*φ*

*−*

_{i}*δ*

*i−1*and

*β*

*i−1*= 180

^{◦}−

*γ*

*−*

_{i}*α*

*i−1*= 90

^{◦}−

*φ*

*+*

_{i}*δ*

*i−1*−

*γ*

*i*. Similarly,

*l*

*i−2*is calculated from

*∆A*2

*B*2

*P*

*l**i−2* = *s**i*sin(α*i−2*)

2 sin(*β**i−2*). (5.5)

where *α**i−2* = 90^{◦} + *φ** _{i}*0

*δ*

*i−2*and

*β*

*i−2*= 90

^{◦}−

*φ*

*−*

_{i}*δ*

*i−2*−

*γ*

*. Here*

_{i}*δ*

*i−1*=

*φ*

*−*

_{i}*φ*

*i−1*and

*δ*

*i−2*=

*φ*

*i−2*−

*φ*

*i*. The length

*l*

*i*is calculated as the sum of

*l*

*i−1*and

*l*

*i−2*:

*l** _{i}*=

*l*

*i−1*+

*l*

*i−2*=

*s*

*2*

_{i}sin*α**i−1*

sin*β**i−1* +sin*α**i−2*

sin*β**i−2*

. (5.6)

*φ**i* is calculated by solving the triangle *∆OO*^{0}*P*^{0} as follows
tan*φ** _{i}* =

*r*

*i*

*c** _{k}* =⇒

*φ*

*= arctan*

_{i}^{}

*r*

*i*

*c*_{k}

. (5.7)

Analogously,

*φ**i−1* = arctan^{}*r**i−1*

*c*_{k}

(5.8)

and

*φ**i−2*= arctan^{}*r**i−2*

*c*_{k}

. (5.9)

If *s*^{0} = 1 [pix], then*δ**i−1* and *δ**i−2* are very small angles. If we assume that *δ**i−1* ≈*δ**i−2* ≈0, it
implies that *α**i−1* ≈*α**i−2* ≈90^{◦}+*φ**i* =*α**i* and *β**i−1* ≈*β**i−2* ≈90^{◦}−*φ**i*−*γ* =*β**i*. Then *l**i* can be
simplified to

*l**i* =*s**i*sin*α**i*

sin*β** _{i}* =

*D*

*i*

*s*

^{0}sin

*α*

*i*

*c** _{k}*sin

*β*

*. (5.10)*

_{i}Another simplification is presented in Fig. 5.12. Here *l**i* is length of the line segment, which
has to be orthogonally projected onto the surface parallel to the sensor to fill one pixel

*l** _{i}*=

*s*

_{i}cos*γ* = *D*_{i}*s*^{0}

*c**k*cos*γ*. (5.11)

*D*_{i}*c**k*

*s’*

*s**i*

*γ**i*

*l*_{i}

*Figure 5.12: Simplified geometry for calculations of the resolution*

**Occlusion**

Occlusion of a texture is a quality measure which is calculated based on acquisition geometry when considering self occlusion, or when considering extrinsic occlusion from additional data.

This quality gives information about which percentage of the texture can be seen in a frame.

Knowing the depth image of the scene, the occlusion factor*o** _{ij}* is defined as

*o*

*ij*=

*n*

_{vis}*N* , (5.12)

where *n** _{vis}* is the number of visible pixels in face,

*j*in frame

*i*and

*N*is the number of pixels occupied by face

*j*. The quality

*o*

*ij*∈[0, 1] takes value

*o*

*ij*= 1 for fully visible textures.

**General Geometric Quality**

For best texture selection, which was described in Section 5.3, one significant quality measure is needed. Calculating the local pixel is computationally expensive; therefore, a simplified quality that takes resolution and occlusion into account is needed.

The more pixels in the texture are occluded, the lower the quality of the image. However, it is possible that a strongly occluded texture has a significantly higher resolution than the resolution of a completely visible texture. On one hand, if we want to extract a texture with the highest resolution, we should always select the parts of the texture with the highest resolution and combine them into one texture. On the other hand, we should keep in mind that every combination can cause small errors on the seam lines. Accordingly, an optimal balance between the occlusion and the resolution should be found using a quality measure

*q** _{ij}* =

*a*

_{1}

*o*

*+*

_{ij}*a*

_{2}

*d*

*+*

_{ij}*a*

_{3}cos

*γ*

*cos*

_{xij}*γ*

_{yij}*a*_{1}+*a*_{2}+*a*_{3} , (5.13)

where *a*1+*a*2+*a*3 6= 0. *q**ij* is computed for every face *j* in every frame *i*. *γ**x*,*γ**y* denote angles
between the normal of a model polygon and the viewing angle of the camera, *a*1, *a*2, *a*3 are
coefficients,*o** _{ij}* is the occlusion factor, and

*d*

_{i}*j*denotes distance factor calculated by

*d** _{ij}* =

*D*

*−*

_{max}*D*

_{ij}*D**max*−*D**min*. (5.14)

Here,*D** _{max}* denotes maximum possible distance from the projection center to model points,

*D*

*denotes minimum possible distance from the projection center to model points, and*

_{min}*D*

*denotes the distance from the projection center to the center of a model polygon. For each face, a texture with the best quality*

_{ij}*q*

*is selected for texture mapping. In cases when a partially occluded face is selected for texturing, the missing part of it is searched in other frames, again considering their quality.*

_{ij}