tfg.io.exr.channels_to_ndarray
Copies channels from an OpenEXR.InputFile into a numpy array.
tfg.io.exr.channels_to_ndarray(
exr, channel_names
)
If the EXR image is of size (width, height), the result will be a numpy array
of shape (height, width, len(channel_names)), where the last dimension holds
the channels in the order they were specified in channel_names. The requested
channels must all have the same datatype.
Args |
exr
|
An OpenEXR.InputFile that is already open.
|
channel_names
|
A list of strings naming the channels to read.
|
Raises |
ValueError
|
If the channels have different datatypes.
|
RuntimeError
|
If a channel has an unknown type.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-10-28 UTC.
[null,null,["Last updated 2022-10-28 UTC."],[],[]]