mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 03:30:34 +08:00
removed obsolete docs
This commit is contained in:
parent
12d98a7d18
commit
f82c04f426
42
doc/FAQ.tex
42
doc/FAQ.tex
@ -1,42 +0,0 @@
|
||||
\chapter{FAQ}
|
||||
\section{First Section}
|
||||
\subsection{Initialization}
|
||||
|
||||
\subsubsection*{CreateImage}
|
||||
\addcontentsline{toc}{subsubsection}{CreateImage}
|
||||
|
||||
Creates header and \textsf{allocates} data
|
||||
|
||||
\begin{shaded}
|
||||
\begin{verbatim}
|
||||
IplImage* cvCreateImage( CvSize size,
|
||||
int depth,
|
||||
int channels );
|
||||
\end{verbatim}
|
||||
\end{shaded}
|
||||
|
||||
\begin{description}
|
||||
\item[\texttt{size}] Image width and height
|
||||
\item[\texttt{depth}] Bit depth of image elements. Can be one of:
|
||||
\begin{description}
|
||||
\item[IPL\_DEPTH\_8U] unsigned 8-bit integers
|
||||
\item[IPL\_DEPTH\_8S] signed 8-bit integers
|
||||
\item[IPL\_DEPTH\_16U] unsigned 16-bit integers
|
||||
\item[IPL\_DEPTH\_16S] signed 16-bit integers
|
||||
\item[IPL\_DEPTH\_32S] signed 32-bit integers
|
||||
\item[IPL\_DEPTH\_32F] single precision floating-point numbers
|
||||
\item[IPL\_DEPTH\_64F] double precision floating-point numbers
|
||||
\end{description}
|
||||
\item[\texttt{channels}] Number of channels per element(pixel). Can be 1, 2, 3 or 4. The channels are interleaved, for example the usual data layout of a color image is:
|
||||
\begin{lstlisting}
|
||||
b0 g0 r0 b1 g1 r1 ...
|
||||
\end{lstlisting}
|
||||
Although in general IPL image format can store non-interleaved images as well and some of OpenCV can process it, this function can create interleaved images only.
|
||||
|
||||
\end{description}
|
||||
|
||||
The function cvCreateImage creates the header and allocates data as in the method of~\cite{author_conf_year}. This call is a shortened form of
|
||||
\begin{lstlisting}
|
||||
header = cvCreateImageHeader(size,depth,channels);
|
||||
cvCreateData(header);
|
||||
\end{lstlisting}
|
@ -1,4 +0,0 @@
|
||||
ifelse(TARGET_LANGUAGE, py, `define(ONLY_PYTHON, $1)', `define(ONLY_PYTHON, )')
|
||||
ifelse(TARGET_LANGUAGE, c, `define(ONLY_C, $1)', `define(ONLY_C, )')
|
||||
define(`RQ',`changequote(<,>)dnl`
|
||||
'changequote`'')
|
732
doc/cvcam.rtf
732
doc/cvcam.rtf
@ -1,732 +0,0 @@
|
||||
{\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset204\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fswiss\fcharset204\fprq2{\*\panose 020b0604020202020204}Arial;}
|
||||
{\f34\froman\fcharset0\fprq2 Times New Roman;}{\f32\froman\fcharset238\fprq2 Times New Roman CE;}{\f35\froman\fcharset161\fprq2 Times New Roman Greek;}{\f36\froman\fcharset162\fprq2 Times New Roman Tur;}
|
||||
{\f37\froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f38\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f39\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f42\fswiss\fcharset0\fprq2 Arial;}{\f40\fswiss\fcharset238\fprq2 Arial CE;}
|
||||
{\f43\fswiss\fcharset161\fprq2 Arial Greek;}{\f44\fswiss\fcharset162\fprq2 Arial Tur;}{\f45\fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f46\fswiss\fcharset178\fprq2 Arial (Arabic);}{\f47\fswiss\fcharset186\fprq2 Arial Baltic;}}
|
||||
{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;
|
||||
\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\red160\green0\blue160;\red136\green0\blue0;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
|
||||
\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\s1\ql \li0\ri0\sb360\sa60\keepn\pagebb\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\f1\fs52\lang1033\langfe1033\kerning32\cgrid\langnp1033\langfenp1033
|
||||
\sbasedon0 \snext0 \sautoupd heading 1;}{\s2\qc \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\f1\fs44\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 2;}{
|
||||
\s3\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\fs40\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 3;}{\*\cs10 \additive Default Paragraph Font;}{
|
||||
\s15\ql \li0\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\caps\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 \sautoupd toc 1;}{
|
||||
\s16\ql \li240\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin240\itap0 \scaps\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 \sautoupd toc 2;}{
|
||||
\s17\ql \li480\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin480\itap0 \i\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 \sautoupd toc 3;}{
|
||||
\s18\ql \li720\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 \sautoupd toc 4;}{
|
||||
\s19\ql \li960\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin960\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 \sautoupd toc 5;}{
|
||||
\s20\ql \li1200\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin1200\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 \sautoupd toc 6;}{
|
||||
\s21\ql \li1440\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin1440\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 \sautoupd toc 7;}{
|
||||
\s22\ql \li1680\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin1680\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 \sautoupd toc 8;}{
|
||||
\s23\ql \li1920\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin1920\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 \sautoupd toc 9;}{\*\cs24 \additive \ul\cf2 \sbasedon10 Hyperlink;}{\*\cs25 \additive \ul\cf12
|
||||
\sbasedon10 FollowedHyperlink;}}{\info{\title }{\author vzaguskX}{\operator vpisarev}{\creatim\yr2002\mo11\dy22\hr18\min6}{\revtim\yr2002\mo11\dy22\hr18\min6}{\version2}{\edmins0}{\nofpages16}{\nofwords2873}{\nofchars16377}{\*\company iNNL}
|
||||
{\nofcharsws20112}{\vern8269}}\paperw11906\paperh16838\margl1701\margr850\margt1134\margb1134 \widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1701
|
||||
\dgvorigin1134\dghshow1\dgvshow1\jexpand\viewkind4\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule \fet0\sectd
|
||||
\linex0\headery708\footery708\colsx708\endnhere\sectlinegrid360\sectdefaultcl {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang
|
||||
{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7
|
||||
\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain
|
||||
\s3\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin0\lin0\itap0 \b\fs40\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
|
||||
\par }\pard\plain \qc \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\fs20\lang1024\langfe1024\noproof
|
||||
{\shpgrp{\*\shpinst\shpleft360\shptop4192\shpright8640\shpbottom7252\shpfhdr0\shpbxcolumn\shpbxignore\shpbypara\shpbyignore\shpwr3\shpwrk0\shpfblwtxt0\shpz0\shplid1026
|
||||
{\sp{\sn groupLeft}{\sv 1813}}{\sp{\sn groupTop}{\sv 5094}}{\sp{\sn groupRight}{\sv 10093}}{\sp{\sn groupBottom}{\sv 8154}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn posh}{\sv 0}}{\sp{\sn posv}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}
|
||||
{\sp{\sn fLayoutInCell}{\sv 1}}{\shp{\*\shpinst\shplid1027{\sp{\sn relLeft}{\sv 1903}}{\sp{\sn relTop}{\sv 6894}}{\sp{\sn relRight}{\sv 10003}}{\sp{\sn relBottom}{\sv 8154}}
|
||||
{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn lTxid}{\sv 65536}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn posh}{\sv 2}}{\sp{\sn posrelh}{\sv 1}}{\sp{\sn posrelv}{\sv 1}}
|
||||
{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 1}}{\shptxt \pard\plain \s2\qc \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel1\adjustright\rin0\lin0\itap0 \b\f1\fs44\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
|
||||
\fs52\charscalex150 Reference manual
|
||||
\par }}}}{\shp{\*\shpinst\shplid1028{\sp{\sn relLeft}{\sv 1813}}{\sp{\sn relTop}{\sv 5094}}{\sp{\sn relRight}{\sv 10093}}{\sp{\sn relBottom}{\sv 7074}}{\sp{\sn fRelFlipH}{\sv 0}}
|
||||
{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn lTxid}{\sv 131072}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn posh}{\sv 2}}{\sp{\sn posrelh}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 1}}{\shptxt
|
||||
\pard\plain \s3\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin0\lin0\itap0 \b\fs40\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {CvCam
|
||||
\par }}}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8192\dpgroup\dpcount3\dpx360\dpy4192\dpxsize8280\dpysize3060\dptxbx\dptxlrtb{\dptxbxtext\pard\plain \s2\qc \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel1\adjustright\rin0\lin0\itap0
|
||||
\b\f1\fs44\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\fs52\charscalex150 Reference manual
|
||||
\par }}\dpx90\dpy1800\dpxsize8100\dpysize1260\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow\dptxbx\dptxlrtb{\dptxbxtext\pard\plain
|
||||
\s3\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin0\lin0\itap0 \b\fs40\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {CvCam
|
||||
\par }}\dpx0\dpy0\dpxsize8280\dpysize1980\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow\dpendgroup\dpx0\dpy0\dpxsize0\dpysize0}}}}{\page }{\f1\fs72 Contents}{\field\fldedit{\*\fldinst {\f1\fs72
|
||||
TOC \\o "1-3" \\h \\z }}{\fldrslt {\lang1024\langfe1024\noproof
|
||||
\par }\pard\plain \s15\ql \li0\ri0\sb120\sa120\widctlpar\tqr\tldot\tx9345\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\caps\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{
|
||||
\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241033"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300033003300000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof Introduction}{\lang1024\langfe1024\noproof\webhidden \tab }{\field{\*\fldinst {
|
||||
\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241033 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300033003300000000}}}{\fldrslt {
|
||||
\lang1024\langfe1024\noproof\webhidden 3}}}}}{\b0\caps0\lang1024\langfe1024\noproof
|
||||
\par }{\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241034"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300033003400000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof Common Usage}{\lang1024\langfe1024\noproof\webhidden \tab }{\field{\*\fldinst {
|
||||
\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241034 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300033003400000000}}}{\fldrslt {
|
||||
\lang1024\langfe1024\noproof\webhidden 5}}}}}{\b0\caps0\lang1024\langfe1024\noproof
|
||||
\par }{\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241035"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300033003500000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof Howto:}{\lang1024\langfe1024\noproof\webhidden \tab }{\field{\*\fldinst {
|
||||
\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241035 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300033003500000000}}}{\fldrslt {
|
||||
\lang1024\langfe1024\noproof\webhidden 8}}}}}{\b0\caps0\lang1024\langfe1024\noproof
|
||||
\par }\pard\plain \s16\ql \li240\ri0\widctlpar\tqr\tldot\tx9345\aspalpha\aspnum\faauto\adjustright\rin0\lin240\itap0 \scaps\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{
|
||||
\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241036"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300033003600000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof Begin work with cvcam}{\lang1024\langfe1024\noproof\webhidden \tab }
|
||||
{\field{\*\fldinst {\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241036 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300033003600000000}}
|
||||
}{\fldrslt {\lang1024\langfe1024\noproof\webhidden 8}}}}}{\scaps0\lang1024\langfe1024\noproof
|
||||
\par }{\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241037"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300033003700000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof Select a camera}{\lang1024\langfe1024\noproof\webhidden \tab }{\field{\*\fldinst {
|
||||
\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241037 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300033003700000000}}}{\fldrslt {
|
||||
\lang1024\langfe1024\noproof\webhidden 8}}}}}{\scaps0\lang1024\langfe1024\noproof
|
||||
\par }{\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241038"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300033003800000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof Set up camera(s)}{\lang1024\langfe1024\noproof\webhidden \tab }{\field{\*\fldinst {
|
||||
\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241038 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300033003800000000}}}{\fldrslt {
|
||||
\lang1024\langfe1024\noproof\webhidden 8}}}}}{\scaps0\lang1024\langfe1024\noproof
|
||||
\par }{\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241039"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300033003900000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof Render the video stream}{\lang1024\langfe1024\noproof\webhidden \tab }
|
||||
{\field{\*\fldinst {\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241039 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300033003900000000}}
|
||||
}{\fldrslt {\lang1024\langfe1024\noproof\webhidden 9}}}}}{\scaps0\lang1024\langfe1024\noproof
|
||||
\par }{\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241040"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300034003000000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof Make the settings active}{\lang1024\langfe1024\noproof\webhidden \tab }
|
||||
{\field{\*\fldinst {\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241040 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300034003000000000}}
|
||||
}{\fldrslt {\lang1024\langfe1024\noproof\webhidden 9}}}}}{\scaps0\lang1024\langfe1024\noproof
|
||||
\par }{\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241041"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300034003100000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof Control the video}{\lang1024\langfe1024\noproof\webhidden \tab }{\field{\*\fldinst {
|
||||
\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241041 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300034003100000000}}}{\fldrslt {
|
||||
\lang1024\langfe1024\noproof\webhidden 9}}}}}{\scaps0\lang1024\langfe1024\noproof
|
||||
\par }{\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241042"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300034003200000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof Display cameras property pages}{\lang1024\langfe1024\noproof\webhidden \tab }
|
||||
{\field{\*\fldinst {\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241042 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300034003200000000}}
|
||||
}{\fldrslt {\lang1024\langfe1024\noproof\webhidden 9}}}}}{\scaps0\lang1024\langfe1024\noproof
|
||||
\par }{\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241043"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300034003300000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof Process video frames}{\lang1024\langfe1024\noproof\webhidden \tab }
|
||||
{\field{\*\fldinst {\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241043 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300034003300000000}}
|
||||
}{\fldrslt {\lang1024\langfe1024\noproof\webhidden 9}}}}}{\scaps0\lang1024\langfe1024\noproof
|
||||
\par }{\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241044"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300034003400000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof Get the pointer to last frame}{\lang1024\langfe1024\noproof\webhidden \tab }
|
||||
{\field{\*\fldinst {\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241044 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300034003400000000}}
|
||||
}{\fldrslt {\lang1024\langfe1024\noproof\webhidden 10}}}}}{\scaps0\lang1024\langfe1024\noproof
|
||||
\par }{\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241045"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300034003500000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof Play an avi file and process it\rquote s frames if needed}{
|
||||
\lang1024\langfe1024\noproof\webhidden \tab }{\field{\*\fldinst {\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241045 \\h }{\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300034003500000000}}}{\fldrslt {\lang1024\langfe1024\noproof\webhidden 10}}}}}{\scaps0\lang1024\langfe1024\noproof
|
||||
\par }{\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241046"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300034003600000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof Work with multiple cameras under linux}{\lang1024\langfe1024\noproof\webhidden \tab
|
||||
}{\field{\*\fldinst {\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241046 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300034003600000000}}
|
||||
}{\fldrslt {\lang1024\langfe1024\noproof\webhidden 11}}}}}{\scaps0\lang1024\langfe1024\noproof
|
||||
\par }{\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241047"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300034003700000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof Work with multiple cameras under Windows}{\lang1024\langfe1024\noproof\webhidden
|
||||
\tab }{\field{\*\fldinst {\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241047 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300034003700000000}}
|
||||
}{\fldrslt {\lang1024\langfe1024\noproof\webhidden 11}}}}}{\scaps0\lang1024\langfe1024\noproof
|
||||
\par }{\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241048"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300034003800000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof Finish working with cvcam}{\lang1024\langfe1024\noproof\webhidden \tab }
|
||||
{\field{\*\fldinst {\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241048 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300034003800000000}}
|
||||
}{\fldrslt {\lang1024\langfe1024\noproof\webhidden 11}}}}}{\scaps0\lang1024\langfe1024\noproof
|
||||
\par }\pard\plain \s15\ql \li0\ri0\sb120\sa120\widctlpar\tqr\tldot\tx9345\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\caps\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{
|
||||
\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241049"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300034003900000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof Cvcam Reference}{\lang1024\langfe1024\noproof\webhidden \tab }{\field{\*\fldinst {
|
||||
\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241049 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300034003900000000}}}{\fldrslt {
|
||||
\lang1024\langfe1024\noproof\webhidden 12}}}}}{\b0\caps0\lang1024\langfe1024\noproof
|
||||
\par }\pard\plain \s16\ql \li240\ri0\widctlpar\tqr\tldot\tx9345\aspalpha\aspnum\faauto\adjustright\rin0\lin240\itap0 \scaps\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{
|
||||
\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241050"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300035003000000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof cvcam API}{\lang1024\langfe1024\noproof\webhidden \tab }{\field{\*\fldinst {
|
||||
\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241050 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300035003000000000}}}{\fldrslt {
|
||||
\lang1024\langfe1024\noproof\webhidden 12}}}}}{\scaps0\lang1024\langfe1024\noproof
|
||||
\par }\pard\plain \s17\ql \li480\ri0\widctlpar\tqr\tldot\tx9345\aspalpha\aspnum\faauto\adjustright\rin0\lin480\itap0 \i\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{
|
||||
\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241051"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300035003100000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof cvcamExit}{\lang1024\langfe1024\noproof\webhidden \tab }{\field{\*\fldinst {
|
||||
\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241051 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300035003100000000}}}{\fldrslt {
|
||||
\lang1024\langfe1024\noproof\webhidden 12}}}}}{\i0\lang1024\langfe1024\noproof
|
||||
\par }{\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241052"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300035003200000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof cvcamGetCamerasCount}{\lang1024\langfe1024\noproof\webhidden \tab }
|
||||
{\field{\*\fldinst {\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241052 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300035003200000000}}
|
||||
}{\fldrslt {\lang1024\langfe1024\noproof\webhidden 12}}}}}{\i0\lang1024\langfe1024\noproof
|
||||
\par }{\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241053"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300035003300000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof cvcamGetProperty}{\lang1024\langfe1024\noproof\webhidden \tab }{\field{\*\fldinst {
|
||||
\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241053 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300035003300000000}}}{\fldrslt {
|
||||
\lang1024\langfe1024\noproof\webhidden 12}}}}}{\i0\lang1024\langfe1024\noproof
|
||||
\par }{\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241054"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300035003400000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof cvcamInit}{\lang1024\langfe1024\noproof\webhidden \tab }{\field{\*\fldinst {
|
||||
\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241054 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300035003400000000}}}{\fldrslt {
|
||||
\lang1024\langfe1024\noproof\webhidden 13}}}}}{\i0\lang1024\langfe1024\noproof
|
||||
\par }{\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241055"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300035003500000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof cvcamPause}{\lang1024\langfe1024\noproof\webhidden \tab }{\field{\*\fldinst {
|
||||
\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241055 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300035003500000000}}}{\fldrslt {
|
||||
\lang1024\langfe1024\noproof\webhidden 13}}}}}{\i0\lang1024\langfe1024\noproof
|
||||
\par }{\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241056"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300035003600000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof cvcamPlayAVI}{\lang1024\langfe1024\noproof\webhidden \tab }{\field{\*\fldinst {
|
||||
\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241056 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300035003600000000}}}{\fldrslt {
|
||||
\lang1024\langfe1024\noproof\webhidden 14}}}}}{\i0\lang1024\langfe1024\noproof
|
||||
\par }{\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241057"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300035003700000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof cvcamResume}{\lang1024\langfe1024\noproof\webhidden \tab }{\field{\*\fldinst {
|
||||
\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241057 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300035003700000000}}}{\fldrslt {
|
||||
\lang1024\langfe1024\noproof\webhidden 15}}}}}{\i0\lang1024\langfe1024\noproof
|
||||
\par }{\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241058"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300035003800000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof cvcamSelectCamera}{\lang1024\langfe1024\noproof\webhidden \tab }{\field{\*\fldinst {
|
||||
\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241058 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300035003800000000}}}{\fldrslt {
|
||||
\lang1024\langfe1024\noproof\webhidden 15}}}}}{\i0\lang1024\langfe1024\noproof
|
||||
\par }{\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241059"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300035003900000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof cvcamSetProperty}{\lang1024\langfe1024\noproof\webhidden \tab }{\field{\*\fldinst {
|
||||
\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241059 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300035003900000000}}}{\fldrslt {
|
||||
\lang1024\langfe1024\noproof\webhidden 16}}}}}{\i0\lang1024\langfe1024\noproof
|
||||
\par }{\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241060"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300036003000000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof cvcamStart}{\lang1024\langfe1024\noproof\webhidden \tab }{\field{\*\fldinst {
|
||||
\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241060 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300036003000000000}}}{\fldrslt {
|
||||
\lang1024\langfe1024\noproof\webhidden 16}}}}}{\i0\lang1024\langfe1024\noproof
|
||||
\par }{\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241061"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300036003100000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof cvcamStop}{\lang1024\langfe1024\noproof\webhidden \tab }{\field{\*\fldinst {
|
||||
\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241061 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300036003100000000}}}{\fldrslt {
|
||||
\lang1024\langfe1024\noproof\webhidden 16}}}}}{\i0\lang1024\langfe1024\noproof
|
||||
\par }\pard\plain \s16\ql \li240\ri0\widctlpar\tqr\tldot\tx9345\aspalpha\aspnum\faauto\adjustright\rin0\lin240\itap0 \scaps\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\field\fldedit{\*\fldinst {\cs24\ul\cf2\lang1024\langfe1024\noproof }{
|
||||
\lang1024\langfe1024\noproof HYPERLINK \\l "_Toc517241062"}{\cs24\ul\cf2\lang1024\langfe1024\noproof }{\ul\cf2\lang1024\langfe1024\noproof {\*\datafield
|
||||
08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300036003200000000}}}{\fldrslt {\cs24\ul\cf2\lang1024\langfe1024\noproof cvcam Properties Interface}{\lang1024\langfe1024\noproof\webhidden \tab }
|
||||
{\field{\*\fldinst {\lang1024\langfe1024\noproof\webhidden PAGEREF _Toc517241062 \\h }{\lang1024\langfe1024\noproof {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f006300350031003700320034003100300036003200000000}}
|
||||
}{\fldrslt {\lang1024\langfe1024\noproof\webhidden 17}}}}}{\scaps0\lang1024\langfe1024\noproof
|
||||
\par }\pard\plain \s1\ql \li0\ri0\sb360\sa60\keepn\pagebb\widctlpar\aspalpha\aspnum\faauto\outlinelevel0\adjustright\rin0\lin0\itap0 \b\f1\fs52\lang1033\langfe1033\kerning32\cgrid\langnp1033\langfenp1033 }}\pard\plain
|
||||
\s1\ql \li0\ri0\sb360\sa60\keepn\pagebb\widctlpar\aspalpha\aspnum\faauto\outlinelevel0\adjustright\rin0\lin0\itap0 \b\f1\fs52\lang1033\langfe1033\kerning32\cgrid\langnp1033\langfenp1033 {{\*\bkmkstart _Toc517241033}Introduction{\*\bkmkend _Toc517241033}
|
||||
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\tab
|
||||
CvCam is a universal cross-platform module for processing video stream from digital video cameras. It is implemented as a dynamic link library (DLL) for Windows and as a shared object library (so) for linux systems and provides a simple and convenient App
|
||||
lication Programming Interface (API) for reading and controlling video stream, processing its frames and rendering the results. CvCam is distributed as a part of Intel\rquote
|
||||
s OpenCV project under the same license and uses some functionality of the Open Source Computer Vision Library.
|
||||
\par }\pard\plain \s1\ql \li0\ri0\sb360\sa60\keepn\pagebb\widctlpar\aspalpha\aspnum\faauto\outlinelevel0\adjustright\rin0\lin0\itap0 \b\f1\fs52\lang1033\langfe1033\kerning32\cgrid\langnp1033\langfenp1033 {\page {\*\bkmkstart _Toc517241034}Common Usage
|
||||
{\*\bkmkend _Toc517241034}
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\tab
|
||||
The simplest way to use CvCam from a C++ program for a single video source is shown at the following listing:
|
||||
\par
|
||||
\par
|
||||
\par }{\fs20 #include \'93cvcam.h\'94
|
||||
\par void callback(IplImage* image);
|
||||
\par int main()
|
||||
\par \{
|
||||
\par \tab int ncams = cvcamGetCamerascount( );//returns the number of available cameras in the
|
||||
\par \tab \tab \tab \tab \tab \tab //system
|
||||
\par \tab cvcamSetProperty(0, CVCAM_PROP_ENABLE, &cvcamone); //Selects the 1-st found
|
||||
\par \tab \tab \tab \tab \tab \tab \tab \tab \tab //camera
|
||||
\par \tab cvcamSetProperty(0, CVCAM_PROP_RENDER, &cvcamone) //We\rquote ll render stream
|
||||
\par \tab \tab \tab \tab \tab \tab \tab \tab \tab //from this source
|
||||
\par \tab //here I assume your create a window and store it\rquote s id in MyWin variable.
|
||||
\par \tab //MyWin is of type HWND on Windows and Window on linux
|
||||
\par
|
||||
\par \tab cvcamSetProperty(0, CVCAM_PROP_WINDOW, &MyWin); // Selects a window for
|
||||
\par \tab \tab \tab \tab \tab \tab \tab \tab //video rendering
|
||||
\par \tab cvcamSetProperty(0, CVCAM_PROP_CALLBACK, callback);//this callback will
|
||||
\par \tab \tab \tab \tab \tab \tab \tab \tab //process every frame
|
||||
\par }\pard \ql \fi720\li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\fs20 cvcamInit( );
|
||||
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\fs20 \tab cvcamStart( );
|
||||
\par \tab //Your app is working
|
||||
\par \tab cvcamStop( );
|
||||
\par \tab cvcamExit( );
|
||||
\par \tab return 0;
|
||||
\par \}
|
||||
\par void callback(IplImage* image)//Draws blue horizontal lines across the image
|
||||
\par \{
|
||||
\par IplImage* image1 = image;
|
||||
\par int i,j;
|
||||
\par
|
||||
\par assert (image);
|
||||
\par
|
||||
\par for(i=0; i<image1->height; i+=10)
|
||||
\par \{
|
||||
\par for(j=(image1->widthStep)*i; j<(image1->widthStep)*(i+1);
|
||||
\par j+=image1->nChannels)
|
||||
\par \{
|
||||
\par image1->imageData[j] = (char)255;
|
||||
\par image1->imageData[j+1] = 0;
|
||||
\par image1->imageData[j+2] = 0;
|
||||
\par
|
||||
\par
|
||||
\par \}
|
||||
\par
|
||||
\par \}
|
||||
\par
|
||||
\par \}
|
||||
\par
|
||||
\par \tab }{The first function to be called is }{\fs20 cvcamGetCamerasCount( );}{ It prepares library and returns the number of available cameras at the system. On Linux it\rquote
|
||||
s also important to call it before your initialize the X window system as it prepares X to work with linux threads. Your can also call }{\fs20 XInitThreads( )}{ at the beginning of your app instead.
|
||||
\par
|
||||
\par \tab The next step is to choose a camera and set it up. }{\fs20 cvcamSetProperty( int camera, char* property, void* arg)}{ can do this for you. See}{\b CvCam Properties Interface }{for complete list of properties and arguments. The first argument for
|
||||
this function is the number of the camera for which the property is set, the second is a property\rquote
|
||||
s name and the third is a pointer to some data, which actual type depends on the property. In the example above we selected a camera and told CvCam to render it into the window we specified.
|
||||
\par
|
||||
\par \tab The third optional step is frame processing with a callback. You can provide a function, which will be called on every frame and can change it\rquote s data. It should be of type void and takes a pointer to a IplImage structure, declared in \'93ipl.h
|
||||
\'94 header file. This is done by }{\fs20 CVCAM_PROP_CALLBACK}{ property and the third argument to }{\fs20 cvcamSetProperty}{ is a pointer to your callback function;
|
||||
\par
|
||||
\par \tab Next step is calling }{\fs20 cvcamInit( ),}{ after which everything is ready for streaming;
|
||||
\par
|
||||
\par \tab }{\fs20 cvcamStart( )}{ just starts the stream. It won\rquote t block your app and returns immediately. The stream continues until }{\fs20 cvcamStop( )}{ is called.
|
||||
\par
|
||||
\par \tab And the last is }{\fs20 cvcamExit( )}{ \endash Frees all resources used by CvCam.}{\fs20
|
||||
\par }\pard\plain \s1\ql \li0\ri0\sb360\sa60\keepn\pagebb\widctlpar\aspalpha\aspnum\faauto\outlinelevel0\adjustright\rin0\lin0\itap0 \b\f1\fs52\lang1033\langfe1033\kerning32\cgrid\langnp1033\langfenp1033 {\page {\*\bkmkstart _Toc517241035}Howto:
|
||||
{\*\bkmkend _Toc517241035}
|
||||
\par }\pard\plain \s2\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel1\adjustright\rin0\lin0\itap0 \b\f1\fs44\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {{\*\bkmkstart _Toc517241036}Begin work with cvcam{\*\bkmkend _Toc517241036}
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\tab Call }{\fs20 cvcamGetCamerasCount()}{
|
||||
. This not only returns the number of cameras in the system, but also prepares cvcam. Under linux be sure to do this call before initializing X, or to call }{\fs20 XInitThreads()}{ before it.
|
||||
\par }\pard\plain \s2\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel1\adjustright\rin0\lin0\itap0 \b\f1\fs44\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {{\*\bkmkstart _Toc517241037}Select a camera{\*\bkmkend _Toc517241037}
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\tab You can select single or multiple cameras in 2 ways. The first is using a camera selection dialog with }{
|
||||
\fs20 cvcamSelectCamera}{. See an example below:
|
||||
\par
|
||||
\par }{\cf11 //Prototype
|
||||
\par }\pard \ql \li0\ri0\widctlpar\faauto\rin0\lin0\itap0 {\fs20\cf11 /*Pops up a camera(s) selection dialog
|
||||
\par Return value - number of cameras selected (0,1 or 2);
|
||||
\par Argument: an array of selected cameras numbers
|
||||
\par NULL if none selected. Should be released with free() when not needed.
|
||||
\par if NULL passed, not used.
|
||||
\par */
|
||||
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\fs20\cf17 CVCAM_API}{\fs20\cf1 }{\fs20\cf2 int}{\fs20\cf1 }{\fs20\cf18 cvcamSelectCamera}{\fs20\cf1 (}{\fs20\cf2 int}{\fs20\cf1 ** }{\fs20\cf15 out}{\fs20\cf1 );
|
||||
\par
|
||||
\par FunctionThatSelectsCamera()
|
||||
\par \{
|
||||
\par \tab int* out;
|
||||
\par \tab int nselected = cvcamSelectCamera(&out);
|
||||
\par }\pard \ql \fi720\li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\fs20\cf1 if(nselected>0)
|
||||
\par \tab {\*\bkmkstart OLE_LINK1}printf(\'93the 1-st selected camera is camera number %d\'94, out[0]);{\*\bkmkend OLE_LINK1}
|
||||
\par if(nselected == 2)
|
||||
\par \tab printf(\'93the 2-nd selected camera is camera number %d\'94, out[1]);
|
||||
\par
|
||||
\par free(out);
|
||||
\par return;
|
||||
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\fs20\cf1
|
||||
\par
|
||||
\par \}
|
||||
\par
|
||||
\par }{\cf1 Note: if you don\rquote t need selected cameras numbers, simply call }{\fs20\cf18 cvcamSelectCamera(NULL)}{\cf18
|
||||
\par Note2: Linux version of cvcam currently has no implementation of }{\fs20\cf18 cvcamSelectCamera}{\cf18 .
|
||||
\par }{\fs20\cf18
|
||||
\par }{\cf18 The second, non-dialog way is to use CVCAM_PROP_ENABLE property like this:
|
||||
\par }{\fs20\cf18 int desiredcamera = 0;//for example
|
||||
\par cvcamSetProperty(desiredcamera, CVCAM_PROP_ENABLE,CVCAMTRUE);
|
||||
\par
|
||||
\par }\pard\plain \s2\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel1\adjustright\rin0\lin0\itap0 \b\f1\fs44\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {{\*\bkmkstart _Toc517241038}Set up camera(s){\*\bkmkend _Toc517241038}
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
|
||||
\par }\pard \ql \fi720\li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {See }{\b CvCam Properties Interface.}{\b\fs20
|
||||
\par
|
||||
\par }\pard\plain \s2\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel1\adjustright\rin0\lin0\itap0 \b\f1\fs44\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {{\*\bkmkstart _Toc517241039}Render the video stream{\*\bkmkend _Toc517241039}
|
||||
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\tab 1. Tell cvcam to render your camera:
|
||||
\par \tab \tab }{\fs20 cvcamSetProperty(YourCamera, CVCAM_PROP_RENDER, CVCAMTRUE)
|
||||
\par }{\tab 2. Select the window
|
||||
\par }\pard \ql \fi720\li720\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0 {\fs20 cvcamWindow mywin = \'85;//here I mean your initialize mywin with some
|
||||
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\fs20 \tab \tab \tab \tab \tab // existing window id/
|
||||
\par }\pard \ql \fi720\li720\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0 {\fs20 cvcamSetProperty(YourCamera, CVCAM_PROP_WINDOW, &mywin);}{
|
||||
\par
|
||||
\par }\pard \ql \fi720\li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {3.Set output width and height of the video.
|
||||
\par }\pard \ql \fi720\li720\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0 {\fs20 int width = 320;
|
||||
\par int height = 240;
|
||||
\par cvcamSetProperty(YourCamera, CVCAM_PROP_RNDWIDTH, &width);
|
||||
\par cvcamSetProperty(YourCamera, CVCAM_PROP_RNDHEIGHT, &height);}{
|
||||
\par
|
||||
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {Note: if your pass NULL as a window, or don\rquote t set it, it\rquote ll be created under Windows systems
|
||||
\par Note 2: If you don\rquote t set width and height those of the source are used.
|
||||
\par Note 3 : cvcamWindow has type HWND under Windows and type Window under linux.
|
||||
\par }\pard\plain \s2\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel1\adjustright\rin0\lin0\itap0 \b\f1\fs44\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {{\*\bkmkstart _Toc517241040}Make the settings active{\*\bkmkend _Toc517241040}
|
||||
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\tab Call }{\fs20 cvcamInit();}{
|
||||
\par }\pard\plain \s2\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel1\adjustright\rin0\lin0\itap0 \b\f1\fs44\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {{\*\bkmkstart _Toc517241041}Control the video{\*\bkmkend _Toc517241041}
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\tab Call }{\fs20 cvcamStart();
|
||||
\par \tab cvcamStop();
|
||||
\par \tab cvcamPause();
|
||||
\par \tab cvcamResume();}{
|
||||
\par \tab They take no arguments and return 0 on success.
|
||||
\par }\pard\plain \s2\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel1\adjustright\rin0\lin0\itap0 \b\f1\fs44\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {{\*\bkmkstart _Toc517241042}Display cameras property pages{\*\bkmkend _Toc517241042
|
||||
}
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {To display the property page for camera YourCamera call
|
||||
\par }{\fs20\cf18 cvcamGetProperty}{\fs20\cf1 (}{\fs20 YourCamera}{\fs20\cf1 , }{\fs20\cf15 CVCAM_CAMERAPROPS}{\fs20\cf1 , }{\fs20\cf17 NULL}{\fs20\cf1 );
|
||||
\par
|
||||
\par }{\cf1 To display the video format property page for the same camera call
|
||||
\par }{\fs20\cf18 cvcamGetProperty}{\fs20\cf1 (}{\fs20 YourCamera}{\fs20\cf1 , }{\fs20\cf15 CVCAM_VIDEOFORMAT}{\fs20\cf1 , }{\fs20\cf17 NULL}{\fs20\cf1 );}{
|
||||
\par
|
||||
\par Note: a camera may have no one or both property pages under Windows and the content of the pages depends on the particular driver.
|
||||
\par Note2: Property pages are displayed only for enabled camera(s) and after a call to }{\fs20 cvcamInit()}{ under Windows.
|
||||
\par }\pard\plain \s2\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel1\adjustright\rin0\lin0\itap0 \b\f1\fs44\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {{\*\bkmkstart _Toc517241043}Process video frames{\*\bkmkend _Toc517241043}
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {You can set your own callback function, which will process every captured frame and change it\rquote
|
||||
s data. It can be done with }{\fs20\cf15 CVCAM_PROP_CALLBACK }{\fs20 property.
|
||||
\par void callback(IplImage* image)
|
||||
\par \{
|
||||
\par \tab //Do everything you want with the image
|
||||
\par \}
|
||||
\par cvcamSetProperty(0, }{\fs20\cf15 CVCAM_PROP_CALLBACK}{\fs20 , callback)
|
||||
\par
|
||||
\par }{Note:under linux callback currently is called on every frame being rendered or got with \'93raw_image\'94 property.
|
||||
\par Under windows \endash on every frame captured.
|
||||
\par }\pard\plain \s2\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel1\adjustright\rin0\lin0\itap0 \b\f1\fs44\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {{\*\bkmkstart _Toc517241044}Get the pointer to last frame{\*\bkmkend _Toc517241044}
|
||||
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {//Example for camera 0
|
||||
\par \tab }{\fs20 IplImage* image;
|
||||
\par \tab CvcamPause();
|
||||
\par \tab cvcamGetProperty(0,\'94raw_image\'94,&image)
|
||||
\par \tab //Do what you want with the image
|
||||
\par }\pard \ql \fi720\li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\fs20 cvcamResume();}{
|
||||
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {
|
||||
\par Note: you don\rquote t need to free the data pointed to by image.
|
||||
\par Note2: You should use }{\fs20 cvcamPause}{ and }{\fs20 cvcamResume}{ to prevent changes of the data.
|
||||
\par Note3. This isn\rquote t currently implemented under Windows
|
||||
\par }\pard\plain \s2\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel1\adjustright\rin0\lin0\itap0 \b\f1\fs44\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {{\*\bkmkstart _Toc517241045}Play an avi file and process it\rquote
|
||||
s frames if needed{\*\bkmkend _Toc517241045}
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\faauto\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\tab Use cvcamPlayAVI(\tab }{\fs20 const}{ }{\fs20 char* file,
|
||||
\par \tab \tab \tab void* window,
|
||||
\par \tab \tab \tab int width,
|
||||
\par \tab \tab \tab int height,
|
||||
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\fs20 \tab \tab \tab void* callback)
|
||||
\par
|
||||
\par }{The default call }{\fs20 cvcamPlayAVI(0,0,0,0,0)}{ opens an \'93open file\'94 dialog and if a file was chosen creates a video window and plays the fil
|
||||
e into it without any procession. If an existing file name is passed as a first argument this file is played. The second argument is a window id to play video into it (HWND or Window depending on platform)
|
||||
\par Width and Height specify the size of the output video window. If 0 passed, those that are set in the file are used. Callback is quiet as for processing video from camera \endash void callback(IplImage* image).
|
||||
\par
|
||||
\par }{\i Example(C++ for Windows ):
|
||||
\par
|
||||
\par \tab }{\fs20 extern "C"
|
||||
\par }\pard \ql \fi720\li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\fs20 \{
|
||||
\par }\pard \ql \fi720\li720\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0 {\fs20 #include "highgui.h"
|
||||
\par }\pard \ql \fi720\li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\fs20 \}
|
||||
\par int main()
|
||||
\par \{
|
||||
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\fs20 \tab \tab char* filename = \'93C:\\cartoon.avi\'94;
|
||||
\par \tab \tab
|
||||
\par \tab \tab named_window("cvcam window", 0);
|
||||
\par HWND mywin = get_hwnd_byname("cvcam window");
|
||||
\par \tab \tab cvcamPlayAVI( filename, mywin, 320, 240, mycallback);
|
||||
\par \tab \tab return 0;
|
||||
\par \tab \}
|
||||
\par \tab
|
||||
\par \tab void mycallback(IplImage* img) //Paints top half of image black
|
||||
\par \tab \{
|
||||
\par \tab \tab memset(img->imageData, 0, img->imageSize/2);
|
||||
\par
|
||||
\par }\pard \ql \fi720\li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\fs20 \}
|
||||
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\fs20 \tab
|
||||
\par }{
|
||||
\par Note: This function blocks the calling thread until the file finishes playing.
|
||||
\par Note: this function isn\rquote t implemented under Linux yet}{\fs20 .}{
|
||||
\par }\pard\plain \s2\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel1\adjustright\rin0\lin0\itap0 \b\f1\fs44\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {{\*\bkmkstart _Toc517241046}Work with multiple cameras under linux
|
||||
{\*\bkmkend _Toc517241046}
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
|
||||
Selecting multiple cameras under linux with setting CVCAM_PROP_ENABLE property will make them all to work independently
|
||||
\par
|
||||
\par }\pard\plain \s2\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel1\adjustright\rin0\lin0\itap0 \b\f1\fs44\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {{\*\bkmkstart _Toc517241047}Work with multiple cameras under Windows
|
||||
{\*\bkmkend _Toc517241047}
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {Enab
|
||||
ling two cameras under Windows results in activating cvSyncFilter, which synchronizes the streams and enables setting stereo callback for 2 synchronous frames. Set it as below:
|
||||
\par }{\fs20
|
||||
\par }\pard \ql \fi720\li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\fs20 void stereocallback(IplImage* image1, IplImage* image2);
|
||||
\par cvcamSetProperty(0, CVCAM_STEREO_CALLBACK , stereocallback);
|
||||
\par
|
||||
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\fs20 Note: single callbacks for each camera are not active in this mode currently;
|
||||
\par }\pard\plain \s2\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel1\adjustright\rin0\lin0\itap0 \b\f1\fs44\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {{\*\bkmkstart _Toc517241048}Finish working with cvcam{\*\bkmkend _Toc517241048}
|
||||
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {Call cvcamExit();
|
||||
\par
|
||||
\par }\pard\plain \s1\ql \li0\ri0\sb360\sa60\keepn\pagebb\widctlpar\aspalpha\aspnum\faauto\outlinelevel0\adjustright\rin0\lin0\itap0 \b\f1\fs52\lang1033\langfe1033\kerning32\cgrid\langnp1033\langfenp1033 {{\*\bkmkstart _Toc517241049}Cvcam Reference
|
||||
{\*\bkmkend _Toc517241049}
|
||||
\par }\pard\plain \s2\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel1\adjustright\rin0\lin0\itap0 \b\f1\fs44\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {{\*\bkmkstart _Toc517241050}cvcam API{\*\bkmkend _Toc517241050}
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
|
||||
\par }\pard\plain \s3\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin0\lin0\itap0 \b\fs40\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {{\*\bkmkstart _Toc517241051}cvcamExit{\*\bkmkend _Toc517241051}
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
|
||||
\par Declaration:
|
||||
\par }\pard \ql \fi720\li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\fs20 int cvcamExit();
|
||||
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {
|
||||
\par Parameters:
|
||||
\par \tab None.
|
||||
\par
|
||||
\par Return Value:
|
||||
\par \tab Always 0.
|
||||
\par
|
||||
\par Remarks:
|
||||
\par \tab Frees all resources, used by cvcam.
|
||||
\par }{\fs20\cf18
|
||||
\par }\pard\plain \s3\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin0\lin0\itap0 \b\fs40\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {{\*\bkmkstart _Toc517241052}cvcamGetCamerasCount{\*\bkmkend _Toc517241052}
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
|
||||
\par Declaration:
|
||||
\par \tab }{\fs20 int cvcamGetCamerasCount();}{
|
||||
\par
|
||||
\par Parameters:
|
||||
\par \tab None.
|
||||
\par
|
||||
\par Return Value:
|
||||
\par \tab Number of found cameras.
|
||||
\par
|
||||
\par Remarks:
|
||||
\par \tab The first procedure to call in most every cvcam based program. Initializes the cvcam library. Under linux initializes X window system to work with multiple threads also.
|
||||
\par
|
||||
\par
|
||||
\par }{\fs20\cf1
|
||||
\par }\pard\plain \s3\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin0\lin0\itap0 \b\fs40\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {{\*\bkmkstart _Toc517241053}cvcamGetProperty{\*\bkmkend _Toc517241053}
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
|
||||
\par
|
||||
\par Declaration:
|
||||
\par }{\fs20 cvcamGetProperty(int camera, const char* property, void* value);
|
||||
\par }{
|
||||
\par
|
||||
\par Parameters:
|
||||
\par }\pard \ql \li720\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0 {int }{\b camera}{ (in) \endash a number of the camera in 0-based index of cameras found in the\tab \tab \tab system.
|
||||
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {
|
||||
\par }\pard \ql \li720\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0 {const char* }{\b property}{ (in) \endash a name of the property (See cvcam Properties Interface for\tab \tab \tab details).
|
||||
\par
|
||||
\par void* }{\b value}{ (out) \endash depends on the property\rquote s name. (See cvcam Properties Interface for\tab \tab details).
|
||||
\par
|
||||
\par
|
||||
\par
|
||||
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {
|
||||
\par
|
||||
\par
|
||||
\par Return Value:
|
||||
\par }\pard \ql \fi720\li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {0 on success, negative error code for error.
|
||||
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {
|
||||
\par Remarks:
|
||||
\par }\pard \ql \fi720\li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {If successful, }{\b value}{ will contain the value of the specified }{\b property }{for the specified\tab }{\b camera}{. (See cvcam Properties Interface for details).
|
||||
|
||||
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {
|
||||
\par }\pard\plain \s3\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin0\lin0\itap0 \b\fs40\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
|
||||
\par {\*\bkmkstart _Toc517241054}cvcamInit{\*\bkmkend _Toc517241054}
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
|
||||
\par
|
||||
\par Declaration:
|
||||
\par \tab }{\fs20 int cvcamInit();}{
|
||||
\par
|
||||
\par Parameters:
|
||||
\par \tab None.
|
||||
\par
|
||||
\par Return Value:
|
||||
\par \tab 1 on success, 0 on error.
|
||||
\par
|
||||
\par Remarks:
|
||||
\par }\pard \ql \li720\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0 {This function makes the settings, set by cvcamSetProperty active and does the final step of cvcam initialization. Don\rquote t be confused \endash it\rquote
|
||||
s not the first function, you call. It assumes that cvcamGetCamerasCount has already been called and usually that some properties have been set.
|
||||
\par }\pard\plain \s3\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin0\lin0\itap0 \b\fs40\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
|
||||
\par }{\cf1 {\*\bkmkstart _Toc517241055}cvcamPause{\*\bkmkend _Toc517241055}
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
|
||||
\par Declaration:
|
||||
\par \tab }{\fs20 int cvcamPause();}{
|
||||
\par
|
||||
\par Parameters:
|
||||
\par \tab None.
|
||||
\par
|
||||
\par Return Value:
|
||||
\par \tab Always 0.
|
||||
\par
|
||||
\par Remarks:
|
||||
\par \tab Just pauses the video stream if it is running.
|
||||
\par
|
||||
\par }\pard\plain \s3\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin0\lin0\itap0 \b\fs40\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {{\*\bkmkstart _Toc517241056}cvcamPlayAVI{\*\bkmkend _Toc517241056}
|
||||
\par
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {Declaration:
|
||||
\par }\pard \ql \fi720\li0\ri0\widctlpar\faauto\rin0\lin0\itap0 {\fs20 int cvcamPlayAVI(const char* file,
|
||||
\par }\pard \ql \li0\ri0\widctlpar\faauto\rin0\lin0\itap0 {\fs20 \tab \tab void* window,
|
||||
\par \tab \tab int width,
|
||||
\par \tab \tab int height,
|
||||
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\fs20 \tab \tab void* callback)}{
|
||||
\par
|
||||
\par Parameters:
|
||||
\par }\pard \ql \fi720\li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {const char* }{\b file}{ (in) \endash the name of an existing file on disk or NULL .
|
||||
\par }\pard \ql \li720\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0 {
|
||||
\par void* }{\b window}{ (in) \endash an existing HWND (Windows systems) or Window(Linux systems) or NULL.
|
||||
\par
|
||||
\par int }{\b width}{ (in) \endash width of the displayed video;
|
||||
\par
|
||||
\par int }{\b height}{ (in) \endash height of the displayed video;
|
||||
\par
|
||||
\par void* }{\b callback }{(in) \endash a pointer to a callback function }{\fs20 void callback(IplImage* img), }{which\tab \tab will process every frame before displaying it.}{\fs20
|
||||
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {
|
||||
\par Return Value:
|
||||
\par }\pard \ql \fi720\li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 { 0 on success, -1 on eror.
|
||||
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {
|
||||
\par Remarks:
|
||||
\par \tab Plays the }{\b file }{of type .avi into a specified }{\b window}{. The output video size is set to
|
||||
\par }\pard \ql \fi720\li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\b width }{x }{\b height. }{Every frame is processed with a }{\b callback }{before displaying.
|
||||
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\tab
|
||||
\par }\pard \ql \fi720\li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {If the }{\b file }{parameter}{\b }{is NULL, the \'93file open\'94 dialog is displayed.
|
||||
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\tab
|
||||
\par \tab If the }{\b window }{is NULL it\rquote ll be created.
|
||||
\par
|
||||
\par \tab If }{\b width}{ or }{\b height}{ is 0, it is set to the size specified inside the avi file being played.
|
||||
\par
|
||||
\par \tab If }{\b callback}{ is NULL the frames won\rquote t be processed, just displayed as is.
|
||||
\par \tab You can also define your callback function }{\fs20 void callback(IplImage* }{\b\fs20 img}{\fs20 ) }{and pass a pointer to \tab it as a }{\b callback }{parameter. It will be called before displaying each frame with the }{\b img \tab }{
|
||||
parameter containing the data of frame going to be displayed. IplImage structure is \tab declared in \'93ipl.h\'94, which is included from \'93cv.h\'94 as follows:
|
||||
\par
|
||||
\par }\pard \ql \li1440\ri0\widctlpar\faauto\rin0\lin1440\itap0 {\fs20 typedef struct _IplImage \{
|
||||
\par int nSize; /* size of iplImage struct */
|
||||
\par int ID; /* version */
|
||||
\par int nChannels;
|
||||
\par int alphaChannel;
|
||||
\par int depth; /* pixel depth in bits */
|
||||
\par char colorModel[4];
|
||||
\par char channelSeq[4];
|
||||
\par int dataOrder;
|
||||
\par int origin;
|
||||
\par int align; /* 4 or 8 byte align */
|
||||
\par int width;
|
||||
\par int height;
|
||||
\par struct _IplROI *roi;
|
||||
\par struct _IplImage
|
||||
\par *maskROI; /* poiner to maskROI if any */
|
||||
\par void *imageId; /* use of the application */
|
||||
\par struct
|
||||
\par _IplTileInfo *tileInfo; /* contains information on tiling */
|
||||
\par int imageSize; /* useful size in bytes */
|
||||
\par char *imageData; /* pointer to aligned image */
|
||||
\par int widthStep; /* size of aligned line in bytes */
|
||||
\par int BorderMode[4]; /* */
|
||||
\par int BorderConst[4]; /* */
|
||||
\par char *imageDataOrigin; /* ptr to full, nonaligned image */
|
||||
\par }\pard \ql \fi720\li720\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0 {\fs20 \} IplImage;
|
||||
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\fs20
|
||||
\par \tab }{This function blocks the calling thread until the file finishes or error occurs and then \tab returns.
|
||||
\par }\pard \ql \fi720\li720\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0 {
|
||||
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\tab
|
||||
\par
|
||||
\par }\pard\plain \s3\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin0\lin0\itap0 \b\fs40\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\cf1 {\*\bkmkstart _Toc517241057}cvcamResume{\*\bkmkend _Toc517241057}
|
||||
\par }{
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {Declaration:
|
||||
\par \tab }{\fs20 int cvcamResume();}{
|
||||
\par
|
||||
\par Parameters:
|
||||
\par \tab None.
|
||||
\par
|
||||
\par Return Value:
|
||||
\par \tab Always 0.
|
||||
\par
|
||||
\par Remarks:
|
||||
\par \tab Resumes the video if it is paused.
|
||||
\par
|
||||
\par }\pard\plain \s3\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin0\lin0\itap0 \b\fs40\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {{\*\bkmkstart _Toc517241058}cvcamSelectCamera{\*\bkmkend _Toc517241058}
|
||||
\par
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {Declaration:
|
||||
\par \tab }{\fs20 int cvcamSelectCamera(int** }{\b\fs20 out}{\fs20 );}{
|
||||
\par
|
||||
\par Parameters:
|
||||
\par \tab int** }{\b out}{ (out) \endash an address of a pointer to int or NULL
|
||||
\par }\pard \ql \fi720\li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {If not NULL will contain an array of selected cameras indexes.
|
||||
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {
|
||||
\par Return Value:
|
||||
\par \tab The number of selected cameras \endash 0, 1 or 2.
|
||||
\par
|
||||
\par Remarks:
|
||||
\par }\pard \ql \li720\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0 {This function pops up a dialog box, which suggests to select one or 2 cameras to work with. If }{\b out }{is}{\b }{not NULL, and user has selected some
|
||||
camera(s), the array of their indexes is placed into *}{\b out}{. Use }{\fs20 free()}{ to release this array after you don\rquote t need it more.
|
||||
\par }\pard\plain \s3\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin0\lin0\itap0 \b\fs40\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
|
||||
\par {\*\bkmkstart _Toc517241059}cvcamSetProperty{\*\bkmkend _Toc517241059}
|
||||
\par }{\cf15
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {Declaration:
|
||||
\par \tab }{\fs20 int cvcamSetProperty(int camera, const char* property, void* value);}{
|
||||
\par
|
||||
\par Parameters:
|
||||
\par }\pard \ql \li720\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0 {int }{\b camera}{ (in) \endash a number of the camera in 0-based index of cameras found in the\tab \tab \tab system.
|
||||
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {
|
||||
\par }\pard \ql \li720\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0 {const char* }{\b property}{ (in) \endash a name of the property (See cvcam Properties Interface for\tab \tab \tab details).
|
||||
\par }\pard\plain \s18\ql \li720\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
|
||||
\par }\pard\plain \ql \li720\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {void* }{\b value}{ (in) \endash depends on the property\rquote s name. (See cvcam Properties Interface for
|
||||
\tab \tab details).
|
||||
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {
|
||||
\par Return Value:
|
||||
\par \tab 0 on success, negative error code for error.
|
||||
\par
|
||||
\par Remarks:
|
||||
\par }\pard \ql \li720\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0 {Sets the value of the specified }{\b property}{ of the specified }{\b camera}{ to }{\b value}{. (See\tab cvcam Properties Interface for details).
|
||||
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {
|
||||
\par
|
||||
\par }\pard\plain \s3\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin0\lin0\itap0 \b\fs40\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {{\*\bkmkstart _Toc517241060}cvcamStart{\*\bkmkend _Toc517241060}
|
||||
\par
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {Declaration:
|
||||
\par \tab }{\fs20 int cvcamStart();
|
||||
\par }{
|
||||
\par
|
||||
\par Parameters:
|
||||
\par \tab None.
|
||||
\par
|
||||
\par Return Value:
|
||||
\par }\pard \ql \fi720\li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {0 on success, -1 on failure.
|
||||
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {
|
||||
\par Remarks:
|
||||
\par \tab Starts the video stream for all enabled cameras.
|
||||
\par }\pard\plain \s3\ql \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin0\lin0\itap0 \b\fs40\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
|
||||
\par {\*\bkmkstart _Toc517241061}cvcamStop{\*\bkmkend _Toc517241061}
|
||||
\par }{\cf1
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {Declaration:
|
||||
\par \tab }{\fs20 int cvcamStop();
|
||||
\par }{
|
||||
\par Parameters:
|
||||
\par \tab None.
|
||||
\par
|
||||
\par Return Value:
|
||||
\par \tab Always 0.
|
||||
\par
|
||||
\par Remarks:
|
||||
\par \tab Stops the video stream.
|
||||
\par }\pard \ql \li0\ri0\widctlpar\faauto\rin0\lin0\itap0 {\fs20\cf1
|
||||
\par
|
||||
\par }\pard\plain \s2\qc \li0\ri0\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel1\adjustright\rin0\lin0\itap0 \b\f1\fs44\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {{\*\bkmkstart _Toc517241062}cvcam Properties Interface{\*\bkmkend _Toc517241062}
|
||||
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {There is a list of properties which can be set for each camera. There are 2 functions to work with them:
|
||||
\par \tab }{\fs20 cvcamGetProperty(int cameraindex, const char* property, void* value);
|
||||
\par \tab cvcamSetProperty(int cameraindex, const char* property, void* value);
|
||||
\par }{
|
||||
\par The first argument is the number that identifies the camera, the second is the name of the property. The act
|
||||
ual type of the 3-rd argument depends on the property. Some of the properties can be set and got, some only set or only got. See the table below for detailes
|
||||
\par
|
||||
\par
|
||||
\par }\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
|
||||
\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx2875\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx4963
|
||||
\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx7536\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10
|
||||
\cltxlrtb\clftsWidth1 \cellx8407\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx9463\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {
|
||||
Property name\cell Action\cell argument\cell Can be get/set\cell Platform
|
||||
\par Win/Lin\cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv
|
||||
\brdrs\brdrw10 \trftsWidth1\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx2875\clvertalt\clbrdrt\brdrs\brdrw10
|
||||
\clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx4963\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx7536\clvertalt\clbrdrt
|
||||
\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx8407\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx9463\row
|
||||
}\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
|
||||
\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx2875\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx4963
|
||||
\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx7536\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10
|
||||
\cltxlrtb\clftsWidth1 \cellx8407\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx9463\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {
|
||||
\fs20\cf15 CVCAM_PROP_ENABLE}{\cell Selects/deselects the camera\cell CVCAMTRUE/
|
||||
\par CVCAMFALSE
|
||||
\par For Set, pointer to int for Get\cell SG\cell WL\cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10
|
||||
\trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx2875
|
||||
\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx4963\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10
|
||||
\cltxlrtb\clftsWidth1 \cellx7536\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx8407\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
|
||||
\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx9463\row }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\fs20\cf15 CVCAM_PROP_RENDER}{\cell Renders the cam\cell CVCAMTRUE/
|
||||
\par CVCAMFALSE
|
||||
\par For Set, pointer to int for Get\cell SG\cell WL\cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10
|
||||
\trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx2875
|
||||
\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx4963\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10
|
||||
\cltxlrtb\clftsWidth1 \cellx7536\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx8407\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
|
||||
\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx9463\row }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\fs20\cf15 CVCAM_PROP_WINDOW}{\cell Selects a window for rendering camera\rquote s stream\cell
|
||||
Pointer to HWND(Win) or pointer to Window(Lin)\cell SG\cell WL\cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr
|
||||
\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1
|
||||
\cellx2875\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx4963\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10
|
||||
\cltxlrtb\clftsWidth1 \cellx7536\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx8407\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
|
||||
\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx9463\row }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\fs20\cf15 CVCAM_PROP_CALLBACK}{\cell Sets a callback function which processes every frame\cell
|
||||
void (*callback)(IplImage* image)\cell S\cell WL\cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr
|
||||
\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1
|
||||
\cellx2875\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx4963\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10
|
||||
\cltxlrtb\clftsWidth1 \cellx7536\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx8407\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
|
||||
\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx9463\row }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\fs20\cf15 CVCAM_DESCRIPTION}{\cell Gets string name and some other info about the camera\cell A pointer to struct }{
|
||||
\fs20 CameraDescription
|
||||
\par Under windows only DeviceDescription field is active}{\cell G\cell WL\cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10
|
||||
\trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10
|
||||
\cltxlrtb\clftsWidth1 \cellx2875\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx4963\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
|
||||
\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx7536\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx8407\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb
|
||||
\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx9463\row }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\fs20\cf15 CVCAM_VIDEOFORMAT}{\cell Displays videoformat dialog box for the camera\cell NULL\cell
|
||||
G\cell WL\cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv
|
||||
\brdrs\brdrw10 \trftsWidth1\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx2875\clvertalt\clbrdrt\brdrs\brdrw10
|
||||
\clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx4963\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx7536\clvertalt\clbrdrt
|
||||
\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx8407\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx9463\row
|
||||
}\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\fs20\cf15 CVCAM_CAMERAPROPS}{\cell Displays camera properties dialog box for the camera\cell NULL\cell G\cell WL\cell }\pard
|
||||
\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10
|
||||
\trftsWidth1\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx2875\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl
|
||||
\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx4963\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx7536\clvertalt\clbrdrt
|
||||
\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx8407\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx9463\row
|
||||
}\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\fs20\cf15 CVCAM_RNDWIDTH}{\cell Sets the width of the output video\cell Pointer to int containing width\cell SG\cell WL\cell }\pard
|
||||
\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10
|
||||
\trftsWidth1\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx2875\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl
|
||||
\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx4963\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx7536\clvertalt\clbrdrt
|
||||
\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx8407\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx9463\row
|
||||
}\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\fs20\cf15 CVCAM_RNDHEIGHT}{\cell Sets the height of the output video\cell Pointer to int containing height\cell SG\cell WL\cell }\pard
|
||||
\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10
|
||||
\trftsWidth1\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx2875\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl
|
||||
\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx4963\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx7536\clvertalt\clbrdrt
|
||||
\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx8407\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx9463\row
|
||||
}\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\fs20\cf15 CVCAM_STEREO_CALLBACK\cell }{Sets the callback which will be called on every two synchronous frames from 2 cameras\cell
|
||||
Void (*callback)(IplImage* Image1, IplImage* image2)\cell S\cell W\cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10
|
||||
\trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10
|
||||
\cltxlrtb\clftsWidth1 \cellx2875\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx4963\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
|
||||
\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx7536\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx8407\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb
|
||||
\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx9463\row }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\fs20\cf15 CVCAM_PROP_RAW\cell }{Gets the last frame\cell IplImage**\cell G\cell L\cell }\pard
|
||||
\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10
|
||||
\trftsWidth1\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx2875\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl
|
||||
\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx4963\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx7536\clvertalt\clbrdrt
|
||||
\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx8407\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx9463\row
|
||||
}\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
|
||||
\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx2875\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx4963
|
||||
\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx7536\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10
|
||||
\cltxlrtb\clftsWidth1 \cellx8407\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx9463\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {
|
||||
\fs20\cf15 CVCAM_PROP_SETFORMAT\cell }{Sets video format in non-dialog way\cell A pointer to struct videoformat.For Set should be initialized with desired values\cell SG\cell L\cell }\pard
|
||||
\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10
|
||||
\trftsWidth1\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx2875\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl
|
||||
\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx4963\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx7536\clvertalt\clbrdrt
|
||||
\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx8407\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth1 \cellx9463\row
|
||||
}\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {
|
||||
\par }}
|
6
doc/go
6
doc/go
@ -1,6 +0,0 @@
|
||||
(pdflatex '\newcommand{\genc}{true}\newcommand{\genpy}{true}\newcommand{\targetlang}{c}\input{opencv.tex}' &&
|
||||
bibtex opencv &&
|
||||
makeindex opencv &&
|
||||
pdflatex '\newcommand{\genc}{true}\newcommand{\genpy}{true}\newcommand{\targetlang}{c}\input{opencv.tex}' > 1
|
||||
) || exit 1
|
||||
#gv -page=480 opencv.pdf
|
@ -1,6 +0,0 @@
|
||||
(pdflatex '\newcommand{\genc}{true}\newcommand{\genpy}{true}\newcommand{\targetlang}{c}\input{opencv_user.tex}' &&
|
||||
# bibtex opencv_user &&
|
||||
# makeindex opencv_user &&
|
||||
pdflatex '\newcommand{\genc}{true}\newcommand{\genpy}{true}\newcommand{\targetlang}{c}\input{opencv_user.tex}' > 1
|
||||
) || exit 1
|
||||
#gv -page=480 opencv_user.pdf
|
@ -1,32 +0,0 @@
|
||||
%%
|
||||
%% This is file `helvetica.sty', based on helvet.sty extended to include
|
||||
%% definitions for rm and tt. This means commands such as \textbf, \textit,
|
||||
%% etc. will appear in Helvetica.
|
||||
%% Changes added by Harriet Borton on <1995/12/11>
|
||||
%%
|
||||
%% The original source files were:
|
||||
%%
|
||||
%% psfonts.dtx (with options: `helvet')
|
||||
%%
|
||||
%% Copyright (C) 1994 Sebastian Rahtz
|
||||
%% All rights reserved.
|
||||
%%
|
||||
%% The original file is part of the PSNFSS2e package.
|
||||
%% -----------------------------------------
|
||||
%%
|
||||
%% This is a generated file. Permission is granted to to customize the
|
||||
%% declarations in this file to serve the needs of your installation.
|
||||
%% However, no permission is granted to distribute a modified version of
|
||||
%% this file under its original name.
|
||||
\def\fileversion{4.2}
|
||||
\def\filedate{94/11/11}
|
||||
\def\docdate {94/11/06}
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{helvetica}[\filedate\space\fileversion\space
|
||||
Helvetica PSNFSS2e package]
|
||||
\renewcommand{\sfdefault}{phv}
|
||||
\renewcommand{\rmdefault}{phv}
|
||||
\renewcommand{\ttdefault}{pcr}
|
||||
\endinput
|
||||
%%
|
||||
%% End of file `helvetica.sty'.
|
@ -1,24 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
LANGUAGES="${LANGUAGES:=c cpp py}"
|
||||
|
||||
mkdir -p $LANGUAGES
|
||||
tput clear
|
||||
python latex.py ../online-opencv.tex $LANGUAGES || exit
|
||||
|
||||
for D in $LANGUAGES
|
||||
do
|
||||
echo $D
|
||||
mkdir -p $D
|
||||
sed "s/%LANG%/$D/" conf.py > $D/conf.py
|
||||
TEXINPUTS=$PWD: sphinx-build -w $D/sphinx.errors -D "lang=$D" -b html -d _build/doctrees/$D $D _build/html/$D
|
||||
|
||||
#Insert javascript links to load the Wiki in a frame
|
||||
for file in `ls _build/html/$D/*.html`
|
||||
do
|
||||
cat $file | sed "/Comments from the Wiki/s/href=\"\(.*\)\">id=0.\([0-9]*\) /href=\"javascript:void\(0\)\" onclick=\"insertIframe\('\2', '\1'\)\" id=\"\2\">/" > tmp.html
|
||||
mv 'tmp.html' "$file"
|
||||
done
|
||||
done
|
||||
|
||||
|
@ -1,17 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
LANGUAGES="${LANGUAGES:=c cpp py}"
|
||||
|
||||
mkdir -p $LANGUAGES
|
||||
tput clear
|
||||
python latex.py ../online-opencv.tex $LANGUAGES || exit
|
||||
|
||||
for D in $LANGUAGES
|
||||
do
|
||||
echo $D
|
||||
mkdir -p _build/latex/$D
|
||||
cp conf.py $D
|
||||
cp mymath.sty _build/latex/$D
|
||||
TEXINPUTS=$PWD: sphinx-build -w $D/sphinx.errors -D "lang=$D" -b latex -d _build/doctrees/$D $D _build/latex/$D
|
||||
(cd _build/latex/$D && rm *.aux *.toc *.log && pdflatex opencv.tex)
|
||||
done
|
Binary file not shown.
Before Width: | Height: | Size: 78 KiB |
@ -1,206 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# opencv documentation build configuration file, created by
|
||||
# sphinx-quickstart on Thu Jun 4 21:06:43 2009.
|
||||
#
|
||||
# This file is execfile()d with the current directory set to its containing dir.
|
||||
#
|
||||
# Note that not all possible configuration values are present in this
|
||||
# autogenerated file.
|
||||
#
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
import sys, os
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#sys.path.append(os.path.abspath('.'))
|
||||
|
||||
# -- General configuration -----------------------------------------------------
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be extensions
|
||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||
extensions = ['sphinx.ext.pngmath', 'sphinx.ext.doctest'] # , 'sphinx.ext.intersphinx']
|
||||
doctest_test_doctest_blocks = 'block'
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
||||
# The suffix of source filenames.
|
||||
source_suffix = '.rst'
|
||||
|
||||
# The encoding of source files.
|
||||
#source_encoding = 'utf-8'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'opencv'
|
||||
copyright = u'2010, authors'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '2.2'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '2.2'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
#language = None
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
#today = ''
|
||||
# Else, today_fmt is used as the format for a strftime call.
|
||||
#today_fmt = '%B %d, %Y'
|
||||
|
||||
# List of documents that shouldn't be included in the build.
|
||||
#unused_docs = []
|
||||
|
||||
# List of directories, relative to source directory, that shouldn't be searched
|
||||
# for source files.
|
||||
exclude_trees = ['_build']
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all documents.
|
||||
#default_role = None
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
#add_function_parentheses = True
|
||||
|
||||
# If true, the current module name will be prepended to all description
|
||||
# unit titles (such as .. function::).
|
||||
#add_module_names = True
|
||||
|
||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||
# output. They are ignored by default.
|
||||
#show_authors = False
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
#modindex_common_prefix = []
|
||||
|
||||
|
||||
# -- Options for HTML output ---------------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. Major themes that come with
|
||||
# Sphinx are currently 'default' and 'sphinxdoc'.
|
||||
html_theme = 'blue'
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
html_theme_options = {
|
||||
"lang" : "%LANG%" # buildall substitutes this for c, cpp, py
|
||||
}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
html_theme_path = ['../_themes']
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
#html_title = None
|
||||
|
||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||
#html_short_title = None
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top
|
||||
# of the sidebar.
|
||||
html_logo = '../opencv-logo2.png'
|
||||
|
||||
# The name of an image file (within the static path) to use as favicon of the
|
||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||
# pixels large.
|
||||
#html_favicon = None
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['../_static']
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
#html_last_updated_fmt = '%b %d, %Y'
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
#html_use_smartypants = True
|
||||
|
||||
# Custom sidebar templates, maps document names to template names.
|
||||
#html_sidebars = {}
|
||||
|
||||
# Additional templates that should be rendered to pages, maps page names to
|
||||
# template names.
|
||||
#html_additional_pages = {}
|
||||
|
||||
# If false, no module index is generated.
|
||||
#html_use_modindex = True
|
||||
|
||||
# If false, no index is generated.
|
||||
#html_use_index = True
|
||||
|
||||
# If true, the index is split into individual pages for each letter.
|
||||
#html_split_index = False
|
||||
|
||||
# If true, links to the reST sources are added to the pages.
|
||||
#html_show_sourcelink = True
|
||||
|
||||
# If true, an OpenSearch description file will be output, and all pages will
|
||||
# contain a <link> tag referring to it. The value of this option must be the
|
||||
# base URL from which the finished HTML is served.
|
||||
#html_use_opensearch = ''
|
||||
|
||||
# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
|
||||
#html_file_suffix = ''
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'opencvdoc'
|
||||
|
||||
|
||||
# -- Options for LaTeX output --------------------------------------------------
|
||||
|
||||
# The paper size ('letter' or 'a4').
|
||||
#latex_paper_size = 'letter'
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#latex_font_size = '10pt'
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title, author, documentclass [howto/manual]).
|
||||
latex_documents = [
|
||||
('index', 'opencv.tex', u'opencv Documentation',
|
||||
u'author', 'manual'),
|
||||
]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
#latex_logo = None
|
||||
|
||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||
# not chapters.
|
||||
#latex_use_parts = False
|
||||
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#latex_preamble = ''
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#latex_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#latex_use_modindex = True
|
||||
|
||||
pngmath_latex_preamble = '\usepackage{mymath}\usepackage{amsmath}\usepackage{bbm}\usepackage[usenames]{color}'
|
||||
|
||||
# intersphinx_mapping = {
|
||||
# 'http://docs.python.org/': None,
|
||||
# }
|
||||
intersphinx_mapping = {}
|
||||
|
||||
latex_elements = {'preamble': '\usepackage{mymath}\usepackage{amssymb}\usepackage{amsmath}\usepackage{bbm}'}
|
@ -1,781 +0,0 @@
|
||||
import sys
|
||||
from latexparser import latexparser, TexCmd
|
||||
import distutils.dep_util
|
||||
import os
|
||||
import cPickle as pickle
|
||||
import pyparsing as pp
|
||||
import StringIO
|
||||
from qfile import QOpen
|
||||
from string import Template
|
||||
from random import random
|
||||
import urllib
|
||||
|
||||
# useful things for pyparsing
|
||||
def returnList(x):
|
||||
def listify(s, loc, toks):
|
||||
return [toks]
|
||||
x.setParseAction(listify)
|
||||
return x
|
||||
def returnTuple(x):
|
||||
def listify(s, loc, toks):
|
||||
return [tuple(toks)]
|
||||
x.setParseAction(listify)
|
||||
return x
|
||||
def CommaList(word):
|
||||
return returnList(pp.Optional(word + pp.ZeroOrMore(pp.Suppress(',') + word)))
|
||||
def sl(s):
|
||||
return pp.Suppress(pp.Literal(s))
|
||||
|
||||
import pythonapi
|
||||
|
||||
python_api = pythonapi.reader("../../modules/python/api")
|
||||
|
||||
|
||||
class SphinxWriter:
|
||||
def __init__(self, filename, language, abspath):
|
||||
assert language in ['py', 'c', 'cpp']
|
||||
self.language = language
|
||||
|
||||
self.abspath = abspath
|
||||
os.path.abspath(os.path.dirname(filename))
|
||||
|
||||
self.f_index = QOpen(os.path.join(self.language, filename), 'wt')
|
||||
self.f = self.f_index
|
||||
self.f_chapter = None
|
||||
self.f_section = None
|
||||
self.indent = 0
|
||||
self.state = None
|
||||
self.envstack = []
|
||||
self.tags = {}
|
||||
self.errors = open('errors.%s' % language, 'wt')
|
||||
self.unhandled_commands = set()
|
||||
self.freshline = True
|
||||
self.function_props = {}
|
||||
self.covered = set() # covered functions, used for error report
|
||||
self.description = ""
|
||||
self.cur_module = ""
|
||||
|
||||
def write(self, s):
|
||||
self.freshline = len(s) > 0 and (s[-1] == '\n')
|
||||
self.f.write(s.replace('\n', '\n' + self.indent * " "))
|
||||
|
||||
def appendspace(self):
|
||||
""" append a space to the output - if we're not at the start of a line """
|
||||
if not self.freshline:
|
||||
self.write(' ')
|
||||
|
||||
def doplain(self, s):
|
||||
if (len(s) > 1) and (s[0] == '$' and s[-1] == '$') and self.state != 'math':
|
||||
s = ":math:`%s`" % s[1:-1].strip()
|
||||
elif self.state != 'math':
|
||||
s.replace('\\_', '_')
|
||||
if len(s) > 0 and s[-1] == '\n':
|
||||
s = s[:-1]
|
||||
if self.state == 'fpreamble':
|
||||
self.description += s
|
||||
else:
|
||||
self.write(s)
|
||||
|
||||
def docmd(self, c):
|
||||
if self.state == 'math':
|
||||
if c.cmd != ']':
|
||||
self.default_cmd(c)
|
||||
else:
|
||||
self.indent -= 1
|
||||
self.state = None
|
||||
self.write('\n\n')
|
||||
else:
|
||||
if c.cmd == '\n':
|
||||
self.write('\\\n')
|
||||
else:
|
||||
if c.cmd == '[':
|
||||
meth = self.cmd_gomath
|
||||
else:
|
||||
cname = "cmd_" + c.cmd
|
||||
meth = getattr(self, cname, self.unrecognized_cmd)
|
||||
meth(c)
|
||||
|
||||
def cmd_gomath(self, c):
|
||||
self.state = 'math'
|
||||
print >>self, "\n\n.. math::"
|
||||
self.indent += 1
|
||||
print >>self
|
||||
|
||||
def cmd_chapter(self, c):
|
||||
filename = str(c.params[0]).lower().replace(' ', '_').replace('/','_').replace('.','_')
|
||||
self.f_index.write(" %s\n" % filename)
|
||||
self.f_chapter = QOpen(os.path.join(self.language, filename + '.rst'), 'wt')
|
||||
self.f_section = None
|
||||
self.f = self.f_chapter
|
||||
self.indent = 0
|
||||
title = str(c.params[0])
|
||||
print >>self, '*' * len(title)
|
||||
print >>self, title
|
||||
print >>self, '*' * len(title)
|
||||
print >>self
|
||||
self.chapter_intoc = False
|
||||
|
||||
def cmd_section(self, c):
|
||||
filename = str(c.params[0]).lower().replace(' ', '_').replace('/','_')
|
||||
if len(self.cur_module) > 0:
|
||||
filename = self.cur_module + "_" + filename
|
||||
if not self.chapter_intoc:
|
||||
self.chapter_intoc = True
|
||||
print >>self.f_chapter
|
||||
print >>self.f_chapter, '.. toctree::'
|
||||
print >>self.f_chapter, ' :maxdepth: 2'
|
||||
print >>self.f_chapter
|
||||
self.f_chapter.write(" %s\n" % filename)
|
||||
self.f_section = QOpen(os.path.join(self.language, filename + '.rst'), 'wt')
|
||||
self.f = self.f_section
|
||||
self.indent = 0
|
||||
title = self.render(c.params[0].str)
|
||||
print >>self, title
|
||||
print >>self, '=' * len(title)
|
||||
print >>self
|
||||
print >>self, '.. highlight:: %s' % {'c': 'c', 'cpp': 'cpp', 'py': 'python'}[self.language]
|
||||
print >>self
|
||||
|
||||
def cmd_subsection(self, c):
|
||||
print >>self
|
||||
nm = str(c.params[0])
|
||||
print >>self, nm
|
||||
print >>self, '-' * len(nm)
|
||||
print >>self
|
||||
self.function_props = {}
|
||||
self.covered.add(nm)
|
||||
|
||||
def cmd_includegraphics(self, c):
|
||||
filename = os.path.join('..', '..', str(c.params[0]))
|
||||
print >>self, "\n\n.. image:: %s\n\n" % filename
|
||||
|
||||
def cmd_renewcommand(self, c):
|
||||
self.indent = 0
|
||||
command = self.render(c.params[0].str)
|
||||
if command == 'curModule':
|
||||
self.cur_module = self.render(c.params[1].str)
|
||||
|
||||
def wikiLink(self, name):
|
||||
return '`id=%s Comments from the Wiki <http://opencv.willowgarage.com/wiki/documentation/%s/%s/%s>`__' % (random(), self.language, self.cur_module, urllib.quote(name) )
|
||||
|
||||
def cmd_cvCppCross(self, c):
|
||||
self.write(":func:`%s`" % str(c.params[0]))
|
||||
|
||||
def cmd_cvCPyCross(self, c):
|
||||
self.write(":ref:`%s`" % str(c.params[0]))
|
||||
|
||||
def cmd_cross(self, c):
|
||||
self.write(":ref:`%s`" % str(c.params[0]))
|
||||
|
||||
def cmd_cvCross(self, c):
|
||||
self.write(":ref:`%s`" % str(c.params[0]))
|
||||
|
||||
def cmd_cvclass(self, c):
|
||||
self.indent = 0
|
||||
self.state = None
|
||||
nm = self.render(list(c.params[0].str))
|
||||
print >>self, "\n.. index:: %s\n" % nm
|
||||
print >>self, ".. _%s:\n" % nm
|
||||
print >>self, nm
|
||||
print >>self, '-' * len(nm)
|
||||
print >>self
|
||||
print >>self, self.wikiLink(nm)
|
||||
print >>self
|
||||
if self.language == 'py':
|
||||
print >>self, ".. class:: " + nm + "\n"
|
||||
else:
|
||||
print >>self, ".. ctype:: " + nm + "\n"
|
||||
print >>self
|
||||
self.addtag(nm, c)
|
||||
self.state = 'class'
|
||||
|
||||
def cmd_index(self, c):
|
||||
pass
|
||||
|
||||
def cmd_hyperref(self, c):
|
||||
pass
|
||||
|
||||
def cmd_footnote(self, c):
|
||||
pass
|
||||
|
||||
def cmd_textasciitilde(self, c):
|
||||
self.write('~')
|
||||
|
||||
def addtag(self, nm, c):
|
||||
if nm == "":
|
||||
self.report_error(c, "empty name")
|
||||
self.tags[nm] = "%s\t%s\t%d" % (nm, os.path.join(os.getcwd(), c.filename), c.lineno)
|
||||
|
||||
def cmd_cvfunc(self, c):
|
||||
self.cmd_cvCPyFunc(c)
|
||||
|
||||
def cmd_cvCPyFunc(self, c):
|
||||
self.indent = 0
|
||||
nm = self.render(c.params[0].str)
|
||||
print >>self, "\n.. index:: %s\n" % nm
|
||||
print >>self, ".. _%s:\n" % nm
|
||||
print >>self, nm
|
||||
print >>self, '-' * len(nm)
|
||||
print >>self
|
||||
print >>self, self.wikiLink(nm)
|
||||
print >>self
|
||||
self.state = 'fpreamble'
|
||||
if self.description != "":
|
||||
self.report_error(c, "overflow - preceding cvfunc (starting %s) not terminated?" % repr(self.description[:30]))
|
||||
self.description = ""
|
||||
self.addtag(nm, c)
|
||||
|
||||
self.function_props = {'name' : nm}
|
||||
self.covered.add(nm)
|
||||
|
||||
def cmd_cvCppFunc(self, c):
|
||||
self.indent = 0
|
||||
nm = self.render(c.params[0].str)
|
||||
print >>self, "\n.. index:: %s\n" % nm
|
||||
if 0:
|
||||
print >>self, "\n.. _%s:\n" % nm
|
||||
print >>self
|
||||
print >>self, 'cv::%s' % nm
|
||||
print >>self, '-' * (4+len(nm))
|
||||
print >>self
|
||||
print >>self, self.wikiLink(nm)
|
||||
print >>self
|
||||
self.state = 'fpreamble'
|
||||
if self.description != "":
|
||||
self.report_error(c, "overflow - preceding cvfunc (starting %s) not terminated?" % repr(self.description[:30]))
|
||||
self.description = ""
|
||||
self.addtag(nm, c)
|
||||
|
||||
self.function_props = {'name' : nm}
|
||||
self.covered.add(nm)
|
||||
|
||||
def cmd_cvdefC(self, c):
|
||||
if self.language != 'c':
|
||||
return
|
||||
s = str(c.params[0]).replace('\\_', '_')
|
||||
s = s.replace('\\par', '')
|
||||
s = s.replace('\n', ' ')
|
||||
s = s.replace(';', '')
|
||||
self.indent = 0
|
||||
for proto in s.split('\\newline'):
|
||||
if proto.strip() != "":
|
||||
print >>self, "\n\n.. cfunction:: " + proto.strip() + "\n"
|
||||
# print >>self, "=", repr(c.params[0].str)
|
||||
print >>self, ' ' + self.description
|
||||
self.description = ""
|
||||
print >>self
|
||||
self.state = None
|
||||
self.function_props['defpy'] = s
|
||||
|
||||
def cmd_cvdefCpp(self, c):
|
||||
if self.language != 'cpp':
|
||||
return
|
||||
s = str(c.params[0]).replace('\\_', '_')
|
||||
s = s.replace('\\par', '')
|
||||
s = s.replace('\n', ' ')
|
||||
s = s.replace(';', '')
|
||||
self.indent = 0
|
||||
for proto in s.split('\\newline'):
|
||||
if proto.strip() != "":
|
||||
print >>self, "\n\n.. cfunction:: " + proto.strip() + "\n"
|
||||
# print >>self, "=", repr(c.params[0].str)
|
||||
if self.description != "":
|
||||
print >>self, ' ' + self.description
|
||||
else:
|
||||
self.report_error(c, 'empty description')
|
||||
self.description = ""
|
||||
print >>self
|
||||
self.state = None
|
||||
self.function_props['defpy'] = s
|
||||
|
||||
def cmd_cvdefPy(self, c):
|
||||
if self.language != 'py':
|
||||
return
|
||||
s = str(c.params[0]).replace('\\_', '_')
|
||||
self.indent = 0
|
||||
print >>self, ".. function:: " + s + "\n"
|
||||
# print >>self, "=", repr(c.params[0].str)
|
||||
print >>self, ' ' + self.description
|
||||
print >>self
|
||||
self.description = ""
|
||||
self.state = None
|
||||
self.function_props['defpy'] = s
|
||||
|
||||
pp.ParserElement.setDefaultWhitespaceChars(" \n\t")
|
||||
|
||||
ident = pp.Word(pp.alphanums + "_.+-")
|
||||
ident_or_tuple = ident | (sl('(') + CommaList(ident) + sl(')'))
|
||||
initializer = ident_or_tuple
|
||||
arg = returnList(ident + pp.Optional(sl('=') + initializer))
|
||||
|
||||
decl = ident + sl('(') + CommaList(arg) + sl(')') + sl("->") + ident_or_tuple + pp.StringEnd()
|
||||
|
||||
try:
|
||||
l = decl.parseString(s)
|
||||
if str(l[0]) != self.function_props['name']:
|
||||
self.report_error(c, 'Decl "%s" does not match function name "%s"' % (str(l[0]), self.function_props['name']))
|
||||
self.function_props['signature'] = l
|
||||
if l[0] in python_api:
|
||||
(ins, outs) = python_api[l[0]]
|
||||
ins = [a for a in ins if not 'O' in a.flags]
|
||||
if outs != None:
|
||||
outs = outs.split(',')
|
||||
if len(ins) != len(l[1]):
|
||||
self.report_error(c, "function %s documented arity %d, code arity %d" % (l[0], len(l[1]), len(ins)))
|
||||
if outs == None:
|
||||
if l[2] != 'None':
|
||||
self.report_error(c, "function %s documented None, but code has %s" % (l[0], l[2]))
|
||||
else:
|
||||
if isinstance(l[2], str):
|
||||
doc_outs = [l[2]]
|
||||
else:
|
||||
doc_outs = l[2]
|
||||
if len(outs) != len(doc_outs):
|
||||
self.report_error(c, "function %s output code tuple %d, documented %d" % (l[0], len(outs), len(doc_outs)))
|
||||
else:
|
||||
# self.report_error(c, "function %s documented but not found in code" % l[0])
|
||||
pass
|
||||
except pp.ParseException, pe:
|
||||
self.report_error(c, str(pe))
|
||||
print s
|
||||
print pe
|
||||
|
||||
def report_error(self, c, msg):
|
||||
print >>self.errors, "%s:%d: [%s] Error %s" % (c.filename, c.lineno, self.language, msg)
|
||||
|
||||
def cmd_begin(self, c):
|
||||
if len(c.params) == 0:
|
||||
self.report_error(c, "Malformed begin")
|
||||
return
|
||||
self.write('\n')
|
||||
s = str(c.params[0])
|
||||
self.envstack.append((s, (c.filename, c.lineno)))
|
||||
if s == 'description':
|
||||
if self.language == 'py' and 'name' in self.function_props and not 'defpy' in self.function_props:
|
||||
self.report_error(c, "No cvdefPy for function %s" % self.function_props['name'])
|
||||
self.indent += 1
|
||||
elif s == 'lstlisting':
|
||||
# Set indent to zero while collecting code; so later write will not double-indent
|
||||
self.saved_f = self.f
|
||||
self.saved_indent = self.indent
|
||||
self.f = StringIO.StringIO()
|
||||
self.indent = 0
|
||||
elif s in ['itemize', 'enumerate']:
|
||||
self.indent += 1
|
||||
elif s == 'tabular':
|
||||
self.f = StringIO.StringIO()
|
||||
else:
|
||||
self.default_cmd(c)
|
||||
|
||||
def cmd_item(self, c):
|
||||
if len(self.ee()) == 0:
|
||||
self.report_error(c, "item without environment")
|
||||
return
|
||||
self.indent -= 1
|
||||
markup = {'itemize' : '*', 'enumerate' : '#.', 'description' : '*'}[self.ee()[-1]]
|
||||
if len(c.args) > 0:
|
||||
markup += " " + self.render([c.args[0].str])
|
||||
if len(c.params) > 0:
|
||||
markup += " " + self.render(c.params[0].str)
|
||||
self.write("\n\n" + markup)
|
||||
self.indent += 1
|
||||
|
||||
def cmd_end(self, c):
|
||||
if len(c.params) != 1:
|
||||
self.report_error(c, "Malformed end")
|
||||
return
|
||||
if len(self.envstack) == 0:
|
||||
self.report_error(c, "end with no env")
|
||||
return
|
||||
self.write('\n')
|
||||
s = str(c.params[0])
|
||||
if self.envstack == []:
|
||||
print "Cannot pop at", (c.filename, c.lineno)
|
||||
if self.envstack[-1][0] != s:
|
||||
self.report_error(c, "end{%s} does not match current stack %s" % (s, repr(self.envstack)))
|
||||
self.envstack.pop()
|
||||
if s == 'description':
|
||||
self.indent -= 1
|
||||
if self.indent == 0:
|
||||
self.function_props['done'] = True
|
||||
elif s in ['itemize', 'enumerate']:
|
||||
self.indent -= 1
|
||||
elif s == 'tabular':
|
||||
tabletxt = self.f.getvalue()
|
||||
self.f = self.f_section
|
||||
self.f.write(self.handle_table(tabletxt))
|
||||
elif s == 'lstlisting':
|
||||
listing = self.f.getvalue()
|
||||
|
||||
self.f = self.saved_f
|
||||
self.indent = self.saved_indent
|
||||
print >>self
|
||||
if self.language == 'py':
|
||||
ckeys = ['#define', 'void', '#include', ';\n']
|
||||
found = [repr(k) for k in ckeys if k in listing]
|
||||
if len(found) > 0:
|
||||
self.report_error(c, 'listing is probably C, found %s' % ",".join(found))
|
||||
if (self.language == 'py') and ('>>>' in listing):
|
||||
print >>self, "\n.. doctest::\n"
|
||||
else:
|
||||
print >>self, "\n::\n"
|
||||
self.indent += 1
|
||||
print >>self
|
||||
self.write(listing)
|
||||
self.indent -= 1
|
||||
print >>self
|
||||
print >>self
|
||||
print >>self, ".." # otherwise a following :param: gets treated as more listing
|
||||
elif s == 'document':
|
||||
pass
|
||||
else:
|
||||
self.default_cmd(c)
|
||||
|
||||
def cmd_label(self, c):
|
||||
pass
|
||||
|
||||
def cmd_lstinputlisting(self, c):
|
||||
s = str(c.params[0])
|
||||
print >>self.f, ".. include:: %s" % os.path.normpath(os.path.join(self.abspath, s))
|
||||
print >>self.f, " :literal:"
|
||||
print >>self.f
|
||||
|
||||
# Conditionals
|
||||
def cmd_cvC(self, c):
|
||||
self.do_conditional(['c'], c)
|
||||
def cmd_cvCpp(self, c):
|
||||
self.do_conditional(['cpp'], c)
|
||||
def cmd_cvPy(self, c):
|
||||
self.do_conditional(['py'], c)
|
||||
def cmd_cvCPy(self, c):
|
||||
self.do_conditional(['c', 'py'], c)
|
||||
def do_conditional(self, langs, c):
|
||||
if self.language in langs:
|
||||
self.doL(c.params[0].str, False)
|
||||
|
||||
def render(self, L):
|
||||
""" return L rendered as a string """
|
||||
save = self.f
|
||||
self.f = StringIO.StringIO()
|
||||
for x in L:
|
||||
if isinstance(x, TexCmd):
|
||||
self.docmd(x)
|
||||
else:
|
||||
self.doplain(x)
|
||||
r = self.f.getvalue()
|
||||
self.f = save
|
||||
return r
|
||||
|
||||
def cmd_cvarg(self, c):
|
||||
if len(c.params) != 2:
|
||||
self.report_error(c, "Malformed cvarg")
|
||||
return
|
||||
e = self.ee()
|
||||
if self.state == 'class':
|
||||
nm = self.render(c.params[0].str)
|
||||
if '->' in nm:
|
||||
print >>self, "\n\n.. method:: %s\n\n" % nm
|
||||
else:
|
||||
print >>self, "\n\n.. attribute:: %s\n\n" % nm
|
||||
self.indent += 1
|
||||
print >>self
|
||||
self.doL(c.params[1].str, False)
|
||||
self.indent -= 1
|
||||
print >>self
|
||||
return
|
||||
is_func_arg = (e == ['description']) and (not 'done' in self.function_props)
|
||||
if is_func_arg:
|
||||
nm = self.render(c.params[0].str)
|
||||
print >>self, '\n:param %s: ' % nm,
|
||||
type = None # Try to figure out the argument type
|
||||
# For now, multiple args get a pass
|
||||
if (self.language == 'py') and ('signature' in self.function_props) and (not ',' in nm):
|
||||
sig = self.function_props['signature']
|
||||
argnames = [a[0] for a in sig[1]]
|
||||
if isinstance(sig[2], str):
|
||||
resnames = [sig[2]]
|
||||
else:
|
||||
resnames = list(sig[2])
|
||||
if not nm in argnames + resnames:
|
||||
self.report_error(c, "Argument %s is not mentioned in signature (%s) (%s)" % (nm, ", ".join(argnames), ", ".join(resnames)))
|
||||
|
||||
api = python_api.get(self.function_props['name'], None)
|
||||
if api:
|
||||
(ins, outs) = api
|
||||
adict = dict([(a.nm, a) for a in ins])
|
||||
arg = adict.get(nm, None)
|
||||
if arg:
|
||||
type = arg.ty
|
||||
else:
|
||||
self.report_error(c, 'cannot find arg %s in code' % nm)
|
||||
elif len(e) > 0 and e[-1] == 'description':
|
||||
print >>self, '\n* **%s** ' % self.render(c.params[0].str),
|
||||
else:
|
||||
self.report_error(c, "unexpected env (%s) for cvarg" % ",".join(e))
|
||||
self.indent += 1
|
||||
self.doL(c.params[1].str, False)
|
||||
self.indent -= 1
|
||||
print >>self
|
||||
if is_func_arg and type:
|
||||
type = type.replace('*', '')
|
||||
translate = {
|
||||
"ints" : "sequence of int",
|
||||
"floats" : "sequence of float",
|
||||
"IplImages" : "sequence of :class:`IplImage`",
|
||||
"double" : "float",
|
||||
"int" : "int",
|
||||
"float" : "float",
|
||||
"char" : "str",
|
||||
"cvarrseq" : ":class:`CvArr` or :class:`CvSeq`",
|
||||
"CvPoint2D32fs" : "sequence of (float, float)",
|
||||
"pts_npts_contours" : "list of lists of (x,y) pairs",
|
||||
"CvSeqOfCvSURFPoint" : ":class:`CvSeq` of :class:`CvSURFPoint`",
|
||||
"CvSeqOfCvSURFDescriptor" : ":class:`CvSeq` of list of float",
|
||||
"cvpoint2d32f_count" : "int",
|
||||
"ranges" : "list of tuples of ints",
|
||||
"PyObject" : "object",
|
||||
"edgeorpoint" : ":class:`CvSubdiv2DEdge`, :class:`CvSubdiv2DPoint`",
|
||||
}
|
||||
print >>self, "\n:type %s: %s" % (nm, translate.get(type, ':class:`%s`' % type))
|
||||
|
||||
def cmd_genc(self, c): pass
|
||||
def cmd_genpy(self, c): pass
|
||||
def cmd_author(self, c): pass
|
||||
def cmd_date(self, c): pass
|
||||
def cmd_def(self, c): pass
|
||||
def cmd_documentclass(self, c): pass
|
||||
def cmd_maketitle(self, c): pass
|
||||
def cmd_newcommand(self, c): pass
|
||||
def cmd_newline(self, c): pass
|
||||
def cmd_setcounter(self, c): pass
|
||||
def cmd_tableofcontents(self, c): pass
|
||||
def cmd_targetlang(self, c): pass
|
||||
def cmd_usepackage(self, c): pass
|
||||
def cmd_title(self, c): pass
|
||||
def cmd_par(self, c): pass
|
||||
def cmd_hline(self, c):
|
||||
print >>self, "\\hline"
|
||||
|
||||
def cmd_cite(self, c):
|
||||
# XXX jcb - these references are crashing Sphinx 0.65
|
||||
# self.write("[%s]_" % str(c.params[0]))
|
||||
self.write("%s" % str(c.params[0]))
|
||||
|
||||
def cmd_href(self, c):
|
||||
if len(c.params) == 2:
|
||||
self.write("`%s <%s>`_" % (str(c.params[1]), self.render(c.params[0].str)))
|
||||
else:
|
||||
self.report_error(c, "href should have two params")
|
||||
|
||||
def cmd_url(self, c):
|
||||
self.write(str(c.params[0]))
|
||||
|
||||
def cmd_emph(self, c):
|
||||
self.write("*" + self.render(c.params[0].str) + "*")
|
||||
|
||||
def cmd_textit(self, c):
|
||||
self.write("*" + self.render(c.params[0].str) + "*")
|
||||
|
||||
def cmd_textbf(self, c):
|
||||
self.write("**" + self.render(c.params[0].str) + "**")
|
||||
|
||||
def cmd_texttt(self, c):
|
||||
self.write("``" + self.render(c.params[0].str) + "``")
|
||||
|
||||
def cmd_code(self, c):
|
||||
self.cmd_texttt(c)
|
||||
|
||||
def default_cmd(self, c):
|
||||
if self.f == self.f_section:
|
||||
self.write(repr(c))
|
||||
|
||||
def unrecognized_cmd(self, c):
|
||||
# if writing the index or chapter heading, anything goes
|
||||
if not self.f in [self.f_index, self.f_chapter]:
|
||||
self.write(c.cmd)
|
||||
if (not 'lstlisting' in self.ee()) and (not c.cmd in "#{}%&*\\_^"):
|
||||
if not c.cmd in self.unhandled_commands:
|
||||
self.report_error(c, 'unhandled command %s' % c.cmd)
|
||||
self.unhandled_commands.add(c.cmd)
|
||||
|
||||
def doL(self, L, newlines = True):
|
||||
for x in L:
|
||||
pos0 = self.f.tell()
|
||||
if isinstance(x, TexCmd):
|
||||
self.docmd(x)
|
||||
else:
|
||||
if 'lstlisting' in self.ee() or not newlines:
|
||||
self.doplain(x)
|
||||
else:
|
||||
self.doplain(x.lstrip())
|
||||
pos1 = self.f.tell()
|
||||
if pos0 != pos1:
|
||||
if self.state in ['math'] or not newlines:
|
||||
self.appendspace()
|
||||
else:
|
||||
if not 'lstlisting' in self.ee():
|
||||
self.write('\n')
|
||||
|
||||
def handle_table(self, s):
|
||||
oneline = s.replace('\n', ' ').strip()
|
||||
rows = [r.strip() for r in oneline.split('\\hline')]
|
||||
tab = []
|
||||
for r in rows:
|
||||
if r != "":
|
||||
cols = [c.strip() for c in r.split('&')]
|
||||
tab.append(cols)
|
||||
widths = [max([len(r[i]) for r in tab]) for i in range(len(tab[0]))]
|
||||
|
||||
st = "" # Sphinx table
|
||||
|
||||
if 0:
|
||||
sep = "+" + "+".join(["-" * w for w in widths]) + "+"
|
||||
st += sep + '\n'
|
||||
for r in tab:
|
||||
st += "|" + "|".join([c.center(w) for (c, w) in zip(r, widths)]) + "|" + '\n'
|
||||
st += sep + '\n'
|
||||
|
||||
st = '.. table::\n\n'
|
||||
sep = " ".join(["=" * w for w in widths])
|
||||
st += ' ' + sep + '\n'
|
||||
for y,r in enumerate(tab):
|
||||
st += ' ' + " ".join([c.ljust(w) for (c, w) in zip(r, widths)]) + '\n'
|
||||
if y == 0:
|
||||
st += ' ' + sep + '\n'
|
||||
st += ' ' + sep + '\n'
|
||||
return st
|
||||
|
||||
def ee(self):
|
||||
""" Return tags of the envstack. envstack[0] is 'document', so skip it """
|
||||
return [n for (n,_) in self.envstack[1:]]
|
||||
|
||||
def get_tags(self):
|
||||
return self.tags
|
||||
|
||||
def close(self):
|
||||
|
||||
if self.envstack != []:
|
||||
print >>self.errors, "Error envstack not empty at end of doc: " + repr(self.envstack)
|
||||
print >>self.errors, "Unrecognized commands:"
|
||||
for c in sorted(self.unhandled_commands):
|
||||
print >>self.errors, "\n " + c
|
||||
print >>self.errors
|
||||
if self.language == 'py':
|
||||
print >>self.errors, "The following functions are undocumented"
|
||||
for f in sorted(set(python_api) - self.covered):
|
||||
print >>self.errors, ' ', f
|
||||
|
||||
print >>self.f_index, " bibliography"
|
||||
print >>self.f_index, """
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`search`
|
||||
"""
|
||||
|
||||
# Quick and dirty bibtex parser
|
||||
|
||||
def parseBib(filename, language):
|
||||
pp.ParserElement.setDefaultWhitespaceChars(" \n\t")
|
||||
entry = returnList(pp.Word('@', pp.alphanums) + sl('{') +
|
||||
pp.Word(pp.alphanums + "_") + sl(',') +
|
||||
CommaList(returnTuple(pp.Word(pp.alphanums) + sl('=') + pp.QuotedString('{', endQuoteChar = '}'))) +
|
||||
pp.Suppress(pp.Optional(',')) +
|
||||
sl('}'))
|
||||
r = (pp.ZeroOrMore(entry) | pp.Suppress('#' + pp.ZeroOrMore(pp.CharsNotIn('\n'))) + pp.StringEnd()).parseFile(filename)
|
||||
|
||||
bibliography = QOpen(os.path.join(language, "bibliography.rst"), 'wt')
|
||||
print >>bibliography, "Bibliography"
|
||||
print >>bibliography, "============"
|
||||
print >>bibliography
|
||||
|
||||
for _,e in sorted([(str(x[1]), x) for x in r]):
|
||||
(etype, tag, attrs) = str(e[0][1:]), str(e[1]), dict([(str(a), str(b)) for (a,b) in e[2]])
|
||||
|
||||
representations = {
|
||||
'article' : '$author, "$title". $journal $volume $number, pp $pages ($year)',
|
||||
'inproceedings' : '$author "$title", $booktitle, $year',
|
||||
'misc' : '$author "$title", $year',
|
||||
'techreport' : '$author "$title", $edition, $edition ($year)',
|
||||
}
|
||||
if etype in representations:
|
||||
if 0:
|
||||
print >>bibliography, tag
|
||||
print >>bibliography, "^" * len(tag)
|
||||
print >>bibliography
|
||||
|
||||
print >>bibliography, ".. [%s] %s" % (tag, Template(representations[etype]).safe_substitute(attrs))
|
||||
print >>bibliography
|
||||
bibliography.close()
|
||||
|
||||
if 1:
|
||||
fulldoc = latexparser(sys.argv[1])
|
||||
|
||||
abspath = os.path.abspath(os.path.dirname(sys.argv[1]))
|
||||
|
||||
raw = open('raw.full', 'w')
|
||||
for x in fulldoc:
|
||||
print >>raw, repr(x)
|
||||
raw.close()
|
||||
|
||||
# Filter on target language
|
||||
def preprocess_conditionals(fd, conditionals):
|
||||
r = []
|
||||
ifstack = []
|
||||
for x in fd:
|
||||
if isinstance(x, TexCmd):
|
||||
ll = x.cmd.rstrip()
|
||||
loc = (x.filename, x.lineno)
|
||||
if ll.startswith("if"):
|
||||
# print " " * len(ifstack), '{', loc
|
||||
ifstack.append((conditionals.get(ll[2:], False), loc))
|
||||
elif ll.startswith("else"):
|
||||
ifstack[-1] = (not ifstack[-1][0], ifstack[-1][1])
|
||||
elif ll.startswith("fi"):
|
||||
ifstack.pop()
|
||||
# print " " * len(ifstack), '}', loc
|
||||
elif not False in [p for (p,_) in ifstack]:
|
||||
r.append(x)
|
||||
else:
|
||||
if not False in [p for (p,_) in ifstack]:
|
||||
r.append(x)
|
||||
if ifstack != []:
|
||||
print "unterminated if", ifstack
|
||||
sys.exit(0)
|
||||
return r
|
||||
|
||||
tags = {}
|
||||
for language in sys.argv[2:]:
|
||||
doc = preprocess_conditionals(fulldoc, {
|
||||
'C' : language=='c',
|
||||
'Python' : language=='py',
|
||||
'Py' : language=='py',
|
||||
'CPy' : (language=='py' or language == 'c'),
|
||||
'Cpp' : language=='cpp',
|
||||
'plastex' : True})
|
||||
|
||||
raw = open('raw.%s' % language, 'w')
|
||||
for x in doc:
|
||||
print >>raw, repr(x)
|
||||
raw.close()
|
||||
sr = SphinxWriter('index.rst', language, abspath)
|
||||
print >>sr, """
|
||||
OpenCV |version| %s Reference
|
||||
=================================
|
||||
|
||||
The OpenCV Wiki is here: http://opencv.willowgarage.com/
|
||||
|
||||
Contents:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
""" % {'c': 'C', 'cpp': 'C++', 'py': 'Python'}[language]
|
||||
sr.doL(doc)
|
||||
sr.close()
|
||||
parseBib('../opencv.bib', language)
|
||||
tags.update(sr.get_tags())
|
||||
open('TAGS', 'w').write("\n".join(sorted(tags.values())) + "\n")
|
||||
|
@ -1,122 +0,0 @@
|
||||
import sys
|
||||
import hashlib
|
||||
import cPickle as pickle
|
||||
import os
|
||||
|
||||
from pyparsing import Word, CharsNotIn, Optional, OneOrMore, ZeroOrMore, Group, Forward, ParseException, Literal, Suppress, replaceWith, StringEnd, lineno, QuotedString, White, NotAny, ParserElement, MatchFirst
|
||||
|
||||
class Argument:
|
||||
def __init__(self, s, loc, toks):
|
||||
self.str = toks[1]
|
||||
def __repr__(self):
|
||||
return "[%s]" % self.str
|
||||
def __str__(self):
|
||||
return self.str
|
||||
def argfun(s, loc, toks):
|
||||
return Argument(s, loc, toks)
|
||||
|
||||
class Parameter:
|
||||
def __init__(self, s, loc, toks):
|
||||
self.str = toks[0].asList()
|
||||
def __repr__(self):
|
||||
return '{' + "".join([str(s) for s in self.str]) + '}'
|
||||
return "{%s}" % self.str
|
||||
def __str__(self):
|
||||
return "".join([str(s) for s in self.str])
|
||||
def paramfun(s, loc, toks):
|
||||
return Parameter(s, loc, toks)
|
||||
|
||||
class TexCmd:
|
||||
def __init__(self, s, loc, toks):
|
||||
self.cmd = str(toks[0])[1:]
|
||||
#print 'cmd', self.cmd
|
||||
self.args = toks[1].asList()
|
||||
self.params = toks[2].asList()
|
||||
self.lineno = lineno(loc, s)
|
||||
self.filename = None
|
||||
def __repr__(self):
|
||||
return '\\' + self.cmd + "".join([repr(a) for a in self.args]) + "".join([repr(p) for p in self.params])
|
||||
|
||||
class ZeroOrMoreAsList(ZeroOrMore):
|
||||
def __init__(self, *args):
|
||||
ZeroOrMore.__init__(self, *args)
|
||||
def listify(s, loc, toks):
|
||||
return [toks]
|
||||
self.setParseAction(listify)
|
||||
|
||||
ParserElement.setDefaultWhitespaceChars("\n\t")
|
||||
backslash = chr(92)
|
||||
|
||||
texcmd = Forward()
|
||||
filler = CharsNotIn(backslash + '$')
|
||||
filler2 = CharsNotIn(backslash + '$' + '{}')
|
||||
|
||||
arg = '[' + CharsNotIn("]") + ']'
|
||||
arg.setParseAction(argfun)
|
||||
|
||||
dollarmath = QuotedString('$', multiline=True, unquoteResults=False)
|
||||
param = Suppress(Literal('{')) + ZeroOrMoreAsList(dollarmath | filler2 | QuotedString('{', endQuoteChar='}', unquoteResults=False) | texcmd) + Suppress(Literal('}'))
|
||||
param.setParseAction(paramfun)
|
||||
def bs(c): return Literal("\\" + c)
|
||||
singles = bs("[") | bs("]") | bs("{") | bs("}") | bs("\\") | bs("&") | bs("_") | bs(",") | bs("#") | bs("\n") | bs(";") | bs("|") | bs("%") | bs("*") | bs("~") | bs("^")
|
||||
texcmd << (singles | Word("\\", "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", min = 2)) + ZeroOrMoreAsList(arg) + ZeroOrMoreAsList(param)
|
||||
def texcmdfun(s, loc, toks):
|
||||
return TexCmd(s, loc, toks)
|
||||
texcmd.setParseAction(texcmdfun)
|
||||
|
||||
#legal = "".join([chr(x) for x in set(range(32, 127)) - set(backslash)])
|
||||
#filler = Word(legal)
|
||||
document = ZeroOrMore(dollarmath | texcmd | filler) + StringEnd().suppress()
|
||||
|
||||
if 0:
|
||||
s = "This is \\\\ test"
|
||||
print s
|
||||
for t in document.parseString(s):
|
||||
if isinstance(t, TexCmd):
|
||||
print '====> cmd=[%s]' % t.cmd, t
|
||||
else:
|
||||
print '====>', t
|
||||
sys.exit(-1)
|
||||
|
||||
selfstr = open( __file__).read() # Own source as a string. Used as part of hash.
|
||||
hashbase = hashlib.md5(selfstr)
|
||||
|
||||
def tokenize(filename):
|
||||
f = open(filename, "rt")
|
||||
|
||||
def uncomment(s):
|
||||
if '%' in s and not '\\%' in s:
|
||||
return s[:s.index('%')] + '\n'
|
||||
else:
|
||||
return s
|
||||
|
||||
docstr = "".join([uncomment(l) for l in f])
|
||||
hash = hashbase.copy()
|
||||
hash.update(docstr)
|
||||
cache_filename = os.path.join("parse-cache", hash.hexdigest())
|
||||
try:
|
||||
return pickle.load(open(cache_filename))
|
||||
except IOError:
|
||||
print "parsing"
|
||||
try:
|
||||
r = document.parseString(docstr)
|
||||
for x in r:
|
||||
if isinstance(x, TexCmd) and not x.filename:
|
||||
x.filename = filename
|
||||
pickle.dump(r, open(cache_filename, 'w'))
|
||||
return r
|
||||
except ParseException, pe:
|
||||
print 'Fatal problem at %s line %d col %d' % (filename, pe.lineno, pe.col)
|
||||
print pe.line
|
||||
sys.exit(1)
|
||||
|
||||
def latexparser(filename):
|
||||
tokens = tokenize(filename)
|
||||
def expand(t):
|
||||
if isinstance(t, TexCmd) and t.cmd == "input":
|
||||
filename = "../" + str(t.params[0].str[0]) + ".tex"
|
||||
print filename
|
||||
return latexparser(filename)
|
||||
else:
|
||||
return [t]
|
||||
return sum([expand(t) for t in tokens], [])
|
Binary file not shown.
Before Width: | Height: | Size: 90 KiB |
@ -1,42 +0,0 @@
|
||||
\ProvidesPackage{mymath}
|
||||
|
||||
\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}
|
||||
}
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB |
@ -1,30 +0,0 @@
|
||||
class Argument:
|
||||
def __init__(self, fields):
|
||||
self.ty = fields[0]
|
||||
self.nm = fields[1]
|
||||
self.flags = ""
|
||||
self.init = None
|
||||
|
||||
if len(fields) > 2:
|
||||
if fields[2][0] == '/':
|
||||
self.flags = fields[2][1:].split(",")
|
||||
else:
|
||||
self.init = fields[2]
|
||||
|
||||
def reader(apifile):
|
||||
api = []
|
||||
for l in open(apifile):
|
||||
if l[0] == '#':
|
||||
continue
|
||||
l = l.rstrip()
|
||||
f = l.split()
|
||||
if len(f) != 0:
|
||||
if l[0] != ' ':
|
||||
if len(f) > 1:
|
||||
ty = f[1]
|
||||
else:
|
||||
ty = None
|
||||
api.append((f[0], [], ty))
|
||||
else:
|
||||
api[-1][1].append(Argument(f))
|
||||
return dict([(a, (ins, outs)) for (a, ins, outs) in api])
|
@ -1,18 +0,0 @@
|
||||
import StringIO
|
||||
import os
|
||||
|
||||
class QOpen(StringIO.StringIO):
|
||||
def __init__(self, *args):
|
||||
self.__args = args
|
||||
StringIO.StringIO.__init__(self)
|
||||
|
||||
def close(self):
|
||||
import StringIO, os
|
||||
fname = self.__args[0]
|
||||
if not os.access(fname, os.R_OK) or self.getvalue() != open(fname).read():
|
||||
open(*self.__args).write(self.getvalue())
|
||||
StringIO.StringIO.close(self)
|
||||
|
||||
def __del__(self):
|
||||
if not self.closed:
|
||||
self.close()
|
130
doc/opencv.tex
130
doc/opencv.tex
@ -1,130 +0,0 @@
|
||||
\documentclass[11pt]{book}
|
||||
|
||||
\usepackage{cite}
|
||||
\usepackage[pdftex]{graphicx}
|
||||
\usepackage{titlesec}
|
||||
\usepackage{listings}
|
||||
\usepackage{fancyvrb}
|
||||
\usepackage[svgnames]{xcolor}
|
||||
\usepackage{framed}
|
||||
\usepackage{amsmath}
|
||||
\usepackage{amssymb}
|
||||
\usepackage{bbm}
|
||||
\usepackage{hyperref}
|
||||
\usepackage{makeidx}
|
||||
\usepackage{color}
|
||||
\usepackage{verbatim}
|
||||
|
||||
\setcounter{secnumdepth}{1}
|
||||
|
||||
\definecolor{shadecolor}{gray}{0.95} % Background color of title bars
|
||||
\lstset{
|
||||
language=C,
|
||||
basicstyle=\small\ttfamily,
|
||||
backgroundcolor=\color{shadecolor}
|
||||
}
|
||||
|
||||
\definecolor{cvlinkcolor}{rgb}{0.0 0.3 0.8}
|
||||
|
||||
% taken from http://en.wikibooks.org/wiki/LaTeX/Hyperlinks
|
||||
\hypersetup{
|
||||
bookmarks=true, % show bookmarks bar?
|
||||
unicode=false, % non-Latin characters in Acrobat’s bookmarks
|
||||
%pdftoolbar=true, % show Acrobat’s toolbar?
|
||||
%pdfmenubar=true, % show Acrobat’s menu?
|
||||
%pdffitwindow=false, % window fit to page when opened
|
||||
%pdfstartview={FitH}, % fits the width of the page to the window
|
||||
%pdftitle={My title}, % title
|
||||
%pdfauthor={Author}, % author
|
||||
%pdfsubject={Subject}, % subject of the document
|
||||
%pdfcreator={Creator}, % creator of the document
|
||||
%pdfproducer={Producer}, % producer of the document
|
||||
%pdfkeywords={keywords}, % list of keywords
|
||||
%pdfnewwindow=true, % links in new window
|
||||
colorlinks=true, % false: boxed links; true: colored links
|
||||
linkcolor=cvlinkcolor, % color of internal links
|
||||
citecolor=cvlinkcolor, % color of links to bibliography
|
||||
filecolor=magenta, % color of file links
|
||||
urlcolor=cyan % color of external links
|
||||
}
|
||||
|
||||
\makeindex
|
||||
|
||||
\newcommand{\piRsquare}{\pi r^2} % This is my own macro !!!
|
||||
|
||||
\usepackage{helvetica}
|
||||
\usepackage{ifthen}
|
||||
\usepackage{alltt}
|
||||
\usepackage{opencv}
|
||||
|
||||
%%% Margins %%%
|
||||
\oddsidemargin 0.0in
|
||||
\evensidemargin 0.0in
|
||||
\textwidth 6.5in
|
||||
%\headheight 1.0in
|
||||
%\topmargin 0.5in
|
||||
%\textheight 9.0in
|
||||
%\footheight 1.0in
|
||||
%%%%%%%%%%%%%%%
|
||||
|
||||
\title{OpenCV Reference Manual} % used by \maketitle
|
||||
\author{v2.2} % used by \maketitle
|
||||
\date{December, 2010} % used by \maketitle
|
||||
|
||||
\begin{document}
|
||||
\maketitle % automatic title!
|
||||
|
||||
\setcounter{tocdepth}{8}
|
||||
\tableofcontents
|
||||
|
||||
\titleformat{\subsection}
|
||||
{\titlerule
|
||||
\vspace{.8ex}%
|
||||
\normalfont\bfseries\Large}
|
||||
{\thesection.}{.5em}{}
|
||||
|
||||
%%% Define these to get rid of warnings
|
||||
\def\genc{true}
|
||||
\def\genpy{true}
|
||||
\def\gencpp{true}
|
||||
|
||||
\newif\ifC
|
||||
\newif\ifPy
|
||||
\newif\ifCpp
|
||||
\newif\ifCPy
|
||||
|
||||
\Ctrue
|
||||
\Cppfalse
|
||||
\Pyfalse
|
||||
\CPytrue
|
||||
\def\targetlang{c}
|
||||
\part{C API Reference}
|
||||
\input{opencvref_body}
|
||||
|
||||
\Cfalse
|
||||
\Cpptrue
|
||||
\Pyfalse
|
||||
\CPyfalse
|
||||
\def\targetlang{cpp}
|
||||
\part{C++ API Reference}
|
||||
\input{opencvref_body}
|
||||
|
||||
\Cfalse
|
||||
\Cppfalse
|
||||
\Pytrue
|
||||
\CPytrue
|
||||
\def\targetlang{python}
|
||||
\part{Python API Reference}
|
||||
\input{opencvref_body}
|
||||
|
||||
%\part{Common Information}
|
||||
\addcontentsline{toc}{part}{Bibliography}
|
||||
\bibliographystyle{plain}
|
||||
{\small
|
||||
\bibliography{opencv}
|
||||
}
|
||||
|
||||
\addcontentsline{toc}{part}{Index}
|
||||
\printindex
|
||||
|
||||
\end{document} % End of document.
|
@ -1,78 +0,0 @@
|
||||
\input{core_introduction}
|
||||
|
||||
\chapter{core. The Core Functionality}
|
||||
\renewcommand{\curModule}{core}
|
||||
\input{core_basic_structures}
|
||||
\input{core_array_operations}
|
||||
\input{core_dynamic_structures}
|
||||
\input{core_drawing_functions}
|
||||
\input{core_persistence}
|
||||
\input{core_clustering_search}
|
||||
\input{core_utilities_system_functions}
|
||||
|
||||
|
||||
\chapter{imgproc. Image Processing}
|
||||
\renewcommand{\curModule}{imgproc}
|
||||
\input{imgproc_histograms}
|
||||
\input{imgproc_image_filtering}
|
||||
\input{imgproc_image_warping}
|
||||
\input{imgproc_image_transform}
|
||||
\input{imgproc_struct_shape_analysis}
|
||||
\input{imgproc_planar_subdivisions}
|
||||
\input{imgproc_motion_tracking}
|
||||
\input{imgproc_feature_detection}
|
||||
\input{imgproc_object_detection}
|
||||
|
||||
\chapter{features2d. Feature Detection and Descriptor Extraction}
|
||||
\renewcommand{\curModule}{features2d}
|
||||
\input{features2d_detection_description}
|
||||
\input{features2d_common_detection_description}
|
||||
\input{features2d_object_categorization}
|
||||
|
||||
\chapter{flann. Clustering and Search in Multi-Dimensional Spaces}
|
||||
\renewcommand{\curModule}{flann}
|
||||
\input{flann}
|
||||
|
||||
\chapter{objdetect. Object Detection}
|
||||
\renewcommand{\curModule}{objdetect}
|
||||
\input{objdetect}
|
||||
|
||||
\chapter{video. Video Analysis}
|
||||
\renewcommand{\curModule}{video}
|
||||
\input{video_motion_tracking}
|
||||
|
||||
\chapter{highgui. High-level GUI and Media I/O}
|
||||
\renewcommand{\curModule}{highgui}
|
||||
\input{highgui}
|
||||
\ifPy %Qt is for C and Cpp, so do nothing
|
||||
\else
|
||||
\input{highgui_qt}
|
||||
\fi
|
||||
|
||||
\chapter{calib3d. Camera Calibration, Pose Estimation and Stereo}
|
||||
\renewcommand{\curModule}{calib3d}
|
||||
\input{calib3d}
|
||||
|
||||
|
||||
\chapter{ml. Machine Learning}
|
||||
\renewcommand{\curModule}{ml}
|
||||
\input{ml}
|
||||
|
||||
|
||||
\ifCpp
|
||||
\chapter{gpu. GPU-based Functionality}
|
||||
\renewcommand{\curModule}{gpu}
|
||||
\input{gpu_introduction}
|
||||
\input{gpu_initialization}
|
||||
\input{gpu_data_structures}
|
||||
\input{gpu_matrix_operations}
|
||||
\input{gpu_per_element_operations}
|
||||
\input{gpu_image_processing}
|
||||
\input{gpu_matrix_reductions}
|
||||
\input{gpu_object_detection}
|
||||
\input{gpu_features2d}
|
||||
\input{gpu_image_filtering}
|
||||
\input{gpu_calib3d}
|
||||
\fi
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,88 +0,0 @@
|
||||
# Makefile for Sphinx documentation
|
||||
#
|
||||
|
||||
# You can set these variables from the command line.
|
||||
SPHINXOPTS =
|
||||
SPHINXBUILD = sphinx-build
|
||||
PAPER =
|
||||
|
||||
# Internal variables.
|
||||
PAPEROPT_a4 = -D latex_paper_size=a4
|
||||
PAPEROPT_letter = -D latex_paper_size=letter
|
||||
ALLSPHINXOPTS = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
||||
|
||||
.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
|
||||
|
||||
help:
|
||||
@echo "Please use \`make <target>' where <target> is one of"
|
||||
@echo " html to make standalone HTML files"
|
||||
@echo " dirhtml to make HTML files named index.html in directories"
|
||||
@echo " pickle to make pickle files"
|
||||
@echo " json to make JSON files"
|
||||
@echo " htmlhelp to make HTML files and a HTML help project"
|
||||
@echo " qthelp to make HTML files and a qthelp project"
|
||||
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
|
||||
@echo " changes to make an overview of all changed/added/deprecated items"
|
||||
@echo " linkcheck to check all external links for integrity"
|
||||
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
||||
|
||||
clean:
|
||||
-rm -rf _build/*
|
||||
|
||||
html:
|
||||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in _build/html."
|
||||
|
||||
dirhtml:
|
||||
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) _build/dirhtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in _build/dirhtml."
|
||||
|
||||
pickle:
|
||||
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle
|
||||
@echo
|
||||
@echo "Build finished; now you can process the pickle files."
|
||||
|
||||
json:
|
||||
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) _build/json
|
||||
@echo
|
||||
@echo "Build finished; now you can process the JSON files."
|
||||
|
||||
htmlhelp:
|
||||
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run HTML Help Workshop with the" \
|
||||
".hhp project file in _build/htmlhelp."
|
||||
|
||||
qthelp:
|
||||
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) _build/qthelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
||||
".qhcp project file in _build/qthelp, like this:"
|
||||
@echo "# qcollectiongenerator _build/qthelp/opencv.qhcp"
|
||||
@echo "To view the help file:"
|
||||
@echo "# assistant -collectionFile _build/qthelp/opencv.qhc"
|
||||
|
||||
latex:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
|
||||
@echo
|
||||
@echo "Build finished; the LaTeX files are in _build/latex."
|
||||
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
|
||||
"run these through (pdf)latex."
|
||||
|
||||
changes:
|
||||
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes
|
||||
@echo
|
||||
@echo "The overview file is in _build/changes."
|
||||
|
||||
linkcheck:
|
||||
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck
|
||||
@echo
|
||||
@echo "Link check complete; look for any errors in the above output " \
|
||||
"or in _build/linkcheck/output.txt."
|
||||
|
||||
doctest:
|
||||
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) _build/doctest
|
||||
@echo "Testing of doctests in the sources finished, look at the " \
|
||||
"results in _build/doctest/output.txt."
|
@ -1,9 +0,0 @@
|
||||
* automatically put generated rst files in subdirectories
|
||||
(e.g. cxcore/, cvreference/ etc.)
|
||||
|
||||
* fixup translation of function groups (e.g. cv*Dget)
|
||||
|
||||
* generate opencv_function_names on the fly during parsing of the tex source
|
||||
|
||||
* improve plastex
|
||||
- allow pickling of dom tree --> only regenerate when necessary
|
@ -1,26 +0,0 @@
|
||||
{% extends "basic/layout.html" %}
|
||||
|
||||
{% block document %}
|
||||
<div class="documentwrapper">
|
||||
{%- if not embedded %}{% if not theme_nosidebar|tobool %}
|
||||
<div class="bodywrapper">
|
||||
{%- endif %}{% endif %}
|
||||
<div class="body">
|
||||
{% block body %} {% endblock %}
|
||||
</div>
|
||||
<div class="feedback">
|
||||
<h2>Help and Feedback</h2>
|
||||
You did not find what you were looking for?
|
||||
<ul>
|
||||
<li>Try the <a href="faq.html">FAQ</a>.</li>
|
||||
<li>Ask a question in the <a href="http://tech.groups.yahoo.com/group/OpenCV/">user group/mailing list</a>.</li>
|
||||
<li>If you think something is missing or wrong in the documentation,
|
||||
please file a <a href="https://code.ros.org/trac/opencv/wiki">bug report</a>.</li>
|
||||
</ul>
|
||||
</div>
|
||||
{%- if not embedded %}{% if not theme_nosidebar|tobool %}
|
||||
</div>
|
||||
{%- endif %}{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -1,31 +0,0 @@
|
||||
[theme]
|
||||
inherit = basic
|
||||
stylesheet = default.css
|
||||
pygments_style = sphinx
|
||||
|
||||
[options]
|
||||
rightsidebar = false
|
||||
stickysidebar = false
|
||||
|
||||
footerbgcolor = #004068
|
||||
footertextcolor = #ffffff
|
||||
sidebarbgcolor = #006090
|
||||
sidebartextcolor = #ffffff
|
||||
sidebarlinkcolor = #cceeff
|
||||
relbarbgcolor = #003048
|
||||
relbartextcolor = #ffffff
|
||||
relbarlinkcolor = #ffffff
|
||||
bgcolor = #ffffff
|
||||
textcolor = #000000
|
||||
headbgcolor = #f2f2f2
|
||||
headtextcolor = #003048
|
||||
headlinkcolor = #65a136
|
||||
linkcolor = #0090d9
|
||||
codebgcolor = #e0f5ff
|
||||
codetextcolor = #333333
|
||||
feedbackbgcolor = #004068
|
||||
feedbacktextcolor = #ffffff
|
||||
feedbacklinkcolor = #ffffff
|
||||
|
||||
bodyfont = sans-serif
|
||||
headfont = 'Trebuchet MS', sans-serif
|
@ -1,197 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# opencv documentation build configuration file, created by
|
||||
# sphinx-quickstart on Thu Jun 4 21:06:43 2009.
|
||||
#
|
||||
# This file is execfile()d with the current directory set to its containing dir.
|
||||
#
|
||||
# Note that not all possible configuration values are present in this
|
||||
# autogenerated file.
|
||||
#
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
import sys, os
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#sys.path.append(os.path.abspath('.'))
|
||||
|
||||
# -- General configuration -----------------------------------------------------
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be extensions
|
||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||
extensions = ['sphinx.ext.pngmath']
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
||||
# The suffix of source filenames.
|
||||
source_suffix = '.rst'
|
||||
|
||||
# The encoding of source files.
|
||||
#source_encoding = 'utf-8'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'opencv'
|
||||
copyright = u'2009, authors'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '2.0'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '2.0+ SVN'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
#language = None
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
#today = ''
|
||||
# Else, today_fmt is used as the format for a strftime call.
|
||||
#today_fmt = '%B %d, %Y'
|
||||
|
||||
# List of documents that shouldn't be included in the build.
|
||||
#unused_docs = []
|
||||
|
||||
# List of directories, relative to source directory, that shouldn't be searched
|
||||
# for source files.
|
||||
exclude_trees = ['_build']
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all documents.
|
||||
#default_role = None
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
#add_function_parentheses = True
|
||||
|
||||
# If true, the current module name will be prepended to all description
|
||||
# unit titles (such as .. function::).
|
||||
#add_module_names = True
|
||||
|
||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||
# output. They are ignored by default.
|
||||
#show_authors = False
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
#modindex_common_prefix = []
|
||||
|
||||
|
||||
# -- Options for HTML output ---------------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. Major themes that come with
|
||||
# Sphinx are currently 'default' and 'sphinxdoc'.
|
||||
html_theme = 'blue'
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
#html_theme_options = {}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
html_theme_path = ['_themes']
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
#html_title = None
|
||||
|
||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||
#html_short_title = None
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top
|
||||
# of the sidebar.
|
||||
html_logo = 'opencv-logo2.png'
|
||||
|
||||
# The name of an image file (within the static path) to use as favicon of the
|
||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||
# pixels large.
|
||||
#html_favicon = None
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['_static']
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
#html_last_updated_fmt = '%b %d, %Y'
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
#html_use_smartypants = True
|
||||
|
||||
# Custom sidebar templates, maps document names to template names.
|
||||
#html_sidebars = {}
|
||||
|
||||
# Additional templates that should be rendered to pages, maps page names to
|
||||
# template names.
|
||||
#html_additional_pages = {}
|
||||
|
||||
# If false, no module index is generated.
|
||||
#html_use_modindex = True
|
||||
|
||||
# If false, no index is generated.
|
||||
#html_use_index = True
|
||||
|
||||
# If true, the index is split into individual pages for each letter.
|
||||
#html_split_index = False
|
||||
|
||||
# If true, links to the reST sources are added to the pages.
|
||||
#html_show_sourcelink = True
|
||||
|
||||
# If true, an OpenSearch description file will be output, and all pages will
|
||||
# contain a <link> tag referring to it. The value of this option must be the
|
||||
# base URL from which the finished HTML is served.
|
||||
#html_use_opensearch = ''
|
||||
|
||||
# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
|
||||
#html_file_suffix = ''
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'opencvdoc'
|
||||
|
||||
|
||||
# -- Options for LaTeX output --------------------------------------------------
|
||||
|
||||
# The paper size ('letter' or 'a4').
|
||||
#latex_paper_size = 'letter'
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#latex_font_size = '10pt'
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title, author, documentclass [howto/manual]).
|
||||
latex_documents = [
|
||||
('index', 'opencv.tex', u'opencv Documentation',
|
||||
u'author', 'manual'),
|
||||
]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
#latex_logo = None
|
||||
|
||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||
# not chapters.
|
||||
#latex_use_parts = False
|
||||
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#latex_preamble = ''
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#latex_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#latex_use_modindex = True
|
||||
|
||||
pngmath_latex_preamble = '\usepackage{mymath}\usepackage{amsmath}\usepackage{bbm}\usepackage[usenames]{color}'
|
||||
highlight_language = 'c'
|
@ -1,12 +0,0 @@
|
||||
|
||||
|
||||
***
|
||||
FAQ
|
||||
***
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
first_section
|
||||
|
||||
|
@ -1,43 +0,0 @@
|
||||
|
||||
FAQ General
|
||||
-----------
|
||||
|
||||
How can I get acquainted with OpenCV fast?
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
1. Look at samples.
|
||||
2. Look at some web guides
|
||||
|
||||
* http://www.cs.iit.edu/~agam/cs512/lect-notes/opencv-intro/index.html
|
||||
* http://web.archive.org/web/20060715011915/http://www.cs.bham.ac.uk/resources/courses/robotics/doc/opencvdocs/ref/OpenCVRef_ImageProcessing.htm
|
||||
* stavens_opencv_optical_flow.pdf
|
||||
|
||||
3. Using C/C++ interpreter Ch to run OpenCV
|
||||
|
||||
* http://www.softintegration.com/products/thirdparty/opencv/demos/
|
||||
|
||||
4. Within Visual Studio you may load OpenCV workspace:
|
||||
|
||||
* opencv.dsw for Microsoft Visual Studio 6.0
|
||||
* opencv.sln for Miscrosoft Visual Studio .NET 2003
|
||||
* cbuilderx/opencv.bpgr for Borland C++ BuilderX
|
||||
* select cvsample project, build it and run. Look into the code and modify it as you wish.
|
||||
|
||||
5. Also, scan through reference manuals - they contain some example code as well.
|
||||
|
||||
6. Search OpenCV archives at http://groups.yahoo.com/group/OpenCV for the topic you are interesting in.
|
||||
|
||||
7. Create a new project from scratch or modify existing cvsample. There are
|
||||
application wizards for Microsoft Visual Studio that create OpenCV-aware
|
||||
projects; look for them at http://groups.yahoo.com/group/OpenCV (Files section
|
||||
- you have to be registered OpenCV@yahoogroups.com user)
|
||||
|
||||
How do I join the OpenCV forum?
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Send email to OpenCV-subscribe@yahoogroups.com , after you are a member and
|
||||
select your logon, you can read the web group at
|
||||
http://groups.yahoo.com/group/OpenCV. This mailing list is mirrored at gmane:
|
||||
http://news.gmane.org/gmane.comp.lib.opencv so you can read it with a usenet
|
||||
client.
|
||||
|
@ -1,48 +0,0 @@
|
||||
|
||||
FAQ Technical Questions on Library Use
|
||||
--------------------------------------
|
||||
|
||||
How to access image pixels
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
(The coordinates are 0-based and counted from image origin, either top-left (img->origin=IPL_ORIGIN_TL) or bottom-left (img->origin=IPL_ORIGIN_BL)
|
||||
|
||||
* Suppose, we have 8-bit 1-channel image I (IplImage* img)::
|
||||
|
||||
I(x,y) ~ ((uchar*)(img->imageData + img->widthStep*y))[x]
|
||||
|
||||
* Suppose, we have 8-bit 3-channel image I (IplImage* img)::
|
||||
|
||||
I(x,y)blue ~ ((uchar*)(img->imageData + img->widthStep*y))[x*3]
|
||||
I(x,y)green ~ ((uchar*)(img->imageData + img->widthStep*y))[x*3+1]
|
||||
I(x,y)red ~ ((uchar*)(img->imageData + img->widthStep*y))[x*3+2]
|
||||
|
||||
e.g. increasing brightness of point (100,100) by 30 can be done this way::
|
||||
|
||||
CvPoint pt = {100,100};
|
||||
((uchar*)(img->imageData + img->widthStep*pt.y))[pt.x*3] += 30;
|
||||
((uchar*)(img->imageData + img->widthStep*pt.y))[pt.x*3+1] += 30;
|
||||
((uchar*)(img->imageData + img->widthStep*pt.y))[pt.x*3+2] += 30;
|
||||
|
||||
or more efficiently::
|
||||
|
||||
CvPoint pt = {100,100};
|
||||
uchar* temp_ptr = &((uchar*)(img->imageData + img->widthStep*pt.y))[pt.x*3];
|
||||
temp_ptr[0] += 30;
|
||||
temp_ptr[1] += 30;
|
||||
temp_ptr[2] += 30;
|
||||
|
||||
* Suppose, we have 32-bit floating point, 1-channel image I (IplImage* img)::
|
||||
|
||||
I(x,y) ~ ((float*)(img->imageData + img->widthStep*y))[x]
|
||||
|
||||
* Now, the general case: suppose, we have N-channel image of type T::
|
||||
|
||||
I(x,y)c ~ ((T*)(img->imageData + img->widthStep*y))[x*N + c]
|
||||
|
||||
or you may use macro CV_IMAGE_ELEM( image_header, elemtype, y, x_Nc )::
|
||||
|
||||
I(x,y)c ~ CV_IMAGE_ELEM( img, T, y, x*N + c )
|
||||
|
||||
There are functions that work with arbitrary (up to 4-channel) images and matrices (cvGet2D, cvSet2D), but they are pretty slow.
|
||||
|
@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
grep ".. cfunction::" *.rst -h |
|
||||
python -c "import sys
|
||||
print \"opencv_function_names = [\"
|
||||
for line in sys.stdin.readlines():
|
||||
fname = line.split()[3].strip(' (')
|
||||
bpos = fname.find('(')
|
||||
if bpos >= 0:
|
||||
fname = fname[:bpos]
|
||||
print \"'%s',\" % fname
|
||||
print \"]\"" > function_names.py
|
@ -1,419 +0,0 @@
|
||||
opencv_function_names = [
|
||||
'cvProjectPoints2',
|
||||
'cvFindHomography',
|
||||
'cvCalibrateCamera2',
|
||||
'cvFindExtrinsicCameraParams2',
|
||||
'cvRodrigues2',
|
||||
'cvUndistort2',
|
||||
'cvInitUndistortMap',
|
||||
'cvFindChessboardCorners',
|
||||
'cvDrawChessboardCorners',
|
||||
'cvRQDecomp3x3',
|
||||
'cvDecomposeProjectionMatrix',
|
||||
'cvCreatePOSITObject',
|
||||
'cvPOSIT',
|
||||
'cvReleasePOSITObject',
|
||||
'cvCalcImageHomography',
|
||||
'cvFindFundamentalMat',
|
||||
'cvComputeCorrespondEpilines',
|
||||
'cvConvertPointsHomogenious',
|
||||
'cvOpenFileStorage',
|
||||
'cvReleaseFileStorage',
|
||||
'cvStartWriteStruct',
|
||||
'cvEndWriteStruct',
|
||||
'cvWriteInt',
|
||||
'cvWriteReal',
|
||||
'cvWriteString',
|
||||
'cvWriteComment',
|
||||
'cvStartNextStream',
|
||||
'cvWrite',
|
||||
'cvWriteRawData',
|
||||
'cvWriteFileNode',
|
||||
'cvGetRootFileNode',
|
||||
'cvGetFileNodeByName',
|
||||
'cvGetHashedKey',
|
||||
'cvGetFileNode',
|
||||
'char*',
|
||||
'cvReadInt',
|
||||
'cvReadIntByName',
|
||||
'cvReadReal',
|
||||
'cvReadRealByName',
|
||||
'char*',
|
||||
'char*',
|
||||
'cvRead',
|
||||
'cvReadByName',
|
||||
'cvReadRawData',
|
||||
'cvStartReadRawData',
|
||||
'cvReadRawDataSlice',
|
||||
'cvRegisterType',
|
||||
'cvUnregisterType',
|
||||
'cvFirstType',
|
||||
'cvFindType',
|
||||
'cvTypeOf',
|
||||
'cvRelease',
|
||||
'cvClone',
|
||||
'cvSave',
|
||||
'cvLoad',
|
||||
'CV_RGB',
|
||||
'cvLine',
|
||||
'cvRectangle',
|
||||
'cvCircle',
|
||||
'cvEllipse',
|
||||
'cvFillPoly',
|
||||
'cvFillConvexPoly',
|
||||
'cvPolyLine',
|
||||
'cvInitFont',
|
||||
'cvPutText',
|
||||
'cvGetTextSize',
|
||||
'cvDrawContours',
|
||||
'cvInitLineIterator',
|
||||
'cvClipLine',
|
||||
'cvEllipse2Poly',
|
||||
'cvCreateMemStorage',
|
||||
'cvCreateChildMemStorage',
|
||||
'cvReleaseMemStorage',
|
||||
'cvClearMemStorage',
|
||||
'cvMemStorageAlloc',
|
||||
'cvMemStorageAllocString',
|
||||
'cvSaveMemStoragePos',
|
||||
'cvRestoreMemStoragePos',
|
||||
'cvCreateSeq',
|
||||
'cvSetSeqBlockSize',
|
||||
'cvSeqPush',
|
||||
'cvSeqPop',
|
||||
'cvSeqPushFront',
|
||||
'cvSeqPopFront',
|
||||
'cvSeqPushMulti',
|
||||
'cvSeqPopMulti',
|
||||
'cvSeqInsert',
|
||||
'cvSeqRemove',
|
||||
'cvClearSeq',
|
||||
'cvGetSeqElem',
|
||||
'cvSeqElemIdx',
|
||||
'cvCvtSeqToArray',
|
||||
'cvMakeSeqHeaderForArray',
|
||||
'cvSeqSlice',
|
||||
'cvCloneSeq',
|
||||
'cvSeqRemoveSlice',
|
||||
'cvSeqInsertSlice',
|
||||
'cvSeqInvert',
|
||||
'cvSeqSort',
|
||||
'cvStartAppendToSeq',
|
||||
'cvStartWriteSeq',
|
||||
'cvEndWriteSeq',
|
||||
'cvFlushSeqWriter',
|
||||
'cvStartReadSeq',
|
||||
'cvGetSeqReaderPos',
|
||||
'cvSetSeqReaderPos',
|
||||
'cvCreateSet',
|
||||
'cvSetAdd',
|
||||
'cvSetRemove',
|
||||
'cvSetNew',
|
||||
'cvSetRemoveByPtr',
|
||||
'cvGetSetElem',
|
||||
'cvClearSet',
|
||||
'cvCreateGraph',
|
||||
'cvGraphAddVtx',
|
||||
'cvGraphRemoveVtx',
|
||||
'cvGraphRemoveVtxByPtr',
|
||||
'cvGetGraphVtx',
|
||||
'cvGraphVtxIdx',
|
||||
'cvGraphAddEdge',
|
||||
'cvGraphAddEdgeByPtr',
|
||||
'cvGraphRemoveEdge',
|
||||
'cvGraphRemoveEdgeByPtr',
|
||||
'cvFindGraphEdge',
|
||||
'cvFindGraphEdgeByPtr',
|
||||
'cvGraphEdgeIdx',
|
||||
'cvGraphVtxDegree',
|
||||
'cvGraphVtxDegreeByPtr',
|
||||
'cvClearGraph',
|
||||
'cvCloneGraph',
|
||||
'cvCreateGraphScanner',
|
||||
'cvNextGraphItem',
|
||||
'cvReleaseGraphScanner',
|
||||
'cvInitTreeNodeIterator',
|
||||
'cvNextTreeNode',
|
||||
'cvPrevTreeNode',
|
||||
'cvTreeToNodeSeq',
|
||||
'cvInsertNodeIntoTree',
|
||||
'cvRemoveNodeFromTree',
|
||||
'cvGetErrStatus',
|
||||
'cvSetErrStatus',
|
||||
'cvGetErrMode',
|
||||
'cvSetErrMode',
|
||||
'cvError',
|
||||
'char*',
|
||||
'cvRedirectError',
|
||||
'cvAlloc',
|
||||
'cvFree',
|
||||
'cvGetTickCount',
|
||||
'cvGetTickFrequency',
|
||||
'cvRegisterModule',
|
||||
'cvGetModuleInfo',
|
||||
'cvUseOptimized',
|
||||
'cvSetMemoryManager',
|
||||
'cvSetIPLAllocators',
|
||||
'cvSobel',
|
||||
'cvLaplace',
|
||||
'cvCanny',
|
||||
'cvPreCornerDetect',
|
||||
'cvCornerEigenValsAndVecs',
|
||||
'cvCornerMinEigenVal',
|
||||
'cvCornerHarris',
|
||||
'cvFindCornerSubPix',
|
||||
'cvGoodFeaturesToTrack',
|
||||
'cvExtractSURF',
|
||||
'cvGetStarKeypoints',
|
||||
'cvSampleLine',
|
||||
'cvGetRectSubPix',
|
||||
'cvGetQuadrangleSubPix',
|
||||
'cvResize',
|
||||
'cvWarpAffine',
|
||||
'cvGetAffineTransform',
|
||||
'cv2DRotationMatrix',
|
||||
'cvWarpPerspective',
|
||||
'cvGetPerspectiveTransform',
|
||||
'cvRemap',
|
||||
'cvLogPolar',
|
||||
'cvCreateStructuringElementEx',
|
||||
'cvReleaseStructuringElement',
|
||||
'cvErode',
|
||||
'cvDilate',
|
||||
'cvMorphologyEx',
|
||||
'cvSmooth',
|
||||
'cvFilter2D',
|
||||
'cvCopyMakeBorder',
|
||||
'cvIntegral',
|
||||
'cvCvtColor',
|
||||
'cvThreshold',
|
||||
'cvAdaptiveThreshold',
|
||||
'cvPyrDown',
|
||||
'cvPyrUp',
|
||||
'cvPyrSegmentation',
|
||||
'cvFloodFill',
|
||||
'cvFindContours',
|
||||
'cvStartFindContours',
|
||||
'cvFindNextContour',
|
||||
'cvSubstituteContour',
|
||||
'cvEndFindContours',
|
||||
'cvMoments',
|
||||
'cvGetSpatialMoment',
|
||||
'cvGetCentralMoment',
|
||||
'cvGetNormalizedCentralMoment',
|
||||
'cvGetHuMoments',
|
||||
'cvHoughLines2',
|
||||
'cvHoughCircles',
|
||||
'cvDistTransform',
|
||||
'cvCreateHist',
|
||||
'cvSetHistBinRanges',
|
||||
'cvReleaseHist',
|
||||
'cvClearHist',
|
||||
'cvMakeHistHeaderForArray',
|
||||
'cvGetMinMaxHistValue',
|
||||
'cvNormalizeHist',
|
||||
'cvThreshHist',
|
||||
'cvCompareHist',
|
||||
'cvCopyHist',
|
||||
'cvCalcHist',
|
||||
'cvCalcBackProject',
|
||||
'cvCalcBackProjectPatch',
|
||||
'cvCalcProbDensity',
|
||||
'cvEqualizeHist',
|
||||
'cvMatchTemplate',
|
||||
'cvMatchShapes',
|
||||
'cvCalcEMD2',
|
||||
'cvCheckArr',
|
||||
'cvKMeans2',
|
||||
'cvSeqPartition',
|
||||
'cvAcc',
|
||||
'cvSquareAcc',
|
||||
'cvMultiplyAcc',
|
||||
'cvRunningAvg',
|
||||
'cvUpdateMotionHistory',
|
||||
'cvCalcMotionGradient',
|
||||
'cvCalcGlobalOrientation',
|
||||
'cvSegmentMotion',
|
||||
'cvMeanShift',
|
||||
'cvCamShift',
|
||||
'cvSnakeImage',
|
||||
'cvCalcOpticalFlowHS',
|
||||
'cvCalcOpticalFlowLK',
|
||||
'cvCalcOpticalFlowBM',
|
||||
'cvCalcOpticalFlowPyrLK',
|
||||
'cvCreateKalman',
|
||||
'cvReleaseKalman',
|
||||
'CvMat*',
|
||||
'CvMat*',
|
||||
'cvCreateConDensation',
|
||||
'cvReleaseConDensation',
|
||||
'cvConDensInitSampleSet',
|
||||
'cvConDensUpdateByTime',
|
||||
'cvCreateImage',
|
||||
'cvCreateImageHeader',
|
||||
'cvReleaseImageHeader',
|
||||
'cvReleaseImage',
|
||||
'cvInitImageHeader',
|
||||
'cvCloneImage',
|
||||
'cvSetImageCOI',
|
||||
'cvGetImageCOI',
|
||||
'cvSetImageROI',
|
||||
'cvResetImageROI',
|
||||
'cvGetImageROI',
|
||||
'cvCreateMat',
|
||||
'cvCreateMatHeader',
|
||||
'cvReleaseMat',
|
||||
'cvInitMatHeader',
|
||||
'cvMat',
|
||||
'cvCloneMat',
|
||||
'cvCreateMatND',
|
||||
'cvCreateMatNDHeader',
|
||||
'cvReleaseMatND',
|
||||
'cvInitMatNDHeader',
|
||||
'cvCloneMatND',
|
||||
'cvDecRefData',
|
||||
'cvIncRefData',
|
||||
'cvCreateData',
|
||||
'cvReleaseData',
|
||||
'cvSetData',
|
||||
'cvGetRawData',
|
||||
'cvGetMat',
|
||||
'cvGetImage',
|
||||
'cvCreateSparseMat',
|
||||
'cvReleaseSparseMat',
|
||||
'cvCloneSparseMat',
|
||||
'cvGetSubRect',
|
||||
'cvGetRow',
|
||||
'cvGetRows',
|
||||
'cvGetCol',
|
||||
'cvGetCols',
|
||||
'cvGetDiag',
|
||||
'cvGetSize',
|
||||
'cvInitSparseMatIterator',
|
||||
'cvGetNextSparseNode',
|
||||
'cvGetElemType',
|
||||
'cvGetDims',
|
||||
'cvGetDimSize',
|
||||
'cvmGet',
|
||||
'cvmSet',
|
||||
'cvClearND',
|
||||
'cvCopy',
|
||||
'cvSet',
|
||||
'cvSetZero',
|
||||
'cvReshape',
|
||||
'cvReshapeMatND',
|
||||
'cvRepeat',
|
||||
'cvFlip',
|
||||
'cvSplit',
|
||||
'cvMerge',
|
||||
'cvLUT',
|
||||
'cvConvertScale',
|
||||
'cvConvertScaleAbs',
|
||||
'cvAdd',
|
||||
'cvAddS',
|
||||
'cvAddWeighted',
|
||||
'cvSub',
|
||||
'cvSubS',
|
||||
'cvSubRS',
|
||||
'cvMul',
|
||||
'cvDiv',
|
||||
'cvAnd',
|
||||
'cvAndS',
|
||||
'cvOr',
|
||||
'cvOrS',
|
||||
'cvXor',
|
||||
'cvXorS',
|
||||
'cvNot',
|
||||
'cvCmp',
|
||||
'cvCmpS',
|
||||
'cvInRange',
|
||||
'cvInRangeS',
|
||||
'cvMax',
|
||||
'cvMaxS',
|
||||
'cvMin',
|
||||
'cvMinS',
|
||||
'cvAbsDiff',
|
||||
'cvAbsDiffS',
|
||||
'cvCountNonZero',
|
||||
'cvSum',
|
||||
'cvAvg',
|
||||
'cvAvgSdv',
|
||||
'cvMinMaxLoc',
|
||||
'cvNorm',
|
||||
'cvSetIdentity',
|
||||
'cvDotProduct',
|
||||
'cvCrossProduct',
|
||||
'cvScaleAdd',
|
||||
'cvGEMM',
|
||||
'cvTransform',
|
||||
'cvPerspectiveTransform',
|
||||
'cvMulTransposed',
|
||||
'cvTrace',
|
||||
'cvTranspose',
|
||||
'cvDet',
|
||||
'cvInvert',
|
||||
'cvSolve',
|
||||
'cvSVD',
|
||||
'cvSVBkSb',
|
||||
'cvEigenVV',
|
||||
'cvCalcCovarMatrix',
|
||||
'cvMahalanobis',
|
||||
'cvRound',
|
||||
'cvSqrt',
|
||||
'cvInvSqrt',
|
||||
'cvCbrt',
|
||||
'cvFastArctan',
|
||||
'cvIsNaN',
|
||||
'cvIsInf',
|
||||
'cvCartToPolar',
|
||||
'cvPolarToCart',
|
||||
'cvPow',
|
||||
'cvExp',
|
||||
'cvLog',
|
||||
'cvSolveCubic',
|
||||
'cvRNG',
|
||||
'cvRandArr',
|
||||
'cvRandInt',
|
||||
'cvRandReal',
|
||||
'cvDFT',
|
||||
'cvGetOptimalDFTSize',
|
||||
'cvMulSpectrums',
|
||||
'cvDCT',
|
||||
'cvLoadHaarClassifierCascade',
|
||||
'cvReleaseHaarClassifierCascade',
|
||||
'cvHaarDetectObjects',
|
||||
'cvSetImagesForHaarClassifierCascade',
|
||||
'cvRunHaarClassifierCascade',
|
||||
'cvApproxChains',
|
||||
'cvStartReadChainPoints',
|
||||
'cvReadChainPoint',
|
||||
'cvApproxPoly',
|
||||
'cvBoundingRect',
|
||||
'cvContourArea',
|
||||
'cvArcLength',
|
||||
'cvCreateContourTree',
|
||||
'cvContourFromContourTree',
|
||||
'cvMatchContourTrees',
|
||||
'cvMaxRect',
|
||||
'cvPointSeqFromMat',
|
||||
'cvBoxPoints',
|
||||
'cvFitEllipse2',
|
||||
'cvFitLine',
|
||||
'cvConvexHull2',
|
||||
'cvCheckContourConvexity',
|
||||
'cvConvexityDefects',
|
||||
'cvPointPolygonTest',
|
||||
'cvMinAreaRect2',
|
||||
'cvMinEnclosingCircle',
|
||||
'cvCalcPGH',
|
||||
'cvSubdiv2DGetEdge',
|
||||
'cvSubdiv2DRotateEdge',
|
||||
'cvSubdiv2DEdgeOrg',
|
||||
'cvSubdiv2DEdgeDst',
|
||||
'cvCreateSubdivDelaunay2D',
|
||||
'cvSubdivDelaunay2DInsert',
|
||||
'cvSubdiv2DLocate',
|
||||
'cvFindNearestPoint2D',
|
||||
'cvCalcSubdivVoronoi2D',
|
||||
'cvClearSubdivVoronoi2D',
|
||||
]
|
@ -1,31 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
#cd .. && make && cd -
|
||||
mkdir -p _build/html/python
|
||||
mkdir -p _build/html/cpp
|
||||
|
||||
if true
|
||||
then
|
||||
rm -f *.rst
|
||||
svn up
|
||||
TEXINPUTS=../: python renderer.py c > a || exit
|
||||
TEXINPUTS=$PWD: sphinx-build -b html -D 'html_title=OpenCV 2.0 C Reference' -d _build/doctrees . _build/html
|
||||
fi
|
||||
|
||||
if true
|
||||
then
|
||||
rm -f *.rst
|
||||
svn up
|
||||
cp python-introduction.rst introduction.rst
|
||||
TEXINPUTS=../: python renderer.py py > a || exit
|
||||
cp python-introduction.rst introduction.rst
|
||||
TEXINPUTS=$PWD: sphinx-build -b html -D 'highlight_language=python' -D 'html_title=OpenCV 2.0 Python Reference' -d _build/doctrees . _build/html/python
|
||||
fi
|
||||
|
||||
if true
|
||||
then
|
||||
rm -f *.rst
|
||||
svn up
|
||||
TEXINPUTS=../: python renderer.py cpp > a || exit
|
||||
TEXINPUTS=$PWD: sphinx-build -b html -D 'html_title=OpenCV 2.0 C++ Reference' -d _build/doctrees . _build/html/cpp
|
||||
fi
|
@ -1,19 +0,0 @@
|
||||
The OpenCV Wiki is here: http://opencv.willowgarage.com/
|
||||
|
||||
Contents:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
introduction
|
||||
cxcore._the_core_functionality
|
||||
cv._image_processing_and_computer_vision
|
||||
cvaux._extra_computer_vision_functionality
|
||||
highgui._high-level_gui_and_media_io
|
||||
ml._machine_learning
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`search`
|
@ -1,75 +0,0 @@
|
||||
import sys
|
||||
from pyparsing import Word, CharsNotIn, Optional, OneOrMore, ZeroOrMore, Group, ParseException, Literal, replaceWith
|
||||
|
||||
import pyparsing
|
||||
help(pyparsing)
|
||||
|
||||
class Argument:
|
||||
def __init__(self, s, loc, toks):
|
||||
self.str = toks[1]
|
||||
def __repr__(self):
|
||||
return "[%s]" % self.str
|
||||
def argfun(s, loc, toks):
|
||||
return Argument(s, loc, toks)
|
||||
|
||||
class Parameter:
|
||||
def __init__(self, s, loc, toks):
|
||||
self.str = toks[1]
|
||||
def __repr__(self):
|
||||
return "{%s}" % self.str
|
||||
def paramfun(s, loc, toks):
|
||||
return Parameter(s, loc, toks)
|
||||
|
||||
class TexCmd:
|
||||
def __init__(self, s, loc, toks):
|
||||
self.cmd = str(toks[0])[1:]
|
||||
#print 'cmd', self.cmd
|
||||
self.args = toks[1].asList()
|
||||
self.params = toks[2].asList()
|
||||
def __repr__(self):
|
||||
return self.cmd + "".join([repr(a) for a in self.args]) + "".join([repr(p) for p in self.params])
|
||||
|
||||
class ZeroOrMoreAsList(ZeroOrMore):
|
||||
def __init__(self, *args):
|
||||
ZeroOrMore.__init__(self, *args)
|
||||
def listify(s, loc, toks):
|
||||
return [toks]
|
||||
self.setParseAction(listify)
|
||||
|
||||
arg = '[' + CharsNotIn("]") + ']'
|
||||
arg.setParseAction(argfun)
|
||||
param = '{' + Optional(CharsNotIn("}")) + '}'
|
||||
param.setParseAction(paramfun)
|
||||
texcmd = Word("\\", "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") + ZeroOrMoreAsList(arg) + ZeroOrMoreAsList(param)
|
||||
def texcmdfun(s, loc, toks):
|
||||
if str(toks[0])[1:] == 'input':
|
||||
filename = toks[2].asList()[0].str + "-py.tex"
|
||||
print 'Now parsing', filename
|
||||
return parsefile(filename)
|
||||
else:
|
||||
return TexCmd(s, loc, toks)
|
||||
texcmd.setParseAction(texcmdfun)
|
||||
|
||||
legal = "".join([chr(x) for x in set(range(32, 127)) - set("\\")])
|
||||
document = ZeroOrMore(texcmd | Word(legal)) + Literal(chr(127)).suppress()
|
||||
|
||||
def parsefile(filename):
|
||||
f = open(filename, "rt")
|
||||
|
||||
lines = list(f)
|
||||
def uncomment(s):
|
||||
if '%' in s:
|
||||
return s[:s.index('%')] + '\n'
|
||||
else:
|
||||
return s
|
||||
|
||||
lines = [uncomment(l) for l in lines]
|
||||
|
||||
docstr = "".join(lines) + chr(127)
|
||||
# document.setFailAction(None)
|
||||
return document.parseString(docstr)
|
||||
|
||||
for x in parsefile(sys.argv[1]):
|
||||
if isinstance(x, TexCmd):
|
||||
if x.cmd == 'chapter':
|
||||
print repr(x)
|
@ -1,42 +0,0 @@
|
||||
\ProvidesPackage{mymath}
|
||||
|
||||
\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}
|
||||
}
|
||||
|
@ -1,189 +0,0 @@
|
||||
from plasTeX import Base
|
||||
from plasTeX.Base.LaTeX.Verbatim import verbatim
|
||||
from plasTeX.Base.LaTeX import Sectioning
|
||||
import sys
|
||||
|
||||
class includegraphics(Base.Command):
|
||||
args = '[size] file'
|
||||
def invoke(self, tex):
|
||||
Base.Command.invoke(self, tex)
|
||||
|
||||
class cvclass(Sectioning.subsection):
|
||||
def invoke(self, tex):
|
||||
Sectioning.subsection.invoke(self, tex)
|
||||
|
||||
class cvfunc(Sectioning.subsection):
|
||||
def invoke(self, tex):
|
||||
Sectioning.subsection.invoke(self, tex)
|
||||
|
||||
class cvCPyFunc(Sectioning.subsection):
|
||||
def invoke(self, tex):
|
||||
Sectioning.subsection.invoke(self, tex)
|
||||
|
||||
class cvCppFunc(Sectioning.subsection):
|
||||
def invoke(self, tex):
|
||||
Sectioning.subsection.invoke(self, tex)
|
||||
|
||||
class cvFunc(Sectioning.subsection):
|
||||
args = 'title alt'
|
||||
def invoke(self, tex):
|
||||
Sectioning.subsection.invoke(self, tex)
|
||||
|
||||
class cvstruct(Sectioning.subsection):
|
||||
def invoke(self, tex):
|
||||
Sectioning.subsection.invoke(self, tex)
|
||||
|
||||
class cvmacro(Sectioning.subsection):
|
||||
def invoke(self, tex):
|
||||
Sectioning.subsection.invoke(self, tex)
|
||||
|
||||
class cross(Base.Command):
|
||||
args = 'name'
|
||||
def invoke(self, tex):
|
||||
Base.Command.invoke(self, tex)
|
||||
|
||||
class label(Base.Command):
|
||||
args = 'name'
|
||||
def invoke(self, tex):
|
||||
Base.Command.invoke(self, tex)
|
||||
|
||||
class url(Base.Command):
|
||||
args = 'loc'
|
||||
def invoke(self, tex):
|
||||
Base.Command.invoke(self, tex)
|
||||
|
||||
class cvarg(Base.Command):
|
||||
args = 'item def'
|
||||
def invoke(self, tex):
|
||||
Base.Command.invoke(self, tex)
|
||||
|
||||
class cvCross(Base.Command):
|
||||
args = 'name altname'
|
||||
def invoke(self, tex):
|
||||
Base.Command.invoke(self, tex)
|
||||
|
||||
class cvCPyCross(Base.Command):
|
||||
args = 'name'
|
||||
def invoke(self, tex):
|
||||
Base.Command.invoke(self, tex)
|
||||
|
||||
class cvCppCross(Base.Command):
|
||||
args = 'name'
|
||||
def invoke(self, tex):
|
||||
Base.Command.invoke(self, tex)
|
||||
|
||||
class cvdefC(Base.Command):
|
||||
args = 'a'
|
||||
def invoke(self, tex):
|
||||
Base.Command.invoke(self, tex)
|
||||
|
||||
class cvcode(Base.Command):
|
||||
args = 'a'
|
||||
def invoke(self, tex):
|
||||
Base.Command.invoke(self, tex)
|
||||
|
||||
class cvdefPy(Base.Command):
|
||||
args = 'a'
|
||||
def invoke(self, tex):
|
||||
Base.Command.invoke(self, tex)
|
||||
|
||||
class cvdefCpp(Base.Command):
|
||||
args = 'a'
|
||||
def invoke(self, tex):
|
||||
Base.Command.invoke(self, tex)
|
||||
|
||||
class cvC(Base.Command):
|
||||
args = 'a'
|
||||
def invoke(self, tex):
|
||||
Base.Command.invoke(self, tex)
|
||||
|
||||
class cvCpp(Base.Command):
|
||||
args = 'a'
|
||||
def invoke(self, tex):
|
||||
Base.Command.invoke(self, tex)
|
||||
|
||||
class cvCPy(Base.Command):
|
||||
args = 'a'
|
||||
def invoke(self, tex):
|
||||
Base.Command.invoke(self, tex)
|
||||
|
||||
class cvPy(Base.Command):
|
||||
args = 'a'
|
||||
def invoke(self, tex):
|
||||
Base.Command.invoke(self, tex)
|
||||
|
||||
class xxindex(Base.Command):
|
||||
args = 'entry'
|
||||
def invoke(self, tex):
|
||||
Base.Command.invoke(self, tex)
|
||||
|
||||
class lstlisting(verbatim):
|
||||
def parse(self, tex):
|
||||
verbatim.parse(self, tex)
|
||||
return self.attributes
|
||||
|
||||
def section_filename(title):
|
||||
"""Image Processing ==> image_processing.rst"""
|
||||
lower_list = [word.lower() for word in title.split()]
|
||||
return "_".join(lower_list) + ".rst"
|
||||
|
||||
class chapter(Sectioning.chapter):
|
||||
@property
|
||||
def filenameoverride(self):
|
||||
if self.attributes['title'] is not None:
|
||||
filename = section_filename(str(self.attributes['title']))
|
||||
#assert filename in ['cxcore.rst', 'cvreference.rst']
|
||||
return filename
|
||||
raise AttributeError, 'This chapter does not generate a new file'
|
||||
|
||||
|
||||
class section(Sectioning.section):
|
||||
@property
|
||||
def filenameoverride(self):
|
||||
if self.attributes['title'] is not None:
|
||||
filename = section_filename(str(self.attributes['title']))
|
||||
print 'section:', filename
|
||||
return filename
|
||||
raise AttributeError, 'This section does not generate a new file'
|
||||
|
||||
class xifthenelse(Base.Command):
|
||||
args = 'test then else'
|
||||
|
||||
class _not(Base.Command):
|
||||
macroName = 'not'
|
||||
|
||||
class _and(Base.Command):
|
||||
macroName = 'and'
|
||||
|
||||
class _or(Base.Command):
|
||||
macroName = 'or'
|
||||
|
||||
class NOT(Base.Command):
|
||||
pass
|
||||
|
||||
class AND(Base.Command):
|
||||
pass
|
||||
|
||||
class OR(Base.Command):
|
||||
pass
|
||||
|
||||
class openParen(Base.Command):
|
||||
macroName = '('
|
||||
|
||||
class closeParen(Base.Command):
|
||||
macroName = ')'
|
||||
|
||||
class isodd(Base.Command):
|
||||
args = 'number:int'
|
||||
|
||||
class isundefined(Base.Command):
|
||||
args = 'command:str'
|
||||
|
||||
class equal(Base.Command):
|
||||
args = 'first second'
|
||||
|
||||
class lengthtest(Base.Command):
|
||||
args = 'test'
|
||||
|
||||
class boolean(Base.Command):
|
||||
args = 'name:str'
|
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB |
@ -1,113 +0,0 @@
|
||||
Introduction
|
||||
============
|
||||
|
||||
Cookbook
|
||||
--------
|
||||
|
||||
Here is a small collection of code fragments demonstrating some features
|
||||
of the OpenCV Python bindings.
|
||||
|
||||
Convert an image from png to jpg
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
::
|
||||
|
||||
import cv
|
||||
cv.SaveImage("foo.png", cv.LoadImage("foo.jpg"))
|
||||
|
||||
Compute the Laplacian
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
::
|
||||
|
||||
im = cv.LoadImage("foo.png", 1)
|
||||
dst = cv.CreateImage(cv.GetSize(im), cv.IPL_DEPTH_16S, 3);
|
||||
laplace = cv.Laplace(im, dst)
|
||||
cv.SaveImage("foo-laplace.png", dst)
|
||||
|
||||
|
||||
Using cvGoodFeaturesToTrack
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
::
|
||||
|
||||
img = cv.LoadImage("foo.jpg")
|
||||
eig_image = cv.CreateImage(cv.GetSize(img), cv.IPL_DEPTH_32F, 1)
|
||||
temp_image = cv.CreateImage(cv.GetSize(img), cv.IPL_DEPTH_32F, 1)
|
||||
# Find up to 300 corners using Harris
|
||||
for (x,y) in cv.GoodFeaturesToTrack(img, eig_image, temp_image, 300, None, 1.0, use_harris = True):
|
||||
print "good feature at", x,y
|
||||
|
||||
Using GetSubRect
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
GetSubRect returns a rectangular part of another image. It does this without copying any data.
|
||||
|
||||
::
|
||||
|
||||
img = cv.LoadImage("foo.jpg")
|
||||
sub = cv.GetSubRect(img, (0, 0, 32, 32)) # sub is 32x32 patch from img top-left
|
||||
cv.SetZero(sub) # clear sub to zero, which also clears 32x32 pixels in img
|
||||
|
||||
Using CreateMat, and accessing an element
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
::
|
||||
|
||||
mat = cv.CreateMat(5, 5, cv.CV_32FC1)
|
||||
mat[3,2] += 0.787
|
||||
|
||||
|
||||
ROS image message to OpenCV
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
See this tutorial: http://www.ros.org/wiki/cv_bridge/Tutorials/UsingCvBridgeToConvertBetweenROSImagesAndOpenCVImages
|
||||
|
||||
PIL Image to OpenCV
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
(For details on PIL see the `PIL manual <http://www.pythonware.com/library/pil/handbook/image.htm>`_).
|
||||
|
||||
::
|
||||
|
||||
import Image
|
||||
import cv
|
||||
pi = Image.open('foo.png') # PIL image
|
||||
cv_im = cv.CreateImageHeader(pi.size, cv.IPL_DEPTH_8U, 1)
|
||||
cv.SetData(cv_im, pi.tostring())
|
||||
|
||||
OpenCV to PIL Image
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
::
|
||||
|
||||
cv_im = cv.CreateImage((320,200), cv.IPL_DEPTH_8U, 1)
|
||||
pi = Image.fromstring("L", cv.GetSize(cv_im), cv_im.tostring())
|
||||
|
||||
NumPy and OpenCV
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
Using the `array interface <http://docs.scipy.org/doc/numpy/reference/arrays.interface.html>`_, to use an OpenCV CvMat in NumPy::
|
||||
|
||||
import cv
|
||||
import numpy
|
||||
mat = cv.CreateMat(5, 5, cv.CV_32FC1)
|
||||
a = numpy.asarray(mat)
|
||||
|
||||
and to use a NumPy array in OpenCV::
|
||||
|
||||
a = numpy.ones((640, 480))
|
||||
mat = cv.fromarray(a)
|
||||
|
||||
even easier, most OpenCV functions can work on NumPy arrays directly, for example::
|
||||
|
||||
picture = numpy.ones((640, 480))
|
||||
cv.Smooth(picture, picture, cv.CV_GAUSSIAN, 15, 15)
|
||||
|
||||
Given a 2D array,
|
||||
the fromarray function (or the implicit version shown above)
|
||||
returns a single-channel CvMat of the same size.
|
||||
For a 3D array of size :math:`j \times k \times l`, it returns a
|
||||
CvMat sized :math:`j \times k` with :math:`l` channels.
|
||||
|
||||
Alternatively, use fromarray with the allowND option to always return a cvMatND.
|
@ -1,595 +0,0 @@
|
||||
import string, re
|
||||
import sys
|
||||
from plasTeX.Renderers import Renderer
|
||||
from plasTeX.Base.TeX import Primitives
|
||||
|
||||
# import generated OpenCV function names
|
||||
# if the file function_names.py does not exist, it
|
||||
# can be generated using the script find_function_names.sh
|
||||
try:
|
||||
from function_names import opencv_function_names
|
||||
except:
|
||||
opencv_function_names = []
|
||||
pass
|
||||
|
||||
class XmlRenderer(Renderer):
|
||||
|
||||
def default(self, node):
|
||||
""" Rendering method for all non-text nodes """
|
||||
s = []
|
||||
|
||||
# Handle characters like \&, \$, \%, etc.
|
||||
if len(node.nodeName) == 1 and node.nodeName not in string.letters:
|
||||
return self.textDefault(node.nodeName)
|
||||
|
||||
# Start tag
|
||||
s.append('<%s>' % node.nodeName)
|
||||
|
||||
# See if we have any attributes to render
|
||||
if node.hasAttributes():
|
||||
s.append('<attributes>')
|
||||
for key, value in node.attributes.items():
|
||||
# If the key is 'self', don't render it
|
||||
# these nodes are the same as the child nodes
|
||||
if key == 'self':
|
||||
continue
|
||||
s.append('<%s>%s</%s>' % (key, unicode(value), key))
|
||||
s.append('</attributes>')
|
||||
|
||||
# Invoke rendering on child nodes
|
||||
s.append(unicode(node))
|
||||
|
||||
# End tag
|
||||
s.append('</%s>' % node.nodeName)
|
||||
|
||||
return u'\n'.join(s)
|
||||
|
||||
def textDefault(self, node):
|
||||
""" Rendering method for all text nodes """
|
||||
return node.replace('&','&').replace('<','<').replace('>','>')
|
||||
|
||||
from plasTeX.Renderers import Renderer as BaseRenderer
|
||||
|
||||
class reStructuredTextRenderer(BaseRenderer):
|
||||
|
||||
aliases = {
|
||||
'superscript': 'active::^',
|
||||
'subscript': 'active::_',
|
||||
'dollar': '$',
|
||||
'percent': '%',
|
||||
'opencurly': '{',
|
||||
'closecurly': '}',
|
||||
'underscore': '_',
|
||||
'ampersand': '&',
|
||||
'hashmark': '#',
|
||||
'space': ' ',
|
||||
'tilde': 'active::~',
|
||||
'at': '@',
|
||||
'backslash': '\\',
|
||||
}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
BaseRenderer.__init__(self, *args, **kwargs)
|
||||
|
||||
# Load dictionary with methods
|
||||
for key in vars(type(self)):
|
||||
if key.startswith('do__'):
|
||||
self[self.aliases[key[4:]]] = getattr(self, key)
|
||||
elif key.startswith('do_'):
|
||||
self[key[3:]] = getattr(self, key)
|
||||
|
||||
self.indent = 0
|
||||
self.in_func = False
|
||||
self.in_cvarg = False
|
||||
self.descriptions = 0
|
||||
self.after_parameters = False
|
||||
self.func_short_desc = ''
|
||||
|
||||
def do_document(self, node):
|
||||
return unicode(node)
|
||||
|
||||
def do_par(self, node):
|
||||
if self.indent == -1:
|
||||
pre = ""
|
||||
post = ""
|
||||
else:
|
||||
pre = "\n" + (" " * self.indent)
|
||||
post = "\n"
|
||||
return pre + unicode(node).lstrip(" ") + post
|
||||
|
||||
def do_chapter(self, node):
|
||||
t = str(node.attributes['title'])
|
||||
|
||||
section_files = []
|
||||
for section in node.subsections:
|
||||
try:
|
||||
filename = section.filenameoverride
|
||||
if filename is not None:
|
||||
section_files.append(filename)
|
||||
except:
|
||||
pass
|
||||
|
||||
toc = ".. toctree::\n :maxdepth: 2\n\n"
|
||||
for file in section_files:
|
||||
if file[-4:] != '.rst':
|
||||
print >>sys.stderr, "WARNING: unexpected file extension:", file
|
||||
else:
|
||||
toc += " %s\n" % file[:-4]
|
||||
toc += "\n\n"
|
||||
|
||||
return "\n\n%s\n%s\n%s\n\n" % ('*' * len(t), t, '*' * len(t)) + toc + unicode(node)
|
||||
|
||||
def do_section(self, node):
|
||||
t = str(node.attributes['title'])
|
||||
return "\n\n%s\n%s\n\n" % (t, '=' * len(t)) + unicode(node)
|
||||
|
||||
def do_subsection(self, node):
|
||||
t = str(node.attributes['title'])
|
||||
return "\n\n%s\n%s\n\n" % (t, '-' * len(t)) + unicode(node)
|
||||
|
||||
def do_cvdefX(self, node, lang):
|
||||
if self.language != lang:
|
||||
return u""
|
||||
self.indent = -1
|
||||
self.in_func = False
|
||||
decl = unicode(node.attributes['a']).rstrip(' ;') # remove trailing ';'
|
||||
decl_list = decl.split(";")
|
||||
r = u""
|
||||
for d in decl_list:
|
||||
r += u"\n\n.. %s:: %s\n\n" % ({'c' : 'cfunction', 'cpp' : 'cfunction', 'py' : 'function'}[self.language], d.strip())
|
||||
self.indent = 4
|
||||
if self.func_short_desc != '':
|
||||
r += self.ind() + self.func_short_desc + '\n\n'
|
||||
self.func_short_desc = ''
|
||||
return r
|
||||
|
||||
def do_cvdefC(self, node):
|
||||
return self.do_cvdefX(node, 'c')
|
||||
|
||||
def do_cvcode(self, node):
|
||||
#body = unicode(node.source).replace(u"\n",u"").replace(u"\\newline", u"\n");
|
||||
#body = body.replace(u"\\par", u"\n").replace(u"\\cvcode{", "").replace(u"\\", u"")[:-1];
|
||||
body = unicode(node.source).replace(u"\\newline", u"\n").replace("_ ", "_");
|
||||
body = body.replace(u"\\par", u"\n").replace(u"\\cvcode{", "").replace(u"\n\n",u"\n");
|
||||
body = body.replace(u",\n", ",\n ").replace(u"\\", u"")[:-1];
|
||||
|
||||
lines = body.split(u"\n")
|
||||
self.indent += 4
|
||||
body = "\n".join([u"%s %s" % (self.ind(), s) for s in lines])
|
||||
r = (u"\n\n%s::\n\n" % self.ind()) + unicode(body) + u"\n\n"
|
||||
self.indent -= 4
|
||||
return r
|
||||
|
||||
def do_cvdefCpp(self, node):
|
||||
lang = 'cpp'
|
||||
if self.language != lang:
|
||||
return u""
|
||||
self.indent = -1
|
||||
self.in_func = False
|
||||
decl = unicode(node.source).replace(u"\n",u"").replace(u"\\newline", u"").replace(u"_ ", u"_");
|
||||
decl = decl.replace(u"\\par", u"").replace(u"\\cvdefCpp{", "").replace(u"\\", u"").rstrip(u" ;}");
|
||||
decl_list = decl.split(";")
|
||||
r = u""
|
||||
for d in decl_list:
|
||||
r += u"\n\n.. %s:: %s\n\n" % ({'c' : 'cfunction', 'cpp' : 'cfunction', 'py' : 'function'}[self.language], d.strip())
|
||||
self.indent = 4
|
||||
if self.func_short_desc != '':
|
||||
r += self.ind() + self.func_short_desc + '\n\n'
|
||||
self.func_short_desc = ''
|
||||
return r
|
||||
|
||||
def do_cvdefPy(self, node):
|
||||
return self.do_cvdefX(node, 'py')
|
||||
|
||||
def do_description(self, node):
|
||||
self.descriptions += 1
|
||||
desc = unicode(node)
|
||||
self.descriptions -= 1
|
||||
if self.descriptions == 0:
|
||||
self.after_parameters = True
|
||||
return u"\n\n" + desc + u"\n\n"
|
||||
|
||||
def do_includegraphics(self, node):
|
||||
filename = '../' + str(node.attributes['file']).strip()
|
||||
if not os.path.isfile(filename):
|
||||
print >>sys.stderr, "WARNING: missing image file", filename
|
||||
return u""
|
||||
return u"\n\n%s.. image:: %s\n\n" % (self.ind(), filename)
|
||||
|
||||
def do_xfunc(self, node, a='title'):
|
||||
t = self.get_func_prefix() + unicode(node.attributes[a]).strip()
|
||||
print "====>", t
|
||||
label = u"\n\n.. index:: %s\n\n.. _%s:\n\n" % (t, t)
|
||||
self.in_func = True
|
||||
self.descriptions = 0
|
||||
self.after_parameters = False
|
||||
self.indent = 0
|
||||
#return u"" + unicode(node)
|
||||
|
||||
# Would like to look ahead to reorder things, but cannot see more than 2 ahead
|
||||
if 0:
|
||||
print "NODES:", node.source
|
||||
n = node.nextSibling
|
||||
while (n != None) and (n.nodeName != 'cvfunc'):
|
||||
print " ", n.nodeName, len(n.childNodes)
|
||||
n = n.nextSibling
|
||||
print "-----"
|
||||
return label + u"\n\n%s\n%s\n\n" % (t, '-' * len(t)) + unicode(node)
|
||||
|
||||
def do_cvfunc(self, node):
|
||||
return self.do_xfunc(node)
|
||||
|
||||
def do_cvclass(self, node):
|
||||
return self.do_xfunc(node)
|
||||
|
||||
def get_func_prefix(self):
|
||||
return u""
|
||||
if self.language == 'c':
|
||||
return u"cv"
|
||||
if self.language == 'cpp':
|
||||
return u"cv\\:\\:"
|
||||
if self.language == 'py':
|
||||
return u"cv\\."
|
||||
return u""
|
||||
|
||||
def do_cvFunc(self, node):
|
||||
return self.do_xfunc(node, ['title','alt'][self.language == 'cpp'])
|
||||
|
||||
def do_cvCPyFunc(self, node):
|
||||
return self.do_xfunc(node)
|
||||
|
||||
def do_cvCppFunc(self, node):
|
||||
return self.do_xfunc(node)
|
||||
|
||||
def do_cvstruct(self, node):
|
||||
t = str(node.attributes['title']).strip()
|
||||
self.after_parameters = False
|
||||
self.indent = 4
|
||||
return u".. ctype:: %s" % t + unicode(node)
|
||||
|
||||
def do_cvmacro(self, node):
|
||||
t = str(node.attributes['title']).strip()
|
||||
self.after_parameters = False
|
||||
self.indent = 4
|
||||
return u".. cmacro:: %s" % t + unicode(node)
|
||||
|
||||
def showTree(self, node, i = 0):
|
||||
n = node
|
||||
while n != None:
|
||||
print "%s[%s]" % (" " * i, n.nodeName)
|
||||
if len(n.childNodes) != 0:
|
||||
self.showTree(n.childNodes[0], i + 4)
|
||||
n = n.nextSibling
|
||||
|
||||
def do_Huge(self, node):
|
||||
return unicode(node)
|
||||
|
||||
def do_tabular(self, node):
|
||||
if 0:
|
||||
self.showTree(node)
|
||||
rows = []
|
||||
for row in node.childNodes:
|
||||
cols = []
|
||||
for col in row.childNodes:
|
||||
cols.append(unicode(col).strip())
|
||||
rows.append(cols)
|
||||
maxes = [ 0 ] * len(rows[0])
|
||||
for r in rows:
|
||||
maxes = [ max(m,len(c)) for m,c in zip(maxes, r) ]
|
||||
sep = "+" + "+".join([ ('-' * (m + 4)) for m in maxes]) + "+"
|
||||
s = ""
|
||||
s += sep + "\n"
|
||||
for r in rows:
|
||||
#s += "|" + "|".join([ ' ' + c.ljust(m + 3) for c,m in zip(r, maxes) ]) + "|" + "\n"
|
||||
#s += sep + "\n"
|
||||
s += self.ind() + "|" + "|".join([ ' ' + c.ljust(m + 3) for c,m in zip(r, maxes) ]) + "|" + "\n"
|
||||
s += self.ind() + sep + "\n"
|
||||
return unicode(s)
|
||||
|
||||
def do_verbatim(self, node):
|
||||
return u"\n\n::\n\n " + unicode(node.source.replace('\n', '\n ')) + "\n\n"
|
||||
|
||||
def do_index(self, node):
|
||||
return u""
|
||||
# No idea why this does not work... JCB
|
||||
return u"\n\n.. index:: (%s)\n\n" % node.attributes['entry']
|
||||
|
||||
def do_label(self, node):
|
||||
return u""
|
||||
|
||||
def fixup_funcname(self, str):
|
||||
"""
|
||||
add parentheses to a function name if not already present
|
||||
"""
|
||||
str = str.strip()
|
||||
if str[-1] != ')':
|
||||
return str + '()'
|
||||
return str
|
||||
|
||||
def gen_reference(self, name):
|
||||
"""
|
||||
try to guess whether *name* is a function, struct or macro
|
||||
and if yes, generate the appropriate reference markup
|
||||
"""
|
||||
name = name.strip()
|
||||
if name[0:2] == 'cv':
|
||||
return u":cfunc:`%s`" % self.fixup_funcname(name)
|
||||
elif 'cv'+name in opencv_function_names:
|
||||
if self.language in ['c', 'cpp']:
|
||||
return u":cfunc:`cv%s`" % self.fixup_funcname(name)
|
||||
else:
|
||||
return u":func:`%s`" % self.fixup_funcname(name)
|
||||
elif name[0:2] == 'Cv' or name[0:3] == 'Ipl':
|
||||
return u":ctype:`%s`" % name
|
||||
elif name[0:2] == 'CV':
|
||||
return u":cmacro:`%s`" % name
|
||||
return None
|
||||
|
||||
def do_xcross(self, refname):
|
||||
# try to guess whether t is a function, struct or macro
|
||||
# and if yes, generate the appropriate reference markup
|
||||
#rst_ref = self.gen_reference(refname)
|
||||
#if rst_ref is not None:
|
||||
# return rst_ref
|
||||
return u":ref:`%s`" % refname
|
||||
|
||||
def do_cross(self, node):
|
||||
return self.do_xcross(str(node.attributes['name']).strip())
|
||||
|
||||
def do_cvCross(self, node):
|
||||
prefix = self.get_func_prefix()
|
||||
if self.language == 'cpp':
|
||||
t = prefix + str(node.attributes['altname']).strip()
|
||||
return u":ref:`%s`" % t
|
||||
else:
|
||||
t = prefix + str(node.attributes['name']).strip()
|
||||
return self.do_xcross(t)
|
||||
|
||||
def do_cvCPyCross(self, node):
|
||||
t = self.get_func_prefix() + str(node.attributes['name']).strip()
|
||||
return self.do_xcross(t)
|
||||
|
||||
def do_cvCppCross(self, node):
|
||||
t = self.get_func_prefix() + str(node.attributes['name']).strip()
|
||||
return u":ref:`%s`" % t
|
||||
|
||||
def ind(self):
|
||||
return u" " * self.indent
|
||||
|
||||
def do_cvarg(self, node):
|
||||
self.indent += 4
|
||||
|
||||
# Nested descriptions occur e.g. when a flag parameter can
|
||||
# be one of several constants. We want to render the inner
|
||||
# description differently than the outer parameter descriptions.
|
||||
if self.in_cvarg or self.after_parameters:
|
||||
defstr = unicode(node.attributes['def'])
|
||||
assert not (u"\xe2" in unicode(defstr))
|
||||
self.indent -= 4
|
||||
param_str = u"\n%s * **%s** - %s\n"
|
||||
return param_str % (self.ind(), str(node.attributes['item']).strip(), self.fix_quotes(defstr).strip(" "))
|
||||
|
||||
# save that we are in a paramater description
|
||||
self.in_cvarg = True
|
||||
defstr = unicode(node.attributes['def'])
|
||||
assert not (u"\xe2" in unicode(defstr))
|
||||
self.in_cvarg = False
|
||||
|
||||
self.indent -= 4
|
||||
param_str = u"\n%s:param %s: %s"
|
||||
return param_str % (self.ind(), str(node.attributes['item']).strip(), self.fix_quotes(defstr).strip())
|
||||
#lines = defstr.split('\n')
|
||||
#return u"\n%s%s\n%s\n" % (self.ind(), str(node.attributes['item']).strip(), "\n".join([self.ind()+" "+l for l in lines]))
|
||||
|
||||
def do_bgroup(self, node):
|
||||
return u"bgroup(%s)" % node.source
|
||||
|
||||
def do_url(self, node):
|
||||
return unicode(node.attributes['loc'])
|
||||
|
||||
def do_enumerate(self, node):
|
||||
return unicode(node)
|
||||
|
||||
def do_itemize(self, node):
|
||||
return unicode(node)
|
||||
|
||||
def do_item(self, node):
|
||||
#if node.attributes['term'] != None:
|
||||
if node.attributes.get('term',None):
|
||||
self.indent += 4
|
||||
defstr = unicode(node).strip()
|
||||
assert not (u"\xe2" in unicode(defstr))
|
||||
self.indent -= 4
|
||||
return u"\n%s* %s *\n%s %s\n" % (self.ind(), unicode(node.attributes['term']).strip(), self.ind(), defstr)
|
||||
else:
|
||||
return u"\n\n%s* %s" % (self.ind(), unicode(node).strip())
|
||||
|
||||
def do_textit(self, node):
|
||||
return "*%s*" % unicode(node.attributes['self'])
|
||||
|
||||
def do_texttt(self, node):
|
||||
t = unicode(node)
|
||||
# try to guess whether t is a function, struct or macro
|
||||
# and if yes, generate the appropriate reference markup
|
||||
rst_ref = self.gen_reference(t)
|
||||
if rst_ref is not None:
|
||||
return rst_ref
|
||||
return u"``%s``" % t
|
||||
|
||||
def do__underscore(self, node):
|
||||
return u"_"
|
||||
|
||||
def default(self, node):
|
||||
print "DEFAULT dropping", node.nodeName
|
||||
return unicode(node)
|
||||
|
||||
def do_lstlisting(self, node):
|
||||
self.in_func = False
|
||||
lines = node.source.split('\n')
|
||||
self.indent += 2
|
||||
body = "\n".join([u"%s %s" % (self.ind(), s) for s in lines[1:-1]])
|
||||
r = (u"\n\n%s::\n\n" % self.ind()) + unicode(body) + u"\n\n"
|
||||
if self.func_short_desc != '':
|
||||
r = self.ind() + self.func_short_desc + '\n\n' + r
|
||||
self.func_short_desc = ''
|
||||
self.indent -= 2
|
||||
return r
|
||||
|
||||
def do_math(self, node):
|
||||
return u":math:`%s`" % node.source
|
||||
|
||||
def do_displaymath(self, node):
|
||||
words = self.fix_quotes(node.source).strip().split()
|
||||
return u"\n\n%s.. math::\n\n%s %s\n\n" % (self.ind(), self.ind(), " ".join(words[1:-1]))
|
||||
|
||||
def do_maketitle(self, node):
|
||||
return u""
|
||||
def do_setcounter(self, node):
|
||||
return u""
|
||||
def do_tableofcontents(self, node):
|
||||
return u""
|
||||
def do_titleformat(self, node):
|
||||
return u""
|
||||
def do_subsubsection(self, node):
|
||||
return u""
|
||||
def do_include(self, node):
|
||||
return u""
|
||||
|
||||
def fix_quotes(self, s):
|
||||
s = s.replace(u'\u2013', "'")
|
||||
s = s.replace(u'\u2019', "'")
|
||||
s = s.replace(u'\u2264', "#<2264>")
|
||||
s = s.replace(u'\xd7', "#<d7>")
|
||||
return s
|
||||
|
||||
def do_cvC(self, node):
|
||||
if self.language == 'c':
|
||||
return unicode(node.attributes['a'])
|
||||
return unicode("")
|
||||
|
||||
def do_cvCpp(self, node):
|
||||
if self.language == 'cpp':
|
||||
return unicode(node.attributes['a'])
|
||||
return unicode("")
|
||||
|
||||
def do_cvPy(self, node):
|
||||
if self.language == 'py':
|
||||
return unicode(node.attributes['a'])
|
||||
return unicode("")
|
||||
|
||||
def do_cvCPy(self, node):
|
||||
if self.language == 'c' or self.language == 'py':
|
||||
return unicode(node.attributes['a'])
|
||||
return unicode("")
|
||||
|
||||
def do_ifthenelse(self, node):
|
||||
# print "IFTHENELSE: [%s],[%s],[%s]" % (node.attributes['test'], str(node.attributes['then']), node.attributes['else'])
|
||||
print "CONDITION", unicode(node.attributes['test']).strip() == u'true'
|
||||
if unicode(node.attributes['test']).strip() == u'true':
|
||||
print "TRUE: [%s]" % str(node.attributes['then'])
|
||||
return unicode(node.attributes['then'])
|
||||
else:
|
||||
return unicode(node.attributes['else'])
|
||||
|
||||
def do_equal(self, node):
|
||||
first = unicode(node.attributes['first']).strip()
|
||||
second = unicode(node.attributes['second']).strip()
|
||||
if first == second:
|
||||
return u'true'
|
||||
else:
|
||||
return u'false'
|
||||
|
||||
def textDefault(self, node):
|
||||
if self.in_func:
|
||||
self.func_short_desc += self.fix_quotes(unicode(node)).strip(" ")
|
||||
return u""
|
||||
|
||||
s = unicode(node)
|
||||
s = self.fix_quotes(s)
|
||||
return s
|
||||
return node.replace('\\_','_')
|
||||
|
||||
|
||||
from plasTeX.TeX import TeX
|
||||
import os
|
||||
import pickle
|
||||
|
||||
def preprocess_conditionals(fname, suffix, conditionals):
|
||||
print 'conditionals', conditionals
|
||||
f = open("../" + fname + ".tex", 'r')
|
||||
fout = open(fname + suffix + ".tex", 'w')
|
||||
print 'write', fname + suffix + ".tex"
|
||||
ifstack=[True]
|
||||
for l in f.readlines():
|
||||
ll = l.lstrip()
|
||||
if ll.startswith("\\if"):
|
||||
ifstack.append(conditionals.get(ll.rstrip()[3:], False))
|
||||
elif ll.startswith("\\else"):
|
||||
ifstack[-1] = not ifstack[-1]
|
||||
elif ll.startswith("\\fi"):
|
||||
ifstack.pop()
|
||||
elif not False in ifstack:
|
||||
fout.write(l)
|
||||
f.close()
|
||||
fout.close()
|
||||
|
||||
def parse_documentation_source(language):
|
||||
# Instantiate a TeX processor and parse the input text
|
||||
tex = TeX()
|
||||
tex.ownerDocument.config['files']['split-level'] = 0
|
||||
master_f = open("../online-opencv.tex", "rt")
|
||||
out_master_f = open(("../online-opencv-%s.tex" % language), "wt")
|
||||
flist = []
|
||||
|
||||
for l in master_f.readlines():
|
||||
outl = l
|
||||
if l.startswith("\\newcommand{\\targetlang}{}"):
|
||||
outl = l.replace("}", ("%s}" % language))
|
||||
elif l.startswith("\\input{"):
|
||||
flist.append(re.findall(r"\{(.+)\}", l)[0])
|
||||
outl = l.replace("}", ("-%s}" % language))
|
||||
out_master_f.write(outl)
|
||||
|
||||
master_f.close()
|
||||
out_master_f.close()
|
||||
|
||||
index_f = open("index.rst.copy", "rt")
|
||||
index_lines = list(index_f.readlines())
|
||||
index_f.close()
|
||||
out_index_f = open("index.rst", "wt")
|
||||
header_line = "OpenCV |version| %s Reference" % {"py": "Python", "c": "C", "cpp": "C++"}[language]
|
||||
index_lines = [header_line + "\n", "="*len(header_line) + "\n", "\n"] + index_lines
|
||||
for l in index_lines:
|
||||
out_index_f.write(l)
|
||||
out_index_f.close()
|
||||
|
||||
for f in flist:
|
||||
preprocess_conditionals(f, '-' + language,
|
||||
{'C':language=='c', 'Python':language=='py',
|
||||
'Py':language=='py', 'CPy':(language=='py' or language == 'c'),
|
||||
'Cpp':language=='cpp', 'plastex':True})
|
||||
|
||||
if 1:
|
||||
tex.input("\\input{online-opencv-%s.tex}" % language)
|
||||
else:
|
||||
src0 = r'''
|
||||
\documentclass{book}
|
||||
\usepackage{myopencv}
|
||||
\begin{document}'''
|
||||
|
||||
src1 = r'''
|
||||
\end{document}
|
||||
'''
|
||||
lines = list(open("../CvReference.tex"))
|
||||
LINES = 80
|
||||
tex.input(src0 + "".join(lines[:LINES]) + src1)
|
||||
|
||||
return tex.parse()
|
||||
|
||||
language = sys.argv[1]
|
||||
|
||||
document = parse_documentation_source(language)
|
||||
|
||||
rest = reStructuredTextRenderer()
|
||||
rest.language = language
|
||||
rest.render(document)
|
Loading…
Reference in New Issue
Block a user