1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
\ProvidesPackage{opencv}
\lstset{ %
language=Python, % choose the language of the code
%basicstyle=\footnotesize, % the size of the fonts that are used for the code
%numbers=left, % where to put the line-numbers
%numberstyle=\footnotesize, % the size of the fonts that are used for the line-numbers
%stepnumber=2, % the step between two line-numbers. If it's 1 each line will be numbered
%numbersep=5pt, % how far the line-numbers are from the code
%backgroundcolor=\color{white}, % choose the background color. You must add \usepackage{color}
showspaces=false, % show spaces adding particular underscores
showstringspaces=false, % underline spaces within strings
showtabs=false, % show tabs within strings adding particular underscores
%frame=single, % adds a frame around the code
%tabsize=2, % sets default tabsize to 2 spaces
%captionpos=b, % sets the caption-position to bottom
%breaklines=true, % sets automatic line breaking
%breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace
%escapeinside={\%*}{*)} % if you want to add a comment within your code
}
\newcommand{\wikiHref}[1]{\hspace{0.1in}\href{http://opencv.willowgarage.com/wiki/documentation/\targetlang/\curModule/#1}{(view/add comments)}}
\newcommand{\curModule}{}
\newcommand{\cvclass}[1]{
\ifthenelse{\equal{\targetlang}{cpp}}
{
\subsection[cv::#1]{cv::#1\wikiHref{#1}}
%\addcontentsline{toc}{subsection}{#1}
\index{cv...!#1}
}
{
\subsection[#1]{#1\wikiHref{#1}}
%\addcontentsline{toc}{subsection}{#1}
\index{cv...!#1}
}
}
\newcommand{\cvfunc}[1]{
\subsection[#1]{#1\wikiHref{#1}}
%\addcontentsline{toc}{subsection}{#1}
\index{cv...!#1}
}
\newcommand{\cvstruct}[1]{
\subsection[#1]{#1\wikiHref{#1}}
%\addcontentsline{toc}{subsection}{#1}
\index{cv...!#1}
}
\newcommand{\cvmacro}[1]{
\subsection[#1]{#1\wikiHref{#1}}
%\addcontentsline{toc}{subsection}{#1}
\index{cv...!#1}
}
\newcommand{\cvarg}[2]{
\item[\texttt{#1}] #2
}
\newcommand{\cvFunc}[2]{
\ifthenelse{\equal{\targetlang}{c}}
{\subsection[cv::#1]{cv#1\wikiHref{#1}}\index{cv#1}\label{cfunc.#1}}
{\ifthenelse{\equal{\targetlang}{cpp}}
{\subsection[cv::#2]{cv::#2\wikiHref{#2}}\index{cv::#2}\label{cppfunc.#2}}
{\subsection[cv::#1]{cv.#1\wikiHref{#1}}\index{cv.#1}\label{pyfunc.#1}}}}
\newcommand{\cvCPyFunc}[1]{\cvFunc{#1}{}}
\newcommand{\cvCppFunc}[1]{\cvFunc{}{#1}}
\newcommand{\cvCross}[2]{
\ifthenelse{\equal{\targetlang}{c}}
{\hyperref[cfunc.#1]{cv#1}}
{\ifthenelse{\equal{\targetlang}{cpp}}
{\hyperref[cppfunc.#2]{cv::#2}}
{\hyperref[pyfunc.#1]{cv.#1}}}}
\newcommand{\cvCPyCross}[1]{\cvCross{#1}{}}
\newcommand{\cvCppCross}[1]{\cvCross{}{#1}}
\newcommand{\cvdefC}[1]{
\ifthenelse{\equal{\targetlang}{c}}{
\begin{shaded}
\begin{alltt}
\setlength{\parindent}{1in}
#1
\end{alltt}
\end{shaded}
}{}
}
\newcommand{\cvdefCpp}[1]{
\ifthenelse{\equal{\targetlang}{cpp}}{
\begin{shaded}
\begin{alltt}
\setlength{\parindent}{1in}
#1
\end{alltt}
\end{shaded}
}{}
}
\newcommand{\cvdefPy}[1]{
\ifthenelse{\equal{\targetlang}{python}}{
\begin{shaded}
\begin{alltt}
\setlength{\parindent}{1in}
#1
\end{alltt}
\end{shaded}
}{}
}
\newcommand{\cvC}[1]{
\ifthenelse{\equal{\targetlang}{c}}{#1}{}
}
\newcommand{\cvCpp}[1]{
\ifthenelse{\equal{\targetlang}{cpp}}{#1}{}
}
\newcommand{\cvPy}[1]{
\ifthenelse{\equal{\targetlang}{python}}{#1}{}}
\newcommand{\cvCPy}[1]{
\ifthenelse{\equal{\targetlang}{c}\or\equal{\targetlang}{python}}{#1}{}
}
\newcommand{\cvcode}[1]{
\begin{shaded}
\begin{alltt}
\setlength{\parindent}{1in}
#1
\end{alltt}
\end{shaded}
}
%\newcommand{\cross}[1]{#1 (page \pageref{#1})}
\newcommand{\cross}[1]{ \hyperref[#1]{#1} }
\newcommand{\matTT}[9]{
\[
\left|\begin{array}{ccc}
#1 & #2 & #3\\
#4 & #5 & #6\\
#7 & #8 & #9
\end{array}\right|
\]
}
\newcommand{\fork}[4]{
\left\{
\begin{array}{l l}
#1 & \mbox{#2}\\
#3 & \mbox{#4}\\
\end{array} \right.}
\newcommand{\forkthree}[6]{
\left\{
\begin{array}{l l}
#1 & \mbox{#2}\\
#3 & \mbox{#4}\\
#5 & \mbox{#6}\\
\end{array} \right.}
\newcommand{\vecthree}[3]{
\begin{bmatrix}
#1\\
#2\\
#3
\end{bmatrix}
}
\newcommand{\vecthreethree}[9]{
\begin{bmatrix}
#1 & #2 & #3\\
#4 & #5 & #6\\
#7 & #8 & #9
\end{bmatrix}
}
% allow special plastex handling
\newif\ifplastex
\plastexfalse