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



\begin{comment}
# Fig for scale space can be seen here
http://opticalengineering.spiedigitallibrary.org/article.aspx?articleid=1089124
http://opticalengineering.spiedigitallibrary.org/data/Journals/OPTICE/22119/017204_1_1.png
\end{comment}


% --------



\begin{comment}
wget http://xphilipp.developpez.com/contribuez/scalespace.png -O ~/latex/cand/figures2/ScaleSpaceFigure.png
python -m ibeis.scripts.specialdraw scalespace --dpath ~/latex/crall-thesis-2017/ --save figures2/ScaleSpaceFigure.png --dpi 300 --clipwhite --diskshow
\end{comment}
\newcommand{\ScaleSpaceFigure}{
\begin{figure}[ht!]
\centering
\includegraphics[width=.8\textwidth]{figures2/ScaleSpaceFigure.png}
\captext[\caplbl{ScaleSpaceFigure}A scale space pyramid]{
% ---
A Gaussian pyramid is used as a scale space representation of an image.
A property of scale space is that doubling the scale is equivalent to
  downsampling the image by half.
The set of images of a specific size correspond to an octave.
The images within each octave are the intervals.
% ---
}
\label{fig:ScaleSpaceFigure}
\end{figure}
}


\begin{comment}
python -m vtool.patch --test-draw_kp_ori_steps \
 --fname=zebra.png --fx=121 --stride=2 \
 --dpath ~/latex/crall-thesis-2017/ --save figures2/testfindkpdirection.jpg \
 --saveparts --diskshow --figsize=10,5 --dpi=300 --hspace=.4 --top=.9


this is bugged in mpl 2.0.2, but works in 2.0.0


python -m vtool.patch --test-draw_kp_ori_steps --fname=zebra.png --fx=121 --show 
python -m vtool.patch --test-draw_kp_ori_steps --fname=zebra.png --fx=121 --dpath . --save KpOri.jpg  --figsize=10,5 --dpi=300  --diskshow  --top=0.8 --saveparts
python -m vtool.patch --test-draw_kp_ori_steps --fname=zebra.png --fx=121 --dpath . --save KpOri.jpg  --figsize=10,5 --dpi=300  --diskshow  --top=0.9 --hspace=.4
--left=.04 --bottom=.05 --wspace=.2 --hspace=.3
\end{comment}
\newcommand{\testfindkpdirection}{
\begin{figure}[ht!]
\centering
\begin{subfigure}[h]{0.23\textwidth}\centering\includegraphics[height=60pt]{figures2/testfindkpdirectionA.jpg}\caption{}\label{sub:testfindkpdirectiona}\end{subfigure}
~~%--
\begin{subfigure}[h]{0.23\textwidth}\centering\includegraphics[height=100pt]{figures2/testfindkpdirectionB.jpg}\caption{}\label{sub:testfindkpdirectionb}\end{subfigure}
~~%--
\begin{subfigure}[h]{0.23\textwidth}\centering\includegraphics[height=100pt]{figures2/testfindkpdirectionC.jpg}\caption{}\label{sub:testfindkpdirectionc}\end{subfigure}
~~%--
\begin{subfigure}[h]{0.23\textwidth}\centering\includegraphics[height=100pt]{figures2/testfindkpdirectionD.jpg}\caption{}\label{sub:testfindkpdirectiond}\end{subfigure}
~~%--
\begin{subfigure}[h]{0.23\textwidth}\centering\includegraphics[height=100pt]{figures2/testfindkpdirectionE.jpg}\caption{}\label{sub:testfindkpdirectione}\end{subfigure}
~~%--
\begin{subfigure}[h]{0.23\textwidth}\centering\includegraphics[height=100pt]{figures2/testfindkpdirectionF.jpg}\caption{}\label{sub:testfindkpdirectionf}\end{subfigure}
~~%--
\begin{subfigure}[h]{0.23\textwidth}\centering\includegraphics[height=100pt]{figures2/testfindkpdirectionG.jpg}\caption{}\label{sub:testfindkpdirectiong}\end{subfigure}
~~%--
\begin{subfigure}[h]{0.23\textwidth}\centering\includegraphics[height=100pt]{figures2/testfindkpdirectionH.jpg}\caption{}\label{sub:testfindkpdirectionh}\end{subfigure}
~~%--
\begin{subfigure}[h]{1\textwidth}\centering\includegraphics[width=\textwidth]{figures2/testfindkpdirectionI.jpg}\caption{}\label{sub:testfindkpdirectioni}\end{subfigure}
\captext[\caplbl{testfindkpdirection}Computing the dominant gradient orientation]{
% ---
The top row shows:
\cref{sub:testfindkpdirectiona} the input image with a single elliptical keypoint,
  \cref{sub:testfindkpdirectionb} the normalized keypoint, \cref{sub:testfindkpdirectionc,sub:testfindkpdirectiond}
  the squared x and y image derivatives.
The middle row shows:
\cref{sub:testfindkpdirectione} the gradient magnitudes, \cref{sub:testfindkpdirectionf} the Gaussian weighted
  gradient magnitude, \cref{sub:testfindkpdirectiong,sub:testfindkpdirectionh} the orientation at each pixel.
The final row~\cref{sub:testfindkpdirectioni} shows the histogram of weighted orientations.
The starred positions show the dominant gradient orientations localized to sub-orientation accuracy.
% ---
}
\label{fig:testfindkpdirection}
\end{figure}
}


\begin{comment}
python -m plottool.viz_featrow draw_feat_row --fname zebra.png --fx=121 \
    --dpath ~/latex/crall-thesis-2017/ --save figures2/vizfeatrow.jpg \
    --figsize=6,3 --dpi 300 --diskshow --saveparts

python -m plottool.viz_featrow --test-draw_feat_row --fname zebra.png --fx=121 --save foo.jpg --figsize=6,3 --dpi 300  --diskshow
\end{comment}
\newcommand{\vizfeatrow}{
\begin{figure}[h]
\centering
\begin{subfigure}[h]{0.47\textwidth}\centering\includegraphics[width=\textwidth]{figures2/vizfeatrowA.jpg}\caption{}\label{sub:vizfeatrowA}\end{subfigure}
~~% --
\begin{subfigure}[h]{0.47\textwidth}\centering\includegraphics[width=\textwidth]{figures2/vizfeatrowB.jpg}\caption{}\label{sub:vizfeatrowB}\end{subfigure}
\captext[\caplbl{vizfeatrow}Example of a SIFT descriptor]{
% ---
\Cref{sub:vizfeatrowA} shows a SIFT feature superimposed over pixels it
  describes.
\Cref{sub:vizfeatrowB} shows the same SIFT descriptor as a flat histogram.
Notice the correspondence between the colors of the histogram bars. 
% ---
}
\label{fig:vizfeatrow}
\end{figure}
}




\begin{comment}
python -m plottool.draw_sv --test-show_sv_simple --dpath ~/latex/crall-thesis-2017/ --save figures2/figSVInlier.jpg --figsize=12,6 --dpi 300 --clipwhite --diskshow
\end{comment}
\newcommand{\figSVInlier}{
\begin{figure}[ht!]
\centering
\includegraphics[width=.6\textwidth]{figures2/figSVInlier.jpg}
\captext[\caplbl{figSVInlier}Before and after spatial verification]{
% ---
This shows the matches before and after spatial verification.
Inconsistent matches are shown in red.
Consistent matches are shown in blue.
Notice that not all spatially consistent matches are correct.
% ---
}
\label{fig:figSVInlier}
\end{figure}
}
