fixed some mistakes in gpu docs
authorAlexey Spizhevoy <no@email>
Tue, 18 Jan 2011 08:09:47 +0000 (08:09 +0000)
committerAlexey Spizhevoy <no@email>
Tue, 18 Jan 2011 08:09:47 +0000 (08:09 +0000)
doc/gpu_data_structures.tex
doc/gpu_image_processing.tex
doc/gpu_matrix_operations.tex
doc/gpu_matrix_reductions.tex
doc/gpu_object_detection.tex
doc/gpu_per_element_operations.tex

index 68a2ddd..52303bf 100644 (file)
@@ -10,4 +10,6 @@ Creates continuous matrix in GPU memory.
 \cvarg{cols}{Column count.}\r
 \cvarg{type}{Type of the matrix.}\r
 \cvarg{m}{Destination matrix. Will be only reshaped if it has proper type and area (\texttt{rows} $\times$ \texttt{cols}).}\r
-\end{description}
\ No newline at end of file
+\end{description}\r
+\r
+Matrix is called continuous if its elements are stored continuously, i.e. wuthout gaps in the end of each row.
\ No newline at end of file
index 542bbe5..e04371a 100644 (file)
@@ -2,7 +2,7 @@
 \r
 \r
 \cvCppFunc{gpu::meanShiftFiltering}\r
