\documentstyle[12pt,fullpage,psfig]{article}

\newcommand{\lecturetitle}[4]{
  \noindent
  CS 280, Computer Vision (Prof. Jitendra Malik) \hfill #3\\
  Lecture \##1 (#2) \hfill {\bf DRAFT} Notes by #4\\[-.05in]
  \mbox{}\hrulefill \mbox{}\\}

\begin{document}

% MODIFY THE FOLLOWING TO INCLUDE THE LECTURE #, TOPIC, DATE, and YOUR NAME
\lecturetitle{16}{Reflection and Scattering}{Mar 17, 1999}{Shawn Chang}

% INCLUDE AN OUTLINE OF THE CLASS TOPICS
\begin{itemize} 
  \item Reflection
	\begin{itemize}
		\item BRDF
		\item Properties of Lambertian Surface
		\item Computing BRDF
	\end{itemize}
  \item Scattering

  \item More on Lambertian Surface
\end{itemize}

% THE NOTES WILL GO HERE

\section{Reflection}

\subsection{BRDF} 
The reflectance property of a material can be characterized by the 
Bidirectional Reflectance Distribution Function (BRDF).  
BRDF is a function of both the incoming and outgoing directions of light
\footnote{In fact, the BRDF is also a function of $\lambda $, the wavelength, 
which we do not consider here for simplicity.} 
A formal defination of BRDF is:
\[
BRDF = \frac{outgoing \ radiance \ in \ a \ given \ direction}{incoming \ irradiance \ in \ another \ given \ direction}
\]
Notice that although the irradiance is a directionless quantity, the 
denominator in the above defination considers the irradiance contribution from
 a particular given direction.


Each of the incoming and outgoing direction is specified by two variables.  
Let $\theta_0, \phi_0 $ be the outgoing direction, and
$\theta ,\phi $ be the incoming direction.  
Then, the BRDF can be experessed as:
\begin{equation}
\rho_{bd}(\theta_0, \phi_0,\theta ,\phi ) = \frac{L(x,\theta_0,\phi_0)}{L_i(x,\theta ,\phi )cos(\theta )d_\omega} 
\end{equation}
where the $d_\omega $ is the solid angle.  
For a perfect black material (no reflected light), the outgoing $L$ is $0$, and so is the $\rho_{bd}$.  The measurements of $L$ and $L_i$ may be obtained by shining lights of known property on the material from many different angles.


There are two important special cases of BRDF:
\begin{itemize}
        \item BRDF is a constant:  a surface with this property is called 
		a Lambertian Surface.  In such case, the outgoing radiance 
		is a constant, independent of direction.
        \item Perfect mirror:  the BRDF for a perfect mirror is $0$ in all 
		directions except the direction of light reflection.
\end{itemize}


\subsection{Properties of Lambertian surface}
Let's undertand more about Lambertian surface.  Since BRDF is a constant, 
the surface looks equally bright from different directions (because our eyes
measure radiance rather than power).  
However, the energy may differ.  This can be seen 
from figure 1, where the power going out from direction 1 and 2 are:
\[
L(x,\theta_1,\phi_1)A cos(\theta_1)(Solid \ angle)
\]
and
\[
L(x,\theta_2,\phi_2)A cos(\theta_2)(Solid \ angle)
\],
respectively, where $A$ is the area of the local patch of interest.  
It is readily seen that the outgoing power peaks in the perpendicular 
direction, where $\theta=0$.


\begin{figure}
\centerline{\psfig{file=fig1.eps,height=2in}}
\caption{Reflection in different directions for a Lambertian surface.}
\label{fig1}
\end{figure}


Now, let's consider the effect of moving the light source for a Lambertian surface.  As the light source moves, the angle $\theta$ between the surface normal and light source direction is changed, and so is the projected area of light.  
  Although the BRDF is constant, the incoming irradiance changes as a function of $cos(\theta )$.  So the brighness appears to be changed.

In conclusion, the brightness is related to 
$\hat{n}*\hat{s}$, where $\hat{n}$ is the surface normal, and $\hat{s}$ is the light source direction.

\subsection{Computing BRDF}
Idealy, if we know the detailed surface geometric structure and material's physical property,
we can predict BRDF.


For a dielectric (non-conducting) material, one can use the Fresnel's Law
 to compute the amount of light that is reflected:
\begin{equation}
\rho(i) = \frac{1}{2}[[\frac{cos(i)-\sqrt{n^2-sin^2(i)}}{cos(i)+\sqrt{n^2-sin^2(i)}}]^2 +
[\frac{n^2 cos(i)-\sqrt{n^2-sin^2(i)}}{n^2 cos(i)+\sqrt{n^2-sin^2(i)}}]^2]
\end{equation}
where $i$ is angular incidence, $n$ is index of refraction, as in figure 2.
Notice this does not apply to conductor.

