title: OpenCV C++: Floodfill
body: <p>I got this image and I'd like to fill the upper left black area with white, but all I get is a completely white image … Any ideas what's wrong with my code?</p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>...
  cv::Rect rect;
  roi = cv::floodFill(roi, cv::Point(1,1), cv::Scalar(0), &amp;rect, cv::Scalar(0), cv::Scalar(0), 4);
  ...
  </code></pre>
  
  <p><strong>Input image:</strong><br>
  <img src="https://i.stack.imgur.com/TF2XE.jpg" alt="enter image description here"></p>