def get_mean_value(img):
    """
    求图像分均值
    :param img:
    :return: 平均值
    """
    y, x = img.shape[:2]
    sum_value = 0
    for _x in range(0, x, 1):
        # temp_value = 0
        for _y in range(0, y, 1):
            sum_value += img[_y][_x]

    return sum_value / (x * y)