restructured gpu modules docs
authorAlexey Spizhevoy <no@email>
Mon, 17 Jan 2011 06:57:57 +0000 (06:57 +0000)
committerAlexey Spizhevoy <no@email>
Mon, 17 Jan 2011 06:57:57 +0000 (06:57 +0000)
doc/gpu.tex [deleted file]
doc/gpu_data_structures.tex [new file with mode: 0644]
doc/gpu_image_processing.tex [new file with mode: 0644]
doc/gpu_matrix_operations.tex [new file with mode: 0644]
doc/gpu_matrix_reductions.tex [new file with mode: 0644]
doc/gpu_object_detection.tex [new file with mode: 0644]
doc/gpu_per_element_operations.tex [new file with mode: 0644]
doc/opencvref_body.tex

diff --git a/doc/gpu.tex b/doc/gpu.tex
deleted file mode 100644 (file)
index 7e334a1..0000000
+++ /dev/null
@@ -1,799 +0,0 @@
-\section{Data Structures}
-
-
-\cvCppFunc{gpu::createContinuous}
-Creates continuous matrix in GPU memory.
-
-\cvdefCpp{void createContinuous(int rows, int cols, int type, GpuMat\& m);}
-\begin{description}
-\cvarg{rows}{Row count.}
-\cvarg{cols}{Column count.}
-\cvarg{type}{Type of the matrix.}
-\cvarg{m}{Destination matrix. Will be reshaped only if it has proper type and area ($rows \times cols$).}
-\end{description}
-
-
-\section{Operations on Matrices}
-
-
-\cvCppFunc{gpu::transpose}
-Transposes the matrix.
-
-\cvdefCpp{void transpose(const GpuMat\& src, GpuMat\& dst);}
-\begin{description}
-\cvarg{src}{Source matrix. Elements sizes 1, 4, 8 bytes are supported for now.}
-\cvarg{dst}{Destination matrix.}
-\end{description}
-
-See also: \cvCppCross{transpose}.
-
-
-\cvCppFunc{gpu::flip}
-Flips a 2D matrix around vertical, horizontal or both axes.
-
-\cvdefCpp{void flip(const GpuMat\& a, GpuMat\& b, int flipCode);}
-\begin{description}
-\cvarg{a}{Source matrix. Only 8UC1 and 8UC4 matrixes are supported for now.}
-\cvarg{b}{Destination matrix.}
-\cvarg{flipCode}{Specifies how to flip the source:
-\begin{description}
-\cvarg{0}{Flip around x-axis.}
-\cvarg{$>$0}{Flip around y-axis.}
-\cvarg{$<$0}{Flip around both axes.}
-\end{description}}
-\end{description}
-
-See also: \cvCppCross{flip}.
-
-\cvCppFunc{gpu::merge}
-Makes multi-channel matrix out of several single-channel matrices.
-
-\cvdefCpp{void merge(const GpuMat* src, size\_t n, GpuMat\& dst);\newline
-void merge(const GpuMat* src, size\_t n, GpuMat\& dst,\par
-  const Stream\& stream);\newline\newline
-void merge(const vector$<$GpuMat$>$\& src, GpuMat\& dst);\newline
-void merge(const vector$<$GpuMat$>$\& src, GpuMat\& dst,\par
-  const Stream\& stream);}
-\begin{description}
-\cvarg{src}{Vector or pointer to array of the source matrices.}
-\cvarg{n}{Number of source matrices.}
-\cvarg{dst}{Destination matrix.}
-\cvarg{stream}{Stream for the asynchronous versions.}
-\end{description}
-
-See also: \cvCppCross{merge}.
-
-
-\cvCppFunc{gpu::split}
-Copies each plane of a multi-channel matrix into an array.
-
-\cvdefCpp{void split(const GpuMat\& src, GpuMat* dst);\newline
-void split(const GpuMat\& src, GpuMat* dst, const Stream\& stream);\newline\newline
-void split(const GpuMat\& src, vector$<$GpuMat$>$\& dst);\newline
-void split(const GpuMat\& src, vector$<$GpuMat$>$\& dst,\par
-  const Stream\& stream);}
-\begin{description}
-\cvarg{src}{Source matrix.}
-\cvarg{dst}{Destination vector or pointer to array of single-channel matrices.}
-\cvarg{stream}{Stream for the asynchronous versions.}
-\end{description}
-
-See also: \cvCppCross{split}.
-
-
-\cvCppFunc{gpu::magnitude}
-Computes magnitude of complex vector.
-
-\cvdefCpp{void magnitude(const GpuMat\& x, GpuMat\& magnitude);}
-\begin{description}
-\cvarg{x}{Source complex matrix in the interleaved format (32FC2). }
-\cvarg{magnitude}{Destination matrix of float magnitudes (32FC1).}
-\end{description}
-
-\cvdefCpp{void magnitude(const GpuMat\& x, const GpuMat\& y, GpuMat\& magnitude);\newline
-void magnitude(const GpuMat\& x, const GpuMat\& y, GpuMat\& magnitude,\par
-  const Stream\& stream);}
-\begin{description}
-\cvarg{x}{Source matrix, containing real components (32FC1).}
-\cvarg{y}{Source matrix, containing imaginary components (32FC1).}
-\cvarg{magnitude}{Destination matrix of float magnitudes (32FC1).}
-\cvarg{stream}{Sream for the asynchronous version.}
-\end{description}
-
-See also: \cvCppCross{magnitude}.
-
-
-\cvCppFunc{gpu::magnitudeSqr}
-Computes squared magnitude of complex vector.
-
-\cvdefCpp{void magnitudeSqr(const GpuMat\& x, GpuMat\& magnitude);}
-\begin{description}
-\cvarg{x}{Source complex matrix in the interleaved format (32FC2). }
-\cvarg{magnitude}{Destination matrix of float magnitude squares (32FC1).}
-\end{description}
-
-\cvdefCpp{void magnitudeSqr(const GpuMat\& x, const GpuMat\& y, GpuMat\& magnitude);\newline
-void magnitudeSqr(const GpuMat\& x, const GpuMat\& y, GpuMat\& magnitude,\par
-  const Stream\& stream);}
-\begin{description}
-\cvarg{x}{Source matrix, containing real components (32FC1).}
-\cvarg{y}{Source matrix, containing imaginary components (32FC1).}
-\cvarg{magnitude}{Destination matrix of float magnitude squares (32FC1).}
-\cvarg{stream}{Sream for the asynchronous version.}
-\end{description}
-
-
-\cvCppFunc{gpu::phase}
-Computes polar angle of each complex value.
-
-\cvdefCpp{void phase(const GpuMat\& x, const GpuMat\& y, GpuMat\& angle,\par
-  bool angleInDegrees=false);\newline
-void phase(const GpuMat\& x, const GpuMat\& y, GpuMat\& angle,\par
-  bool angleInDegrees, const Stream\& stream);}
-\begin{description}
-\cvarg{x}{Source matrix, containing real components (32FC1).}
-\cvarg{y}{Source matrix, containing imaginary components (32FC1).}
-\cvarg{angle}{Destionation matrix of angles (32FC1).}
-\cvarg{angleInDegress}{Flag which indicates angles must be evaluated in degress.}
-\cvarg{stream}{Sream for the asynchronous version.}
-\end{description}
-
-See also: \cvCppCross{phase}.
-
-
-\cvCppFunc{gpu::cartToPolar}
-Converts Cartesian coordinates into polar.
-
-\cvdefCpp{void cartToPolar(const GpuMat\& x, const GpuMat\& y, GpuMat\& magnitude,\par
-  GpuMat\& angle, bool angleInDegrees=false);\newline
-void cartToPolar(const GpuMat\& x, const GpuMat\& y, GpuMat\& magnitude,\par
-  GpuMat\& angle, bool angleInDegrees, const Stream\& stream);}
-\begin{description}
-\cvarg{x}{Source matrix, containing real components (32FC1).}
-\cvarg{y}{Source matrix, containing imaginary components (32FC1).}
-\cvarg{magnitude}{Destination matrix of float magnituds (32FC1).}
-\cvarg{angle}{Destionation matrix of angles (32FC1).}
-\cvarg{angleInDegress}{Flag which indicates angles must be evaluated in degress.}
-\cvarg{stream}{Sream for the asynchronous version.}
-\end{description}
-
-See also: \cvCppCross{cartToPolar}.
-
-
-\cvCppFunc{gpu::polarToCart}
-Converts polar coordinates into Cartesian.
-
-\cvdefCpp{void polarToCart(const GpuMat\& magnitude, const GpuMat\& angle,\par
-  GpuMat\& x, GpuMat\& y, bool angleInDegrees=false);\newline
-void polarToCart(const GpuMat\& magnitude, const GpuMat\& angle,\par
-  GpuMat\& x, GpuMat\& y, bool angleInDegrees,\par
-  const Stream\& stream);}
-\begin{description}
-\cvarg{magnitude}{Source matrix, containing magnitudes (32FC1).}
-\cvarg{angle}{Source matrix, containing angles (32FC1).}
-\cvarg{x}{Destination matrix of real components (32FC1).}
-\cvarg{y}{Destination matrix of imaginary components (32FC1).}
-\cvarg{angleInDegress}{Flag which indicates angles are in degress.}
-\cvarg{stream}{Sream for the asynchronous version.}
-\end{description}
-
-See also: \cvCppCross{polarToCart}.
-
-
-\section{Per-element Operations.}
-
-
-\cvCppFunc{add}
-Computes matrx-matrix or matrix-scalar sum.
-
-\cvdefCpp{void add(const GpuMat\& a, const GpuMat\& b, GpuMat\& c);}
-\begin{description}
-\cvarg{a}{First source matrix. 8UC1, 8UC4, 32SC1 and 32FC2 matrixes are supported for now.}
-\cvarg{b}{Second source matrix. Must have the same size and type as \texttt{a}.}
-\cvarg{c}{Destination matrix. Will have the same size and type as \texttt{a}.}
-\end{description}
-
-\cvdefCpp{void add(const GpuMat\& a, const Scalar\& sc, GpuMat\& c);}
-\begin{description}
-\cvarg{a}{Source matrix. 32SC1 and 32FC2 matrixes are supported for now.}
-\cvarg{b}{Source scalar.}
-\cvarg{c}{Destination matrix. Will have the same size and type as \texttt{a}.}
-\end{description}
-
-See also: \cvCppCross{add}.
-
-
-\cvfunc{cv::gpu::bitwise\_not}\label{cppfunc.gpu.bitwise.not}
-Performs per-element bitwise inversion.
-
-\cvdefCpp{void bitwise\_not(const GpuMat\& src, GpuMat\& dst,\par
-  const GpuMat\& mask=GpuMat());\newline
-void bitwise\_not(const GpuMat\& src, GpuMat\& dst,\par
-  const GpuMat\& mask, const Stream\& stream);}
-
-\begin{description}
-\cvarg{src}{Source matrix.}
-\cvarg{dst}{Destination matrix. Will have the same size and type as \texttt{src}.}
-\cvarg{mask}{Optional operation mask. 8-bit single channel image.}
-\cvarg{stream}{Stream for the asynchronous version.}
-\end{description}
-
-See also: \hyperref[cppfunc.bitwise.not]{cv::bitwise\_not}.
-
-
-\cvfunc{cv::gpu::bitwise\_or}\label{cppfunc.gpu.bitwise.or}
-Performs per-element bitwise disjunction of two matrices.
-
-\cvdefCpp{void bitwise\_or(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,\par
-  const GpuMat\& mask=GpuMat());\newline
-void bitwise\_or(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,\par
-  const GpuMat\& mask, const Stream\& stream);}
-
-\begin{description}
-\cvarg{src1}{First source matrix.}
-\cvarg{src2}{Second source matrix. It must have the same size and type as \texttt{src1}.}
-\cvarg{dst}{Destination matrix. Will have the same size and type as \texttt{src1}.}
-\cvarg{mask}{Optional operation mask. 8-bit single channel image.}
-\cvarg{stream}{Stream for the asynchronous version.}
-\end{description}
-
-See also: \hyperref[cppfunc.bitwise.or]{cv::bitwise\_or}.
-
-
-\cvfunc{cv::gpu::bitwise\_and}\label{cppfunc.gpu.bitwise.and}
-Performs per-element bitwise conjunction of two matrices.
-
-\cvdefCpp{void bitwise\_and(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,\par
-  const GpuMat\& mask=GpuMat());\newline
-void bitwise\_and(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,\par
-  const GpuMat\& mask, const Stream\& stream);}
-
-\begin{description}
-\cvarg{src1}{First source matrix.}
-\cvarg{src2}{Second source matrix. It must have the same size and type as \texttt{src1}.}
-\cvarg{dst}{Destination matrix. Will have the same size and type as \texttt{src1}.}
-\cvarg{mask}{Optional operation mask. 8-bit single channel image.}
-\cvarg{stream}{Stream for the asynchronous version.}
-\end{description}
-
-See also: \hyperref[cppfunc.bitwise.and]{cv::bitwise\_and}.
-
-
-\cvfunc{cv::gpu::bitwise\_xor}\label{cppfunc.gpu.bitwise.xor}
-Performs per-element bitwise "exclusive or" of two matrices.
-
-\cvdefCpp{void bitwise\_xor(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,\par
-  const GpuMat\& mask=GpuMat());\newline
-void bitwise\_xor(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,\par
-  const GpuMat\& mask, const Stream\& stream);}
-
-\begin{description}
-\cvarg{src1}{First source matrix.}
-\cvarg{src2}{Second source matrix. It must have the same size and type as \texttt{src1}.}
-\cvarg{dst}{Destination matrix. Will have the same size and type as \texttt{src1}.}
-\cvarg{mask}{Optional operation mask. 8-bit single channel image.}
-\cvarg{stream}{Stream for the asynchronous version.}
-\end{description}
-
-See also: \hyperref[cppfunc.bitwise.xor]{cv::bitwise\_xor}.
-
-
-\section{Image Processing}
-
-
-\cvCppFunc{gpu::meanShiftFiltering}
-Performs mean-shift filtering.
-
-\cvdefCpp{void meanShiftFiltering(const GpuMat\& src, GpuMat\& dst,\par
-  int sp, int sr,\par
-  TermCriteria criteria = TermCriteria(TermCriteria::MAX\_ITER\par
-  + TermCriteria::EPS, 5, 1));}
-
-\begin{description}
-\cvarg{src}{Source image. Only 8UC4 images are supported for now.}
-\cvarg{dst}{Destination image. Will have the same size and type as \texttt{src}. Each pixel \texttt{(x,y)} of the destination image will contain color of the converged point started from \texttt{(x,y)} pixel of the source image.}
-\cvarg{sp}{Spatial window radius.}
-\cvarg{sr}{Color window radius.}
-\cvarg{criteria}{Termination criteria. See \hyperref[TermCriteria]{cv::TermCriteria}.}
-\end{description}
-
-
-\cvCppFunc{gpu::meanShiftProc}
-Performs mean-shift procedure and stores information about converged points in two images..
-
-\cvdefCpp{void meanShiftProc(const GpuMat\& src, GpuMat\& dstr, GpuMat\& dstsp,\par
-  int sp, int sr,\par
-  TermCriteria criteria = TermCriteria(TermCriteria::MAX\_ITER\par
-  + TermCriteria::EPS, 5, 1));}
-
-\begin{description}
-\cvarg{src}{Source image. Only 8UC4 images are supported for now.}
-\cvarg{dstr}{Destination image. Will have the same size and type as \texttt{src}. Each pixel \texttt{(x,y)} of the destination image will contain color of converged point started from \texttt{(x,y)} pixel of the source image.}
-\cvarg{dstsp}{16SC2 matrix, which will contain coordinates of converged points and have the same size as \texttt{src}.}
-\cvarg{sp}{Spatial window radius.}
-\cvarg{sr}{Color window radius.}
-\cvarg{criteria}{Termination criteria. See \hyperref[TermCriteria]{cv::TermCriteria}.}
-\end{description}
-
-
-\cvCppFunc{gpu::meanShiftSegmentation}
-Performs mean-shift segmentation of the source image and eleminates small segments.
-
-\cvdefCpp{void meanShiftSegmentation(const GpuMat\& src, Mat\& dst,\par
-  int sp, int sr, int minsize,\par
-  TermCriteria criteria = TermCriteria(TermCriteria::MAX\_ITER\par
-  + TermCriteria::EPS, 5, 1));}
-
-\begin{description}
-\cvarg{src}{Source image. Only 8UC4 images are supported for now.}
-\cvarg{dst}{Segmented image. Will have the same size and type as \texttt{src}.}
-\cvarg{sp}{Spatial window radius.}
-\cvarg{sr}{Color window radius.}
-\cvarg{minsize}{Minimum segment size. Smaller segements will be merged.}
-\cvarg{criteria}{Termination criteria. See \hyperref[TermCriteria]{cv::TermCriteria}.}
-\end{description}
-
-
-\cvCppFunc{gpu::integral}
-Computes the integral image and squared integral image.
-
-\cvdefCpp{void integral(const GpuMat\& src, GpuMat\& sum);\newline
-void integral(const GpuMat\& src, GpuMat\& sum, GpuMat\& sqsum);}
-
-\begin{description}
-\cvarg{src}{Source image. Only 8UC1 images are supported for now.}
-\cvarg{sum}{Integral image. Will contain 32-bit unsigned integer values packed into 32SC1.}
-\cvarg{sqsum}{Squared integral image. Will have 32FC1 type.}
-\end{description}
-
-See also: \cvCppCross{integral}.
-
-
-\cvCppFunc{gpu::sqrIntegral}
-Computes squared integral image.
-
-\cvdefCpp{void sqrIntegral(const GpuMat\& src, GpuMat\& sqsum);}
-\begin{description}
-\cvarg{src}{Source image. Only 8UC1 images are supported for now.}
-\cvarg{sqsum}{Squared integral image. Will contain 64-bit floating point values packed into 64U.}
-\end{description}
-
-
-\cvCppFunc{gpu::columnSum}
-Computes vertical (column) sum.
-
-\cvdefCpp{void columnSum(const GpuMat\& src, GpuMat\& sum);}
-\begin{description}
-\cvarg{src}{Source image. Only 32FC1 images are supported for now.}
-\cvarg{sum}{Destination image. Will have 32FC1 type.}
-\end{description}
-
-
-\cvCppFunc{gpu::cornerHarris}
-Computes Harris cornerness criteria at each image pixel.
-
-\cvdefCpp{void cornerHarris(const GpuMat\& src, GpuMat\& dst,\par
-  int blockSize, int ksize, double k,\par
-  int borderType=BORDER\_REFLECT101);}
-
-\begin{description}
-\cvarg{src}{Source image. Only 8UC1 and 32FC1 images are supported for now.}
-\cvarg{dst}{Destination image. Will have the same size and 32FC1 type and contain cornerness values.}
-\cvarg{blockSize}{Neighborhood size.}
-\cvarg{ksize}{Aperture parameter for the Sobel operator.}
-\cvarg{k}{Harris detector free parameter.}
-\cvarg{borderType}{Pixel extrapolation method. Only \texttt{BORDER\_REFLECT101} and \texttt{BORDER\_REPLICATE} are supported for now.}
-\end{description}
-
-See also: \cvCppCross{cornerHarris}.
-
-
-\cvCppFunc{gpu::cornerMinEigenVal}
-Computes minimum eigen value of 2x2 derivative covariation matrix at each pixel - the cornerness criteria.
-
-\cvdefCpp{void cornerMinEigenVal(const GpuMat\& src, GpuMat\& dst,\par
-  int blockSize, int ksize,\par
-  int borderType=BORDER\_REFLECT101);}
-
-\begin{description}
-\cvarg{src}{Source image. Only 8UC1 and 32FC1 images are supported for now.}
-\cvarg{dst}{Destination image. Will have the same size and 32FC1 type and contain cornerness values.}
-\cvarg{blockSize}{Neighborhood size.}
-\cvarg{ksize}{Aperture parameter for the Sobel operator.}
-\cvarg{k}{Harris detector free parameter.}
-\cvarg{borderType}{Pixel extrapolation method. Only \texttt{BORDER\_REFLECT101} and \texttt{BORDER\_REPLICATE} are supported for now.}
-\end{description}
-
-See also: \cvCppCross{cornerMinEigenValue}.
-
-
-\cvCppFunc{gpu::mulSpectrums}
-Performs per-element multiplication of two Fourier spectrums.
-
-\cvdefCpp{void mulSpectrums(const GpuMat\& a, const GpuMat\& b,\par
-  GpuMat\& c, int flags, bool conjB=false);}
-
-\begin{description}
-\cvarg{a}{First spectrum.}
-\cvarg{b}{Second spectrum. Must have the same size and type as \texttt{a}.}
-\cvarg{c}{Destination spectrum.}
-\cvarg{flags}{Mock paramter is kept for CPU/GPU interfaces similarity.}
-\cvarg{conjB}{Optional flag which indicates the second spectrum must be conjugated before the multiplcation.}
-\end{description}
-
-Only full (i.e. not packed) 32FC2 complex spectrums in the interleaved format are supported for now.
-
-See also: \cvCppCross{mulSpectrums}.
-
-
-\cvCppFunc{gpu::mulAndScaleSpectrums}
-Performs per-element multiplication of two Fourier spectrums and scales the result.
-
-\cvdefCpp{void mulAndScaleSpectrums(const GpuMat\& a, const GpuMat\& b,\par
-  GpuMat\& c, int flags, float scale, bool conjB=false);}
-
-\begin{description}
-\cvarg{a}{First spectrum.}
-\cvarg{b}{Second spectrum. Must have the same size and type as \texttt{a}.}
-\cvarg{c}{Destination spectrum.}
-\cvarg{flags}{Mock paramter is kept for CPU/GPU interfaces similarity.}
-\cvarg{scale}{Scale constant.}
-\cvarg{conjB}{Optional flag which indicates the second spectrum must be conjugated before the multiplcation.}
-\end{description}
-
-Only full (i.e. not packed) 32FC2 complex spectrums in the interleaved format are supported for now.
-
-See also: \cvCppCross{mulSpectrums}.
-
-
-\cvCppFunc{gpu::dft}
-Performs a forward or inverse discrete Fourier transform (1D or 2D) of floating point matrix.
-
-\cvdefCpp{void dft(const GpuMat\& src, GpuMat\& dst, Size dft\_size, int flags=0);}
-
-\begin{description}
-\cvarg{src}{Real of complex source matrix.}
-\cvarg{dst}{Real or complex destination matrix.}
-\cvarg{dft\_size}{Size of discrete Fourier transform.}
-\cvarg{flags}{Optional flags:
-\begin{description}
-  \cvarg{DFT\_ROWS}{Transform each individual row of the source matrix.}
-  \cvarg{DFT\_SCALE}{Scale the result: divide it by the number of elements in the transform (it's obtained from \texttt{dft\_size}).
-  \cvarg{DFT\_INVERSE}{Inverse DFT must be perfromed for complex-complex case (real-complex and  complex-real cases are respectively forward and inverse always).}}
-  \cvarg{DFT\_REAL\_OUTPUT}{The source matrix is the result of real-complex transform and the destination matrix must be real.}
-\end{description}}
-\end{description}
-
-The source matrix should be continuous, otherwise reallocation and data copying will be performed. Function chooses the operation mode depending on the flags, size and channel count of the source matrix:
-\begin{itemize}
-  \item If the source matrix is complex and the output isn't specified as real then the destination matrix will be complex, will have \texttt{dft\_size} size and 32FC2 type. It will contain full result of the DFT (forward or inverse).
-  \item If the source matrix is complex and the output is specified as real then function assumes that its input is the result of the forward transform (see next item). The destionation matrix will have \texttt{dft\_size} size and 32FC1 type. It will contain result of the inverse DFT.
-  \item If the source matrix is real (i.e. its type is 32FC1) then forward DFT will be performed. The result of the DFT will be packed into complex (32FC2) matrix so its width will be \texttt{dft\_size.width / 2 + 1}, but if the source is a single column then height will be reduced.
-\end{itemize}
-
-See also: \cvCppCross{dft}.
-
-
-\cvCppFunc{gpu::convolve}
-Computes convolution (or cross-correlation) of two images.
-
-\cvdefCpp{void convolve(const GpuMat\& image, const GpuMat\& templ, GpuMat\& result,\par
-  bool ccorr=false);\newline
-void convolve(const GpuMat\& image, const GpuMat\& templ, GpuMat\& result,\par
-  bool ccorr, ConvolveBuf\& buf);}
-
-\begin{description}
-\cvarg{image}{Source image. Only 32FC1 images are supported for now.}
-\cvarg{templ}{Template image. Must have size not greater then \texttt{image} size and be the same type as \texttt{image}.}
-\cvarg{result}{Result image. Will have the same size and type as \texttt{image}.}
-\cvarg{ccorr}{Flags which indicates cross-correlation must be evaluated instead of convolution.}
-\cvarg{buf}{Optional buffer to decrease memory reallocation count (for many calls with the same sizes).}
-\end{description}
-
-
-\cvclass{gpu::ConvolveBuf}
-Memory buffer for the \cvCppCross{gpu::convolve} function.
-
-\begin{lstlisting}
-struct CV_EXPORTS ConvolveBuf
-{
-    ConvolveBuf() {}
-    ConvolveBuf(Size image_size, Size templ_size) 
-        { create(image_size, templ_size); }
-    void create(Size image_size, Size templ_size);
-
-private:
-    // Hidden
-};
-\end{lstlisting}
-
-
-\cvCppFunc{gpu::ConvolveBuf::ConvolveBuf}
-
-\cvdefCpp{ConvolveBuf();}
-Construct empty buffer which will be properly resized after first call of the convolve function.
-
-\cvdefCpp{ConvolveBuf(Size image\_size, Size templ\_size);}
-Construct buffer for the convolve function with respectively arguments.
-
-
-\cvCppFunc{gpu::matchTemplate}
-Computes the proximity map for the raster template and the image where the template is searched for.
-
-\cvdefCpp{void matchTemplate(const GpuMat\& image, const GpuMat\& templ,\par
-  GpuMat\& result, int method);}
-
-\begin{description}
-\cvarg{image}{Source image. 32F and 8U images (1..4 channels) are supported for now.}
-\cvarg{templ}{Template image. Must have the same size and type as \texttt{image}.}
-\cvarg{result}{A map of comparison results (32FC1). If \texttt{image} is $W \times H$ and
-\texttt{templ} is $w \times h$ then \texttt{result} must be $(W-w+1) \times (H-h+1)$.}
-\cvarg{method}{Specifies the way the template must be compared with the image.}
-\end{description}
-Following methods are supported for 8U images for now:
-\begin{itemize}
-\item CV\_TM\_SQDIFF \item CV\_TM\_SQDIFF\_NORMED \item CV\_TM\_CCORR \item CV\_TM\_CCORR\_NORMED \item CV\_TM\_CCOEFF \item CV\_TM\_CCOEFF\_NORMED 
-\end{itemize}
-Following methods are supported for 32F images for now:
-\begin{itemize}
-\item CV\_TM\_SQDIFF \item CV\_TM\_CCORR
-\end{itemize}
-
-See also: \cvCppCross{matchTemplate}. 
-
-
-\section{Matrix Reductions}
-
-
-\cvCppFunc{gpu::sum}
-Returns sum of array elements.
-
-\cvdefCpp{Scalar sum(const GpuMat\& src);\newline
-Scalar sum(const GpuMat\& src, GpuMat\& buf);}
-
-\begin{description}
-\cvarg{src}{Source image of any depth excepting 64F, single-channel.}
-\cvarg{buf}{Optional buffer. It's resized automatically.}
-\end{description}
-
-See also: \cvCppCross{sum}.
-
-
-\cvCppFunc{gpu::sqrSum}
-Returns squared sum of array elements.
-
-\cvdefCpp{Scalar sqrSum(const GpuMat\& src);\newline
-Scalar sqrSum(const GpuMat\& src, GpuMat\& buf);}
-\begin{description}
-\cvarg{src}{Source image of any depth excepting 64F, single-channel.}
-\cvarg{buf}{Optional buffer. It's resized automatically.}
-\end{description}
-
-
-\cvCppFunc{gpu::minMax}
-Finds global minimum and maximum array elements and returns their values.
-
-\cvdefCpp{void minMax(const GpuMat\& src, double* minVal,\par
-  double* maxVal=0, const GpuMat\& mask=GpuMat());\newline
-void minMax(const GpuMat\& src, double* minVal, double* maxVal,\par
-  const GpuMat\& mask, GpuMat\& buf);}
-\begin{description}
-\cvarg{src}{Single-channel source image.}
-\cvarg{minVal}{Pointer to returned minimum value. \texttt{NULL} if not required.}
-\cvarg{maxVal}{Pointer to returned maximum value. \texttt{NULL} if not required.}
-\cvarg{mask}{Optional mask to select a sub-array.}
-\cvarg{buf}{Optional buffer. It's resized automatically.}
-\end{description}
-
-Function doesn't work with 64F images on GPU with compute capability $<$ 1.3.\newline
-See also: \cvCppCross{minMaxLoc}.
-
-
-\cvCppFunc{gpu::minMaxLoc}
-Finds global minimum and maximum array elements and returns their values with locations.
-
-\cvdefCpp{void minMaxLoc(const GpuMat\& src, double\* minVal, double* maxVal=0,\par
-  Point* minLoc=0, Point* maxLoc=0,\par
-  const GpuMat\& mask=GpuMat());\newline
-void minMaxLoc(const GpuMat\& src, double* minVal, double* maxVal,\par
-  Point* minLoc, Point* maxLoc, const GpuMat\& mask,\par
-  GpuMat\& valbuf, GpuMat\& locbuf);}
-\begin{description}
-\cvarg{src}{Single-channel source image.}
-\cvarg{minVal}{Pointer to returned minimum value. \texttt{NULL} if not required.}
-\cvarg{maxVal}{Pointer to returned maximum value. \texttt{NULL} if not required.}
-\cvarg{minValLoc}{Pointer to returned minimum location. \texttt{NULL} if not required.}
-\cvarg{maxValLoc}{Pointer to returned maximum location. \texttt{NULL} if not required.}
-\cvarg{mask}{Optional mask to select a sub-array.}
-\cvarg{valbuf}{Optional values buffer. It's resized automatically.}
-\cvarg{locbuf}{Optional location buffer. It's resized automatically.}
-\end{description}
-
-Function doesn't work with 64F images on GPU with compute capability $<$ 1.3.\newline
-See also: \cvCppCross{minMaxLoc}.
-
-
-\cvCppFunc{gpu::countNonZero}
-Counts non-zero array elements.
-
-\cvdefCpp{int countNonZero(const GpuMat\& src);\newline
-int countNonZero(const GpuMat\& src, GpuMat\& buf);}
-\begin{description}
-\cvarg{src}{Single-channel source image.}
-\cvarg{buf}{Optional buffer. It's resized automatically.}
-\end{description}
-
-Function doesn't work with 64F images on GPU with compute capability $<$ 1.3.\newline
-See also: \cvCppCross{countNonZero}.
-
-
-\section{Object Detection}
-
-
-\cvclass{gpu::HOGDescriptor}
-Histogram of Oriented Gradients descriptor and detector.
-
-\begin{lstlisting}
-struct CV_EXPORTS HOGDescriptor
-{
-    enum { DEFAULT_WIN_SIGMA = -1 };
-    enum { DEFAULT_NLEVELS = 64 };
-    enum { DESCR_FORMAT_ROW_BY_ROW, DESCR_FORMAT_COL_BY_COL };
-
-    HOGDescriptor(Size win_size=Size(64, 128), Size block_size=Size(16, 16),
-                  Size block_stride=Size(8, 8), Size cell_size=Size(8, 8),
-                  int nbins=9, double win_sigma=DEFAULT_WIN_SIGMA,
-                  double threshold_L2hys=0.2, bool gamma_correction=true,
-                  int nlevels=DEFAULT_NLEVELS);
-
-    size_t getDescriptorSize() const;
-    size_t getBlockHistogramSize() const;
-
-    void setSVMDetector(const vector<float>& detector);
-
-    static vector<float> getDefaultPeopleDetector();
-    static vector<float> getPeopleDetector48x96();
-    static vector<float> getPeopleDetector64x128();
-
-    void detect(const GpuMat& img, vector<Point>& found_locations, 
-                double hit_threshold=0, Size win_stride=Size(), 
-                Size padding=Size());
-
-    void detectMultiScale(const GpuMat& img, vector<Rect>& found_locations,
-                          double hit_threshold=0, Size win_stride=Size(), 
-                          Size padding=Size(), double scale0=1.05, 
-                          int group_threshold=2);
-
-    void getDescriptors(const GpuMat& img, Size win_stride, 
-                        GpuMat& descriptors,
-                        int descr_format=DESCR_FORMAT_COL_BY_COL);
-
-    Size win_size;
-    Size block_size;
-    Size block_stride;
-    Size cell_size;
-    int nbins;
-    double win_sigma;
-    double threshold_L2hys;
-    bool gamma_correction;
-    int nlevels;
-
-private:
-    // Hidden
-}
-\end{lstlisting}
-
-Interfaces of all methods are kept similar to CPU HOG descriptor and detector's analogues as much as possible.
-
-
-\cvCppFunc{gpu::HOGDescriptor::HOGDescriptor}
-Creates HOG descriptor and detector.
-
-\cvdefCpp{HOGDescriptor(Size win\_size=Size(64, 128), Size block\_size=Size(16, 16),\par
-          Size block\_stride=Size(8, 8), Size cell\_size=Size(8, 8),\par
-          int nbins=9, double win\_sigma=DEFAULT\_WIN\_SIGMA,\par
-          double threshold\_L2hys=0.2, bool gamma\_correction=true,\par
-          int nlevels=DEFAULT\_NLEVELS);}
-
-\begin{description}
-\cvarg{win\_size}{Detection window size. Must be aligned to block size and block stride.}
-\cvarg{block\_size}{Block size in cells. Only (2,2) is supported for now.}
-\cvarg{block\_stride}{Block stride. Must be a multiple of cell size.}
-\cvarg{cell\_size}{Cell size. Only (8, 8) is supported for now.}
-\cvarg{nbins}{Number of bins. Only 9 bins per cell is supported for now.}
-\cvarg{win\_sigma}{Gaussian smoothing window parameter.}
-\cvarg{threshold\_L2Hys}{L2-Hys normalization method shrinkage.}
-\cvarg{gamma\_correction}{Do gamma correction preprocessing or not.}
-\cvarg{nlevels}{Maximum number of detection window increases.}
-\end{description}
-
-
-\cvCppFunc{gpu::HOGDescriptor::getDescriptorSize}
-Returns number of coefficients required for the classification.
-
-\cvdefCpp{size\_t getDescriptorSize() const;}
-
-
-\cvCppFunc{gpu::HOGDescriptor::getBlockHistogramSize}
-Returns block histogram size.
-
-\cvdefCpp{size\_t getBlockHistogramSize() const;}
-
-
-\cvCppFunc{gpu::HOGDescriptor::setSVMDetector}
-Sets coefficients for the linear SVM classifier. 
-
-\cvdefCpp{void setSVMDetector(const vector<float>\& detector);}
-
-
-\cvCppFunc{gpu::HOGDescriptor::getDefaultPeopleDetector}
-Returns coefficients of the classifier trained for people detection (for default window size).
-
-\cvdefCpp{static vector<float> getDefaultPeopleDetector();}
-
-
-\cvCppFunc{gpu::HOGDescriptor::getPeopleDetector48x96}
-Returns coefficients of the classifier trained for people detection (for 48x96 windows).
-
-\cvdefCpp{static vector<float> getPeopleDetector48x96();}
-
-
-\cvCppFunc{gpu::HOGDescriptor::getPeopleDetector64x128}
-Returns coefficients of the classifier trained for people detection (for 64x128 windows).
-
-\cvdefCpp{static vector<float> getPeopleDetector64x128();}
-
-
-\cvCppFunc{gpu::HOGDescriptor::detect}
-Perfroms object detection without increasing detection window.
-
-\cvdefCpp{void detect(const GpuMat\& img, vector<Point>\& found\_locations,\par
-             double hit\_threshold=0, Size win\_stride=Size(),\par
-             Size padding=Size());}
-
-\begin{description}
-\cvarg{img}{Source image. 8UC1 and 8UC4 types are supported for now.}
-\cvarg{found\_locations}{Will contain left-top corner points of detected objects boundaries.}
-\cvarg{hit\_threshold}{Threshold for the distance between features and classifying plane. Usually it's 0, and should be specfied in the detector coefficients (as the last free coefficient), but if the free coefficient is missed (it's allowed) you can specify it manually here.}
-\cvarg{win\_stride}{Window stride. Must be a multiple of block stride.}
-\cvarg{padding}{Mock parameter to keep CPU interface compatibility. Must be (0,0).}
-\end{description}
-
-
-\cvCppFunc{gpu::HOGDescriptor::detectMultiScale}
-Perfroms object detection with increasing detection window.
-
-\cvdefCpp{void detectMultiScale(const GpuMat\& img, vector<Rect>\& found\_locations,\par
-                      double hit\_threshold=0, Size win\_stride=Size(),\par
-                      Size padding=Size(), double scale0=1.05,\par
-                      int group\_threshold=2);}
-
-\begin{description}
-\cvarg{img}{Source image. See \cvCppCross{gpu::HOGDescriptor::detect} for type limitations.}
-\cvarg{found\_locations}{Will contain detected objects boundaries.}
-\cvarg{hit\_threshold}{The threshold for the distance between features and classifying plane. See \cvCppCross{gpu::HOGDescriptor::detect} for details.}
-\cvarg{win\_stride}{Window stride. Must be a multiple of block stride.}
-\cvarg{padding}{Mock parameter to keep CPU interface compatibility. Must be (0,0).}
-\cvarg{scale0}{Coefficient of the detection window increase.}
-\cvarg{group\_threshold}{After detection some objects could be covered by many rectangles. This coefficient regulates similarity threshold. 0 means don't perform grouping.\newline
-See \cvCppCross{groupRectangles}.}
-\end{description}
-
-
-\cvCppFunc{gpu::HOGDescriptor::getDescriptors}
-Returns block descriptors computed for the whole image. 
-
-\cvdefCpp{void getDescriptors(const GpuMat\& img, Size win\_stride,\par
-                    GpuMat\& descriptors,\par
-                    int descr\_format=DESCR\_FORMAT\_COL\_BY\_COL);}
-
-\begin{description}
-\cvarg{img}{Source image. See \cvCppCross{gpu::HOGDescriptor::detect} for type limitations.}
-\cvarg{win\_stride}{Window stride. Must be a multiple of block stride.}
-\cvarg{descriptors}{2D array of descriptors.}
-\cvarg{descr\_format}{Descriptor storage format: 
-\begin{description}
-    \cvarg{DESCR\_FORMAT\_ROW\_BY\_ROW}{Row-major order.}
-    \cvarg{DESCR\_FORMAT\_COL\_BY\_COL}{Column-major order.}
-\end{description}}
-\end{description}
diff --git a/doc/gpu_data_structures.tex b/doc/gpu_data_structures.tex
new file mode 100644 (file)
index 0000000..075f07f
--- /dev/null
@@ -0,0 +1,13 @@
+\section{Data Structures}\r
+\r
+\r
+\cvCppFunc{gpu::createContinuous}\r
+Creates continuous matrix in GPU memory.\r
+\r
+\cvdefCpp{void createContinuous(int rows, int cols, int type, GpuMat\& m);}\r
+\begin{description}\r
+\cvarg{rows}{Row count.}\r
+\cvarg{cols}{Column count.}\r
+\cvarg{type}{Type of the matrix.}\r
+\cvarg{m}{Destination matrix. Will be reshaped only if it has proper type and area ($rows \times cols$).}\r
+\end{description}
\ No newline at end of file
diff --git a/doc/gpu_image_processing.tex b/doc/gpu_image_processing.tex
new file mode 100644 (file)
index 0000000..b692840
--- /dev/null
@@ -0,0 +1,262 @@
+\section{Image Processing}\r
+\r
+\r
+\cvCppFunc{gpu::meanShiftFiltering}\r
+Performs mean-shift filtering.\r
+\r
+\cvdefCpp{void meanShiftFiltering(const GpuMat\& src, GpuMat\& dst,\par\r
+  int sp, int sr,\par\r
+  TermCriteria criteria = TermCriteria(TermCriteria::MAX\_ITER\par\r
+  + TermCriteria::EPS, 5, 1));}\r
+\r
+\begin{description}\r
+\cvarg{src}{Source image. Only 8UC4 images are supported for now.}\r
+\cvarg{dst}{Destination image. Will have the same size and type as \texttt{src}. Each pixel \texttt{(x,y)} of the destination image will contain color of the converged point started from \texttt{(x,y)} pixel of the source image.}\r
+\cvarg{sp}{Spatial window radius.}\r
+\cvarg{sr}{Color window radius.}\r
+\cvarg{criteria}{Termination criteria. See \hyperref[TermCriteria]{cv::TermCriteria}.}\r
+\end{description}\r
+\r
+\r
+\cvCppFunc{gpu::meanShiftProc}\r
+Performs mean-shift procedure and stores information about converged points in two images..\r
+\r
+\cvdefCpp{void meanShiftProc(const GpuMat\& src, GpuMat\& dstr, GpuMat\& dstsp,\par\r
+  int sp, int sr,\par\r
+  TermCriteria criteria = TermCriteria(TermCriteria::MAX\_ITER\par\r
+  + TermCriteria::EPS, 5, 1));}\r
+\r
+\begin{description}\r
+\cvarg{src}{Source image. Only 8UC4 images are supported for now.}\r
+\cvarg{dstr}{Destination image. Will have the same size and type as \texttt{src}. Each pixel \texttt{(x,y)} of the destination image will contain color of converged point started from \texttt{(x,y)} pixel of the source image.}\r
+\cvarg{dstsp}{16SC2 matrix, which will contain coordinates of converged points and have the same size as \texttt{src}.}\r
+\cvarg{sp}{Spatial window radius.}\r
+\cvarg{sr}{Color window radius.}\r
+\cvarg{criteria}{Termination criteria. See \hyperref[TermCriteria]{cv::TermCriteria}.}\r
+\end{description}\r
+\r
+\r
+\cvCppFunc{gpu::meanShiftSegmentation}\r
+Performs mean-shift segmentation of the source image and eleminates small segments.\r
+\r
+\cvdefCpp{void meanShiftSegmentation(const GpuMat\& src, Mat\& dst,\par\r
+  int sp, int sr, int minsize,\par\r
+  TermCriteria criteria = TermCriteria(TermCriteria::MAX\_ITER\par\r
+  + TermCriteria::EPS, 5, 1));}\r
+\r
+\begin{description}\r
+\cvarg{src}{Source image. Only 8UC4 images are supported for now.}\r
+\cvarg{dst}{Segmented image. Will have the same size and type as \texttt{src}.}\r
+\cvarg{sp}{Spatial window radius.}\r
+\cvarg{sr}{Color window radius.}\r
+\cvarg{minsize}{Minimum segment size. Smaller segements will be merged.}\r
+\cvarg{criteria}{Termination criteria. See \hyperref[TermCriteria]{cv::TermCriteria}.}\r
+\end{description}\r
+\r
+\r
+\cvCppFunc{gpu::integral}\r
+Computes the integral image and squared integral image.\r
+\r
+\cvdefCpp{void integral(const GpuMat\& src, GpuMat\& sum);\newline\r
+void integral(const GpuMat\& src, GpuMat\& sum, GpuMat\& sqsum);}\r
+\r
+\begin{description}\r
+\cvarg{src}{Source image. Only 8UC1 images are supported for now.}\r
+\cvarg{sum}{Integral image. Will contain 32-bit unsigned integer values packed into 32SC1.}\r
+\cvarg{sqsum}{Squared integral image. Will have 32FC1 type.}\r
+\end{description}\r
+\r
+See also: \cvCppCross{integral}.\r
+\r
+\r
+\cvCppFunc{gpu::sqrIntegral}\r
+Computes squared integral image.\r
+\r
+\cvdefCpp{void sqrIntegral(const GpuMat\& src, GpuMat\& sqsum);}\r
+\begin{description}\r
+\cvarg{src}{Source image. Only 8UC1 images are supported for now.}\r
+\cvarg{sqsum}{Squared integral image. Will contain 64-bit floating point values packed into 64U.}\r
+\end{description}\r
+\r
+\r
+\cvCppFunc{gpu::columnSum}\r
+Computes vertical (column) sum.\r
+\r
+\cvdefCpp{void columnSum(const GpuMat\& src, GpuMat\& sum);}\r
+\begin{description}\r
+\cvarg{src}{Source image. Only 32FC1 images are supported for now.}\r
+\cvarg{sum}{Destination image. Will have 32FC1 type.}\r
+\end{description}\r
+\r
+\r
+\cvCppFunc{gpu::cornerHarris}\r
+Computes Harris cornerness criteria at each image pixel.\r
+\r
+\cvdefCpp{void cornerHarris(const GpuMat\& src, GpuMat\& dst,\par\r
+  int blockSize, int ksize, double k,\par\r
+  int borderType=BORDER\_REFLECT101);}\r
+\r
+\begin{description}\r
+\cvarg{src}{Source image. Only 8UC1 and 32FC1 images are supported for now.}\r
+\cvarg{dst}{Destination image. Will have the same size and 32FC1 type and contain cornerness values.}\r
+\cvarg{blockSize}{Neighborhood size.}\r
+\cvarg{ksize}{Aperture parameter for the Sobel operator.}\r
+\cvarg{k}{Harris detector free parameter.}\r
+\cvarg{borderType}{Pixel extrapolation method. Only \texttt{BORDER\_REFLECT101} and \texttt{BORDER\_REPLICATE} are supported for now.}\r
+\end{description}\r
+\r
+See also: \cvCppCross{cornerHarris}.\r
+\r
+\r
+\cvCppFunc{gpu::cornerMinEigenVal}\r
+Computes minimum eigen value of 2x2 derivative covariation matrix at each pixel - the cornerness criteria.\r
+\r
+\cvdefCpp{void cornerMinEigenVal(const GpuMat\& src, GpuMat\& dst,\par\r
+  int blockSize, int ksize,\par\r
+  int borderType=BORDER\_REFLECT101);}\r
+\r
+\begin{description}\r
+\cvarg{src}{Source image. Only 8UC1 and 32FC1 images are supported for now.}\r
+\cvarg{dst}{Destination image. Will have the same size and 32FC1 type and contain cornerness values.}\r
+\cvarg{blockSize}{Neighborhood size.}\r
+\cvarg{ksize}{Aperture parameter for the Sobel operator.}\r
+\cvarg{k}{Harris detector free parameter.}\r
+\cvarg{borderType}{Pixel extrapolation method. Only \texttt{BORDER\_REFLECT101} and \texttt{BORDER\_REPLICATE} are supported for now.}\r
+\end{description}\r
+\r
+See also: \cvCppCross{cornerMinEigenValue}.\r
+\r
+\r
+\cvCppFunc{gpu::mulSpectrums}\r
+Performs per-element multiplication of two Fourier spectrums.\r
+\r
+\cvdefCpp{void mulSpectrums(const GpuMat\& a, const GpuMat\& b,\par\r
+  GpuMat\& c, int flags, bool conjB=false);}\r
+\r
+\begin{description}\r
+\cvarg{a}{First spectrum.}\r
+\cvarg{b}{Second spectrum. Must have the same size and type as \texttt{a}.}\r
+\cvarg{c}{Destination spectrum.}\r
+\cvarg{flags}{Mock paramter is kept for CPU/GPU interfaces similarity.}\r
+\cvarg{conjB}{Optional flag which indicates the second spectrum must be conjugated before the multiplcation.}\r
+\end{description}\r
+\r
+Only full (i.e. not packed) 32FC2 complex spectrums in the interleaved format are supported for now.\r
+\r
+See also: \cvCppCross{mulSpectrums}.\r
+\r
+\r
+\cvCppFunc{gpu::mulAndScaleSpectrums}\r
+Performs per-element multiplication of two Fourier spectrums and scales the result.\r
+\r
+\cvdefCpp{void mulAndScaleSpectrums(const GpuMat\& a, const GpuMat\& b,\par\r
+  GpuMat\& c, int flags, float scale, bool conjB=false);}\r
+\r
+\begin{description}\r
+\cvarg{a}{First spectrum.}\r
+\cvarg{b}{Second spectrum. Must have the same size and type as \texttt{a}.}\r
+\cvarg{c}{Destination spectrum.}\r
+\cvarg{flags}{Mock paramter is kept for CPU/GPU interfaces similarity.}\r
+\cvarg{scale}{Scale constant.}\r
+\cvarg{conjB}{Optional flag which indicates the second spectrum must be conjugated before the multiplcation.}\r
+\end{description}\r
+\r
+Only full (i.e. not packed) 32FC2 complex spectrums in the interleaved format are supported for now.\r
+\r
+See also: \cvCppCross{mulSpectrums}.\r
+\r
+\r
+\cvCppFunc{gpu::dft}\r
+Performs a forward or inverse discrete Fourier transform (1D or 2D) of floating point matrix.\r
+\r
+\cvdefCpp{void dft(const GpuMat\& src, GpuMat\& dst, Size dft\_size, int flags=0);}\r
+\r
+\begin{description}\r
+\cvarg{src}{Real of complex source matrix.}\r
+\cvarg{dst}{Real or complex destination matrix.}\r
+\cvarg{dft\_size}{Size of discrete Fourier transform.}\r
+\cvarg{flags}{Optional flags:\r
+\begin{description}\r
+  \cvarg{DFT\_ROWS}{Transform each individual row of the source matrix.}\r
+  \cvarg{DFT\_SCALE}{Scale the result: divide it by the number of elements in the transform (it's obtained from \texttt{dft\_size}).\r
+  \cvarg{DFT\_INVERSE}{Inverse DFT must be perfromed for complex-complex case (real-complex and  complex-real cases are respectively forward and inverse always).}}\r
+  \cvarg{DFT\_REAL\_OUTPUT}{The source matrix is the result of real-complex transform and the destination matrix must be real.}\r
+\end{description}}\r
+\end{description}\r
+\r
+The source matrix should be continuous, otherwise reallocation and data copying will be performed. Function chooses the operation mode depending on the flags, size and channel count of the source matrix:\r
+\begin{itemize}\r
+  \item If the source matrix is complex and the output isn't specified as real then the destination matrix will be complex, will have \texttt{dft\_size} size and 32FC2 type. It will contain full result of the DFT (forward or inverse).\r
+  \item If the source matrix is complex and the output is specified as real then function assumes that its input is the result of the forward transform (see next item). The destionation matrix will have \texttt{dft\_size} size and 32FC1 type. It will contain result of the inverse DFT.\r
+  \item If the source matrix is real (i.e. its type is 32FC1) then forward DFT will be performed. The result of the DFT will be packed into complex (32FC2) matrix so its width will be \texttt{dft\_size.width / 2 + 1}, but if the source is a single column then height will be reduced.\r
+\end{itemize}\r
+\r
+See also: \cvCppCross{dft}.\r
+\r
+\r
+\cvCppFunc{gpu::convolve}\r
+Computes convolution (or cross-correlation) of two images.\r
+\r
+\cvdefCpp{void convolve(const GpuMat\& image, const GpuMat\& templ, GpuMat\& result,\par\r
+  bool ccorr=false);\newline\r
+void convolve(const GpuMat\& image, const GpuMat\& templ, GpuMat\& result,\par\r
+  bool ccorr, ConvolveBuf\& buf);}\r
+\r
+\begin{description}\r
+\cvarg{image}{Source image. Only 32FC1 images are supported for now.}\r
+\cvarg{templ}{Template image. Must have size not greater then \texttt{image} size and be the same type as \texttt{image}.}\r
+\cvarg{result}{Result image. Will have the same size and type as \texttt{image}.}\r
+\cvarg{ccorr}{Flags which indicates cross-correlation must be evaluated instead of convolution.}\r
+\cvarg{buf}{Optional buffer to decrease memory reallocation count (for many calls with the same sizes).}\r
+\end{description}\r
+\r
+\r
+\cvclass{gpu::ConvolveBuf}\r
+Memory buffer for the \cvCppCross{gpu::convolve} function.\r
+\r
+\begin{lstlisting}\r
+struct CV_EXPORTS ConvolveBuf\r
+{\r
+    ConvolveBuf() {}\r
+    ConvolveBuf(Size image_size, Size templ_size) \r
+        { create(image_size, templ_size); }\r
+    void create(Size image_size, Size templ_size);\r
+\r
+private:\r
+    // Hidden\r
+};\r
+\end{lstlisting}\r
+\r
+\r
+\cvCppFunc{gpu::ConvolveBuf::ConvolveBuf}\r
+\r
+\cvdefCpp{ConvolveBuf();}\r
+Construct empty buffer which will be properly resized after first call of the convolve function.\r
+\r
+\cvdefCpp{ConvolveBuf(Size image\_size, Size templ\_size);}\r
+Construct buffer for the convolve function with respectively arguments.\r
+\r
+\r
+\cvCppFunc{gpu::matchTemplate}\r
+Computes the proximity map for the raster template and the image where the template is searched for.\r
+\r
+\cvdefCpp{void matchTemplate(const GpuMat\& image, const GpuMat\& templ,\par\r
+  GpuMat\& result, int method);}\r
+\r
+\begin{description}\r
+\cvarg{image}{Source image. 32F and 8U images (1..4 channels) are supported for now.}\r
+\cvarg{templ}{Template image. Must have the same size and type as \texttt{image}.}\r
+\cvarg{result}{A map of comparison results (32FC1). If \texttt{image} is $W \times H$ and\r
+\texttt{templ} is $w \times h$ then \texttt{result} must be $(W-w+1) \times (H-h+1)$.}\r
+\cvarg{method}{Specifies the way the template must be compared with the image.}\r
+\end{description}\r
+Following methods are supported for 8U images for now:\r
+\begin{itemize}\r
+\item CV\_TM\_SQDIFF \item CV\_TM\_SQDIFF\_NORMED \item CV\_TM\_CCORR \item CV\_TM\_CCORR\_NORMED \item CV\_TM\_CCOEFF \item CV\_TM\_CCOEFF\_NORMED \r
+\end{itemize}\r
+Following methods are supported for 32F images for now:\r
+\begin{itemize}\r
+\item CV\_TM\_SQDIFF \item CV\_TM\_CCORR\r
+\end{itemize}\r
+\r
+See also: \cvCppCross{matchTemplate}. 
\ No newline at end of file
diff --git a/doc/gpu_matrix_operations.tex b/doc/gpu_matrix_operations.tex
new file mode 100644 (file)
index 0000000..cc25309
--- /dev/null
@@ -0,0 +1,165 @@
+\section{Operations on Matrices}\r
+\r
+\r
+\cvCppFunc{gpu::transpose}\r
+Transposes the matrix.\r
+\r
+\cvdefCpp{void transpose(const GpuMat\& src, GpuMat\& dst);}\r
+\begin{description}\r
+\cvarg{src}{Source matrix. Elements sizes 1, 4, 8 bytes are supported for now.}\r
+\cvarg{dst}{Destination matrix.}\r
+\end{description}\r
+\r
+See also: \cvCppCross{transpose}.\r
+\r
+\r
+\cvCppFunc{gpu::flip}\r
+Flips a 2D matrix around vertical, horizontal or both axes.\r
+\r
+\cvdefCpp{void flip(const GpuMat\& a, GpuMat\& b, int flipCode);}\r
+\begin{description}\r
+\cvarg{a}{Source matrix. Only 8UC1 and 8UC4 matrixes are supported for now.}\r
+\cvarg{b}{Destination matrix.}\r
+\cvarg{flipCode}{Specifies how to flip the source:\r
+\begin{description}\r
+\cvarg{0}{Flip around x-axis.}\r
+\cvarg{$>$0}{Flip around y-axis.}\r
+\cvarg{$<$0}{Flip around both axes.}\r
+\end{description}}\r
+\end{description}\r
+\r
+See also: \cvCppCross{flip}.\r
+\r
+\cvCppFunc{gpu::merge}\r
+Makes multi-channel matrix out of several single-channel matrices.\r
+\r
+\cvdefCpp{void merge(const GpuMat* src, size\_t n, GpuMat\& dst);\newline\r
+void merge(const GpuMat* src, size\_t n, GpuMat\& dst,\par\r
+  const Stream\& stream);\newline\newline\r
+void merge(const vector$<$GpuMat$>$\& src, GpuMat\& dst);\newline\r
+void merge(const vector$<$GpuMat$>$\& src, GpuMat\& dst,\par\r
+  const Stream\& stream);}\r
+\begin{description}\r
+\cvarg{src}{Vector or pointer to array of the source matrices.}\r
+\cvarg{n}{Number of source matrices.}\r
+\cvarg{dst}{Destination matrix.}\r
+\cvarg{stream}{Stream for the asynchronous versions.}\r
+\end{description}\r
+\r
+See also: \cvCppCross{merge}.\r
+\r
+\r
+\cvCppFunc{gpu::split}\r
+Copies each plane of a multi-channel matrix into an array.\r
+\r
+\cvdefCpp{void split(const GpuMat\& src, GpuMat* dst);\newline\r
+void split(const GpuMat\& src, GpuMat* dst, const Stream\& stream);\newline\newline\r
+void split(const GpuMat\& src, vector$<$GpuMat$>$\& dst);\newline\r
+void split(const GpuMat\& src, vector$<$GpuMat$>$\& dst,\par\r
+  const Stream\& stream);}\r
+\begin{description}\r
+\cvarg{src}{Source matrix.}\r
+\cvarg{dst}{Destination vector or pointer to array of single-channel matrices.}\r
+\cvarg{stream}{Stream for the asynchronous versions.}\r
+\end{description}\r
+\r
+See also: \cvCppCross{split}.\r
+\r
+\r
+\cvCppFunc{gpu::magnitude}\r
+Computes magnitude of complex vector.\r
+\r
+\cvdefCpp{void magnitude(const GpuMat\& x, GpuMat\& magnitude);}\r
+\begin{description}\r
+\cvarg{x}{Source complex matrix in the interleaved format (32FC2). }\r
+\cvarg{magnitude}{Destination matrix of float magnitudes (32FC1).}\r
+\end{description}\r
+\r
+\cvdefCpp{void magnitude(const GpuMat\& x, const GpuMat\& y, GpuMat\& magnitude);\newline\r
+void magnitude(const GpuMat\& x, const GpuMat\& y, GpuMat\& magnitude,\par\r
+  const Stream\& stream);}\r
+\begin{description}\r
+\cvarg{x}{Source matrix, containing real components (32FC1).}\r
+\cvarg{y}{Source matrix, containing imaginary components (32FC1).}\r
+\cvarg{magnitude}{Destination matrix of float magnitudes (32FC1).}\r
+\cvarg{stream}{Sream for the asynchronous version.}\r
+\end{description}\r
+\r
+See also: \cvCppCross{magnitude}.\r
+\r
+\r
+\cvCppFunc{gpu::magnitudeSqr}\r
+Computes squared magnitude of complex vector.\r
+\r
+\cvdefCpp{void magnitudeSqr(const GpuMat\& x, GpuMat\& magnitude);}\r
+\begin{description}\r
+\cvarg{x}{Source complex matrix in the interleaved format (32FC2). }\r
+\cvarg{magnitude}{Destination matrix of float magnitude squares (32FC1).}\r
+\end{description}\r
+\r
+\cvdefCpp{void magnitudeSqr(const GpuMat\& x, const GpuMat\& y, GpuMat\& magnitude);\newline\r
+void magnitudeSqr(const GpuMat\& x, const GpuMat\& y, GpuMat\& magnitude,\par\r
+  const Stream\& stream);}\r
+\begin{description}\r
+\cvarg{x}{Source matrix, containing real components (32FC1).}\r
+\cvarg{y}{Source matrix, containing imaginary components (32FC1).}\r
+\cvarg{magnitude}{Destination matrix of float magnitude squares (32FC1).}\r
+\cvarg{stream}{Sream for the asynchronous version.}\r
+\end{description}\r
+\r
+\r
+\cvCppFunc{gpu::phase}\r
+Computes polar angle of each complex value.\r
+\r
+\cvdefCpp{void phase(const GpuMat\& x, const GpuMat\& y, GpuMat\& angle,\par\r
+  bool angleInDegrees=false);\newline\r
+void phase(const GpuMat\& x, const GpuMat\& y, GpuMat\& angle,\par\r
+  bool angleInDegrees, const Stream\& stream);}\r
+\begin{description}\r
+\cvarg{x}{Source matrix, containing real components (32FC1).}\r
+\cvarg{y}{Source matrix, containing imaginary components (32FC1).}\r
+\cvarg{angle}{Destionation matrix of angles (32FC1).}\r
+\cvarg{angleInDegress}{Flag which indicates angles must be evaluated in degress.}\r
+\cvarg{stream}{Sream for the asynchronous version.}\r
+\end{description}\r
+\r
+See also: \cvCppCross{phase}.\r
+\r
+\r
+\cvCppFunc{gpu::cartToPolar}\r
+Converts Cartesian coordinates into polar.\r
+\r
+\cvdefCpp{void cartToPolar(const GpuMat\& x, const GpuMat\& y, GpuMat\& magnitude,\par\r
+  GpuMat\& angle, bool angleInDegrees=false);\newline\r
+void cartToPolar(const GpuMat\& x, const GpuMat\& y, GpuMat\& magnitude,\par\r
+  GpuMat\& angle, bool angleInDegrees, const Stream\& stream);}\r
+\begin{description}\r
+\cvarg{x}{Source matrix, containing real components (32FC1).}\r
+\cvarg{y}{Source matrix, containing imaginary components (32FC1).}\r
+\cvarg{magnitude}{Destination matrix of float magnituds (32FC1).}\r
+\cvarg{angle}{Destionation matrix of angles (32FC1).}\r
+\cvarg{angleInDegress}{Flag which indicates angles must be evaluated in degress.}\r
+\cvarg{stream}{Sream for the asynchronous version.}\r
+\end{description}\r
+\r
+See also: \cvCppCross{cartToPolar}.\r
+\r
+\r
+\cvCppFunc{gpu::polarToCart}\r
+Converts polar coordinates into Cartesian.\r
+\r
+\cvdefCpp{void polarToCart(const GpuMat\& magnitude, const GpuMat\& angle,\par\r
+  GpuMat\& x, GpuMat\& y, bool angleInDegrees=false);\newline\r
+void polarToCart(const GpuMat\& magnitude, const GpuMat\& angle,\par\r
+  GpuMat\& x, GpuMat\& y, bool angleInDegrees,\par\r
+  const Stream\& stream);}\r
+\begin{description}\r
+\cvarg{magnitude}{Source matrix, containing magnitudes (32FC1).}\r
+\cvarg{angle}{Source matrix, containing angles (32FC1).}\r
+\cvarg{x}{Destination matrix of real components (32FC1).}\r
+\cvarg{y}{Destination matrix of imaginary components (32FC1).}\r
+\cvarg{angleInDegress}{Flag which indicates angles are in degress.}\r
+\cvarg{stream}{Sream for the asynchronous version.}\r
+\end{description}\r
+\r
+See also: \cvCppCross{polarToCart}.
\ No newline at end of file
diff --git a/doc/gpu_matrix_reductions.tex b/doc/gpu_matrix_reductions.tex
new file mode 100644 (file)
index 0000000..ed2299b
--- /dev/null
@@ -0,0 +1,83 @@
+\section{Matrix Reductions}\r
+\r
+\r
+\cvCppFunc{gpu::sum}\r
+Returns sum of array elements.\r
+\r
+\cvdefCpp{Scalar sum(const GpuMat\& src);\newline\r
+Scalar sum(const GpuMat\& src, GpuMat\& buf);}\r
+\r
+\begin{description}\r
+\cvarg{src}{Source image of any depth excepting 64F, single-channel.}\r
+\cvarg{buf}{Optional buffer. It's resized automatically.}\r
+\end{description}\r
+\r
+See also: \cvCppCross{sum}.\r
+\r
+\r
+\cvCppFunc{gpu::sqrSum}\r
+Returns squared sum of array elements.\r
+\r
+\cvdefCpp{Scalar sqrSum(const GpuMat\& src);\newline\r
+Scalar sqrSum(const GpuMat\& src, GpuMat\& buf);}\r
+\begin{description}\r
+\cvarg{src}{Source image of any depth excepting 64F, single-channel.}\r
+\cvarg{buf}{Optional buffer. It's resized automatically.}\r
+\end{description}\r
+\r
+\r
+\cvCppFunc{gpu::minMax}\r
+Finds global minimum and maximum array elements and returns their values.\r
+\r
+\cvdefCpp{void minMax(const GpuMat\& src, double* minVal,\par\r
+  double* maxVal=0, const GpuMat\& mask=GpuMat());\newline\r
+void minMax(const GpuMat\& src, double* minVal, double* maxVal,\par\r
+  const GpuMat\& mask, GpuMat\& buf);}\r
+\begin{description}\r
+\cvarg{src}{Single-channel source image.}\r
+\cvarg{minVal}{Pointer to returned minimum value. \texttt{NULL} if not required.}\r
+\cvarg{maxVal}{Pointer to returned maximum value. \texttt{NULL} if not required.}\r
+\cvarg{mask}{Optional mask to select a sub-array.}\r
+\cvarg{buf}{Optional buffer. It's resized automatically.}\r
+\end{description}\r
+\r
+Function doesn't work with 64F images on GPU with compute capability $<$ 1.3.\newline\r
+See also: \cvCppCross{minMaxLoc}.\r
+\r
+\r
+\cvCppFunc{gpu::minMaxLoc}\r
+Finds global minimum and maximum array elements and returns their values with locations.\r
+\r
+\cvdefCpp{void minMaxLoc(const GpuMat\& src, double\* minVal, double* maxVal=0,\par\r
+  Point* minLoc=0, Point* maxLoc=0,\par\r
+  const GpuMat\& mask=GpuMat());\newline\r
+void minMaxLoc(const GpuMat\& src, double* minVal, double* maxVal,\par\r
+  Point* minLoc, Point* maxLoc, const GpuMat\& mask,\par\r
+  GpuMat\& valbuf, GpuMat\& locbuf);}\r
+\begin{description}\r
+\cvarg{src}{Single-channel source image.}\r
+\cvarg{minVal}{Pointer to returned minimum value. \texttt{NULL} if not required.}\r
+\cvarg{maxVal}{Pointer to returned maximum value. \texttt{NULL} if not required.}\r
+\cvarg{minValLoc}{Pointer to returned minimum location. \texttt{NULL} if not required.}\r
+\cvarg{maxValLoc}{Pointer to returned maximum location. \texttt{NULL} if not required.}\r
+\cvarg{mask}{Optional mask to select a sub-array.}\r
+\cvarg{valbuf}{Optional values buffer. It's resized automatically.}\r
+\cvarg{locbuf}{Optional location buffer. It's resized automatically.}\r
+\end{description}\r
+\r
+Function doesn't work with 64F images on GPU with compute capability $<$ 1.3.\newline\r
+See also: \cvCppCross{minMaxLoc}.\r
+\r
+\r
+\cvCppFunc{gpu::countNonZero}\r
+Counts non-zero array elements.\r
+\r
+\cvdefCpp{int countNonZero(const GpuMat\& src);\newline\r
+int countNonZero(const GpuMat\& src, GpuMat\& buf);}\r
+\begin{description}\r
+\cvarg{src}{Single-channel source image.}\r
+\cvarg{buf}{Optional buffer. It's resized automatically.}\r
+\end{description}\r
+\r
+Function doesn't work with 64F images on GPU with compute capability $<$ 1.3.\newline\r
+See also: \cvCppCross{countNonZero}.
\ No newline at end of file
diff --git a/doc/gpu_object_detection.tex b/doc/gpu_object_detection.tex
new file mode 100644 (file)
index 0000000..70e88d2
--- /dev/null
@@ -0,0 +1,170 @@
+\section{Object Detection}\r
+\r
+\r
+\cvclass{gpu::HOGDescriptor}\r
+Histogram of Oriented Gradients descriptor and detector.\r
+\r
+\begin{lstlisting}\r
+struct CV_EXPORTS HOGDescriptor\r
+{\r
+    enum { DEFAULT_WIN_SIGMA = -1 };\r
+    enum { DEFAULT_NLEVELS = 64 };\r
+    enum { DESCR_FORMAT_ROW_BY_ROW, DESCR_FORMAT_COL_BY_COL };\r
+\r
+    HOGDescriptor(Size win_size=Size(64, 128), Size block_size=Size(16, 16),\r
+                  Size block_stride=Size(8, 8), Size cell_size=Size(8, 8),\r
+                  int nbins=9, double win_sigma=DEFAULT_WIN_SIGMA,\r
+                  double threshold_L2hys=0.2, bool gamma_correction=true,\r
+                  int nlevels=DEFAULT_NLEVELS);\r
+\r
+    size_t getDescriptorSize() const;\r
+    size_t getBlockHistogramSize() const;\r
+\r
+    void setSVMDetector(const vector<float>& detector);\r
+\r
+    static vector<float> getDefaultPeopleDetector();\r
+    static vector<float> getPeopleDetector48x96();\r
+    static vector<float> getPeopleDetector64x128();\r
+\r
+    void detect(const GpuMat& img, vector<Point>& found_locations, \r
+                double hit_threshold=0, Size win_stride=Size(), \r
+                Size padding=Size());\r
+\r
+    void detectMultiScale(const GpuMat& img, vector<Rect>& found_locations,\r
+                          double hit_threshold=0, Size win_stride=Size(), \r
+                          Size padding=Size(), double scale0=1.05, \r
+                          int group_threshold=2);\r
+\r
+    void getDescriptors(const GpuMat& img, Size win_stride, \r
+                        GpuMat& descriptors,\r
+                        int descr_format=DESCR_FORMAT_COL_BY_COL);\r
+\r
+    Size win_size;\r
+    Size block_size;\r
+    Size block_stride;\r
+    Size cell_size;\r
+    int nbins;\r
+    double win_sigma;\r
+    double threshold_L2hys;\r
+    bool gamma_correction;\r
+    int nlevels;\r
+\r
+private:\r
+    // Hidden\r
+}\r
+\end{lstlisting}\r
+\r
+Interfaces of all methods are kept similar to CPU HOG descriptor and detector's analogues as much as possible.\r
+\r
+\r
+\cvCppFunc{gpu::HOGDescriptor::HOGDescriptor}\r
+Creates HOG descriptor and detector.\r
+\r
+\cvdefCpp{HOGDescriptor(Size win\_size=Size(64, 128), Size block\_size=Size(16, 16),\par\r
+          Size block\_stride=Size(8, 8), Size cell\_size=Size(8, 8),\par\r
+          int nbins=9, double win\_sigma=DEFAULT\_WIN\_SIGMA,\par\r
+          double threshold\_L2hys=0.2, bool gamma\_correction=true,\par\r
+          int nlevels=DEFAULT\_NLEVELS);}\r
+\r
+\begin{description}\r
+\cvarg{win\_size}{Detection window size. Must be aligned to block size and block stride.}\r
+\cvarg{block\_size}{Block size in cells. Only (2,2) is supported for now.}\r
+\cvarg{block\_stride}{Block stride. Must be a multiple of cell size.}\r
+\cvarg{cell\_size}{Cell size. Only (8, 8) is supported for now.}\r
+\cvarg{nbins}{Number of bins. Only 9 bins per cell is supported for now.}\r
+\cvarg{win\_sigma}{Gaussian smoothing window parameter.}\r
+\cvarg{threshold\_L2Hys}{L2-Hys normalization method shrinkage.}\r
+\cvarg{gamma\_correction}{Do gamma correction preprocessing or not.}\r
+\cvarg{nlevels}{Maximum number of detection window increases.}\r
+\end{description}\r
+\r
+\r
+\cvCppFunc{gpu::HOGDescriptor::getDescriptorSize}\r
+Returns number of coefficients required for the classification.\r
+\r
+\cvdefCpp{size\_t getDescriptorSize() const;}\r
+\r
+\r
+\cvCppFunc{gpu::HOGDescriptor::getBlockHistogramSize}\r
+Returns block histogram size.\r
+\r
+\cvdefCpp{size\_t getBlockHistogramSize() const;}\r
+\r
+\r
+\cvCppFunc{gpu::HOGDescriptor::setSVMDetector}\r
+Sets coefficients for the linear SVM classifier. \r
+\r
+\cvdefCpp{void setSVMDetector(const vector<float>\& detector);}\r
+\r
+\r
+\cvCppFunc{gpu::HOGDescriptor::getDefaultPeopleDetector}\r
+Returns coefficients of the classifier trained for people detection (for default window size).\r
+\r
+\cvdefCpp{static vector<float> getDefaultPeopleDetector();}\r
+\r
+\r
+\cvCppFunc{gpu::HOGDescriptor::getPeopleDetector48x96}\r
+Returns coefficients of the classifier trained for people detection (for 48x96 windows).\r
+\r
+\cvdefCpp{static vector<float> getPeopleDetector48x96();}\r
+\r
+\r
+\cvCppFunc{gpu::HOGDescriptor::getPeopleDetector64x128}\r
+Returns coefficients of the classifier trained for people detection (for 64x128 windows).\r
+\r
+\cvdefCpp{static vector<float> getPeopleDetector64x128();}\r
+\r
+\r
+\cvCppFunc{gpu::HOGDescriptor::detect}\r
+Perfroms object detection without increasing detection window.\r
+\r
+\cvdefCpp{void detect(const GpuMat\& img, vector<Point>\& found\_locations,\par\r
+             double hit\_threshold=0, Size win\_stride=Size(),\par\r
+             Size padding=Size());}\r
+\r
+\begin{description}\r
+\cvarg{img}{Source image. 8UC1 and 8UC4 types are supported for now.}\r
+\cvarg{found\_locations}{Will contain left-top corner points of detected objects boundaries.}\r
+\cvarg{hit\_threshold}{Threshold for the distance between features and classifying plane. Usually it's 0, and should be specfied in the detector coefficients (as the last free coefficient), but if the free coefficient is missed (it's allowed) you can specify it manually here.}\r
+\cvarg{win\_stride}{Window stride. Must be a multiple of block stride.}\r
+\cvarg{padding}{Mock parameter to keep CPU interface compatibility. Must be (0,0).}\r
+\end{description}\r
+\r
+\r
+\cvCppFunc{gpu::HOGDescriptor::detectMultiScale}\r
+Perfroms object detection with increasing detection window.\r
+\r
+\cvdefCpp{void detectMultiScale(const GpuMat\& img, vector<Rect>\& found\_locations,\par\r
+                      double hit\_threshold=0, Size win\_stride=Size(),\par\r
+                      Size padding=Size(), double scale0=1.05,\par\r
+                      int group\_threshold=2);}\r
+\r
+\begin{description}\r
+\cvarg{img}{Source image. See \cvCppCross{gpu::HOGDescriptor::detect} for type limitations.}\r
+\cvarg{found\_locations}{Will contain detected objects boundaries.}\r
+\cvarg{hit\_threshold}{The threshold for the distance between features and classifying plane. See \cvCppCross{gpu::HOGDescriptor::detect} for details.}\r
+\cvarg{win\_stride}{Window stride. Must be a multiple of block stride.}\r
+\cvarg{padding}{Mock parameter to keep CPU interface compatibility. Must be (0,0).}\r
+\cvarg{scale0}{Coefficient of the detection window increase.}\r
+\cvarg{group\_threshold}{After detection some objects could be covered by many rectangles. This coefficient regulates similarity threshold. 0 means don't perform grouping.\newline\r
+See \cvCppCross{groupRectangles}.}\r
+\end{description}\r
+\r
+\r
+\cvCppFunc{gpu::HOGDescriptor::getDescriptors}\r
+Returns block descriptors computed for the whole image. \r
+\r
+\cvdefCpp{void getDescriptors(const GpuMat\& img, Size win\_stride,\par\r
+                    GpuMat\& descriptors,\par\r
+                    int descr\_format=DESCR\_FORMAT\_COL\_BY\_COL);}\r
+\r
+\begin{description}\r
+\cvarg{img}{Source image. See \cvCppCross{gpu::HOGDescriptor::detect} for type limitations.}\r
+\cvarg{win\_stride}{Window stride. Must be a multiple of block stride.}\r
+\cvarg{descriptors}{2D array of descriptors.}\r
+\cvarg{descr\_format}{Descriptor storage format: \r
+\begin{description}\r
+    \cvarg{DESCR\_FORMAT\_ROW\_BY\_ROW}{Row-major order.}\r
+    \cvarg{DESCR\_FORMAT\_COL\_BY\_COL}{Column-major order.}\r
+\end{description}}\r
+\end{description}
\ No newline at end of file
diff --git a/doc/gpu_per_element_operations.tex b/doc/gpu_per_element_operations.tex
new file mode 100644 (file)
index 0000000..17dce17
--- /dev/null
@@ -0,0 +1,96 @@
+\section{Per-element Operations.}\r
+\r
+\r
+\cvCppFunc{add}\r
+Computes matrix-matrix or matrix-scalar sum.\r
+\r
+\cvdefCpp{void add(const GpuMat\& a, const GpuMat\& b, GpuMat\& c);}\r
+\begin{description}\r
+\cvarg{a}{First source matrix. 8UC1, 8UC4, 32SC1 and 32FC2 matrixes are supported for now.}\r
+\cvarg{b}{Second source matrix. Must have the same size and type as \texttt{a}.}\r
+\cvarg{c}{Destination matrix. Will have the same size and type as \texttt{a}.}\r
+\end{description}\r
+\r
+\cvdefCpp{void add(const GpuMat\& a, const Scalar\& sc, GpuMat\& c);}\r
+\begin{description}\r
+\cvarg{a}{Source matrix. 32SC1 and 32FC2 matrixes are supported for now.}\r
+\cvarg{b}{Source scalar.}\r
+\cvarg{c}{Destination matrix. Will have the same size and type as \texttt{a}.}\r
+\end{description}\r
+\r
+See also: \cvCppCross{add}.\r
+\r
+\r
+\cvfunc{cv::gpu::bitwise\_not}\label{cppfunc.gpu.bitwise.not}\r
+Performs per-element bitwise inversion.\r
+\r
+\cvdefCpp{void bitwise\_not(const GpuMat\& src, GpuMat\& dst,\par\r
+  const GpuMat\& mask=GpuMat());\newline\r
+void bitwise\_not(const GpuMat\& src, GpuMat\& dst,\par\r
+  const GpuMat\& mask, const Stream\& stream);}\r
+\r
+\begin{description}\r
+\cvarg{src}{Source matrix.}\r
+\cvarg{dst}{Destination matrix. Will have the same size and type as \texttt{src}.}\r
+\cvarg{mask}{Optional operation mask. 8-bit single channel image.}\r
+\cvarg{stream}{Stream for the asynchronous version.}\r
+\end{description}\r
+\r
+See also: \hyperref[cppfunc.bitwise.not]{cv::bitwise\_not}.\r
+\r
+\r
+\cvfunc{cv::gpu::bitwise\_or}\label{cppfunc.gpu.bitwise.or}\r
+Performs per-element bitwise disjunction of two matrices.\r
+\r
+\cvdefCpp{void bitwise\_or(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,\par\r
+  const GpuMat\& mask=GpuMat());\newline\r
+void bitwise\_or(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,\par\r
+  const GpuMat\& mask, const Stream\& stream);}\r
+\r
+\begin{description}\r
+\cvarg{src1}{First source matrix.}\r
+\cvarg{src2}{Second source matrix. It must have the same size and type as \texttt{src1}.}\r
+\cvarg{dst}{Destination matrix. Will have the same size and type as \texttt{src1}.}\r
+\cvarg{mask}{Optional operation mask. 8-bit single channel image.}\r
+\cvarg{stream}{Stream for the asynchronous version.}\r
+\end{description}\r
+\r
+See also: \hyperref[cppfunc.bitwise.or]{cv::bitwise\_or}.\r
+\r
+\r
+\cvfunc{cv::gpu::bitwise\_and}\label{cppfunc.gpu.bitwise.and}\r
+Performs per-element bitwise conjunction of two matrices.\r
+\r
+\cvdefCpp{void bitwise\_and(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,\par\r
+  const GpuMat\& mask=GpuMat());\newline\r
+void bitwise\_and(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,\par\r
+  const GpuMat\& mask, const Stream\& stream);}\r
+\r
+\begin{description}\r
+\cvarg{src1}{First source matrix.}\r
+\cvarg{src2}{Second source matrix. It must have the same size and type as \texttt{src1}.}\r
+\cvarg{dst}{Destination matrix. Will have the same size and type as \texttt{src1}.}\r
+\cvarg{mask}{Optional operation mask. 8-bit single channel image.}\r
+\cvarg{stream}{Stream for the asynchronous version.}\r
+\end{description}\r
+\r
+See also: \hyperref[cppfunc.bitwise.and]{cv::bitwise\_and}.\r
+\r
+\r
+\cvfunc{cv::gpu::bitwise\_xor}\label{cppfunc.gpu.bitwise.xor}\r
+Performs per-element bitwise "exclusive or" of two matrices.\r
+\r
+\cvdefCpp{void bitwise\_xor(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,\par\r
+  const GpuMat\& mask=GpuMat());\newline\r
+void bitwise\_xor(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,\par\r
+  const GpuMat\& mask, const Stream\& stream);}\r
+\r
+\begin{description}\r
+\cvarg{src1}{First source matrix.}\r
+\cvarg{src2}{Second source matrix. It must have the same size and type as \texttt{src1}.}\r
+\cvarg{dst}{Destination matrix. Will have the same size and type as \texttt{src1}.}\r
+\cvarg{mask}{Optional operation mask. 8-bit single channel image.}\r
+\cvarg{stream}{Stream for the asynchronous version.}\r
+\end{description}\r
+\r
+See also: \hyperref[cppfunc.bitwise.xor]{cv::bitwise\_xor}.
\ No newline at end of file
index f4da822..b159b3e 100644 (file)
 \renewcommand{\curModule}{gpu}
 %\input{gpu_introduction}
 \input{gpu_initialization}
-\input{gpu}
-%\input{gpu_datastructures}
-%\input{gpu_matrixoperations}
-%\input{gpu_imageproc}
-%\input{gpu_matrixreductions}
-%\input{gpu_objectdetection}
+\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}
 \fi