\documentclass[11pt]{article}
\usepackage{latexsym}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{epsfig}
\usepackage[tight]{subfigure}

\newcommand{\handout}[5]{
  \noindent
  \begin{center}
  \framebox{
    \vbox{
      \hbox to 5.78in { {#1} \hfill #2 }
      \vspace{4mm}
      \hbox to 5.78in { {\Large \hfill #5  \hfill} }
      \vspace{2mm}
      \hbox to 5.78in { {\em #3 \hfill #4} }
    }
  }
  \end{center}
  \vspace*{4mm}
}

\newcommand{\lecture}[5]{\handout{#1}{#2}{#3}{#4}{#5}}

\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{observation}[theorem]{Observation}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{fact}[theorem]{Fact}
\newtheorem{assumption}[theorem]{Assumption}

% 1-inch margins, from fullpage.sty by H.Partl, Version 2, Dec. 15, 1988.
\topmargin 0pt \advance \topmargin by -\headheight \advance \topmargin by -\headsep \textheight 8.9in
\oddsidemargin 0pt \evensidemargin \oddsidemargin \marginparwidth 0.5in \textwidth 6.5in

\parindent 0in
\parskip 1.5ex
%\renewcommand{\baselinestretch}{1.25}

\begin{document}

\lecture{Statistical Techniques in Robotics (16-831, F09)}{Lecture \#11 (Tuesday September 29)}{Lecturer: Drew
Bagnell}{Scribe: Javier Hernandez Rivera}{Random fields for Ladar data and estimation}




\section{Portfolio optimization (continuation)}
As we defined in the previous class, the update rule in this problem is:
\begin{equation}
w_{t+1}^i \leftarrow w_{t}^i + \alpha \frac{r_{t}^i}{\sum_i w_{t}^i r_{t}^i}
\end{equation}
The projected sugradient descent would be:
\begin{equation}
w_{t+1}^i \leftarrow Proj [w_{t}^i + \alpha \frac{r_{t}^i}{\sum_i w_{t}^i r_{t}^i}]
\end{equation}
where the learning rate is defined as:
\begin{equation}
\alpha = \frac{F}{\sqrt{t} G}
\end{equation}
Since $\sum_i w_i = 1$, the maximum size of the space (F) will be $\sqrt{2}$. \\
Bounding the rate of return as $r_{min} \leq r \leq r_{max}$, the maximum gradient (G) will be achieved at $\frac{r_{max}}{r_{min}}$. Therefore:
\begin{equation}
\alpha = \frac{\sqrt{2}r_{min}}{\sqrt{t} r_{max}}
\end{equation}

Note that if $r_{min}$ decreases, $\alpha$ becomes smaller and the trader would look more conservative.



\section{Markov Random Fields Applications}
\subsection{Range Sensing \cite{Diebel05}}

A new generation of range sensors combines the capture of low-resolution range images with
the acquisition of registered high-resolution camera images. Markov Random Field (MRF) are applied for integrating both data sources. The intuition behind the MRF is that depth discontinuities
in a scene often co-occur with color or brightness changes within the associated camera
image. Since the camera image is commonly available at much higher resolution, this
insight can be used to enhance the resolution and accuracy of the depth image.

\begin{figure}[h!t]
\centering
   \includegraphics[width=9cm, angle=-90,trim=0.25in 0.25in 0.25in 0.25in]{img/mrf_depth.pdf}
\caption{Markov Random Field for Range Sensing}
\label{fig:mrfdepth}
\end{figure}



Figure \ref{fig:mrfdepth} illustrates the proposed MRF. The potential functions are defined as:
\begin{equation}
\Psi = \exp{-C (\widetilde{D}-D)^2}
\end{equation}
\begin{equation}
\Phi = \exp{-w_{ij} (D_i-D_j)^2}
\end{equation}
where $C$ is a constant weight placed on the depth measurements.

The weighting factors $w_{ij}$ are a key element, in that they provide the link to the
image layer in the MRF. Each $w_{ij}$ is a deterministic function of the corresponding
two adjacent image pixels, which is calculated as follows:
\begin{equation}
w_{ij} = \exp{-\lambda U_{ij}} 
\end{equation}
\begin{equation}
U_{ij} = \sum_{c\in \text{ color channels}} (pixel_i^c - pixel_j^c)^2
\end{equation}
Here $\lambda$ is a constant that quantifies how unwilling we are to have smoothing occur
across edges in the image.

As explained in lecture 5, the probability of the latent variables can be computed as:
\begin{equation}
Pr(\stackrel{\rightarrow}{D}) = \frac{1}{Z} [\prod_{i,j \in \text{ neighbors of i}} \Phi(D_i,D_j)] [\prod_i \Psi_i(D_i)]
\end{equation}
where $Z$ is the normalizing factor.\\

The parameters can be estimated with MAP:
\begin{equation}
\max \log{Pr(\stackrel{\rightarrow}{D})} \propto \frac{1}{2} \min_{\stackrel{\rightarrow}{D})} \sum_i C_i (\widetilde{D} - D_i)^2 + \sum_{ij} w_{ij} (D_i - D_j)^2
\end{equation}
\begin{equation}
\nabla\ell_i = C_i (D_j - \widetilde{D}_i) + \sum_{j \in\text{ neighbors of }i}w_{ij}(D_i - D_j)
\label{eq:deriv}
\end{equation}
This can be plugged into the convex optimization update rule we derived in class:
\begin{equation}
D_{t+1}^i \leftarrow D_{t}^i + \alpha \nabla\ell_i 
\end{equation}



There are some problems associated with this solution:
\begin{enumerate}
    \item Flat surfaces with color changes will not be correctly estimated (e.g. wall posters).
    \item Projection is required for some case such as out of range readings (e.g. mirrors).
    \item Range readings are influenced by big areas of pixels.
\end{enumerate}




\subsection{Terrain Mapping}

The objective in this problem is to estimate the height of the terrain observed with range sensors. Let's assume the set of heights can be described by a function $Z = f(x,y)$ where $Z=0$ corresponds to the ground level. Figure \ref{fig:mrfterrain} illustrates a MRF to solve this problem. Note that in this case, $Z$ is defined in 1D.
\begin{figure}[h!t]
\centering
   \includegraphics[width=9cm, angle=-90,trim=0.25in 0.25in 0.25in 0.25in]{img/mrf_terrain.pdf}
\caption{Markov Random Field for Terrain Mapping}
\label{fig:mrfterrain}
\end{figure}

Similarly to the previous problem, we can define the potential functions as:
\begin{equation}
\Psi = \exp{-(\widetilde{D}_i-D_i)^2}
\end{equation}
\begin{equation}
\Phi = \exp{-w_{ij} (D_i-D_j)^2}
\end{equation}

Moreover, we have the set of constraints $\forall D_i \leq \text{Ray height}_i$ that require a projection function to be satisfied. Note that the set of solutions is convex because it is defined with inequalities.\\
Some problems may appear with puddles where the robot would believe there is a hole in the ground. 
\bibliographystyle{unsrt}
\bibliography{biblio}
\end{document}
