extended Sobel & Scharr description (ticket #1555). Added CV_32F/CV_64F format combin...
authorVadim Pisarevsky <no@email>
Tue, 10 Apr 2012 20:25:22 +0000 (20:25 +0000)
committerVadim Pisarevsky <no@email>
Tue, 10 Apr 2012 20:25:22 +0000 (20:25 +0000)
modules/imgproc/doc/filtering.rst
modules/imgproc/src/filter.cpp

index 8b7cbd3..6ef7161 100644 (file)
@@ -1497,7 +1497,13 @@ Calculates the first, second, third, or mixed image derivatives using an extende
 
     :param dst: Destination image of the same size and the same number of channels as  ``src`` .
     
-    :param ddepth: Destination image depth.
+    :param ddepth: Destination image depth. The following combination of ``src.depth()`` and ``ddepth`` are supported:
+         * ``src.depth()`` = ``CV_8U``, ``ddepth`` = -1/``CV_16S``/``CV_32F``/``CV_64F``
+         * ``src.depth()`` = ``CV_16U``/``CV_16S``, ``ddepth`` = -1/``CV_32F``/``CV_64F``
+         * ``src.depth()`` = ``CV_32F``, ``ddepth`` = -1/``CV_32F``/``CV_64F``
+         * ``src.depth()`` = ``CV_64F``, ``ddepth`` = -1/``CV_64F``
+        
+        when ``ddepth=-1``, the destination image will have the same depth as the source. In the case of 8-bit input images it will result in truncated derivatives.
 
     :param xorder: Order of the derivative x.
 
@@ -1572,9 +1578,9 @@ Calculates the first x- or y- image derivative using Scharr operator.
 
     :param src: Source image.
 
-    :param dst: Destination image of the same size and the same number of channels as  ``src`` .
+    :param dst: Destination image of the same size and the same number of channels as ``src``.
     
-    :param ddepth: Destination image depth.
+    :param ddepth: Destination image depth. See :ocv:func:`Sobel` for the list of supported combination of ``src.depth()`` and ``ddepth``.
 
     :param xorder: Order of the derivative x.
 
@@ -1582,7 +1588,7 @@ Calculates the first x- or y- image derivative using Scharr operator.
 
     :param scale: Optional scale factor for the computed derivative values. By default, no scaling is applied. See  :ocv:func:`getDerivKernels` for details.
 
-    :param delta: Optional delta value that is added to the results prior to storing them in  ``dst`` .
+    :param delta: Optional delta value that is added to the results prior to storing them in  ``dst``.
     
     :param borderType: Pixel extrapolation method. See  :ocv:func:`borderInterpolate` for details.
     
index efe552a..a23e862 100644 (file)
@@ -2804,6 +2804,8 @@ cv::Ptr<cv::BaseRowFilter> cv::getLinearRowFilter( int srcType, int bufType,
     if( sdepth == CV_32F && ddepth == CV_32F )
         return Ptr<BaseRowFilter>(new RowFilter<float, float, RowVec_32f>
             (kernel, anchor, RowVec_32f(kernel)));
+    if( sdepth == CV_32F && ddepth == CV_64F )
+        return Ptr<BaseRowFilter>(new RowFilter<float, double, RowNoVec>(kernel, anchor));
     if( sdepth == CV_64F && ddepth == CV_64F )
         return Ptr<BaseRowFilter>(new RowFilter<double, double, RowNoVec>(kernel, anchor));