mlx.data.Buffer.image_channel_reduction#
- Buffer.image_channel_reduction(self: mlx.data._c.Buffer, key: str, preset: str = 'default', output_key: str = '') mlx.data._c.Buffer #
Reduce an RGB image to gray-scale with various weights for red, green and blue.
Preset Name
Red weight
Green weight
Blue weight
default/rec601
0.299
0.587
0.114
rec709
0.2126
0.7152
0.0722
rec2020
0.2627
0.678
0.0593
green
0
1
0
- Parameters: