import random
image_size = (5000,5000)
portion_size = (200, 200)
x1 = random.randint(0, image_size[0]-portion_size[0]-1)
y1 = random.randint(0, image_size[1]-portion_size[1]-1)
x2, y2 = x1+portion_size[0]-1, y1+portion_size[1]-1
# Grab the area of the image that is the rectangle defined by (x1,y1) and (x2,y2)
То, как вы делаете последний бит, зависит от того, как вы работаете с изображением.