skimage 0.17.2

NotesParametersRaisesReturnsBackRef
rgb2gray(rgb)

Notes

The weights used in this conversion are calibrated for contemporary CRT phosphors:

Y = 0.2125 R + 0.7154 G + 0.0721 B

If there is an alpha channel present, it is ignored.

Parameters

rgb : (..., 3) array_like

The image in RGB format. Final dimension denotes channels.

Raises

ValueError

If :None:None:`rgb` is not at least 2-D with shape (..., 3).

Returns

out : ndarray

The luminance image - an array which is the same size as the input array, but with the channel dimension removed.

Compute luminance of an RGB image.

Examples

This example is valid syntax, but we were not able to check execution
>>> from skimage.color import rgb2gray
... from skimage import data
... img = data.astronaut()
... img_gray = rgb2gray(img)
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

skimage.restoration.j_invariant.calibrate_denoiser skimage.restoration.deconvolution.unsupervised_wiener skimage.color.colorconv.rgb2gray skimage.restoration.deconvolution.richardson_lucy skimage.restoration.deconvolution.wiener skimage.restoration._denoise.denoise_tv_chambolle skimage.feature.censure.CENSURE skimage.restoration._denoise.denoise_wavelet

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /skimage/color/colorconv.py#753
type: <class 'function'>
Commit: