title: C++ algorithm for flood filling a binary image
body: <p>I am trying to simulate a matlab function "imfill" for flood filling a binary image (2D matrix of 1's and zeros).</p>
  
  <p>I want to specify a starting point in the matrix, and flood fill like a 4 connected version of imfill would do.</p>
  
  <p>Does this already exist out there somewhere in the C++ world? If not, what would be the most efficient way to implement this?</p>