pulse2percept.stimuli.samples.ucsb_bike
- pulse2percept.stimuli.samples.ucsb_bike(resize=None, electrodes=None, metadata=None, as_gray=False)[source]
UCSB bike path photograph
Load a 600x900x3 RGB photograph of a cyclist, a pedestrian, a crosswalk, and a stop sign on the UCSB campus.
The photograph is made available by its copyright holder under the same BSD 3-Clause license as pulse2percept;
metadatacarries a short form of that.Added in version 0.11.0.
- Parameters:
resize (
(height, width)or None, optional) – A tuple specifying the desired height and the width of the image stimulus.electrodes (int, string or list thereof; optional) –
Optionally, you can provide your own electrode names. If none are given, each pixel is named after its place in the image: a letter for the row, a number for the column, and a suffix for the color channel (e.g. ‘A1’, ‘C12’, ‘A1_R’).
Note
The number of electrode names provided must match the number of pixels in the (resized) image.
metadata (dict, optional) – Additional stimulus metadata can be stored in a dictionary. Keys given here override the attribution defaults above.
as_gray (bool, optional) – Flag whether to convert the image to grayscale.
- Returns:
stim
- Return type:
Examples
>>> from pulse2percept.stimuli import samples >>> samples.ucsb_bike().img_shape (600, 900, 3)