%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Masters/Doctoral Thesis 
% LaTeX Template
% Version 1.41 (9/9/13)
%
% This template has been downloaded from:
% http://www.latextemplates.com
%
% Original authors:
% Steven Gunn 
% http://users.ecs.soton.ac.uk/srg/softwaretools/document/templates/
% and
% Sunil Patel
% http://www.sunilpatel.co.uk/thesis-template/
%
% License:
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
%
% Note:
% Make sure to edit document variables in the Thesis.cls file
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%----------------------------------------------------------------------------------------
%	PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------

\documentclass[11pt, a4paper, oneside]{Thesis} % Paper size, default font size and one-sided paper

\graphicspath{{Pictures/}} % Specifies the directory where pictures are stored

\usepackage[square, numbers, comma, sort&compress]{natbib}

\usepackage{rotating}

 % Use the natbib reference package - read up on this to edit the reference style; if you want text (e.g. Smith et al., 2012) for the in-text references (instead of numbers), remove 'numbers' 
\hypersetup{urlcolor=blue, colorlinks=true} % Colors hyperlinks in blue - change to black if annoying
\title{\ttitle} % Defines the thesis title - don't touch this

\begin{document}

\frontmatter % Use roman page numbering style (i, ii, iii, iv...) for the pre-content pages

\setstretch{1.3} % Line spacing of 1.3

% Define the page headers using the FancyHdr package and set up for one-sided printing
\fancyhead{} % Clears all page headers and footers
\rhead{\thepage} % Sets the right side header to show the page number
\lhead{} % Clears the left side page header

\pagestyle{fancy} % Finally, use the "fancy" page style to implement the FancyHdr headers

\newcommand{\HRule}{\rule{\linewidth}{0.5mm}} % New command to make the lines in the title page

% PDF meta-data
\hypersetup{pdftitle={\ttitle}}
\hypersetup{pdfsubject=\subjectname}
\hypersetup{pdfauthor=\authornames}
\hypersetup{pdfkeywords=\keywordnames}

%----------------------------------------------------------------------------------------
%	TITLE PAGE
%----------------------------------------------------------------------------------------

\begin{titlepage}
\newcommand{\brk}{\vspace*{0.18in}}

% No page number on the title page
\thispagestyle{empty}

% Center the whole title page
\begin{center}

\brk

% Large font and bold face for the headline. Try to keep it at one or
% two lines. Headlines over two lines will mess up the spacing, and you have to
% manually finetune it. Note that the line break in the SOURCE CODE
% does not affect the line breaking in the output file. If you want
% hardcoded line breaks, you have to mark them with a double backslash (\\)

   {\LARGE  
	\textbf{
	Body-SLAM: Simultaneous Localization and Mapping inside the Human Body 
	}
   }


\brk
by


% insert your name here. 
Guanqun Bao


% All this is constant:

A Dissertation


Submitted to the Faculty


of the 


WORCESTER POLYTECHNIC INSTITUTE
	
\brk
In partial fulfillment of the requirements for the

\brk
Degree of Doctor of Philosophy


in


Electrical and Computer Engineering


by

% This is how LaTeX draws lines :) It's where your signature goes.

\rule{3in}{1.2pt}

% Adjust this to your preferred month and year
\brk
April 2014

\end{center}

	
\vfill
APPROVED:

\vspace{0.3in}
\rule{2.8in}{0.8pt} \qquad
\rule{2.8in}{0.8pt}
% Change this to your favorite CS professor.
\\\footnotesize{Professor Kaveh Pahlavan, Major Thesis Advisor} \quad\qquad \footnotesize{Professor Yehia Massoud, Head of Department}	

\vspace{0.3in}
\rule{2.8in}{0.8pt} \qquad
\rule{2.8in}{0.8pt}
\\\footnotesize{Professor Lifeng Lai, ECE Dept., WPI} \qquad\qquad\qquad\qquad \footnotesize{Professor Emmanuel Agu, CS Dept., WPI}	
% This is also constant :)

\vspace{0.3in}
\rule{2.8in}{0.8pt} \qquad
\rule{2.8in}{0.8pt}
\\\footnotesize{Dr. Allen Levesque, ECE Dept., WPI } \qquad\qquad\qquad\qquad \footnotesize{Dr. Sayrafian Kamran, NIST}	
% This is also constant :)


% end of titlepage
\end{titlepage}

%----------------------------------------------------------------------------------------
%	DECLARATION PAGE
%	Your institution may give you a different text to place here
%----------------------------------------------------------------------------------------

