2.1 Perspective Transformation Wi Th One Vanishing Point The
Total Page:16
File Type:pdf, Size:1020Kb
PHOTOINTERPRETATION AND SMALL SCALE STEREOPLOTTING WITH DIGITALLY RECTIFIED PHOTOGRAPHS WITH GEOMETRICAL CONSTRAINTS1 Gabriele FANGI, Gianluca GAGLIARDINI, Eva Savina MALINVERNI University of Ancona, via Brecce Bianche, 60131 Ancona, Italy Phone: ++39.071.2204742, E-mail: [email protected] [email protected] KEY WORDS: Architectural photogrammetry, self-calibration, rectification, stereoscopy, vanishing points ABSTRACT It is well know that it is possible to use the vanishing point geometry to assess the orientation parameters of the photographic image. Here we propose a numerical or graphical procedure to estimate such parameters, assuming that in the imaged object are present planar surfaces, straight-line edges, and right angles. In addition, by means of the same estimated parameters, it is possible to project the same image onto a selected plane say to rectify the image. The advantages are that non-metric images, taken from archives or books also, provided a good geometry and quality, are suitable for the task. From one side the role of the classical line photogrammetry is taken more and more over by laser scanning, and on the other side, this simplified procedure enables the researcher to use photogrammetric techniques for stereoscopy and interpretation, thematic mapping, research. The convergent non- stereoscopic images rectified with digital photogrammetric techniques, are then made suitable for stereoscopy. In fact the rectification corrects for tilt displacement and not for relief displacement, but it is just relief displacement that enables stereoscopy. Some examples of stereoplotting and photo-interpretation with digitally rectified photographs are shown. 1 INTRODUCTION The possibility to use non-metric images is normally linked to the availability of the control information in the imaged object, usually control points to be input in a bundle adjustment procedure or DLT. There is also the possibility to use a-priori knowledge of the geometry of the object, such as parallelism of lines and perpendicularity of planes (Williamston & Brill, 2, 1987,3, 1988, Ethrog, 8,1984, Krauss, 5, 1997, Van Heuvel, 7, 1999). In this way the study and the safeguard of the monuments can be helped by the biggest existing archive available to the researcher, the books. We propose an approach that has the advantage to be particularly simple and to be performed also in a graphical way by people not particularly expert in complicated computations. It uses the vanishing points geometry. We assume the geometry of the ideal pinhole camera. So far, the distortion is neglected. With the same estimated parameters it is possible to rectify the image and produce a stereo-couple from convergent non-stereoscopic photographs. Many computers have already main-board and graphical card suitable for stereoscopy (stereo-ready). In addition, the digital workstations do not have a device such as dove-prism to rotate the optical field and to improve stereoscopy; therefore a good stereo- capability is more important than before. 2 THE VANISHING POINT GEOMETRY In an image the parallel object lines converge in points called Vanishing Points. There are many methods for the detection of the Vanishing Points in the images. A good review is given by (V.Heuvel, 6, 1998), together with a proposal for a new approach, based on strong statistical base. Here the detection of the vanishing points will not be discussed. 2.1 Perspective transformation wi th one vanishing point The transformation matrix, composed by a perspective followed by a projection onto Z =0 plane, is written: é1 0 0 pù é1 0 0 0ù é1 0 0 pù ê ú ê ú ê ú 0 1 0 0 0 1 0 0 0 1 0 0 [T ] = ê ú × ê ú = ê ú (1) ê0 0 1 0ú ê0 0 0 0ú ê0 0 0 0ú ê ú ê ú ê ú ël m n 1û ë0 0 0 1û ël m 0 1û In the case that l = m = 0 ( or we are not interested in the translation l, m ), an arbitrary point P with homogeneous co- ordinates [x,y,z,1] is transformed or projected, in é1 0 0 pù ê ú ê0 1 0 0ú é x y ù [x,y,z,1]. = [x,y,0,(x.p+1)]= ê 0 1ú =[X, Y,0,1 ] (2) ê0 0 0 0ú ë x.p + 1 x. p + 1 û ê ú ë0 0 0 1û When we have the image and we want the estimate the value of the parameter p, we can use the vanishing point in direction of X axis that is transformed: 1 The present work has been financed by Cofin2001, Italian Ministry for Scientific Research é1 0 0 pù ê ú 0 1 0 0 [1 0 0 0]× ê ú = [1 0 0 p]= [1/ p 0 0 1] = [X 0 0 1] (3) ê0 0 0 0ú PF1 ê ú ë0 0 0 1û p = 1/ X PF1 (4) Once the image co-ordinate XPF1 of the vanishing point is determined, in a reference system where YPF1 = 0, it is possible to rectify the image with eqns.(2), by means of the parameter p . In fact the inverse transformation of (2) is obtained from eqns. (2) and isolating the x and y ì X x = ï 1- p.X í Y ï y = îï 1 - p.X (5) This procedure is useful when we want to rectify an image with one vanishing point only. The case is very frequent with the images taken from books of architecture, where normally the lines, vertical in the reality, last vertical in the image. Fig. 1 – One Vanishing Point Image Figs. 2, 3 - Florence – S.Miniato al monte. The original one VP image and the rectified one The ratio base/height depends on the translation m , that can not be determined. Therefore the rectified image has two unknown different scale factor. 2.2 Perspective transformation with two vanishing points The transformation in this case is: é1 0 0 pù é1 0 0 0ù é1 0 0 pù ê ú ê ú ê ú 0 1 0 q 0 1 0 0 0 1 0 q [T ] = ê ú × ê ú = ê ú (6) ê0 0 1 0ú ê0 0 0 0ú ê0 0 0 0ú ê ú ê ú ê ú ë0 0 0 1û ë0 0 0 1û ë0 0 0 1û An arbitrary point P[x,y,z,1] is then transformed in é1 0 0 pù ê ú ê0 1 0 qú é x y ù [x,y,z,1]. = [x,y,0,(x.p+y.q+1)]= ê 0 1ú =[X, Y,0,1 ] (7) ê0 0 0 0ú ë x.p + y.q + 1 x. p + y.q +1 û ê ú ë0 0 0 1û The two vanishing points of the X and Y axes, are projected: é1 0 0 pù ê ú é1 0 0 0ù ê0 1 0 qú é1 0 0 pù é1/ p 0 0 1ù é X PF1 YPF1 0 1ù ê ú × = ê ú = ê ú = ê ú (8) ë0 1 0 0û ê0 0 0 0ú ë0 1 0 qû ë 0 1/ q 0 1û ë X PF2 YPF2 0 1û ê ú ë0 0 0 1û from where we get: ì p = 1/ X PF1 ì YPF1 = 0 í í (9) î q = 1/YPF2 î X PF2 = 0 Determinate the image co-ordinates image XPF1 and YPF1 of the two vanishing point, p and q parameters are solved. The inverse transformation is obtained by developing (7) and ordering with respect to x and y ì( pX - 1).x + qX.y = - X í (10) î pY.x + (qY -1). y = -Y Fig. 4 – Two Vanishing points image This procedure is useful when we want to rectify an image with two vanishing points only, using eqns (7 and (10), in a reference system where YPF1 =0 and XPF2 =0. Figs. 5, 6 - Assisi – Basilica of S. Francesco – Original -two VP- image of the façade - The rectified image, modified to fit the rose window in a circle 3 PERSPECTIVE TRANSFORMATION WITH THREE VANISHING POINTS Let a reference system with horizontal X and Z-axes, and vertical Y-axis be fixed. The point of view M is placed along Z-axis at a distance Zc from the origin (fig. 1). The parallelogram ABCDEFGH is then rotated, translated and finally projected from M in a plane parallel to XY plane. The resulting image is shown in fig. 2); it is possible to detect three vanishing points, according to the three orthogonal directions. This is very often the case of images in architecture. Of course in a normal picture there are as many V.P. as many sets of parallel lines, but we restrict only to the case of the rectangular solid in fig. 1. A general conform transformation in 3d space can be performed by the concatenation of the three rotations tilt k , azimuth w , and swing q about the axes of the system and three translations m , n , p along three principal directions, (Roger, Adams, 1, 1980). [T1] = [RZ] [RY] [RX][TXYZ] = é cos k sink 0 0ù écos j 0 - sinj 0ù é1 0 0 0ù é1 0 0 0ù ê ú ê ú ê ú ê ú - sink cos k 0 0 0 1 0 0 0 cos J sinJ 0 0 1 0 0 = ê ú × ê ú × ê ú × ê ú (11) ê 0 0 1 0ú ê sinj 0 cos j 0ú ê0 - sinJ cos J 0ú ê0 0 1 0ú ê ú ê ú ê ú ê ú ë 0 0 0 1û ë 0 0 0 1û ë0 0 0 1û ël m n 1û When in the image beyond the solid ABCDEFGH other parallelograms are present also, whose main planes are not parallel to those of the first one, we select the most suitable, that is the one with the longest possible lines per VP detection.