I read an image with ndimage, which results in a binary image like this:
If your image is represented with non-negative floating point values topping out at 1.0, you can use 1 - close_image
1 - close_image