finished gpu module docs for per-element operations
authorAlexey Spizhevoy <no@email>
Mon, 17 Jan 2011 08:14:48 +0000 (08:14 +0000)
committerAlexey Spizhevoy <no@email>
Mon, 17 Jan 2011 08:14:48 +0000 (08:14 +0000)
doc/gpu_per_element_operations.tex

index 17dce17..73e58b2 100644 (file)
 \section{Per-element Operations.}\r
 \r
 \r
-\cvCppFunc{add}\r
+\cvCppFunc{gpu::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{a}{First source matrix. 8UC1, 8UC4, 32SC1 and 32FC2 matrices 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{a}{Source matrix. 32FC1 and 32FC2 matrixes are supported for now.}\r
+\cvarg{b}{Source scalar to be added to the source matrix.}\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
+\cvCppFunc{gpu::subtract}\r
+Subtracts matrix from another matrix (or scalar from matrix).\r
+\r
+\cvdefCpp{void subtract(const GpuMat\& a, const GpuMat\& b, GpuMat\& c);}\r
+\begin{description}\r
+\cvarg{a}{First source matrix. 8UC1, 8UC4, 32SC1 and 32FC2 matrices 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 subtract(const GpuMat\& a, const Scalar\& sc, GpuMat\& c);}\r
+\begin{description}\r
+\cvarg{a}{Source matrix.  32FC1 and 32FC2 matrixes are supported for now.}\r
+\cvarg{b}{Scalar to be subtracted from the source matrix \texttt{a}.}\r
+\cvarg{c}{Destination matrix. Will have the same size and type as \texttt{a}.}\r
+\end{description}\r
+\r
+See also: \cvCppCross{subtract}.\r
+\r
+\r
+\cvCppFunc{gpu::multiply}\r
+Computes per-element product of two matrices (or of matrix and scalar).\r
+\r
+\cvdefCpp{void multiply(const GpuMat\& a, const GpuMat\& b, GpuMat\& c);}\r
+\begin{description}\r
+\cvarg{a}{First source matrix. 8UC1, 8UC4, 32SC1 and 32FC2 matrices are supported for now.}\r
+\cvarg{b}{Second source matrix. Must have the same size and type as \texttt{a}.}\r
+\cvarg{c}{Destionation matrix. Will have the same size and type as \texttt{a}.}\r
+\end{description}\r
+\r
+\cvdefCpp{void multiply(const GpuMat\& a, const Scalar\& sc, GpuMat\& c);}\r
+\begin{description}\r
+\cvarg{a}{Source matrix.  32FC1 and 32FC2 matrixes are supported for now.}\r
+\cvarg{b}{Scalar to be multiplied by.}\r
+\cvarg{c}{Destination matrix. Will have the same size and type as \texttt{a}.}\r
+\end{description}\r
+\r
+See also: \cvCppCross{multiply}.\r
+\r
+\r
+\cvCppFunc{gpu::divide}\r
+Performs per-element division of two matrices (or division of matrix by scalar).\r
+\r
+\cvdefCpp{void divide(const GpuMat\& a, const GpuMat\& b, GpuMat\& c);}\r
+\begin{description}\r
+\cvarg{a}{First source matrix. 8UC1, 8UC4, 32SC1 and 32FC2 matrices are supported for now.}\r
+\cvarg{b}{Second source matrix. Must have the same size and type as \texttt{a}.}\r
+\cvarg{c}{Destionation matrix. Will have the same size and type as \texttt{a}.}\r
+\end{description}\r
+\r
+\cvdefCpp{void divide(const GpuMat\& a, const Scalar\& sc, GpuMat\& c);}\r
+\begin{description}\r
+\cvarg{a}{Source matrix.  32FC1 and 32FC2 matrixes are supported for now.}\r
+\cvarg{b}{Scalar to be divided by.}\r
+\cvarg{c}{Destination matrix. Will have the same size and type as \texttt{a}.}\r
+\end{description}\r
+\r
+See also: \cvCppCross{divide}.\r
+\r
+\r
+\cvCppFunc{gpu::exp}\r
+Computes exponent of each matrix element.\r
+\r
+\cvdefCpp{void exp(const GpuMat\& a, GpuMat\& b);}\r
+\begin{description}\r
+\cvarg{a}{Source matrix. 32FC1 matrixes are supported for now.}\r
+\cvarg{b}{Destination matrix. Will have the same size and type as \texttt{a}.}\r
+\end{description}\r
+\r
+See also: \cvCppCross{exp}.\r
+\r
+\r
+\cvCppFunc{gpu::log}\r
+Computes natural logarithm of absolute value of each matrix element.\r
+\r
+\cvdefCpp{void log(const GpuMat\& a, GpuMat\& b);}\r
+\begin{description}\r
+\cvarg{a}{Source matrix. 32FC1 matrixes are supported for now.}\r
+\cvarg{b}{Destination matrix. Will have the same size and type as \texttt{a}.}\r
+\end{description}\r
+\r
+See also: \cvCppCross{log}.\r
+\r
+\r
+\cvCppFunc{gpu::absdiff}\r
+Computes per-element absolute difference of two matrices (or of matrix and scalar).\r
+\r
+\cvdefCpp{void absdiff(const GpuMat\& a, const GpuMat\& b, GpuMat\& c);}\r
+\begin{description}\r
+\cvarg{a}{First source matrix. 8UC1, 8UC4, 32SC1 and 32FC2 matrices are supported for now.}\r
+\cvarg{b}{Second source matrix. Must have the same size and type as \texttt{a}.}\r
+\cvarg{c}{Destionation matrix. Will have the same size and type as \texttt{a}.}\r
+\end{description}\r
+\r
+\cvdefCpp{void absdiff(const GpuMat\& a, const Scalar\& s, GpuMat\& c);}\r
+\begin{description}\r
+\cvarg{a}{Source matrix. 32FC1 matrixes are supported for now.}\r
+\cvarg{b}{Scalar to be multiplied by.}\r
+\cvarg{c}{Destination matrix. Will have the same size and type as \texttt{a}.}\r
+\end{description}\r
+\r
+See also: \cvCppCross{absdiff}.\r
+\r
+\r
+\cvCppFunc{gpu::compare}\r
+Compares elements of two matrices.\r
+\r
+\cvdefCpp{void compare(const GpuMat\& a, const GpuMat\& b, GpuMat\& c, int cmpop);}\r
+\begin{description}\r
+\cvarg{a}{First source matrix. 8UC4 and 32FC1 matrices 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 as \texttt{a} and be 8UC1 type.}\r
+\cvarg{cmpop}{Flag specifying the relation between the elements to be checked:\r
+\begin{description}\r
+\cvarg{CMP\_EQ}{$=$}\r
+\cvarg{CMP\_GT}{$>$}\r
+\cvarg{CMP\_GE}{$\ge$}\r
+\cvarg{CMP\_LT}{$<$}\r
+\cvarg{CMP\_LE}{$\le$}\r
+\cvarg{CMP\_NE}{$\ne$}\r
+\end{description}\r
+}\r
+\end{description}\r
+\r
+See also: \cvCppCross{compare}.\r
+\r
+\r
 \cvfunc{cv::gpu::bitwise\_not}\label{cppfunc.gpu.bitwise.not}\r
 Performs per-element bitwise inversion.\r
 \r
@@ -93,4 +220,56 @@ void bitwise\_xor(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,\par
 \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
+See also: \hyperref[cppfunc.bitwise.xor]{cv::bitwise\_xor}.\r
+\r
+\r
+\cvCppFunc{gpu::min}\r
+Computes per-element minimum of two matrices (or of matrix and scalar).\r
+\r
+\cvdefCpp{void min(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst);\newline\r
+void min(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,\par\r
+  const Stream\& stream);}\r
+\begin{description}\r
+\cvarg{src1}{First source matrix.}\r
+\cvarg{src2}{Second source matrix.}\r
+\cvarg{dst}{Destination matrix. Will have the same size and type as \texttt{src1}.}\r
+\cvarg{stream}{Stream for the asynchronous version.}\r
+\end{description}\r
+\r
+\cvdefCpp{void min(const GpuMat\& src1, double src2, GpuMat\& dst);\newline\r
+void min(const GpuMat\& src1, double src2, GpuMat\& dst,\par\r
+  const Stream\& stream);}\r
+\begin{description}\r
+\cvarg{src1}{Source matrix.}\r
+\cvarg{src2}{Scalar to be compared with.}\r
+\cvarg{dst}{Destination matrix. Will have the same size and type as \texttt{src1}.}\r
+\cvarg{stream}{Stream for the asynchronous version.}\r
+\end{description}\r
+\r
+See also: \cvCppCross{min}.\r
+\r
+\r
+\cvCppFunc{gpu::max}\r
+Computes per-element maximum of two matrices (or of matrix and scalar).\r
+\r
+\cvdefCpp{void max(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst);\newline\r
+void max(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,\par\r
+  const Stream\& stream);}\r
+\begin{description}\r
+\cvarg{src1}{First source matrix.}\r
+\cvarg{src2}{Second source matrix.}\r
+\cvarg{dst}{Destination matrix. Will have the same size and type as \texttt{src1}.}\r
+\cvarg{stream}{Stream for the asynchronous version.}\r
+\end{description}\r
+\r
+\cvdefCpp{void max(const GpuMat\& src1, double src2, GpuMat\& dst);\newline\r
+void max(const GpuMat\& src1, double src2, GpuMat\& dst,\par\r
+  const Stream\& stream);}\r
+\begin{description}\r
+\cvarg{src1}{Source matrix.}\r
+\cvarg{src2}{Scalar to be compared with.}\r
+\cvarg{dst}{Destination matrix. Will have the same size and type as \texttt{src1}.}\r
+\cvarg{stream}{Stream for the asynchronous version.}\r
+\end{description}\r
+\r
+See also: \cvCppCross{max}.
\ No newline at end of file