def cb_dim_proportion(pattern_size_wh, factor=1):
    """
    Given the chessboard pattern size pattern_size_wh = (nx, ny), 
    i.e. number of corners in horizonal and vertical direction, 
    return the proportion (h, v) of the number of squares
    in horizontal and vertical direction, multiplied with 
    an optional factor. 
    """
        
    numbers_of_squares = (n_points - 1 for n_points in pattern_size_wh)
    
    return tuple(n_sq * factor for n_sq in numbers_of_squares)