colormap->greymap

Synopsis

(colormap->greymap colormap)

Parameters

  • colormap

Description

The colormap is converted to a new greymap with the same dimensions applying the formula RED * 0.299 + GREEN * 0.587 + BLUE * 0.114 to compute the grey value for each pixel.

Side Effects

Return Value

The resulting greymap is returned.

Example

> (define g (grabber-create))
g
> (define cm (grabber-grab g))
cm
> (colormap->greymap cm)
#<greymap orow:-1 ocol:-1 xres:-1 yres:-1 h:720 w:1280>
>