def image_proc_desaturate( image ):
    """
    Desaturate the image.

    The function uses Rec. 709 luma component factors:  
    OUT = 0.2989 R + 0.587 G + 0.114 B
    """
    output_image = []
    for row in image:
        output_row = []
        for pixel in row:
            output_row.append( 0.2989 * pixel[0] + 0.587 * pixel[1] + 0.114 * pixel[2] )
        output_image.append( output_row )
    return output_image