]> rtime.felk.cvut.cz Git - opencv.git/commitdiff
Proper CvConnectedComp declaration
authorjamesb <jamesb@73c94f0f-984f-4a5f-82bc-2d8db8d8ee08>
Wed, 24 Mar 2010 20:56:08 +0000 (20:56 +0000)
committerjamesb <jamesb@73c94f0f-984f-4a5f-82bc-2d8db8d8ee08>
Wed, 24 Mar 2010 20:56:08 +0000 (20:56 +0000)
git-svn-id: https://code.ros.org/svn/opencv/trunk@2900 73c94f0f-984f-4a5f-82bc-2d8db8d8ee08

opencv/doc/cv_image_transform.tex

index ff7c69cb0b2cefeae78901081ed4de2f6346c2a8..ae4e369ba925f585d2b57e0d8aee56fe08e78624 100644 (file)
@@ -386,16 +386,7 @@ In this mode the processing time is still O(N), where N is the number of
 pixels. Thus, the function provides a very fast way to compute approximate
 Voronoi diagram for the binary image.
 
-\cvCPyFunc{FloodFill}
-Fills a connected component with the given color.
-
-\cvdefC{
-void cvFloodFill(\par CvArr* image,\par CvPoint seed\_point,\par CvScalar new\_val,\par
-                  CvScalar lo\_diff=cvScalarAll(0),\par CvScalar up\_diff=cvScalarAll(0),\par
-                  CvConnectedComp* comp=NULL,\par int flags=4,\par CvArr* mask=NULL );
-
-}
-\cvdefPy{FloodFill(image,seed\_point,new\_val,lo\_diff=(0,0,0,0),up\_diff=(0,0,0,0),flags=4,mask=NULL)-> comp}
+\cvclass{CvConnectedComp}
 
 \ifC
 \begin{lstlisting}
@@ -408,18 +399,38 @@ typedef struct CvConnectedComp
                       (the contour might have child contours corresponding to the holes) */
 } CvConnectedComp;
 
-#define CV_FLOODFILL_FIXED_RANGE (1 << 16)
-#define CV_FLOODFILL_MASK_ONLY   (1 << 17)
 \end{lstlisting}
 \fi
 
+\ifPy
+Connected component, represented as a tuple (area, value, rect), where
+area is the area of the component as a float, value is the average color
+as a \cross{CvScalar}, and rect is the ROI of the component, as a \cross{CvRect}.
+\fi
+
+\cvCPyFunc{FloodFill}
+Fills a connected component with the given color.
+
+\cvdefC{
+void cvFloodFill(\par CvArr* image,\par CvPoint seed\_point,\par CvScalar new\_val,\par
+                  CvScalar lo\_diff=cvScalarAll(0),\par CvScalar up\_diff=cvScalarAll(0),\par
+                  CvConnectedComp* comp=NULL,\par int flags=4,\par CvArr* mask=NULL );
+
+}
+\cvdefPy{FloodFill(image,seed\_point,new\_val,lo\_diff=(0,0,0,0),up\_diff=(0,0,0,0),flags=4,mask=NULL)-> comp}
+
+
 \begin{description}
 \cvarg{image}{Input 1- or 3-channel, 8-bit or floating-point image. It is modified by the function unless the \texttt{CV\_FLOODFILL\_MASK\_ONLY} flag is set (see below)}
 \cvarg{seed\_point}{The starting point}
 \cvarg{new\_val}{New value of the repainted domain pixels}
 \cvarg{lo\_diff}{Maximal lower brightness/color difference between the currently observed pixel and one of its neighbors belonging to the component, or a seed pixel being added to the component. In the case of 8-bit color images it is a packed value}
 \cvarg{up\_diff}{Maximal upper brightness/color difference between the currently observed pixel and one of its neighbors belonging to the component, or a seed pixel being added to the component. In the case of 8-bit color images it is a packed value}
+\ifC % {
 \cvarg{comp}{Pointer to the structure that the function fills with the information about the repainted domain}
+\else % }{
+\cvarg{comp}{Returned connected component for the repainted domain}
+\fi % }
 \cvarg{flags}{The operation flags. Lower bits contain connectivity value, 4 (by default) or 8, used within the function. Connectivity determines which neighbors of a pixel are considered. Upper bits can be 0 or a combination of the following flags:
 \begin{description}
   \cvarg{CV\_FLOODFILL\_FIXED\_RANGE}{if set, the difference between the current pixel and seed pixel is considered, otherwise the difference between neighbor pixels is considered (the range is floating)}