def convert_rgb_to_y(img, dim_order='hwc'):
    """ Get Y(CbCr) value from RGB image (standard conversion)

    :param img: input image array in RGB form
    :return: array of Y values

    """

    if dim_order == 'hwc':
        return 16. + (64.738 * img[..., 0] + 129.057 * img[..., 1] + 25.064 * img[..., 2]) / 256.
    else:
        return 16. + (64.738 * img[0] + 129.057 * img[1] + 25.064 * img[2]) / 256.