title: OpenCV - How to use floodFill with RGB image?
body: <p>I am trying to use <code>floodFill</code> on an image like below to extract the sky:</p>
  <p><a href="https://i.stack.imgur.com/bFhJ2.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bFhJ2.jpg" alt="enter image description here" /></a></p>
  <p>But even when I set the <code>loDiff=Scalar(0,0,0)</code> and <code>upDiff=Scalar(255,255,255)</code> the result is just showing the seed point and does not grow larger (the green dot):</p>
  <p><a href="https://i.stack.imgur.com/XbF16.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XbF16.png" alt="enter image description here" /></a></p>
  <h3>code:</h3>
  <pre class="lang-c prettyprint-override"><code>Mat flood;
  Point seed = Point(180, 80);
  flood = imread(&quot;D:/Project/data/1.jpeg&quot;);
  cv::floodFill(flood, seed, Scalar(0, 0, 255), NULL, Scalar(0, 0, 0), Scalar(255, 255, 255));
  circle(flood, seed, 2, Scalar(0, 255, 0), CV_FILLED, CV_AA);
  </code></pre>
  <p>This is the result (red dot is the seed):</p>
  <p><a href="https://i.stack.imgur.com/PSnyR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PSnyR.png" alt="enter image description here" /></a></p>
  <p>How can I set the function to get a larger area (like the whole sky)?</p>