[![enter image description here](https://i.stack.imgur.com/0ITjm.png)](https://i.stack.imgur.com/0ITjm.png)

I have a large binary image (4k x 7k pix) from which I want to extract the entire yellow portion as a single rectangle. I tried binary erosion to even out features inside the yellow region. Then I used the `bbox` method of `skimage.regionprops` but it does not seem to work fast enough for large image with one large bbox. Do you have any suggestion?