plenoptic.data.einstein#

plenoptic.data.einstein(as_gray=True)[source]#

Return an example grayscale image of Albert Einstein.

Parameters:

as_gray (bool (default: True)) – Whether to load a single grayscale channel or 3 RGB channels.

Return type:

Tensor

Returns:

image – 4d tensor of the image.

Examples

>>> import plenoptic as po
>>> einstein = po.data.einstein()
>>> einstein.shape
torch.Size([1, 1, 256, 256])
>>> po.plot.imshow(einstein)
<PyrFigure size ...>

(png, hires.png, pdf)

../../_images/plenoptic-data-einstein-1.png
>>> import plenoptic as po
>>> einstein_rgb = po.data.einstein(as_gray=False)
>>> einstein_rgb.shape
torch.Size([1, 3, 256, 256])