Itseez/opencv — pull request #828 by tim36272 (2013-04-17 07:36:07+00:00)
Title: Clarify floodfill documentation

The documentation for floodfill shows there is an option to modify just a mask, but does not indicate how to set the value to fill the mask with. The documentation makes it seem like the Scalar newVal is used in some cases, and not in others, but never explicitly indicates what is used in the "others" case.
The function actually decodes the value from bits 8-16 bits of the flags, so for instance if you wanted to set values in the mask to 255 then you'd set flags = (255 << 8).
Especially for programmers who aren't aware that << can be used with things other than insertion this is very confusing.

I clarified what value floodfill sets pixels in the mask to when FOODFILL_MASK_ONLY is set.