def scale_cv_figsize(im_shape, scale, max_figsize):
    """
    Scales image size for clearer display in OpenCV.
    
    Parameters
    ----------
    im_shape : 2-tuple of ints
        (number of rows, number of columns) in image to be scaled
    scale : float
        Positive factor to scale image size
    max_figsize : 2-tuple of ints
        (max number of rows, max number of columns) for image to be scaled
    
    Returns
    -------
    int : new x-dimension (number of columns)
    int : new y-dimension (number of rows)   
    """
    assert scale > 0
    return int( min(max_figsize[1], scale*im_shape[1]) ), \
           int( min(max_figsize[0], scale*im_shape[0]) )