def detect_max_scale(annotation, wsi):
    """Detects maximum possible annotation scale for OpenCV Images

    The maximum possible annotation scale is one where the annotation image is so big it doesn't fit within the whole slide image dimensions
    
        Parameters
        ----------
        annotation : OpenCV image
        wsi : OpenCV image

        Returns
        -------
        max_scale : int 
    """
    annotation_height, annotation_width, _ = annotation.shape
    wsi_height, wsi_width, _ = wsi.shape
    max_width_scale = wsi_width/annotation_width
    max_height_scale = wsi_height/annotation_height
    return min(max_width_scale, max_height_scale)