PHOTO-PLAN CREATION OF CYLINDRICAL OBJECTS

Photo-plans are frequent outputs in photogrammetry focused on historical planar objects. For planar spatially articulated objects it is not possible to create an exact photo-plan but is it possible to make an orthophoto. These above mentioned methods are inappropriate for cylindrical objects. In our contribution, methods of creating photo-plans are evaluated when used for cylindrical objects. This paper deals with today’s possibilities, which are available for developable bodies. Commercial software dealing with these issues is introduced and some published procedures of creating photomaps using unwrapping are shown. There are specific given examples of processing and results. A number of historical buildings contain cylindrical elements such as towers, vaults, and apses. Their documentation is not easy and it is problematic to use the classic single image photogrammetry and popular photo-plan, which contains all photographic details. It seems to be appropriate to unwrap this form into a plane. Subsequently, the paper presents main computational procedures and methods introduced in the Laboratory of Photogrammetry of the CTU in Prague. In the practical part of this paper the software Photo UnWrap and the methods used by authors for unwrapping cylindrical and conical bodies are introduced.


INTRODUCTION 1.1 Photo-plans
Classical photo-plans can be produced from images of planar objects by image transformation based on well-known equations of central projection.The parameters can be calculated based on at least four control points.Photo-plans are frequently used in historical objects documentation for facade restoration.By the cylindrical form of a documented object, only one line is undistorted on an image taken by a camera in an ideal configuration (Fig. 1).For this reason, this procedure is not applicable on cylindrical objects.Cylinders are not planar but it is, from cartographic point of view, evolvable.We searched for an exact mathematical solution of this idea.There are many objects that approximately are cylindrical (towers, nave vaults or apses in churches etc.) and we registered a demand on unwrapping of cylindrical surfaces to a photo-plan from many experts in restoration or conservators of historical objects.

Using of Unwrapping
We have already encountered with the need of a photo-plan of an unwrappable object for the purposes of conservation.In an older project, which was focused on the documentation of Choli minaret in Erbil (northern Iraq), the approximate method was used for minaret tube unwrapping.The reason was simple.The upper part of the minaret looks like a perfect tube.Originally, it is a part of the truncated cone and it is distorted (bended).On the upper part of the minaret about 200 control points were measured and the unwrapping was solved by parts (vertical stripes, which were transformed separately as a classical photoplan).The quality of the results was sufficient for the purposes of conservators.Measurement in Iraq and processing to graphical outputs were performed by Laboratory of photogrammetry, CTU in Prague (Pavelka et al., 2007); the Choli minaret was successfully restored by Czech firma GemaArt in 2009 (Fig. 2).
Figure 1.Cylindrical shape affects the photo-plan

Existing software and solution
Among the sources in literature and on the Internet, several commercial software and projects concerning unwrapping can be found, using usually of cylindrical or cone forms.For example Metigo 3D, Ad Hoc Ortofoto cilindrica, DigiCad 3D, PhoToPlan, Software can be mentioned (Vetter, Siedler, 2011, AdHoc, 2012, Interstudio, 2012, Kubit 2012).In the materials of commercial software's it cannot be expected to be found any exactly reproducable procedures where the unwrapping can be solved.Some schematic procedures can be found for example in (Karras et al., 1997, Leroy, 2005) or in other sources but they aren't complex solutions.

University solution
It is not possible to adequately capture the whole surface of the form (which we can unwrap) only using one image.For objects with a large curvature, it is necessary to take a number of pictures.For processing an unwrapped photo-plan, a precise digital model of the original object is necessary.This can be done by classical geodetic methods, by the use of photogrammetry or by laser scanning.Thus, a necessary part of the whole procedure is to define the parameters of the original form (Georgopoulos et al., 2012).Defining the shape of the object is selected using mathematical procedures.It is based on a set of object points, which define the mathematical body (Fig. 3).Our approach uses orthogonal distance fitting for defining basic shapes as a cylinder or a cone.At the Department of Special Geodesy, CTU in Prague, FCE, there is a GNU licensed library Spatfig on the department server.The library Spatfig is used for fitting geometrical shapes using a set of points (Koska, 2012).After this procedure, we get parameters like point on main axis (X,Y,Z), radius r (in case of cone in a point of axis), rotation ω around X axis, rotation φ around Y axis and apex angle ψ in the case of a cone.The next part of the solution is focused on the camera and images.Using a standard camera calibration we get an interior camera orientation (focal length, principal point coordinates radial and tangential distortion parameters.Next it is necessary to compute the exterior orientation of all images.There are a lot of procedures for solving this problem like DLT (direct linear transformation), bundle adjustment (for example using professional software like Photomodeler or AGIsoft) or a special procedure based on genetic algorithm and voxel method, developed at the CTU in Prague (Urban, Štroner, 2012).In our case, the Alltran library for common transformations and computing of transformation coefficients based on adjustment by least squares was used.These above mentioned steps give us a definition of the object shape, internal camera calibration and external orientations of all used images.From the beginning it was clear that the user must indicate the object and control points in the images.For this reason, a program was developed as an application with a graphical interface (Fig. 4).The whole procedure is based on free software under GNU license.The final software was built using free libraries in Matlab.The input file is a text file, which includes object points for geometrical fitting of shape and control points for external orientation of images taken by a camera.Of course, it is necessary to know internal orientation of used camera (for calibration process we use PhotoModeler for example).The images enter the program step by step.It is possible (highly recommended) to use images with corrected distortion (using own created procedure or PhotoModeler Scanner).It causes faster computing but slightly lesser image quality after the second image resampling.In our process, there is also the possibility to use raw distorted images with the distortion correction during final computing.By the entering of (distorted) uncorrected image data, coordinates of measured control points are automatically corrected from radial distortion.We use this typical form for radial distortion: where k 0 , k 1 , k 2 characterize the radial distortion, x´,y´ are image coordinates, x´o, y´o are coordinates of principal image point, r is radial distance and x,y are corrected coordinates.

Photo Unwrapping
The custom procedure of unwrapping is divided into several parts.It is necessary to define the original object shape on each image as precisely as possible (Fig. 10).
This part is the core of our solution, which contains: a) The detection of a visible part of the cylindrical object (the interval between two heights and two azimuths in the local object system); the preliminary object form (based on parameters point on axis C, radius and rotations -see 2.2) is computed by using the SpatFig procedure from object points (measured by classical geodetic method, by using multi-photo photogrammetry or laser scanning).There's a problem: on an arbitrary image the preliminary point C computed from object point using the Spatfig procedure cannot be visible on each processed image.Using iteration (in image coordinates), a new point C on the main object axis is computed (near projected principal image point).To this point a local object coordinate system is transferred -this step supports better future processing (Fig. 4).c) Selecting a pixel size of the final photo-plan For a cylinder body the calculation is easier.Raster height is derived from the height of the visible part of the object divided by appropriate and adequately detailed pixel size (for example 5mm on the object).The raster width is defined by length of the arc divided by pixel size.The photo-plan raster width is based on angular interval.The length of so defined circular arcs divided by the pixel size is the width of the raster.Raster size calculation for a cone is more complex (see Fig. 5).

