Using latest v2 of OpenCVSharp (2.4.10.201...), which I installed in my project with the NuGet manager.
It seems the floodfill function has a memory-corruption issue. I am applying it to the following image:
while the mask produced follows the same corruption pattern:
The code I use is:
filledArea = new CvMat( hue.Rows + 2, hue.Cols + 2, MatrixType.U8C1 );
Cv.FloodFill( hue, hintPos, new CvScalar(255,255,255), low, upp, out filledAreaData,
FloodFillFlag.Link8 | FloodFillFlag.FixedRange, filledArea );
where hue is the input image
hintPos is CvPoint(10,400)
low = upp = CvScalar(10,10,10,10)
Note: the "corruption pattern" is random and changes every time.