Image¶
Scalar Images¶
- class huira.Image_f32¶
- __init__(*args, **kwargs)¶
Overloaded function.
__init__(self: huira._huira.Image_f32) -> None
__init__(self: huira._huira.Image_f32, width: int, height: int) -> None
__init__(self: huira._huira.Image_f32, width: int, height: int, fill_value: float) -> None
__init__(self: huira._huira.Image_f32, array: numpy.ndarray[numpy.float32]) -> None
Construct from a numpy array. Single-channel: (H, W). Multi-channel: (H, W, C).
- property channels¶
- clear(self: huira._huira.Image_f32) None¶
- property empty¶
- fill(self: huira._huira.Image_f32, value: float) None¶
- get_channel(self: huira._huira.Image_f32, channel: int) huira._huira.Image_f32¶
Extract a single channel as an Image_f32 (0-indexed).
- property height¶
- property resolution¶
- property sensor_bit_depth¶
- property shape¶
- to_numpy(self: huira._huira.Image_f32) numpy.ndarray[numpy.float32]¶
Return image data as a numpy array (always copies).
- property width¶
- class huira.Image_f64¶
- __init__(*args, **kwargs)¶
Overloaded function.
__init__(self: huira._huira.Image_f64) -> None
__init__(self: huira._huira.Image_f64, width: int, height: int) -> None
__init__(self: huira._huira.Image_f64, width: int, height: int, fill_value: float) -> None
__init__(self: huira._huira.Image_f64, array: numpy.ndarray[numpy.float64]) -> None
Construct from a numpy array. Single-channel: (H, W). Multi-channel: (H, W, C).
- property channels¶
- clear(self: huira._huira.Image_f64) None¶
- property empty¶
- fill(self: huira._huira.Image_f64, value: float) None¶
- get_channel(self: huira._huira.Image_f64, channel: int) huira._huira.Image_f32¶
Extract a single channel as an Image_f32 (0-indexed).
- property height¶
- property resolution¶
- property sensor_bit_depth¶
- property shape¶
- to_numpy(self: huira._huira.Image_f64) numpy.ndarray[numpy.float64]¶
Return image data as a numpy array (always copies).
- property width¶
- class huira.Image_u8¶
- __init__(*args, **kwargs)¶
Overloaded function.
__init__(self: huira._huira.Image_u8) -> None
__init__(self: huira._huira.Image_u8, width: int, height: int) -> None
__init__(self: huira._huira.Image_u8, width: int, height: int, fill_value: int) -> None
__init__(self: huira._huira.Image_u8, array: numpy.ndarray[numpy.uint8]) -> None
Construct from a numpy array. Single-channel: (H, W). Multi-channel: (H, W, C).
- property channels¶
- clear(self: huira._huira.Image_u8) None¶
- property empty¶
- fill(self: huira._huira.Image_u8, value: int) None¶
- get_channel(self: huira._huira.Image_u8, channel: int) huira._huira.Image_f32¶
Extract a single channel as an Image_f32 (0-indexed).
- property height¶
- property resolution¶
- property sensor_bit_depth¶
- property shape¶
- to_numpy(self: huira._huira.Image_u8) numpy.ndarray[numpy.uint8]¶
Return image data as a numpy array (always copies).
- property width¶
- class huira.Image_u16¶
- __init__(*args, **kwargs)¶
Overloaded function.
__init__(self: huira._huira.Image_u16) -> None
__init__(self: huira._huira.Image_u16, width: int, height: int) -> None
__init__(self: huira._huira.Image_u16, width: int, height: int, fill_value: int) -> None
__init__(self: huira._huira.Image_u16, array: numpy.ndarray[numpy.uint16]) -> None
Construct from a numpy array. Single-channel: (H, W). Multi-channel: (H, W, C).
- property channels¶
- clear(self: huira._huira.Image_u16) None¶
- property empty¶
- fill(self: huira._huira.Image_u16, value: int) None¶
- get_channel(self: huira._huira.Image_u16, channel: int) huira._huira.Image_f32¶
Extract a single channel as an Image_f32 (0-indexed).
- property height¶
- property resolution¶
- property sensor_bit_depth¶
- property shape¶
- to_numpy(self: huira._huira.Image_u16) numpy.ndarray[numpy.uint16]¶
Return image data as a numpy array (always copies).
- property width¶
- class huira.Image_u32¶
- __init__(*args, **kwargs)¶
Overloaded function.
__init__(self: huira._huira.Image_u32) -> None
__init__(self: huira._huira.Image_u32, width: int, height: int) -> None
__init__(self: huira._huira.Image_u32, width: int, height: int, fill_value: int) -> None
__init__(self: huira._huira.Image_u32, array: numpy.ndarray[numpy.uint32]) -> None
Construct from a numpy array. Single-channel: (H, W). Multi-channel: (H, W, C).
- property channels¶
- clear(self: huira._huira.Image_u32) None¶
- property empty¶
- fill(self: huira._huira.Image_u32, value: int) None¶
- get_channel(self: huira._huira.Image_u32, channel: int) huira._huira.Image_f32¶
Extract a single channel as an Image_f32 (0-indexed).
- property height¶
- property resolution¶
- property sensor_bit_depth¶
- property shape¶
- to_numpy(self: huira._huira.Image_u32) numpy.ndarray[numpy.uint32]¶
Return image data as a numpy array (always copies).
- property width¶
- class huira.Image_u64¶
- __init__(*args, **kwargs)¶
Overloaded function.
__init__(self: huira._huira.Image_u64) -> None
__init__(self: huira._huira.Image_u64, width: int, height: int) -> None
__init__(self: huira._huira.Image_u64, width: int, height: int, fill_value: int) -> None
__init__(self: huira._huira.Image_u64, array: numpy.ndarray[numpy.uint64]) -> None
Construct from a numpy array. Single-channel: (H, W). Multi-channel: (H, W, C).
- property channels¶
- clear(self: huira._huira.Image_u64) None¶
- property empty¶
- fill(self: huira._huira.Image_u64, value: int) None¶
- get_channel(self: huira._huira.Image_u64, channel: int) huira._huira.Image_f32¶
Extract a single channel as an Image_f32 (0-indexed).
- property height¶
- property resolution¶
- property sensor_bit_depth¶
- property shape¶
- to_numpy(self: huira._huira.Image_u64) numpy.ndarray[numpy.uint64]¶
Return image data as a numpy array (always copies).
- property width¶
Image I/O¶
- huira.read_png(filepath: str) tuple¶
Read a PNG as an RGB image
- huira.read_png_mono(filepath: str) tuple¶
Read a PNG as a mono image
- huira.write_png(*args, **kwargs)¶
Overloaded function.
write_png(filepath: str, image: huira._huira.Image_f32, bit_depth: int = 8) -> None
write_png(filepath: str, image: huira::Image<huira::SpectralBins<3ul, 600, 750, 500, 600, 380, 500> >, bit_depth: int = 8) -> None
write_png(filepath: str, image: huira._huira.Image_f32, alpha: huira._huira.Image_f32, bit_depth: int = 8) -> None
write_png(filepath: str, image: huira::Image<huira::SpectralBins<3ul, 600, 750, 500, 600, 380, 500> >, alpha: huira._huira.Image_f32, bit_depth: int = 8) -> None
- huira.read_jpeg(filepath: str) huira::Image<huira::SpectralBins<3ul, 600, 750, 500, 600, 380, 500> >¶
Read a JPEG as an RGB image
- huira.read_jpeg_mono(filepath: str) huira._huira.Image_f32¶
Read a JPEG as a mono image
- huira.write_jpeg(*args, **kwargs)¶
Overloaded function.
write_jpeg(filepath: str, image: huira._huira.Image_f32, quality: int = 95) -> None
write_jpeg(filepath: str, image: huira::Image<huira::SpectralBins<3ul, 600, 750, 500, 600, 380, 500> >, quality: int = 95) -> None