OpenCV  3.4.4
Open Source Computer Vision
samples/cpp/ffilldemo.cpp

An example using the FloodFill technique