def compute_obji(testBB, gtBB):
    """ Compute the OBJI measurement. """
    inter_rect = testBB.intersection_region(gtBB)
    inter_area = inter_rect.area()
    max_area = max(testBB.area(), gtBB.area())
    return float(inter_area) / max_area