http://www.emgu.com
Fills a connected component with given color.

Namespace: Emgu.CV
Assembly: Emgu.CV (in Emgu.CV.dll) Version: 2.4.2.1777 (2.4.2.1777)

Syntax

C#
public static void cvFloodFill(
	IntPtr src,
	Point seedPoint,
	MCvScalar newVal,
	MCvScalar loDiff,
	MCvScalar upDiff,
	out MCvConnectedComp comp,
	CONNECTIVITY connectivity,
	FLOODFILL_FLAG flags,
	IntPtr mask
)
Visual Basic
Public Shared Sub cvFloodFill ( _
	src As IntPtr, _
	seedPoint As Point, _
	newVal As MCvScalar, _
	loDiff As MCvScalar, _
	upDiff As MCvScalar, _
	<OutAttribute> ByRef comp As MCvConnectedComp, _
	connectivity As CONNECTIVITY, _
	flags As FLOODFILL_FLAG, _
	mask As IntPtr _
)
Visual C++
public:
static void cvFloodFill(
	IntPtr src, 
	Point seedPoint, 
	MCvScalar newVal, 
	MCvScalar loDiff, 
	MCvScalar upDiff, 
	[OutAttribute] MCvConnectedComp% comp, 
	CONNECTIVITY connectivity, 
	FLOODFILL_FLAG flags, 
	IntPtr mask
)

Parameters

src
Type: System..::..IntPtr
Input 1- or 3-channel, 8-bit or floating-point image. It is modified by the function unless CV_FLOODFILL_MASK_ONLY flag is set.
seedPoint
Type: System.Drawing..::..Point
The starting point.
newVal
Type: Emgu.CV.Structure..::..MCvScalar
New value of repainted domain pixels.
loDiff
Type: Emgu.CV.Structure..::..MCvScalar
Maximal lower brightness/color difference between the currently observed pixel and one of its neighbor belong to the component or seed pixel to add the pixel to component. In case of 8-bit color images it is packed value.
upDiff
Type: Emgu.CV.Structure..::..MCvScalar
Maximal upper brightness/color difference between the currently observed pixel and one of its neighbor belong to the component or seed pixel to add the pixel to component. In case of 8-bit color images it is packed value.
comp
Type: Emgu.CV.Structure..::..MCvConnectedComp%
Pointer to structure the function fills with the information about the repainted domain.
connectivity
Type: Emgu.CV.CvEnum..::..CONNECTIVITY
The connectivity of flood fill
flags
Type: Emgu.CV.CvEnum..::..FLOODFILL_FLAG
The flood fill types
mask
Type: System..::..IntPtr
Operation mask, should be singe-channel 8-bit image, 2 pixels wider and 2 pixels taller than image. If not IntPtr.Zero, the function uses and updates the mask, so user takes responsibility of initializing mask content. Floodfilling can't go across non-zero pixels in the mask, for example, an edge detector output can be used as a mask to stop filling at edges. Or it is possible to use the same mask in multiple calls to the function to make sure the filled area do not overlap. Note: because mask is larger than the filled image, pixel in mask that corresponds to (x,y) pixel in image will have coordinates (x+1,y+1).

See Also