\begin{figure}
\centerline{\psfig{file=fig2.eps,height=2in}}
\caption{Reflection and refraction.}
\label{fig2}
\end{figure}



When we have perpendicular incidence, i.e. $i=0$:
\begin{eqnarray}
\rho(i) &  =  &  \frac{1}{2} [[\frac{1-n}{1+n}]^2 + [\frac{n^2-n}{n^2+n}]^2] \\
     &   = &[\frac{1-n}{1+n}]^2
\end{eqnarray}

For glass, $n=1.5$, and $\rho(0)=0.04$, i.e. only $4\%$ of light reflected.


As $i$ goes to $\pi/2$, $\rho(i)$ approaches $1$,i.e. most of the lights are reflected. 
This can be used to explain the phenomenon shown in figure 3.

\begin{figure}
\centerline{\psfig{file=fig3.eps,height=2in}}
\caption{Illustration of Fresnel's Law.}
\label{fig3}
\end{figure}


\section{Scattering}
Scattering of light occurs when we have very small particles
(relative to the wavelengths of visible lights, 
which is from  400nm for blue light to 700nm for red light) in the medium of light.  

Rayleigh's Law of scattering states that the scattering is proportional 
to $\frac{1}{\lambda^4}$, 
where $\lambda$ is wavelength.  It can be used to explain several natural phenomena associated with lights traveling in atomosphere.

\begin{itemize}
        \item Sky appears blue:  See figure 4.  Since the blue light has the 
	shortest wavelength, it scatters the most as the sunlight travels 
	through the earth atomospere,which contains many small molecules of air 	and dirt.    
        \item Sunlight appears redder at sunset, and yellowish at noon: See figure 5.  The path of sunlight in the atomosphere is longer at sunset, so more of the blue lights scatter off; at noon, the path is shorter and more blue lights remain to give the yellowish appearance of sunlight. 
        \item Sky is brighter at horizon than at the zenith:  The light from the horizon travels to the observer through a longer air column than the light from the zenith.  The longer path creates more scattering and better brightness.
	\item Aerial Perspective: $p_1$ appears 
	brighter than $p_2$ in figure 6, although $p_1$ is farther away from observer. Again, it's because the air column from $p_1$ is longer.  This happens when the effect of air column dominates, and should be more obvious in foggy days.

\end{itemize}

\begin{figure}
\centerline{\psfig{file=fig4.eps,height=2in}}
\caption{Sky appears blue.}
\label{fig4}
\end{figure}

\begin{figure}
\centerline{\psfig{file=fig5.eps,height=2in}}
\caption{Sunlight is redder at sunset.}
\label{fig5}
\end{figure}


\begin{figure}
\centerline{\psfig{file=fig6.eps,height=1.6in}}
\caption{Aerial Perspective: object $(P_1)$ farther away  may appear brighter than object $(P_2)$ closer to observer.}
\label{fig6}
\end{figure}



Quantititavely, we can define the following:
\begin{equation}
Object \ light: L(r) = L_0 e^{-\sigma r}
\end{equation}
where $r$ is distance to the object, and $L_0$ is the light at the object.

\begin{equation}
Air \ light: L(r) = L_h(1-e^{-\sigma r})
\end{equation}
 where $r$ is air column length, and $L_h$ is the light at horizon.

\begin{equation}
Contrast: \frac{L_0 e^{-\sigma r} - L_h e^{-\sigma r}}{L_h} = \frac{L_0-L_h}{L_h} e^{-\sigma r} 
\end{equation}


\section{More on Lambertian Surface}
Lambertian surface was first discovered by French physicist Lambert in 1740's.
It's due to the large number of random reflection in all directions caused by small particles in the reflecting material, as illustrated in figure 7.  Statistically, equal amount of light is reflected in each direction by the small particales.

\begin{figure}
\centerline{\psfig{file=fig7.eps,height=2in}}
\caption{Lambertian surface.}
\label{fig7}
\end{figure}


Finally, the basic equation for today is:
\begin{equation}
L(x,\theta_0,\phi_0) = L_e(x,\theta_0,\phi_0) + \int_{\Omega} \rho_bd(x,\theta_0,\phi_0,\theta,\phi)L(x,\theta,\phi)cos(\theta)d_\omega
\end{equation}
The first term $L_e$ is the original emission from the patch, and the second term is integrated over all incoming directions.

\end{document}