Final transformation -inverse mapping
d) For the creation of the final photo-plan we use the classical inverse mapping procedure (indirect image transformation) (Fig. 9).At the beginning we have an empty raster defined in our system and all necessary parameters to perform the final calculation.Indirect transformation is used; it is possible to select a method of interpolation (nearest neighbour, bilinear or bicubic interpolation for a new pixel value using well known equations and (if wasn't made before) a correction of (radial) distortion (Fig. 6).Empirically, it was found that the biggest difference between the methods described above could be seen on photo-plans, which have dimensions corresponding to the original picture size.

Figure 6. Results after nearest neighbour and bicubic interpolation
For the final transformation the object spatial parameters computed preliminarily by Spatfig procedure are necessary.In the case of the cylinder, the height Z L point from Y P coordinate in the local system is immediately known (Fig. 4).X P coordinates corresponds in the local coordinate system to the circle part for given Y P from the line joining points 1'-1".This part of the circle with cylinder radius defines the angle necessary for polar calculation of x, y point of the cylinder axis.
Transformation from the local system to a global system is shown on next lines -equations (2) and Fig. 7:

Radial distortion problem
It is recommended to use in the process shown on Fig. 10 images with corrected distortion.By creating a photo-plan with raw uncorrected image data using inverse mapping it is not possible to use equations for distortion correction (1), because these equations compute undistorted coordinates from distorted ones and we need the inverse process.The inverse procedure is not simple and we solve this problem by the use of iteration.For point P in the photo plans we calculate a distortion correction r 1 : it is not added to image coordinates, but it is subtracted.Next we get new point P 0 , compute again distortion correction r 2 and we minimize the difference between both corrections.We know from experience that 4 iterations are usually enough.

Test object
As an object for technology testing, a concrete pillar has been used.On this pillar a testing field with marked points was fixed, and point's coordinates were measured by classical geodetic method using total station (Fig. 11).

Water tower test object
An old water tower in Prague in a real case project has been used.We used a camera with 12MPix resolution, a focal length approximately of 55mm from a distance of 40m.Only some images were taken, 5 control points were measured using s total station and 30 object points were measured (Fig. 12-17).This contribution has been peer-reviewed.The double-blind peer-review was conducted on the basis of the full paper.233

Conclusion
The main objective of this paper is to present functional software for simple surfaces unwrapping based on photogrammetrical approaches.When creating a custom application, the emphasis was put on a clearly definable functionality and stability of the final software.The whole computing process and the workflow is supported by a graphical user interface.The procedure itself has been created to unwrap cylindrical and conical surfaces.The reason is technical -a number of historical buildings contain construction parts, which can be substituted by a cylinder or cone.This software can be used for approximately cylindrical or cone surfaces; the output is a photo-plan.Accuracy reaches normally some cm in position by typical objects such as towers.It hardly depends on the mathematical spatial defining of original object and on the regularity with respect to the object shape.Only an approximately cylindrical body will have, after the processing, a logically less accurate photo-plan.Of course, it depends on image resolution, camera position and number of images too.
Only the central part of created photo-plans can be used in a final mosaic (like by creating orthophoto mosaic).Peripheral parts of a created photo-plan aren't sharp and are distorted.Our solution is still laborious and can be used for regular cylindrical and cone objects only; we will focus our solutions on historical object documentation such as small historical cylindrical towers, painted cylindrical vaults and apses in churches.We think that it will bring a new element for restorers; they know classical photo-plans from planar facades only or general oblique photos.Joining with laser scanning is expected.

Figure 3 .
Figure 3. Defining shape of object based on set of object points

Figure 4 .
Figure 4. Coordinate systems and border of cylinder cuts Annals of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume II-5/W1, 2013 XXIV International CIPA Symposium, 2 -6 September 2013, Strasbourg, France This contribution has been peer-reviewed.The double-blind peer-review was conducted on the basis of the full paper.231e) The last part is the computation of image coordinates by generally known equations using projective transformation, where X,Y,Z are coordinates in geodetic system, x´,y´ are image coordinates, by known interior camera orientation (Fig.7-8).

Figure 12 .
Figure 12.Complex view on water tower

Figure 15 .
Figure 15.Example: unwrapping of the water tower upper part