Fills a connected component with given color.
|C#||Visual Basic||Visual C++|
Public Shared Sub cvFloodFill ( _ src As IntPtr, _ seedPoint As MCvPoint, _ newVal As MCvScalar, _ loDiff As MCvScalar, _ upDiff As MCvScalar, _ <OutAttribute> ByRef comp As MCvConnectedComp, _ flags As Integer, _ mask As IntPtr _ )
Assembly: Emgu.CV (Module: Emgu.CV) Version: 126.96.36.199 (188.8.131.52)
- 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 (MCvPoint)
- 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.
- flags (Int32)
- 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 combination of the following flags: CV_FLOODFILL_FIXED_RANGE - if set the difference between the current pixel and seed pixel is considered, otherwise difference between neighbor pixels is considered (the range is floating). CV_FLOODFILL_MASK_ONLY - if set, the function does not fill the image (new_val is ignored), but the fills mask (that must be non-NULL in this case).
- mask (IntPtr)
- Operation mask, should be singe-channel 8-bit image, 2 pixels wider and 2 pixels taller than image. If not NULL, 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).