-Performs mean-shift filtering.\r
+Performs mean-shift filtering for each point of the source image. It maps each point of the source image into another point, and as the result we have new color and new position of each point.\r
 \r
 \cvdefCpp{void meanShiftFiltering(const GpuMat\& src, GpuMat\& dst,\par\r
   int sp, int sr,\par\r
@@ -11,7 +11,7 @@ Performs mean-shift filtering.
 \r
 \begin{description}\r
 \cvarg{src}{Source image. Only \texttt{CV\_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{dst}{Destination image, containing color of mapped points. Will have the same size and type 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
@@ -19,7 +19,7 @@ Performs mean-shift filtering.
 \r
 \r
 \cvCppFunc{gpu::meanShiftProc}\r
-Performs mean-shift procedure and stores information about converged points in two images.\r
+Performs mean-shift procedure and stores information about processed points (i.e. their colors and positions) into two images. \r
 \r
 \cvdefCpp{void meanShiftProc(const GpuMat\& src, GpuMat\& dstr, GpuMat\& dstsp,\par\r
   int sp, int sr,\par\r
@@ -28,13 +28,15 @@ Performs mean-shift procedure and stores information about converged points in t
 \r
 \begin{description}\r
 \cvarg{src}{Source image. Only \texttt{CV\_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}{\texttt{CV\_16SC2} matrix, which will contain coordinates of converged points and have the same size as \texttt{src}.}\r
+\cvarg{dstr}{Destination image, containing color of mapped points. Will have the same size and type as \texttt{src}.}\r
+\cvarg{dstsp}{Destination image, containing position of mapped points. Will have the same size as \texttt{src} and \texttt{CV\_16SC2} type.}\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
+See also: \cvCppCross{gpu::meanShiftFiltering}.\r
+\r
 \r
 \cvCppFunc{gpu::meanShiftSegmentation}\r
 Performs mean-shift segmentation of the source image and eleminates small segments.\r
@@ -75,7 +77,7 @@ Computes squared integral image.
 \cvdefCpp{void sqrIntegral(const GpuMat\& src, GpuMat\& sqsum);}\r
 \begin{description}\r
 \cvarg{src}{Source image. Only \texttt{CV\_8UC1} images are supported for now.}\r
-\cvarg{sqsum}{Squared integral image. Will contain 64-bit floating point values packed into 64U.}\r
+\cvarg{sqsum}{Squared integral image. Will contain 64-bit unsigned integer values packed into \texttt{CV\_64FC1}.}\r
 \end{description}\r
 \r
 \r
@@ -138,7 +140,7 @@ Performs per-element multiplication of two Fourier spectrums.
 \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
+\cvarg{conjB}{Optional flag which indicates the second spectrum must be conjugated before the multiplication.}\r
 \end{description}\r
 \r
 Only full (i.e. not packed) \texttt{CV\_32FC2} complex spectrums in the interleaved format are supported for now.\r
@@ -158,7 +160,7 @@ Performs per-element multiplication of two Fourier spectrums and scales the resu
 \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
+\cvarg{conjB}{Optional flag which indicates the second spectrum must be conjugated before the multiplication.}\r
 \end{description}\r
 \r
 Only full (i.e. not packed) \texttt{CV\_32FC2} complex spectrums in the interleaved format are supported for now.\r
@@ -167,7 +169,7 @@ See also: \cvCppCross{mulSpectrums}.
 \r
 \r
 \cvCppFunc{gpu::dft}\r
-Performs a forward or inverse discrete Fourier transform (1D or 2D) of floating point matrix.\r
+Performs a forward or inverse discrete Fourier transform (1D or 2D) of floating point matrix. Can handle real matrices (\texttt{CV\_32FC1}) and complex matrices in the interleaved format (\texttt{CV\_32FC2}).\r
 \r
 \cvdefCpp{void dft(const GpuMat\& src, GpuMat\& dst, Size dft\_size, int flags=0);}\r
 \r
@@ -188,7 +190,7 @@ The source matrix should be continuous, otherwise reallocation and data copying
 \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 \texttt{CV\_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 \texttt{CV\_32FC1} type. It will contain result of the inverse DFT.\r
-  \item If the source matrix is real (i.e. its type is \texttt{CV\_32FC1}) then forward DFT will be performed. The result of the DFT will be packed into complex (\texttt{CV\_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
+  \item If the source matrix is real (i.e. its type is \texttt{CV\_32FC1}) then forward DFT will be performed. The result of the DFT will be packed into complex (\texttt{CV\_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 instead of width.\r
 \end{itemize}\r
 \r
 See also: \cvCppCross{dft}.\r
@@ -207,7 +209,7 @@ void convolve(const GpuMat\& image, const GpuMat\& templ, GpuMat\& result,\par
 \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
+\cvarg{buf}{Optional buffer to avoid extra memory allocations (for many calls with the same sizes).}\r
 \end{description}\r
 \r
 \r
@@ -244,17 +246,18 @@ Computes a proximity map for a raster template and an image where the template i
   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{image}{Source image. \texttt{CV\_32F} and \texttt{CV\_8U} depth 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}{Map containing comparison results (32FC1). If \texttt{image} is $W \times H$ and\r
+\cvarg{result}{Map containing comparison results (\texttt{CV\_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 which the template must be compared with the image.}\r
 \end{description}\r
-Following methods are supported for the 8U images for now:\r
+\r
+Following methods are supported for the \texttt{CV\_8U} depth 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 the 32F images for now:\r
+Following methods are supported for the \texttt{CV\_32F} images for now:\r
 \begin{itemize}\r
 \item CV\_TM\_SQDIFF \item CV\_TM\_CCORR\r
 \end{itemize}\r
index 1fb600e..bad8c2f 100644 (file)
@@ -18,7 +18,7 @@ Flips a 2D matrix around vertical, horizontal or both axes.
 \r
 \cvdefCpp{void flip(const GpuMat\& a, GpuMat\& b, int flipCode);}\r
 \begin{description}\r
-\cvarg{a}{Source matrix. Only \texttt{CV\_8UC1} and \texttt{CV\_8UC4} matrixes are supported for now.}\r
+\cvarg{a}{Source matrix. Only \texttt{CV\_8UC1} and \texttt{CV\_8UC4} matrices are supported for now.}\r
 \cvarg{b}{Destination matrix.}\r
 \cvarg{flipCode}{Specifies how to flip the source:\r
 \begin{description}\r
@@ -32,7 +32,8 @@ See also: \cvCppCross{flip}.
 \r
 \r
 \cvCppFunc{gpu::LUT}\r
-Transforms the source matrix into the destination matrix using given look-up table: \texttt{dst(I) = lut(src(I))}.\r
+Transforms the source matrix into the destination matrix using given look-up table: \r
+\[dst(I) = lut(src(I))\]\r
 \r
 \cvdefCpp{void LUT(const GpuMat\& src, const Mat\& lut, GpuMat\& dst);}\r
 \begin{description}\r
@@ -108,7 +109,7 @@ void magnitude(const GpuMat\& x, const GpuMat\& y, GpuMat\& magnitude,\par
 \cvarg{x}{Source matrix, containing real components (\texttt{CV\_32FC1}).}\r
 \cvarg{y}{Source matrix, containing imaginary components (\texttt{CV\_32FC1}).}\r
 \cvarg{magnitude}{Destination matrix of float magnitudes (\texttt{CV\_32FC1}).}\r
-\cvarg{stream}{Sream for the asynchronous version.}\r
+\cvarg{stream}{Stream for the asynchronous version.}\r
 \end{description}\r
 \r
 See also: \cvCppCross{magnitude}.\r
@@ -130,7 +131,7 @@ void magnitudeSqr(const GpuMat\& x, const GpuMat\& y, GpuMat\& magnitude,\par
 \cvarg{x}{Source matrix, containing real components (\texttt{CV\_32FC1}).}\r
 \cvarg{y}{Source matrix, containing imaginary components (\texttt{CV\_32FC1}).}\r
 \cvarg{magnitude}{Destination matrix of float magnitude squares (\texttt{CV\_32FC1}).}\r
-\cvarg{stream}{Sream for the asynchronous version.}\r
+\cvarg{stream}{Stream for the asynchronous version.}\r
 \end{description}\r
 \r
 \r
@@ -146,7 +147,7 @@ void phase(const GpuMat\& x, const GpuMat\& y, GpuMat\& angle,\par
 \cvarg{y}{Source matrix, containing imaginary components (\texttt{CV\_32FC1}).}\r
 \cvarg{angle}{Destionation matrix of angles (\texttt{CV\_32FC1}).}\r
 \cvarg{angleInDegress}{Flag which indicates angles must be evaluated in degress.}\r
-\cvarg{stream}{Sream for the asynchronous version.}\r
+\cvarg{stream}{Stream for the asynchronous version.}\r
 \end{description}\r
 \r
 See also: \cvCppCross{phase}.\r
@@ -165,7 +166,7 @@ void cartToPolar(const GpuMat\& x, const GpuMat\& y, GpuMat\& magnitude,\par
 \cvarg{magnitude}{Destination matrix of float magnituds (\texttt{CV\_32FC1}).}\r
 \cvarg{angle}{Destionation matrix of angles (\texttt{CV\_32FC1}).}\r
 \cvarg{angleInDegress}{Flag which indicates angles must be evaluated in degress.}\r
-\cvarg{stream}{Sream for the asynchronous version.}\r
+\cvarg{stream}{Stream for the asynchronous version.}\r
 \end{description}\r
 \r
 See also: \cvCppCross{cartToPolar}.\r
@@ -185,7 +186,7 @@ void polarToCart(const GpuMat\& magnitude, const GpuMat\& angle,\par
 \cvarg{x}{Destination matrix of real components (\texttt{CV\_32FC1}).}\r
 \cvarg{y}{Destination matrix of imaginary components (\texttt{CV\_32FC1}).}\r
 \cvarg{angleInDegress}{Flag which indicates angles are in degress.}\r
-\cvarg{stream}{Sream for the asynchronous version.}\r
+\cvarg{stream}{Stream for the asynchronous version.}\r
 \end{description}\r
 \r
 See also: \cvCppCross{polarToCart}.
\ No newline at end of file
index 5d16121..8ec955f 100644 (file)
@@ -41,8 +41,8 @@ Returns sum of matrix elements.
 Scalar sum(const GpuMat\& src, GpuMat\& buf);}\r
 \r
 \begin{description}\r
-\cvarg{src}{Source image of any depth excepting \texttt{CV\_64F}, single-channel.}\r
-\cvarg{buf}{Optional buffer. It's resized automatically.}\r
+\cvarg{src}{Source image of any depth except \texttt{CV\_64F}, single-channel.}\r
+\cvarg{buf}{Optional buffer to avoid extra memory allocations. It's resized automatically.}\r
 \end{description}\r
 \r
 See also: \cvCppCross{sum}.\r
@@ -54,8 +54,8 @@ Returns squared sum of matrix elements.
 \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 \texttt{CV\_64F}, single-channel.}\r
-\cvarg{buf}{Optional buffer. It's resized automatically.}\r
+\cvarg{src}{Source image of any depth except \texttt{CV\_64F}, single-channel.}\r
+\cvarg{buf}{Optional buffer to avoid extra memory allocations. It's resized automatically.}\r
 \end{description}\r
 \r
 \r
@@ -71,7 +71,7 @@ void minMax(const GpuMat\& src, double* minVal, double* maxVal,\par
 \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-matrix.}\r
-\cvarg{buf}{Optional buffer. It's resized automatically.}\r
+\cvarg{buf}{Optional buffer to avoid extra memory allocations. It's resized automatically.}\r
 \end{description}\r
 \r
 Function doesn't work with \texttt{CV\_64F} images on GPU with compute capability $<$ 1.3.\newline\r
@@ -94,8 +94,8 @@ void minMaxLoc(const GpuMat\& src, double* minVal, double* maxVal,\par
 \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-matrix.}\r
-\cvarg{valbuf}{Optional values buffer. It's resized automatically.}\r
-\cvarg{locbuf}{Optional location buffer. It's resized automatically.}\r
+\cvarg{valbuf}{Optional values buffer to avoid extra memory allocations. It's resized automatically.}\r
+\cvarg{locbuf}{Optional locations buffer to avoid extra memory allocations. It's resized automatically.}\r
 \end{description}\r
 \r
 Function doesn't work with \texttt{CV\_64F} images on GPU with compute capability $<$ 1.3.\newline\r
@@ -109,7 +109,7 @@ Counts non-zero matrix elements.
 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
+\cvarg{buf}{Optional buffer to avoid extra memory allocations. It's resized automatically.}\r
 \end{description}\r
 \r
 Function doesn't work with \texttt{CV\_64F} images on GPU with compute capability $<$ 1.3.\newline\r
index 0f13aed..e5cfb18 100644 (file)
@@ -54,7 +54,7 @@ private:
 }\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
+Interfaces of all methods are kept similar to CPU HOG descriptor and detector analogues as much as possible.\r
 \r
 \r
 \cvCppFunc{gpu::HOGDescriptor::HOGDescriptor}\r
@@ -68,7 +68,7 @@ Creates HOG descriptor and detector.
 \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\_size}{Block size in pixels. Must be aligned to cell size. Only (16,16) 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
@@ -116,7 +116,7 @@ Returns coefficients of the classifier trained for people detection (for 64x128
 \r
 \r
 \cvCppFunc{gpu::HOGDescriptor::detect}\r
-Perfroms object detection without increasing detection window.\r
+Perfroms object detection without multiscale 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
@@ -125,14 +125,14 @@ Perfroms object detection without increasing detection window.
 \begin{description}\r
 \cvarg{img}{Source image. \texttt{CV\_8UC1} and \texttt{CV\_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{hit\_threshold}{Threshold for the distance between features and SVM 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 omitted (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 several times with preliminary increase of detection window.\r
+Perfroms object detection with multiscale 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
@@ -142,7 +142,7 @@ Perfroms object detection several times with preliminary increase of detection w
 \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{hit\_threshold}{The threshold for the distance between features and SVM 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
@@ -152,7 +152,7 @@ See \cvCppCross{groupRectangles}.}
 \r
 \r
 \cvCppFunc{gpu::HOGDescriptor::getDescriptors}\r
-Returns block descriptors computed for the whole image. \r
+Returns block descriptors computed for the whole image. It's mainly used for classifier learning purposes.\r
 \r
 \cvdefCpp{void getDescriptors(const GpuMat\& img, Size win\_stride,\par\r
                     GpuMat\& descriptors,\par\r
index 3135a69..30190f9 100644 (file)
@@ -34,7 +34,7 @@ Subtracts matrix from another matrix (or scalar from matrix).
 \cvdefCpp{void subtract(const GpuMat\& a, const Scalar\& sc, GpuMat\& c);}\r
 \begin{description}\r
 \cvarg{a}{Source matrix.  \texttt{CV\_32FC1} and \texttt{CV\_32FC2} matrixes are supported for now.}\r
-\cvarg{b}{Scalar to be subtracted from the source matrix \texttt{a}.}\r
+\cvarg{b}{Scalar to be subtracted from the source matrix elements.}\r
 \cvarg{c}{Destination matrix. Will have the same size and type as \texttt{a}.}\r
 \end{description}\r
 \r
@@ -118,7 +118,7 @@ Computes per-element absolute difference of two matrices (or of matrix and scala
 \cvdefCpp{void absdiff(const GpuMat\& a, const Scalar\& s, GpuMat\& c);}\r
 \begin{description}\r
 \cvarg{a}{Source matrix. \texttt{CV\_32FC1} matrixes are supported for now.}\r
-\cvarg{b}{Scalar to be multiplied by.}\r
+\cvarg{b}{Scalar to be subtracted from the source matrix elements.}\r
 \cvarg{c}{Destination matrix. Will have the same size and type as \texttt{a}.}\r
 \end{description}\r
 \r