%Names: IBEIS-PZ-1348 viewpoint issue different and viewing conditions
%IBEIS-PZ-1421 Pose issues where the zebras are fighting
%\newcommand{\captionlabel}[2]{\caption{#1 - #2}\label{#2}}

\begin{comment}
    python -m ibeis.scripts.gen_cand_expts --exec-parse_latex_comments_for_commmands --fname figdef1.tex

    sudo apt-get install pngquant
    pngquant --quality=0-70 figures1/*.png
    pngquant --quality=0-70 figures2/*.png
    pngquant --quality=0-70 figures3/*.png
    pngquant --quality=0-70 figures4/*.png
    pngquant --quality=0-70 figures5/*.png
    pngquant --quality=0-70 *.png
    pngquant --quality=0-70 *.png
\end{comment}


\begin{comment}
python -m ibeis.viz.viz_name show_multiple_chips --db NNP_Master3 --aids=6416,7458,13339,10170 \
    --no-inimage --notitle --adjust=.05 --rc=1,4 --saveparts \
    --dpath ~/latex/crall-thesis-2017/ --save "figures1/PlainsFigure.jpg" --figsize=9,4 --dpi=300 --diskshow 
\end{comment}
\newcommand{\PlainsFigure}{
\begin{figure}[h]
\centering
\begin{subfigure}[h]{0.44\textwidth}\centering\includegraphics[height=110pt]{figures1/PlainsFigureA.jpg}\caption{}\label{sub:PlainsFigureA}\end{subfigure}%
\begin{subfigure}[h]{0.48\textwidth}\centering\includegraphics[height=110pt]{figures1/PlainsFigureB.jpg}\caption{}\label{sub:PlainsFigureB}\end{subfigure}
\begin{subfigure}[h]{0.44\textwidth}\centering\includegraphics[height=110pt]{figures1/PlainsFigureD.jpg}\caption{}\label{sub:PlainsFigureD}\end{subfigure}%
\begin{subfigure}[h]{0.48\textwidth}\centering\includegraphics[height=110pt]{figures1/PlainsFigureC.jpg}\caption{}\label{sub:PlainsFigureC}\end{subfigure}%
\captext[\caplbl{PlainsFigure}Distinguishing features for plains zebras]{
% ---
For a plains zebra, the most distinguishing features tend to be located on the upper shoulder.
Other distinguishing features are typically be found on the face and side.
Image pairs~\cref{sub:PlainsFigureA,sub:PlainsFigureB} and~\cref{sub:PlainsFigureC,sub:PlainsFigureD} depict the
same individual. These photos were taken during the GZC~\cite{rubenstein_great_2015}.
% ---
}
\label{fig:PlainsFigure}
\end{figure}
}


\begin{comment}
python -m ibeis.viz.viz_name show_multiple_chips --aids=163,253,286,449 --db=NNP_MasterGIRM_core \
    --no-inimage --adjust=.05 --no-figtitle --notitle --rc=1,4  --dpi=300 --figsize=9,4 \
    --dpath ~/latex/crall-thesis-2017/ --save "figures1/GirMasaiFigure.jpg"  \
    --saveparts --diskshow
%./main.py --db NNP_MasterGIRM_core --query 164 --daids-mode=all -y
\end{comment}
\newcommand{\GirMasaiFigure}{
\begin{figure}[h]
\centering
\begin{subfigure}[h]{0.48\textwidth}\centering\includegraphics[height=250pt]{figures1/GirMasaiFigureA.jpg}\caption{}\label{sub:GirMasaiFigureA}\end{subfigure}%
\begin{subfigure}[h]{0.48\textwidth}\centering\includegraphics[height=250pt]{figures1/GirMasaiFigureB.jpg}\caption{}\label{sub:GirMasaiFigureB}\end{subfigure}
\begin{subfigure}[h]{0.48\textwidth}\centering\includegraphics[height=180pt]{figures1/GirMasaiFigureC.jpg}\caption{}\label{sub:GirMasaiFigureC}\end{subfigure}%
\begin{subfigure}[h]{0.48\textwidth}\centering\includegraphics[height=180pt]{figures1/GirMasaiFigureD.jpg}\caption{}\label{sub:GirMasaiFigureD}\end{subfigure}
\captext[\caplbl{GirMasaiFigure}Distinguishing features for Masai giraffes]{
% ---
Masai giraffes have an abundance of features distinctive to each individual.
There are two individuals seen in images pairs~\cref{sub:GirMasaiFigureA,sub:GirMasaiFigureB}
  and~\cref{sub:GirMasaiFigureC,sub:GirMasaiFigureD}.
Note that the numerous features make it initially difficult for a human to match giraffes.
In contrast, this is easier for algorithms. These photos were taken during the GZC~\cite{rubenstein_great_2015}.
% ---
}
\label{fig:GirMasaiFigure}
\end{figure}
}


\begin{comment}
python -m ibeis.viz.viz_name show_multiple_chips --aids=923,1013,823,960 --db=GZ_ALL  \
    --no-figtitle --notitle --no-inimage --rc=2,2 \
    --dpath ~/latex/cand/ --save "figures1/GrevysFigure.jpg"  --saveparts \
    --figsize=9,4  --dpi=300 --diskshow
%ib 
./main.py --db GZ_ALL --query 923 --daids-mode=all -y
\end{comment}
\newcommand{\GrevysFigure}{
\begin{figure}[h]
\centering
\begin{subfigure}[h]{0.48\textwidth}\centering\includegraphics[height=90pt]{figures1/GrevysFigureA.jpg}\caption{}\label{sub:GrevysFigureA}\end{subfigure}%
\begin{subfigure}[h]{0.48\textwidth}\centering\includegraphics[height=90pt]{figures1/GrevysFigureB.jpg}\caption{}\label{sub:GrevysFigureB}\end{subfigure}
\begin{subfigure}[h]{0.48\textwidth}\centering\includegraphics[height=90pt]{figures1/GrevysFigureC.jpg}\caption{}\label{sub:GrevysFigureC}\end{subfigure}%
\begin{subfigure}[h]{0.48\textwidth}\centering\includegraphics[height=90pt]{figures1/GrevysFigureD.jpg}\caption{}\label{sub:GrevysFigureD}\end{subfigure}
\captext[\caplbl{GrevysFigure}Distinguishing features for Grévy's zebras]{
% ---
A Grévy's zebra's most distinctive features are above the front and rear legs.
Useful, but less distinctive information can be seen on the side of the body.
Image pairs~\cref{sub:GrevysFigureA,sub:GrevysFigureB} and~\cref{sub:GrevysFigureC,sub:GrevysFigureD} depict the
  same individual.
% ---
}
\label{fig:GrevysFigure}
\end{figure}
}


\begin{comment}
python -m ibeis.viz.viz_name show_multiple_chips --aids=7,2,8 --db=humpbacks_fb --dpath ~/latex/crall-thesis-2017/ --save "figures1/HumpbackFig.jpg" --figsize=9,4  --dpi=300 --no-inimage --adjust=.05,.05,.15 --no-figtitle --notitle --diskshow --saveparts 
\end{comment}
\newcommand{\HumpbackFig}{
\begin{figure}[h]
\centering
\begin{subfigure}[h]{0.33\textwidth}\centering\includegraphics[height=88pt]{figures1/HumpbackFigA.jpg}\caption{}\label{sub:HumpbackFigA}\end{subfigure}%
\begin{subfigure}[h]{0.33\textwidth}\centering\includegraphics[height=88pt]{figures1/HumpbackFigB.jpg}\caption{}\label{sub:HumpbackFigB}\end{subfigure}%
\begin{subfigure}[h]{0.33\textwidth}\centering\includegraphics[height=88pt]{figures1/HumpbackFigC.jpg}\caption{}\label{sub:HumpbackFigC}\end{subfigure}
\captext[\caplbl{HumpbackFig}Distinguishing features for humpback whales]{
% ---
A humpback whale can be identified by the texture patterns on the fluke or using the shape of the notches along
  the edge of the fluke.
Note that some humpbacks (like the on seen in \ref{sub:HumpbackFigB}) do not have any texture patterns on their
  fluke.
The pair of images \cref{sub:HumpbackFigA,sub:HumpbackFigC} depict the same individual.
These images were collected from FlukeBook\cite{levenson_flukebook_2015}.
% ---
}
\label{fig:HumpbackFig}
\end{figure}
}


\begin{comment}
python -m ibeis.viz.viz_name show_multiple_chips --db NNP_Master3 --aids=13285,12598,6563,9332 --no-inimage --notitle --rc=1,4 --dpath ~/latex/crall-thesis-2017/ --save "figures1/HardCaseFigure.jpg" --figsize=9,4  --dpi=300 --diskshow --saveparts
\end{comment}
\newcommand{\HardCaseFigure}{
\begin{figure}[h]
\centering
\begin{subfigure}[h]{0.45\textwidth}\centering\includegraphics[height=110pt]{figures1/HardCaseFigureB.jpg}\caption{}\label{sub:HardCaseFigureB}\end{subfigure}%
\begin{subfigure}[h]{0.55\textwidth}\centering\includegraphics[height=110pt]{figures1/HardCaseFigureA.jpg}\caption{}\label{sub:HardCaseFigureA}\end{subfigure}
\begin{subfigure}[h]{0.45\textwidth}\centering\includegraphics[height=110pt]{figures1/HardCaseFigureC.jpg}\caption{}\label{sub:HardCaseFigureC}\end{subfigure}%
\begin{subfigure}[h]{0.55\textwidth}\centering\includegraphics[height=110pt]{figures1/HardCaseFigureD.jpg}\caption{}\label{sub:HardCaseFigureD}\end{subfigure}
\captext[\caplbl{HardCaseFigure}Visually similar plains zebras]{
% ---
Different plains zebras sometimes have visual similarities that can be difficult to distinguish.
There are three individuals in these four images.
The images in~\cref{sub:HardCaseFigureB,sub:HardCaseFigureD} depict the same individual.
Dissimilarities can be seen on the lower thigh of images~\cref{sub:HardCaseFigureC,sub:HardCaseFigureD}, as well
  as on the front shoulder of images~\cref{sub:HardCaseFigureA,sub:HardCaseFigureB}.
% ---
}
\label{fig:HardCaseFigure}
\end{figure}
}




\begin{comment}
python -m ibeis.viz.viz_name --test-show_multiple_chips --db NNP_Master3 --aids=6524,6540,6571,6751 --no-inimage --notitle --dpath ~/latex/crall-thesis-2017/ --save "figures1/BacksFigure.jpg" --figsize=9,4  --dpi=300 --rc=1,4 --diskshow --saveparts
\end{comment}
\newcommand{\BacksFigure}{
\begin{figure}[h]
\centering
\begin{subfigure}[h]{0.24\textwidth}\centering\includegraphics[height=165pt]{figures1/BacksFigureA.jpg}\caption{}\label{sub:BacksFigureA}\end{subfigure}%
\begin{subfigure}[h]{0.24\textwidth}\centering\includegraphics[height=165pt]{figures1/BacksFigureB.jpg}\caption{}\label{sub:BacksFigureB}\end{subfigure}
\begin{subfigure}[h]{0.24\textwidth}\centering\includegraphics[height=165pt]{figures1/BacksFigureC.jpg}\caption{}\label{sub:BacksFigureC}\end{subfigure}%
\begin{subfigure}[h]{0.24\textwidth}\centering\includegraphics[height=165pt]{figures1/BacksFigureD.jpg}\caption{}\label{sub:BacksFigureD}\end{subfigure}
\captext[\caplbl{BacksFigure}Back viewpoints of plains zebras]{
% ---
The backs of plains zebras have very little distinguishing information.
All the above images are different individuals.
These photos were taken during the GZC~\cite{rubenstein_great_2015}.
% ---
}
\label{fig:BacksFigure}
\end{figure}
}



\begin{comment}
python -m ibeis.viz.viz_name --test-show_multiple_chips --db PZ_Master0 --aids=5878,5885,5886,5888,5890,5904 --no-inimage --notitle --dpath ~/latex/crall-thesis-2017/ --save "figures1/ThreeSixtyFigure.jpg" --figsize=9,4  --dpi=300 --diskshow --saveparts

./dev.py --db PZ_Master0 --eval="','.join(list(map(str, ibs.search_annot_notes('360'))))"
\end{comment}
\newcommand{\ThreeSixtyFigure}{
\begin{figure}[h]
\centering
%\begin{subfigure}[h]{0.26\textwidth}\centering\includegraphics[height=110pt]{figures1/ThreeSixtyFigureF.jpg}\caption{}\label{sub:ThreeSixtyFigureF}\end{subfigure}%
\begin{subfigure}[h]{0.48\textwidth}\centering\includegraphics[height=155pt]{figures1/ThreeSixtyFigureA.jpg}\caption{}\label{sub:ThreeSixtyFigureA}\end{subfigure}
\begin{subfigure}[h]{0.28\textwidth}\centering\includegraphics[height=155pt]{figures1/ThreeSixtyFigureB.jpg}\caption{}\label{sub:ThreeSixtyFigureB}\end{subfigure}
\begin{subfigure}[h]{0.18\textwidth}\centering\includegraphics[height=155pt]{figures1/ThreeSixtyFigureC.jpg}\caption{}\label{sub:ThreeSixtyFigureC}\end{subfigure}
\begin{subfigure}[h]{0.48\textwidth}\centering\includegraphics[height=155pt]{figures1/ThreeSixtyFigureD.jpg}\caption{}\label{sub:ThreeSixtyFigureD}\end{subfigure}
\begin{subfigure}[h]{0.48\textwidth}\centering\includegraphics[height=155pt]{figures1/ThreeSixtyFigureE.jpg}\caption{}\label{sub:ThreeSixtyFigureE}\end{subfigure}
\captext[\caplbl{ThreeSixtyFigure}Examples of viewpoint variations]{
% ---
This shows the viewpoint variations of an individual Grévy's zebra.
It would not be possible to match image~\cref{sub:ThreeSixtyFigureA,sub:ThreeSixtyFigureE} without information
  from images showing intermediate views.
These photos were taken directly by our team.
% ---
}
\label{fig:ThreeSixtyFigure}
\end{figure}
}


\begin{comment}
python -m ibeis.viz.viz_name --test-show_multiple_chips --aids=11081,13057,15897,15249,8081,13758 --db NNP_Master3 --dpath ~/latex/crall-thesis-2017 --save figures1/PoseFigure.jpg  --figsize=9,4  --dpi=300 --no-figtitle --notitle --diskshow --no-draw_lbls --zoom=.5 --saveparts

--adjust=.05,.05,.05,.15 
\end{comment}
\newcommand{\PoseFigure}{
\begin{figure}[h]
\centering
\begin{subfigure}[h]{0.32\textwidth}\centering\includegraphics[height=100pt]{figures1/PoseFigureA.jpg}\caption{}\label{sub:PoseFigureA}\end{subfigure}
\begin{subfigure}[h]{0.32\textwidth}\centering\includegraphics[height=100pt]{figures1/PoseFigureE.jpg}\caption{}\label{sub:PoseFigureE}\end{subfigure}
\begin{subfigure}[h]{0.31\textwidth}\centering\includegraphics[height=100pt]{figures1/PoseFigureD.jpg}\caption{}\label{sub:PoseFigureD}\end{subfigure}
\begin{subfigure}[h]{0.32\textwidth}\centering\includegraphics[height=100pt]{figures1/PoseFigureB.jpg}\caption{}\label{sub:PoseFigureB}\end{subfigure}
\begin{subfigure}[h]{0.32\textwidth}\centering\includegraphics[height=100pt]{figures1/PoseFigureC.jpg}\caption{}\label{sub:PoseFigureC}\end{subfigure}
\begin{subfigure}[h]{0.31\textwidth}\centering\includegraphics[height=100pt]{figures1/PoseFigureF.jpg}\caption{}\label{sub:PoseFigureF}\end{subfigure}
\captext[\caplbl{PoseFigure}Examples of challenging pose variations]{
% ---
Animals can appear in a wide variety of poses.
To clearly see the different poses, the images are shown with surrounding context.
During identification the image is cropped to the bounding box shown around each animal.
These photos were taken during the GZC~\cite{rubenstein_great_2015}.
% ---
}
\label{fig:PoseFigure}
\end{figure}
}



\begin{comment}
python -m ibeis.viz.viz_name --test-show_multiple_chips --dpath ~/latex/crall-thesis-2017 --save 'figures1/OccludeFigure.jpg' --no-figtitle --notitle --db NNP_Master3 --figsize=9,4 --dpi=300 --no-inimage --aids=13870,13740,7735,13233,13603,13906,7354,9776 --rc=2,4 --diskshow --saveparts
\end{comment}
\newcommand{\OccludeFigure}{
\begin{figure}[h]
\centering
\begin{subfigure}[h]{0.44\textwidth}\centering\includegraphics[height=95pt]{figures1/OccludeFigureC.jpg}\caption{}\label{sub:OccludeFigureC}\end{subfigure}
\begin{subfigure}[h]{0.26\textwidth}\centering\includegraphics[height=95pt]{figures1/OccludeFigureB.jpg}\caption{}\label{sub:OccludeFigureB}\end{subfigure}
\begin{subfigure}[h]{0.26\textwidth}\centering\includegraphics[height=95pt]{figures1/OccludeFigureH.jpg}\caption{}\label{sub:OccludeFigureH}\end{subfigure}
\begin{subfigure}[h]{0.38\textwidth}\centering\includegraphics[height=95pt]{figures1/OccludeFigureD.jpg}\caption{}\label{sub:OccludeFigureD}\end{subfigure}
\begin{subfigure}[h]{0.30\textwidth}\centering\includegraphics[height=95pt]{figures1/OccludeFigureE.jpg}\caption{}\label{sub:OccludeFigureE}\end{subfigure}
\begin{subfigure}[h]{0.30\textwidth}\centering\includegraphics[height=95pt]{figures1/OccludeFigureF.jpg}\caption{}\label{sub:OccludeFigureF}\end{subfigure}

%\begin{subfigure}[h]{0.3\textwidth}\centering\includegraphics[height=80pt]{figures1/OccludeFigureA.jpg}\caption{}\label{sub:OccludeFigureA}\end{subfigure}%
%\begin{subfigure}[h]{0.24\textwidth}\centering\includegraphics[height=60pt]{figures1/OccludeFigureG.jpg}\caption{}\label{sub:OccludeFigureG}\end{subfigure}%
\captext[\caplbl{OccludeFigure}Examples of occlusion and distractors]{
% ---
Occlusions can obfuscate or remove distinctive feature entirely.
Secondary animals can introduce new distinctive features that do not belong to the primary animal.
Images like this can cause other images of the secondary animal to the primary animal.
These photos were taken during the GZC~\cite{rubenstein_great_2015}.
% ---
}
\label{fig:OccludeFigure}
\end{figure}
}


\begin{comment}
python -m ibeis.viz.viz_name --test-show_multiple_chips --dpath ~/latex/crall-thesis-2017 --save figures1/IlluminationFigure.jpg --no-figtitle --notitle --db NNP_Master3 --figsize=9,3 --no-inimage --aids=6466,10161,10634,9458,12472,14728  --diskshow  --saveparts --dpi=300
\end{comment}
\newcommand{\IlluminationFigure}{
\begin{figure}[ht!]
\centering
%\begin{subfigure}[h]{0.2\textwidth}\centering\includegraphics[height=65pt]{figures1/IlluminationFigureA.jpg}\caption{}\label{sub:IlluminationFigureA}\end{subfigure}%
%\begin{subfigure}[h]{0.2\textwidth}\centering\includegraphics[height=65pt]{figures1/IlluminationFigureB.jpg}\caption{}\label{sub:IlluminationFigureB}\end{subfigure}%
\begin{subfigure}[h]{0.36\textwidth}\centering\includegraphics[height=110pt]{figures1/IlluminationFigureC.jpg}\caption{}\label{sub:IlluminationFigureC}\end{subfigure}
\begin{subfigure}[h]{0.60\textwidth}\centering\includegraphics[height=110pt]{figures1/IlluminationFigureF.jpg}\caption{}\label{sub:IlluminationFigureF}\end{subfigure}
\begin{subfigure}[h]{0.50\textwidth}\centering\includegraphics[height=110pt]{figures1/IlluminationFigureD.jpg}\caption{}\label{sub:IlluminationFigureD}\end{subfigure}
\begin{subfigure}[h]{0.46\textwidth}\centering\includegraphics[height=110pt]{figures1/IlluminationFigureE.jpg}\caption{}\label{sub:IlluminationFigureE}\end{subfigure}
\captext[\caplbl{IlluminationFigure}Examples of different lighting conditions]{
% ---
Shadow and illumination can cause variations in the underlying image intensity and gradients.
This can make it more difficult to localize repeatable keypoints and describe the underlying texture patterns.
These photos were taken during the GZC~\cite{rubenstein_great_2015}.
% ---
}
\label{fig:IlluminationFigure}
\end{figure}
}



\begin{comment}
python -m ibeis.viz.viz_name --test-show_multiple_chips \
    --db NNP_Master3 --aids=6416,8227,6262,10705,15417 \
    --no-figtitle --notitle  --figsize=9,4 --dpi=300 \
    --adjust=.05  --rc=2,5  --no-draw_lbls --doboth --trydrawline --qualtitle  --grouprows \
    --dpath ~/latex/crall-thesis-2017 --save 'figures1/QualityFigure.jpg'  --diskshow  --saveparts 
\end{comment}
\newcommand{\QualityFigure}{
\begin{figure}[ht!]
\centering
\begin{subfigure}[h]{0.19\textwidth}\centering\includegraphics[height=150pt]{figures1/QualityFigureA.jpg}\caption{}\label{sub:QualityFigureA}\end{subfigure}
\begin{subfigure}[h]{0.19\textwidth}\centering\includegraphics[height=150pt]{figures1/QualityFigureB.jpg}\caption{}\label{sub:QualityFigureB}\end{subfigure}
\begin{subfigure}[h]{0.19\textwidth}\centering\includegraphics[height=150pt]{figures1/QualityFigureC.jpg}\caption{}\label{sub:QualityFigureC}\end{subfigure}
\begin{subfigure}[h]{0.19\textwidth}\centering\includegraphics[height=150pt]{figures1/QualityFigureD.jpg}\caption{}\label{sub:QualityFigureD}\end{subfigure}
\begin{subfigure}[h]{0.19\textwidth}\centering\includegraphics[height=150pt]{figures1/QualityFigureE.jpg}\caption{}\label{sub:QualityFigureE}\end{subfigure}
\captext[\caplbl{QualityFigure}Examples of different image qualities]{
% ---
The bottom row shows the cropped images that correspond to the bounding boxes in the top row.
Each column shows different qualities:
\Cref{sub:QualityFigureA} an excellent quality image taken from a short distance, \Cref{sub:QualityFigureB} a
  good quality image with minor shadow and taken from a medium distance, \Cref{sub:QualityFigureC} an ok quality
  image due to minor occlusion, \Cref{sub:QualityFigureD} a poor quality image due to major occlusion,
  \Cref{sub:QualityFigureE} a junk quality image due to considerable blur.
These photos were taken during the GZC~\cite{rubenstein_great_2015}.
% ---
}
\label{fig:QualityFigure}
\end{figure}
}


\begin{comment}
python -m ibeis.viz.viz_name --test-show_name --name=08_106 --db PZ_MTEST --save "figures1/Age.jpg" --dpath ~/latex/crall-thesis-2017/ --figsize=9,4  --dpi=300 --no-figtitle --notitle --diskshow --no-draw_lbls --no-inimage --saveparts
\end{comment}
\newcommand{\AgeFigure}{
\begin{figure}[h]
\centering
\begin{subfigure}[h]{0.48\textwidth}\centering\includegraphics[height=100pt]{figures1/AgeA.jpg}\caption{}\label{sub:AgeA}\end{subfigure}%
\begin{subfigure}[h]{0.48\textwidth}\centering\includegraphics[height=100pt]{figures1/AgeB.jpg}\caption{}\label{sub:AgeB}\end{subfigure}
\captext[\caplbl{AgeFigure}Examples of visual differences caused by age]{
% ---
The left and right images show the adult and juvenile appearance of the
  same individual.
As an animal ages its appearance changes mainly in color and texture
  with some minor shape and scale differences.
These photos were taken in Ol' Pejeta conservancy.
% ---
}
\label{fig:AgeFigure}
\end{figure}
}


\begin{comment}
python -m ibeis.viz.viz_name --test-show_multiple_chips --db PZ_Master0 --aids=4020,4839 --no-inimage --notitle --adjust=.05 --dpath ~/latex/crall-thesis-2017/ --save "figures1/GashFigure.jpg" --figsize=9,4  --dpi=300 --diskshow --saveparts
\end{comment}
\newcommand{\GashFigure}{
\begin{figure}[h]
\centering
\begin{subfigure}[h]{0.48\textwidth}\centering\includegraphics[height=100pt]{figures1/GashFigureA.jpg}\caption{}\label{sub:GashFigureA}\end{subfigure}%
\begin{subfigure}[h]{0.48\textwidth}\centering\includegraphics[height=100pt]{figures1/GashFigureB.jpg}\caption{}\label{sub:GashFigureB}\end{subfigure}
\captext[\caplbl{GashFigure}Examples of visual differences caused by injuries]{
% ---
Injuries can obscure features on an animal as well as creating new ones.
The left image shows a wounded animal, and the right image shows an animal
  with a distinguishing scar.
The left photo was taken during the GZC~\cite{rubenstein_great_2015}.
The right photo was taken in Ol' Pejeta conservancy.
% ---
}
\label{fig:GashFigure}
\end{figure}
}


\begin{comment}
python -m ibeis.viz.viz_image --test-show_multi_images --db NNP_Master3 --gids=7409,7448,4670,7497,7496,7464 --adjust=.05 --dpath ~/latex/crall-thesis-2017/ --save "figures1/DetectFigure.jpg" --figsize=9,4  --dpi=300 --diskshow --saveparts
\end{comment}
\newcommand{\DetectFigure}{
\begin{figure}[ht!]
\centering
\begin{subfigure}[h]{0.32\textwidth}\centering\includegraphics[height=80pt]{figures1/DetectFigureA.jpg}\caption{}\label{sub:DetectFigureA}\end{subfigure}
\begin{subfigure}[h]{0.32\textwidth}\centering\includegraphics[height=80pt]{figures1/DetectFigureB.jpg}\caption{}\label{sub:DetectFigureB}\end{subfigure}
\begin{subfigure}[h]{0.32\textwidth}\centering\includegraphics[height=80pt]{figures1/DetectFigureC.jpg}\caption{}\label{sub:DetectFigureC}\end{subfigure}
\begin{subfigure}[h]{0.32\textwidth}\centering\includegraphics[height=80pt]{figures1/DetectFigureD.jpg}\caption{}\label{sub:DetectFigureD}\end{subfigure}
\begin{subfigure}[h]{0.32\textwidth}\centering\includegraphics[height=80pt]{figures1/DetectFigureE.jpg}\caption{}\label{sub:DetectFigureE}\end{subfigure}
\begin{subfigure}[h]{0.32\textwidth}\centering\includegraphics[height=80pt]{figures1/DetectFigureF.jpg}\caption{}\label{sub:DetectFigureF}\end{subfigure}
\captext[\caplbl{DetectFigure}Detection of plains zebras]{
% ---
These photos were taken during the GZC~\cite{rubenstein_great_2015}.
Detections were automatically suggested and manually verified before being accepted.
% ---
}
\label{fig:DetectFigure}
\end{figure}
}

\begin{comment}
python -m ibeis.viz.viz_name --test-show_multiple_chips --dpath ~/latex/crall-thesis-2017 --save figures1/OccurrenceComplementFigure.jpg --no-figtitle --notitle --db NNP_Master3 --figsize=9,4 --dpi=300 --no-inimage --aids=15288,15333,15797 --diskshow --saveparts
\end{comment}
\newcommand{\OccurrenceComplementFigure}{
\begin{figure}[h]
\centering
\begin{subfigure}[h]{0.33\textwidth}\centering\includegraphics[height=85pt]{figures1/OccurrenceComplementFigureA.jpg}\caption{}\label{sub:OccurrenceComplementFigureA}\end{subfigure}
\begin{subfigure}[h]{0.32\textwidth}\centering\includegraphics[height=85pt]{figures1/OccurrenceComplementFigureB.jpg}\caption{}\label{sub:OccurrenceComplementFigureB}\end{subfigure}
\begin{subfigure}[h]{0.30\textwidth}\centering\includegraphics[height=85pt]{figures1/OccurrenceComplementFigureC.jpg}\caption{}\label{sub:OccurrenceComplementFigureC}\end{subfigure}
\captext[\caplbl{OccurrenceComplementFigure}Multiple images in an occurrence]{
% ---
These images were taken within an occurrence and demonstrate redundant and complementary features.
Features on the shoulders are somewhat redundant in
  images~\cref{sub:OccurrenceComplementFigureA,sub:OccurrenceComplementFigureB,sub:OccurrenceComplementFigureC}
  because they are all under approximately constant illumination and are seen from the same angle.
Images~\cref{sub:OccurrenceComplementFigureA,sub:OccurrenceComplementFigureC} have complementary features because
  the viewpoint of the animal has shifted slightly.
These photos were taken during the GZC~\cite{rubenstein_great_2015}.
% ---
}
\label{fig:OccurrenceComplementFigure}
\end{figure}
}

\begin{comment}
python -m ibeis.viz.viz_qres show_qres --db=PZ_MTEST --qaid=45 --top-aids=5 --simplemode --sidebyside --annot_mode=0 --notitle --no-viz_name_score --max_nCols=3 --adjust=.02 --figsize=9,4 --show --dpi=300 '--dpath=~/latex/crall-thesis-2017' --save=figures1/RankFigure2.jpg --diskshow --saveparts
\end{comment}
\newcommand{\RankFigure}{
\begin{figure}[h]
\centering
\begin{subfigure}[h]{0.7\textwidth}\centering\includegraphics[width=\textwidth]{figures1/RankFigure2A.jpg}\caption{Rank 1}\label{sub:RankFigure2A}\end{subfigure}
\begin{subfigure}[h]{0.7\textwidth}\centering\includegraphics[width=\textwidth]{figures1/RankFigure2B.jpg}\caption{Rank 2}\label{sub:RankFigure2B}\end{subfigure}
\begin{subfigure}[h]{0.7\textwidth}\centering\includegraphics[width=\textwidth]{figures1/RankFigure2C.jpg}\caption{Rank 3}\label{sub:RankFigure2C}\end{subfigure}
%\begin{subfigure}[h]{0.19\textwidth}\centering\includegraphics[width=\textwidth]{figures1/RankFigure2D.jpg}\caption{}\label{sub:RankFigure2D}\end{subfigure}%
%\begin{subfigure}[h]{0.19\textwidth}\centering\includegraphics[width=\textwidth]{figures1/RankFigure2E.jpg}\caption{}\label{sub:RankFigure2E}\end{subfigure}%
\captext[Examples of top ranked matches]{
% ---
Each pair is a one-vs-one comparison.
All the left images are the same query image.
Each image on the right is a candidate match.
The match in \cref{sub:RankFigure2A} is correct and the other matches are incorrect.
However, a ranked list may contain more than one correct match.
These photos were taken during the GZC~\cite{rubenstein_great_2015}.
% ---
}
\label{fig:RankFigure}
\end{figure}
}

