Fills a connected component with given color.

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

Syntax

         
 C#  Visual Basic  Visual 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
)
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 _
)
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
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
Point
The starting point.
newVal
MCvScalar
New value of repainted domain pixels.
loDiff
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
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
MCvConnectedComp%
Pointer to structure the function fills with the information about the repainted domain.
connectivity
CONNECTIVITY
The connectivity of flood fill
flags
FLOODFILL_FLAG
The flood fill types
mask
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