Hi Zach,
Since this code uses flood fill segmentation, the necessary time to process an image can increase exponentially with the resolution.
However, do you really need to process the image in the original resolution? It only makes sense to process an image in 2000x2000 if you can't keep the image features in a lower resolution.
This same robocup example was implemented in javascript (interpreted script language with a lower performance). In this case the image was scaled down to 180 pixels width and the result is the same:
Try, for instance, to process your image in 400 pixels width. After loading the image, scale it down as follows:
scale(image.clone(), image,400);
After obtaining the segments or blobs you can scale them up to the original resolution (2000x2000) simply multiplying the coordinates by 5. (400x400 * 5 = 2000x2000)