• Nie Znaleziono Wyników

Projective transformation in geometric correction of digital images

N/A
N/A
Protected

Academic year: 2022

Share "Projective transformation in geometric correction of digital images"

Copied!
7
0
0

Pełen tekst

(1)

Seria: G E O M E T R IA I G R A F IK A IN Ż Y N IE R S K A z. 1 N r kol. 1318

PETER SULYOK

Lajos Kossuth University

Institute of M athem atics and Informatics

PROJECTIVE TRANSFORMATIONS IN GEOMETRIC CORRECTION OF DIGITAL IMAGES1

S u m m a ry . The paper presents a method of a geom etric correction of digital im ages. The m ethod consits in aaproximation a global nonlinear transformation of digital im ages by elem entary projective transformations.

P R Z E K S Z T A Ł C E N IA R Z U T O W E W G E O M E T R Y C Z N E J K O R E K C IE O B R A Z Ó W C Y F R O W Y C H

S tre s z c z e n ie . W pracy rozważa się zastąpienie ogólnego przekształcenia nieliniowego jako m etody elim inacji zniekształceń map bitowych przez elementarne przekształcenia typu rzutowego, tj. zachowujące współliniowośó.

1. G e o m e tric c o rre c tio n s o f digital im ages

G eo m etric corrections of digital images are frequently used in digital image processing. In general the digital im ages have distortion because of the fault of the digitizing system. The main reasons of geom etric distortion are the following:

- optical error of cam era

- perspective distortion of mapping - m oving of camera.

The aim of these corrections is to prepare the ideal image without geom etric distortion. Mostly we want to m easure distances on the digital im age.

1 This p a p e r w a s su p p o rte d by OTKA 1651.

(2)

1.1. M o d e l o f geom etric corrections

Let us consider at the

m odel of geometric correction

based on [5] (see Figure 1). W e need to produce corrected im age

q ' (k,l)

from the given digital im age

q(k,l).

The digital im age

q(k,l)

is a bounded function of two variables which has integer values in a rectangle domain at discrete places.

The corrected im age

q*(k,l)

has to approach properly the ideal image

f(x,y).

The geom etric correction contains a coordinate transformation and a colour calculation of the new pixels in the corrected digital im age. To realize the coordinate transformation we need to find the convenient inverse transform a­

tion which can be applied on the digital im age to restore the ideal image without distortion. Secondly we can apply colour calculation of corrected image with the help of an Interpolating function [2],

Fig 1

1.2. Types o f distortions

W e can classify distortions to

linear

(e.g. perspective distortion) and

nonlinear

cases (e.g. optical distortion) (see Figure 2). In case of linear distortion we need to apply a global linear transform ation to the digital im age. These transformations are projective transformations but we can use affine transformations in special cases [1]. In case of nonlinear distortions we need to apply a global nonlinear transformation to the digital image. In general it is hard to determine these transformations theoretically because we have not enough information about the digitizing device.

(3)

2. C o rre c tin g n o n lin e a r d is to rtio n

W e try to determ ine distortion correcting transformation practically. Let us use a reference grid at the digitizing process. This reference grid will inherit and show the type of distortion (see Figure 2).

A fter the digitizing process we need to determine (digitize) the coordinates of the reference grid points in the digital im age. W ith the help of this grid we are able to apply the correcting transformation on the digital im age.

Instead of applying the global nonlinear transformation we can use elem entary linear transform a­

tions. T h e linear transformations are determined by the corresponding four neighbouring points of the distorted and the ideal reference grids (see Figure 3). Applying of these local linear transformations we will have good approximation of the global nonlinear transformation if we use the reference grid with acceptable quality (i.e. the distance between the neighbouring points of the reference grid is conveniently sm all).

2.1. Coordinate transformation o f correction

To apply local linear coordinate transformation on digital im age we need to use projective plane transform ation. The four neighbouring points of the reference grid uniquely determ ine the projective transformation (see Figure 4).

Fig. 4

(4)

Let

/

5

X ? =

S f i X f

+

3 i 2 X 2

+

&13*3 I

S;

X j

- + ®22*2 + ®23X 3

;

%

* 3

&

31*1 +

&

3 2 * 2 + ® 3 3 * 3

be a projective transformation

p ^

where the indeces fc,/ identify the four neighbouring points in the

digital picture. Let us use homogeneous coordinates to describe the points [4j. The x/ a n d x , (/' =

1...3)

are known homogeneous coordinate values (5 is the multiplicative coefficient of the transformation) and w e must calculate the coefficients a^ of the projective transformation.

In practice instead of using p /jw e use the inverse projective transformation

p ] j

(see Figure 5). In

this case we need to calculate the original pixel coordinates in the distorted im age from where the new pixel inherits its colour in the ideal im age.

... ? • . / •■Ô...

P ,j

- : P