%\Declaration{
%
%\addtocontents{toc}{\vspace{1em}} % Add a gap in the Contents, for aesthetics
%
%I, \authornames, declare that this thesis titled, '\ttitle' and the work presented in it are my own. I confirm that:
%
%\begin{itemize} 
%\item[\tiny{$\blacksquare$}] This work was done wholly or mainly while in candidature for a research degree at this University.
%\item[\tiny{$\blacksquare$}] Where any part of this thesis has previously been submitted for a degree or any other qualification at this University or any other institution, this has been clearly stated.
%\item[\tiny{$\blacksquare$}] Where I have consulted the published work of others, this is always clearly attributed.
%\item[\tiny{$\blacksquare$}] Where I have quoted from the work of others, the source is always given. With the exception of such quotations, this thesis is entirely my own work.
%\item[\tiny{$\blacksquare$}] I have acknowledged all main sources of help.
%\item[\tiny{$\blacksquare$}] Where the thesis is based on work done by myself jointly with others, I have made clear exactly what was done by others and what I have contributed myself.\\
%\end{itemize}
% 
%Signed:\\
%\rule[1em]{25em}{0.5pt} % This prints a line for the signature
% 
%Date:\\
%\rule[1em]{25em}{0.5pt} % This prints a line to write the date
%}
%
%\clearpage % Start a new page

%----------------------------------------------------------------------------------------
%	QUOTATION PAGE
%----------------------------------------------------------------------------------------

\pagestyle{empty} % No headers or footers for the following pages

\null\vfill % Add some space to move the quote down the page a bit

