Content uploaded by Roman Ďurikovič
Author content
All content in this area was uploaded by Roman Ďurikovič on Sep 21, 2018
Content may be subject to copyright.
Content uploaded by Roman Ďurikovič
Author content
All content in this area was uploaded by Roman Ďurikovič on Sep 21, 2018
Content may be subject to copyright.
*r'te41E16E
+iilr+tli1*henE I s s N 1
3
42 2 8eh
3D,oRl.JM
Vol.15No.4
2001.
\2
THE JOURNAL OF THREE
T3
DnF&._l
2001
+
L2
E
DIMENSIONAL IMAGES
Vol.15, No.4
December, 2001
RH + eE&#.
tr=Rnw.7 *  ) ^an nn'6J HHr*^+r+ff a#
( Er w.
)
r,# E E.J
f=knvM.a7 * i ^a+frESAU;t.(J
trRtr/J=knW&.J
tr15
+AiE,i(J
ffiX#flz) F9tYsrDWJ
ffin#*\3) FProtrude,
FlowJ
ffift#l*{4\ tr'fdeti&rf2J
ft*F+rF +e {F* ... I
Hr6 *: .. 2
ffiH Htr.. 4
Edr ttE ... 5
EL +* .. 6
$g H... I
FJtr#_HF
... 14
JEE ++ . 24
Hf# rydT
... 2s
SfrHEHA++t+
HH',t+ &X*W
FHt+ A&
HH^+ Affi
EET:Ef==t#
Ef€?eF5+&
ffifr#fll\ trf ' t )v
}Dfu#.atzuta7
+, 2 * t J
z7 4 * 7 P. Harman
f& ... 32
[HC:=2001,
 Fourth Interaational Conference
onHg.n_an,and.Oomputer
Fftt* (Part tr,)J,
...
=xfr44#r#
3D7*t^*€
41
181
217
ll9
PhysicallyBased
Model
of Photographic
Effects
for Night and Day
Scenes
Roman Durikovic l
Konstantin Kolchin
Computer Graphics Laboratory, Software
Department, The University of Aizu'
Ikkimachi, Aizuwakamatsushi,
Fukushima, 965 8580
Japan'
voice: [+81]
(242)37
2641
; fax: [+81]
(242)
37
2706
email:
seaan,kvkol@uaizu.
ac.
jP
Abstract
The light scattering within the camera system,
and film emulsion and diffraction on stops aud fil
ters creates
the effects of bloom and coroua with
radial streaks of light around high intensity otr'
jects. The proposed digital filters are take into ac
count known physical effects in simulation of ca^im
era bloom and corona
for realistic image synthesis'
Our method is applied to the image with correctly
calculated luminance values, so we reproduce the
photo ca,rnera
giare in a physically correct manner'
and physiological causes of glare in human visi
were studied by Spencer [4]. The above wor
focus mostly on human perception and do not
film emulsion for computer :nimation
We will derive the digitai filters for bloom
corona ca::3.era effects using the known physt
equations. Our focus is in digital simulation of
tical filter or single carnera stop effects for arti
architects and urban designers
used to emph
1 Introduction
The limited range of CRTs prevents the display of
iuminaires at their actual luminance values' Tak
ing into account the refraction, diffraction and
specular distributions will create the blooming
and coronas around the luminaires. The movie
production ofben
uses
the special lenses
to create
effects around lights or explosions First models
used in digital image synthesis
to add glare effects
were proposed by Naka,mae
et al l5] and improved
by Rokita Bj. They have used the Eqs. 1,2 as ker
nels in convolution image filtering' Vos [8] defined
a point spread function that describes the redis
tribution of point source energy onto the visuai
field of a human eye' The physical mechanisms
rcti l*". fr"* D"p".tment of Computer Graphics and
Image Processing, Faculty of \'{athematics, Physics and
Computer Science, Comenius University. Bratisiava, Slo
vakia
count for visual masking effects of giare.
cal properties on carnera image formation
was studied in astronomy for film calibration
poses. The first definition of analytical kernel
the efiect of camera bloom on emulsion grain
investigated by astronomists [].
Our approach
has been
to model the physical
fects cause
by the camera optical system and
the light scenes
of the virtuai buildings.
our rendered images consist of physically
sca,lar
luminance values we carr reproduce the
rect ca,rnera
effects.
2 Carnera phYsical effects
Let us consider a simplified optical formation s
tem consisting of opticai fiiter, lens and pro
tion plane positioned along the z coordinate
whiie projection plane is coincident with zy
as shown in Fig. 1. Among the rays reaching
surface of the diaphragm only the rays
through a diaphragm a^rrive
at its focal pla"ne
fiIm plate.
lF" where Ia is the light intensity fot 0 :0, a,nd
, slnz(lraa)
T: _
' sin'(da)
1f
a = lslnd.
(3)
(4\
plane
Figure 1: Camera image formation system
2.L Diffraction due to single diaphragm
All parallei
beams
passing through the lens are
focused on a single point of the plane placed at
the focal dista.nce
from the lens. A single small
hoie also called diaphragm piaced before the lens
creates the diffraction pattern at projection plane
which is the same pattern regardless
the location
of the hole. If the diameter of hole is e' then it
can be replaced by a slit with width e.
If rays with wavelength ,\ pass through the slit
with width e , they deviate from the direct path
about and angle
0. The intensity, 1", in the diffrac
tion pattern depends
on angle d as follows [2]:
.9
I"(o):roff' (1)
where
rs
s the
risht
rnte;:l:j d:0, and
Note that the above equation describes the fact
that the smailer is the slit width, the larger will
be the diffraction pattern. The same is true for a
hole.
2.2 Multiple holes of the same size
For many small holes distributed randomly, the
diffraction pattern on the focal plane wili be given
by superposition of difiraction patterns coming
from ali particular holes. The problem of N reg
ularly distributed holes
with radius e and spacing
d can be again replaced by a set of l[ paraile] siits
with width e and siit spacing d. The intensity'
I*, in the diffraction pattern grven by multiple
slits depends
on deviation angle 0 as follows:
Note, that if the slit spacing is irreguiar and the
number of slits is big, then f = N' and the diffrac
tion pattern is given bY
I*(e) : NI'(d)
Therefore, the N holes
of the same
size
and
shape,
will produce the difiraction pattern of a single hole
amplified N times.
2.3 Diffraction on a slit network
The slit networks produce the corona diffiaction
pattern. Generally, the slit forming even sided
polygon gives
the star diffraction pattern with the
same number of rays, unlike the siit forming odd
sided polygon network which gives the star pat
tern with doubie number of rays as sides
of poly
gon. Many camera filters avaiiable on the mar
ket produce corona patterns having the conver
gent rays with that same
length. An example of a
photo shot with rectangular siit network is shown
in Figure 2 top.
2.4 Diffraction on carnera stop
Camera stop is a hole with polygonal shape con
trolling the amount of iight coming to the surface
of the fiim. It is possibie to produce the corona
and bloom effect with a simple camera without
any filter just by setting the stop a,nd
expose
time'
The real photograph of a scene
shot during the day
is shown in Figure 2 bottom. The Babinet's lavr
ciaims that a hoie of the same
shape
is always giv
ing the sarne diffraction pattern. As a result we
shouid see
the same
pattern for given camera set
tings. Number of rays in corona pattern produced
by a hole obeys the simiiar rule as the siit network'
For example, the triangular hole wiil always give a
diffraction pattern the star with six rays' a square
hole will give the star with four rays, '.. [3]. The
stop on camera objective used to shoot the photo
had seven sided diaphragm, which explains why
optical
filter
rnra):10/+1:,4, (2)
\ea )'
t20
))
1'\
le
le
)n
:d
he
td
v
rr
)r
rn
rn
"ce
na
,Ut
1e.
ay
a,w
iv
we
:ed
rk.
ea
)xe
'he
rto
'hy
we see 14 rays in corona. Investigating the Fig. 2
bpttom further one can see that the rays have the
random iength and are divergent.
Figure 2: Real photographs: top) shot with a rect
angular slit filter bottom) shot with an objective
having the 7 sided stop.
2.5 Camera Bloom
This effect is attributed to the scattering of light
in the optical system where the scatter contribu
tions from lens and small particles within the fi.lm
emuision occur in roughly equal portions. Nlulti
ple scattering within the emulsion will occur foom
grain to grain until it is absorbed or leaves the
emulsion. Figure 3 iilustrates the situation when
scattered light inside the camera is added to lhe
light coming from object B. As result, the object
B is blurred and its contrast decreases.
Figure 3: Carnera
bioom that results in reduction
in contrast from scattered lieht.
3 Model of camera bloo
corona
This section will derive the equations
be used to generate the digital image
bloom and corona camera effects. filters
based on known physical equations have
ters with intuitive physical meaning and
ate wide ranse of caruera
effects.
Vos [8] defined a density function on t visual
field that describes how a unit volume ooi
is "spread" onto other points of the vi
The density function, P(0), defined on
sphere of directions entering the camera
the point spread, function (PSF)and has
Iowine form
can
for
field.
hemi
called
fol
from
3 and
.5,3).
from
the
words
or aF
(5)
nique
Any PSF P is nonnegative and must sa the
norma"lization
condition on the hemis of di
angie
rections enterinE the camera, where d is t
where 5(0) is a delta function representing
PSF with all energy in one point, a is the
of light that is not scattered, d is the an
the gaze direction, k is a constant betwee
50, and /(A) is function of dn with n €
around the gaze direction and 0 is the
he eaze direction measured in radians.
function P conserves the energy in
the energy is redistributed but not emi
sorbed:
r2n 14
I l" P(0)sn1dqdQ:r.
Jo Jo
3.1 Alternative PSF definition
PSF is a nonuegative
function defined
in
ordinates
P(r,d): (1 e)d(r)
+ ef
(r,,b),
satisfying the normaiization condition of
volume integrai in polar coordinates:
P(e): al(q
+
ft),
r2tr ra
I I P(r,Q)rdrdb: r.
JO JO
In above equations d(r) is a deita fun ,rls
a distance from the center of PSF at the
I Ol
 TLI 