■(!...<?■■ • - v ...?...*?”

• -o...-ç ... - Q - ••Ç ...-Ô... <?--

distorted im age ideal im age

Fig. 5

In general the distortion of a digitizing device is constant so if we fix the points of the reference

grid and w e calculate its elementary projective transformations

p'/j

we may apply this distorsion

correcting system on all digital images of digitizing device.

2.2. Pixel color calculation o f correction

A fter the calculation of pixel coordinates we need to determine the new colour of pixel in corrected im age. Th ere are several interpolating methods in [1] [2] [3] [5] [6].

A : : D

•-0... ;•••«...

i

I ''1

i

a :

^

...

i

P i :

p'u

P i

B : ; C

distorted im age ideal im age

Fig. 6

(5)

T h e

nearest-neighbour interpolation

is a well known technique in digital image processing [1] [5]. In this case w e select the colour of the nearest neighbouring point from

P

point (see Figure 6 )

q*(P) = q(Pt )*q(C)

based on the distances a and p. This interpolation can be calculated in simple way but it produces false-contour effects for high enlargement factors.

Th e

bilinear interpolation

gives better result than the nearest-neighbour interpolation [3] [5]. This method calculates new color value to point

P'1

from colors of points

A, B, C, D

with the linear interpolation

q ' ( P ) = q ( P ')

= P f a

q (C )

+

(1 - a ) q (D ))

+

(1

- p j f f a

q (B )

+

(1 - a ) q (A ))

3. E n h a n c in g th e q u a lity o f referen ce grid

W e can enhance the quality of the reference grid if we calculate new points on the grid. W e can fit quadratic interpolating curves to points of reference grid. Let

x (f) = + 9*3

y ( t ) - a 21t 2 +

a 22t

+

a 23

be the quadratic interpolating curve

r(t).

Rys. 7

(6)

Considering the interpolating curves

n(t)

and

r

2

(t)

we can produce a series of curves between these curves with help of the following equation

rx ( t ) ^ ri{t) + ( l - k ) r 2 {t) \ e [ 0 . . l ]

Selecting different values for

X

we get different curves beetwen

rtft)

and

rz(t)

(see Figure 7).

W e need to calculate additional points on these curves. W e can calculate midpoints recursively on the curves

rrft), rz(t)

and

rx(t)

based on curve length. W ith these points we can expand the reference grid and enhance its quality.

R efe re n ce s

[1] B R A C C IN I C. - M A R IN O G.:

Fast Geometrical Manipulations of Digital Images.

Com puter Graphics and Im age Processing 1 3 ,1 9 8 0 .

[2] A N D R E W S H. - P A T T E R S O N C.L.:

Digital Interpolation of Discrete Images.

IE E E Transactions on Computers, Vol. c-25 No. 2, 1976.

[3] Y A R O S L A V S K Y L.P.:

Digital im age Processing.

Springer-verlag 1985. Springer Series In Information Science Volum e 10.

[4] P E N N A M .A . - P A T T E R S O N R.R.:

Projective geom etry and its application to com puter graphics.

Prentlce-Hall 1986.

[5] A l l 6 G . - H E G E D O s C S. - K E LEM EN D. - S Z A B 6 J.;

A digitalis k6pfeldolgozSs alapproblPmtji.

Akaddm ia kiadd Budapest 1989.

[6] S U L Y O K P.:

Application of interpolating B-spline surface in geometric correction of digital images.

Proceedings of International Conference on Applied Informatics, Eger 1993.

S tre s z c z e n ie

G eom etryczne korekty obrazów cyfrowych, czyli tzw. mapy bitowej są działaniam i często stosowanymi. Chodzi w nich o eliminację bądź ograniczenie zniekształceń obrazów, które m ogą mieć charakter liniowy (perspektywiczny) bądź nieliniowy (optyczny). W przypadku zniekształceń liniowych metoda korekty opiera się na użyciu odpowiednich przekształceń rzutowych, czasem afinicznych. W przypadku zniekształceń nieliniowych należy sięgnąć do przekształceń nieliniowych, których teore­

tyczne określenie jest jednak trudne, zwłaszcza przy niedostatecznej informacji o sprzęcie.

(7)

W pracy przedstawiono koncepcję zastosowania w tym zakresie przekształceń rzutowych. Zasada działania polega na aproksymowanlu ogólnego, nieliniowego przekształcenia przez elem entarne przekształcenia rzutowe, tj. zachowujące współliniowość punktów. W odnośnych działaniach korzysta się z siatek, których interpolacja pozwala na uzyskanie dokładniejszych wyników. W rozważaniach nie pominięto problemu zniekształceń koloru.

Cytaty

Powiązane dokumenty

A certain linear growth of the pluricomplex Green function of a bounded convex domain of C N at a given boundary point is related to the existence of a certain plurisubharmonic

How many fibers determine univocally functions defined on a non-Archimedean valued field K, complete, algebraically closed and with char K = 0.. That is, on the fibers over how

The paper contains the estimates from above of the principal curvatures of the solution to some curvature equations.. A correction of the author’s previous argument is

It emerges on the one hand, caused by competencies concerning information gaining and utilization about the transactional customer behavior, on the other hand, by the

RESEARCH OBJECTIVE: The objective of this essay is to demonstrate how political narratives in the United States of America, specifically, Presidential campaign advertisements,

Zbadano wpływ rodzaju aktywatora wulkanizacji oraz redukcji ilości jonów cynku na właściwości mechaniczne wulkanizatów oraz ich odporność na starzenie

Krajski pisze, że filozofia społeczna w ujęciu Morawskiego jest „etyką szczegółową, którą należy nazwać etyką chrześcijańską czy katolicką z tego