\textit{``To my family"}

\begin{flushright}
Guanqun Bao
\end{flushright}

\vfill\vfill\vfill\vfill\vfill\vfill\null % Add some space at the bottom to position the quote just right

\clearpage % Start a new page

%----------------------------------------------------------------------------------------
%	ABSTRACT PAGE
%----------------------------------------------------------------------------------------

\addtotoc{Abstract} % Add the "Abstract" page entry to the Contents

\abstract{\addtocontents{toc}{\vspace{0.5em}} % Add a gap in the Contents, for aesthetics

Wireless capsule endoscopy (WCE) offers a patient-friendly, non-invasive and painless investigation of the entire small intestine, where other conventional wired endoscopic instrument can barely reach. As a critical component of the capsule endoscopic examination, physicians need to know the precise position of the endoscopic capsule in order to identify the position of intestinal disease after it is detected by the video source. To define the position of the endoscopic capsule, we need to have a map of inside the human body. However, since the shape of the small intestine is extremely complex and the length of small intestine is up to 7 meters, accurate mapping and localization inside small intestine is very challenging. In this dissertation, we present an in-body simultaneous localization and mapping technique (Body-SLAM) to enhance the positioning accuracy of WCE inside the small intestine and reconstruct the trajectory the capsule has traveled. The proposed approach takes advantage of data fusion from two sources that come with the WCE: image sequences captured by the WCE's embedded camera and the RF signal emitted by the capsule. This approach estimates the speed and orientation of the endoscopic capsule by analyzing displacements of feature points between consecutive images. Then, it integrates this motion information with the RF measurements by employing a Kalman filter to smooth the localization results and generate the route that the WCE has traveled. The performance of the proposed motion tracking algorithm is validated using empirical data from the patients and this motion model is later imported into a virtual testbed to test the performance of the alternative Body-SLAM algorithms. Experimental results show that the proposed Body-SLAM technique is able to provide accurate tracking of the WCE with average error of less than 2.3cm. 
}


\clearpage % Start a new page

%----------------------------------------------------------------------------------------
%	ACKNOWLEDGEMENTS
%----------------------------------------------------------------------------------------

\setstretch{1.5} % Reset the line-spacing to 1.3 for body text (if it has changed)

\acknowledgements{\addtocontents{toc}{\vspace{1em}} % Add a gap in the Contents, for aesthetics

First and foremost, I would like to express my deepest appreciation to my advisor Professor Kaveh Pahlavan, not only for his guidance and support in academics and research, but also for enlightening me by sharing his insights and life experience. I cannot remember how many times professor Pahlavan has provided creative discussions and advices when I was stuck with my research and inspired me with his short didactic stories which contain the true philosophy of life. My work and accomplishments were only possible because of his help and encouragement.

I also would like to thank the members of my PhD committee, Prof. Allen H. Levesque for always being kind and supportive to my research and bringing me into this prestigious research lab, Professor Massoud for sharing his life experience and insights when I was hesitating between choices, Professor Agu for his excellent lectures on Computer Graphic, which lay down the fundamentals of my thesis, Professor Lai for his valuable suggestions and comments towards my thesis, and Professor Kamran Sarafian for being my external committee member off campus. I also would like to extend my thanks to Dr. David R. Cave from Umass Medical Center for introducing us to the field of localization of wireless capsule endoscopy and educating us with the knowledge of his expertise. 

I also would like to show my applications to the former and current members of CWINS lab: Dr. Yunxing Ye, Dr. Jie He, Ruijun Fu, Shen Li, Jin Chen, Xin Zheng, Zhuoran Liu, Yishuang Geng, Bader Alkandari, Fardad Askarzadeh, for their direct or indirect help in preparing this thesis. Special thanks to Liang Mi for working with me on the emulation testbed and being so hardworking and productive during the past two years.

Finally, and most importantly, I would like to thank my wife Zhijiao Wang for her continued support, encouragement, patience and unwavering love during the past six years. I thank my parents, Yuling Zhao and Lichun Bao, for their faith in me. Without their support I would't have a chance to achieve today's accomplishments. 
  
}
\clearpage % Start a new page

%----------------------------------------------------------------------------------------
%	LIST OF CONTENTS/FIGURES/TABLES PAGES
%----------------------------------------------------------------------------------------

\pagestyle{fancy} % The page style headers have been "empty" all this time, now use the "fancy" headers as defined before to bring them back

\lhead{\emph{Contents}} % Set the left side page header to "Contents"
\tableofcontents % Write out the Table of Contents

\lhead{\emph{List of Figures}} % Set the left side page header to "List of Figures"
\listoffigures % Write out the List of Figures

\lhead{\emph{List of Tables}} % Set the left side page header to "List of Tables"
\listoftables % Write out the List of Tables

%----------------------------------------------------------------------------------------
%	ABBREVIATIONS
%----------------------------------------------------------------------------------------

\clearpage % Start a new page

\setstretch{1.5} % Set the line spacing to 1.5, this makes the following tables easier to read

\lhead{\emph{Abbreviations}} % Set the left side page header to "Abbreviations"
\listofsymbols{ll} % Include a list of Abbreviations (a table of two columns)
{
\textbf{ASIFT} & \textbf{A}ffine  \textbf{S}cale \textbf{I}nvariant \textbf{F}eature \textbf{T}ransform \\
\textbf{BAN} & \textbf{B}ody  \textbf{A}rea \textbf{N}etwork  \\
\textbf{CDF} & \textbf{C}umulative   \textbf{D}istribution  \textbf{F}unction  \\
\textbf{CT} & \textbf{C}omputer \textbf{T}omography \\
\textbf{CRLB} & \textbf{C}ramer  \textbf{R}ao \textbf{L}ower \textbf{B}ound \\
\textbf{GI} & \textbf{G}astro \textbf{I}ntestinal \\
\textbf{GPS} & \textbf{G}lobal \textbf{P}ositioning \textbf{S}ystem \\
\textbf{HOG} & \textbf{H}istogram of \textbf{O}riented \textbf{G}radients \\
\textbf{IPS} & \textbf{I}ndoor \textbf{P}ositioning \textbf{S}ystem \\
\textbf{LBP} & \textbf{L}ocal  \textbf{B}inary \textbf{P}attern \\
\textbf{LS} & \textbf{L}east \textbf{S}quare \\
\textbf{MLE} & \textbf{M}aximum  \textbf{L}likelihood \textbf{E}stimation \\
\textbf{NIST} & \textbf{N}ational  \textbf{I}nstitute of \textbf{S}cience and \textbf{T}echnology\\
\textbf{PDF} & \textbf{P}robability  \textbf{D}ensity \textbf{F}unction \\
\textbf{RSS} & \textbf{R}eceived  \textbf{S}ignal \textbf{S}trength \\
\textbf{ToA} & \textbf{T}ime  \textbf{o}f \textbf{A}rrival \\
\textbf{KF} & \textbf{K}alman  \textbf{F}ilter \\
\textbf{WCE} & \textbf{W}ireless  \textbf{C}apsule \textbf{E}ndoscopy \\
\textbf{SNR} & \textbf{S}ignal to \textbf{N}oise \textbf{R}atio \\
\textbf{SLAM} & \textbf{S}imultaneous   \textbf{L}ocalization \textbf{A}nd \textbf{M}apping \\
\textbf{SRM} & \textbf{S}tatistical \textbf{R}egion \textbf{M}erging \\
\textbf{FP} & \textbf{F}eature  \textbf{P}oints \\
\textbf{SIFT} & \textbf{S}cale \textbf{I}nvariant \textbf{F}eature \textbf{T}ransform \\
\textbf{FCC} & \textbf{F}ederal \textbf{C}ommunications \textbf{C}ommission  \\
\textbf{ISM} & \textbf{I}ndustrial \textbf{S}cientific and \textbf{M}edical  \\
\textbf{FDA} & \textbf{F}ood and \textbf{D}rug and \textbf{A}dministration  \\
\textbf{MRI} & \textbf{M}agnetic \textbf{R}esonance and \textbf{I}maging  \\

%\textbf{Acronym} & \textbf{W}hat (it) \textbf{S}tands \textbf{F}or \\
}

%----------------------------------------------------------------------------------------
%	PHYSICAL CONSTANTS/OTHER DEFINITIONS
%----------------------------------------------------------------------------------------

%\clearpage % Start a new page
%
%\lhead{\emph{Physical Constants}} % Set the left side page header to "Physical Constants"
%
%\listofconstants{lrcl} % Include a list of Physical Constants (a four column table)
%{
%Speed of Light & $c$ & $=$ & $2.997\ 924\ 58\times10^{8}\ \mbox{ms}^{-\mbox{s}}$ (exact)\\
%% Constant Name & Symbol & = & Constant Value (with units) \\
%}

%----------------------------------------------------------------------------------------
%	SYMBOLS
%----------------------------------------------------------------------------------------

\clearpage % Start a new page

\lhead{\emph{Symbols}} % Set the left side page header to "Symbols"

\listofnomenclature{lll} % Include a list of Symbols (a three column table)
{
$\boldsymbol{I_n}$         & $n\times n$ identity matrix &  \\
$(.)^T$                    & matrix transpose &  \\
$(.)^H$                    & $n\times n$ matrix conjugate transpose &  \\
$|\boldsymbol{S}|_i$       & $ith$ column of matrix $\boldsymbol{S}$ &  \\
$|\boldsymbol{S}|_{i,j}$   & $i,j th$ column of matrix $\boldsymbol{S}$ &  \\
$|\boldsymbol{S}|_{i,j}$   & signum function &  \\
$sign(.)$                  & $i,j th$ column of matrix $\boldsymbol{S}$ &  \\
$diag(\boldsymbol{A})$     & vector resulting from extraction of diagonal elements of $\boldsymbol{A}$  &  \\
$tr(.)$                    & matrix trace  &  \\
$\bigtriangledown(f) $     & gradient with respect to $f$  &  \\
$E(.)$                     & expectation   & \\
$\delta(.)$                & discrete Kronecker delta function   &   \\
$Bel^-(.)$                 & prior belief  &   \\
$Bel^+(.)$                 & posterior belief  &   \\
}

%----------------------------------------------------------------------------------------
%	DEDICATION
%----------------------------------------------------------------------------------------

%\setstretch{1.3} % Return the line spacing back to 1.3
%
%\pagestyle{empty} % Page style needs to be empty for this page
%
%\dedicatory{For/Dedicated to/To my\ldots} % Dedication text
%
%\addtocontents{toc}{\vspace{2em}} % Add a gap in the Contents, for aesthetics
%----------------------------------------------------------------------------------------
%	THESIS CONTENT - CHAPTERS
%----------------------------------------------------------------------------------------



\mainmatter % Begin numeric (1,2,3...) page numbering

\pagestyle{fancy} % Return the page headers back to the "fancy" style

% Include the chapters of the thesis as separate files from the Chapters folder
% Uncomment the lines as you write the chapters

\setstretch{2} % Line spacing of 2.0

\input{Chapters/Chapter1}
\input{Chapters/Chapter2} 
\input{Chapters/Chapter3}
\input{Chapters/Chapter4} 
\input{Chapters/Chapter5} 

%----------------------------------------------------------------------------------------
%	THESIS CONTENT - APPENDICES
%----------------------------------------------------------------------------------------

\addtocontents{toc}{\vspace{2em}} % Add a gap in the Contents, for aesthetics

\appendix % Cue to tell LaTeX that the following 'chapters' are Appendices

% Include the appendices of the thesis as separate files from the Appendices folder
% Uncomment the lines as you write the Appendices

\input{Appendices/AppendixA}
\input{Appendices/AppendixB}
\input{Appendices/AppendixC}

\addtocontents{toc}{\vspace{2em}} % Add a gap in the Contents, for aesthetics

\backmatter

%----------------------------------------------------------------------------------------
%	BIBLIOGRAPHY
%----------------------------------------------------------------------------------------

\label{Bibliography}

\lhead{\emph{Bibliography}} % Change the page header to say "Bibliography"

\bibliographystyle{unsrtnat} % Use the "unsrtnat" BibTeX style for formatting the Bibliography

\bibliography{Bibliography} % The references (bibliography) information are stored in the file named "Bibliography.bib"

\end{document}  