:F gaze direction, @
is the angle around the gaze di
rection in radians, e defines
a fraction oflight that
is spread to neighboring points of camera visuai
fieid, /(r, /) is a function that determines the cam
era effect namely bloom or corona.
3.2 Adding the Bloom
It is now desirable
to find a simple general analyt
ical forrnula which quantitativeiy represents the
observed bioom spread profile. Such a function
f (r,d) = ln(r,/) in PSF definition, Eq. 5, is
rays. Function n(r) that determines whether the
corona ray width converges or diverges
is proposed
as follows l
^/\ 
''\' l  ln(cosi^.,)'
where   (l)"t.
w
The width of rays is constant for s : 0, alterna
tively it wiil converge and diverge for s < 0 and
s ) 0, respectively" Thin and long rays can be
used to simulate the corona effects of optical fii
ters while the long and divergent rays are good for
simulation of corona effects
produce by the carnera
stop.
3.4 Implementation
The above PSFs are appiied as a postprocessing
to the image
I(x,A) of luminance
distributions in
cdlrn2. The Cartesian coordinates (r, gr) are the
discrete image coordinates i.e. pixels. The modi
fied luminance
intensities
I'(r,A) of the image are
then calculated by the standard discrete convolu
tion method
I' (r,y) : t l(ro,ao) * K(r  ro,a  ao),
co,u0
where K(r,3r) is the fiiter kernel derived from PDF
by transforming it from polar coordinates to the
Cartesian coordinate system:
vl* .,\  t>(
r!\&)y/  a \. r,9..
,lan (ll.
'r''
The normalization coefficient in the above
PDFs
can be calculated analyiically or if it is not pos
sible they can be approximated in discrete Carte
sian space by using the normalization condition
lKrr,il:r
/J" \
The filters are independent of a particuia,r image
and their size is determined relative to the image
width and height. Note that the filter is applied at
each of bright points whose iuminance is greater
tha.n the threshold value.
tr
Ia\r,Q):0+?lR)2Y, (6)
where parameter fi = 30  I20p,m controis the
fliter width, and.
B x 3  5 is a consta.nt. Af
ter substitution of Eq. 6 in to the PSF definition,
Eq. 5 we derive the extension of Moffat kernel [7]
which is obtained' for e : 1 by enhancing the en
ergy for nearly orthogonal incident rays. For e : 0
all light energy is concentrated in one single point
and there is no bloom effect.
3.3 Adding the Corona
The corona effect that can simulate the random
ness
in the length, width and intensity fade out of
corona
rays
is proposed
to be /(r, $): f"(r,Q) in
Eo. 5 as follows:
f
"?,
d)
: ct(r) cos(t91'@ .
where C is a normalization constant, k is the num
ber of rays in visible corona. The fadeout effect of
rays and their length in corona is suggested to be
I(r) : 2o'/t
'
where the mearr ray length I is defined by the user
and o controls the intensity fadeout aiong the ray.
To simulate more,realistic effects nameiy random
length of rays in corona, I can be considered as a
statistical variable with a given mea.n
and devia
tion. In our implementations the deviation is 25%
of the mean. which produce the reasonable
camera
spot effects.
Let ur be a ray width and s be a parameter defin
ing the convergence
and divergence
angle of corona
trl
x2+y2
 LLL
l
t
)f
)Fs
)os
)1]
rage
lage
,d at
:aief
Figure 4: Camera bloom: teft) the fitter proflle center) the scene without any effects right) t;
luminaries enhanced by a bioom effect'
4 Results and Discussion
Since. it is possible to control the spreading frac
rion of "o"rg1, independentiy from decay rate in
Eq. 6, the PSF can have a uniform delta peak in
tire center with energy at large distance trom cen
ter. The fi1ter shape with parameters e : 0'005'
B :2 and R : 10'4 pixels is demonstrated ln the
lefb of Figure 4. The bloom effect using the same
parameters is showl in right of Figure 4' Centrai
i*ug" in Figure 4 shows the scene with original
luminaries.
Figure 5 shows the siniulation of camera effect
on tlie stop with 7 sides resuiting in 14 rays' On
the left image of Figure 5 we show the corona
filter profiie using tire parameter e : 0'005' the
ray length is set to I : 15'6, tire number ot rays
is k : 14, and the divergence parameter 1s 's :
1. Central figure shows the scene that was post
processed by the PSF using the same parameler
set, the righi figure shows the composiiion of both
the corona and bloom efiects'
Difterent camera coronas can be produced by
width and divergence parameters' On Figure 6
from treft firsi irnage uses convergent rays with pa
rameters s : 1, 'il.'
: 10; next inage slmulaies
the effects produced by an optical fllter using the
constat width ra.r's s : 0. tu  J; the third image
uses s : 0.5Tu : 3 and divergent rays are shown
on the last image
for s: 1,a:3' The length
of
ray used was approximaiely I : 80 pixels and ihe
random factor rvas omitted in this tigure'
5 Conclusion
effects of corona was proposed' The pe
are responsible for a corona alld' bloom I
the camera image formation system' ltr't;
cused narnely on scattering in the opt
lens, stop and film emulsion'
lAte have propcsed the point spread f
tirat can be converted into the digital filter
bhe
bloom effect to the image simuiai'ing t
We have presented, tire mechanisms gendr
cepted by the fiIm and camera communi
tering within the filrl emulslon' Similari.y i
simtifating tire borh the divergent and con
J*
that
1n
f,
fi1ter,
tion
add
PSF
med
ts lln
''.i:.
.ri:
n!
ll:l
iir
ii
,iil
1g
1n
tlc
l;
)a
1t
experirnenis indicates that ihe camera e'
prove the image perception and can be ':
ln a .easonable time of up to 1 minute' 'l scalar
luminance images were used in our exat
]F
;he
Acknowledgments
The authors thank Siivestei Czantrer attd
Kopyiov lor their real photos with corona
The images rvere rendered by the Insp
tracing progra.m developed by Integra' I
author also thank Sergey Ershor'{or c:
method. This research was sponsored
from the Fukushlma Prefectural
Japan for the Advancement of Scienc;e
ucaiion.
References
ward
efiects.
er fay
c. The
no ihiq
grants
10n ln
frJ
fu
i23
Figure 5: Camera corona: ieft) ihe filter profile center) the scene with only corona effect appiied o
luminaries right) the scene luminaries are enhanced by both corona a,nd bloom effects.
Figure 6: Caraera corona parameters.
. r!:',i,
;i:.:,,
"'lja.,'
"::lri
r
,':,
,i,,,'
,
i tl't,
'' '
"
'
ii:";
: i:,'.
.Iit'
t:.
r ::: rlll'
:,,.r;:,,
a::,
:: : a.;.::
:: t:
f:l
:: lii:
: : : li.::
:t;
'tl
' ;.,
:::: :'t l
;i,
: ',i,:::
.;::::
" iii
:,:
:ia::
il:r,
+i
:i;.''
:;.rr'
: ,,
:lt::::
]I::
ilr'
: :::
;:
[1] G. Simpson. "Occuiar halos and coronas."
Brztish JournaL
of OpthaLmology,
vol.37, pp.
450486,1953.
12]
NI. Born E. Wolf. "Principles
of optics." Perg
arnon Press,
New York. 1953.
13]
G.B. Parrent B.J. Thompson.
"Physical
op
tics notebook." Society of Photooptzcal
In
strumentation Engineers, Billingham, fuIA,
1969.
[4] G Spencer, P. Shirley. K. Zimmerman.
D.P. Greenberg.
"Physicallybased
glare ef
fects for digiial images." In Computer Graph
ics Proceed,tngs,
Annual Conference Serzes,
pp. 325334,
ACN{ Siggraph,
1995.
[5] E. Nakamae. K. Kaneda. T. Okamoto,
T. Nishita. "A lighting model aiming at the
drive simulators." Computer Grapht'cs,
vol.
24,
r:o. 3, pp. 395,tr04,
Siggraph'90,
f990.
16]
P. Rokita. "A model for rendering
high inten
sity lights." Computer
and Graph'i,cs,
vol. 17.
no. 4. pp.
431437, 1993.
[7] A.F.J. lvloffat.
"A theoreticai
investigation of
focal steilar images in the photographic
emui
sion
and applicaiton
to photographic pirotom
etry," ,4slronomy and Astrophysr.cs.
vol. 3,
pp"
455. i967.
i8] J. Vos.
"Disability glare
a
report." C.LE. Jounal,
voI.
53, 1984.
..,r^+^ ^t +l^ ^
SUdt,C tJ! UUE d
3, no. 2, pp. 3
 194
