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¶
- 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¶
- 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¶
- 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¶
- 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¶
- 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¶
- 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¶
RGB Images¶
- class huira.Image_rgb_f32¶
- __init__(*args, **kwargs)¶
Overloaded function.
__init__(self: huira._huira.Image_rgb_f32) -> None
__init__(self: huira._huira.Image_rgb_f32, width: int, height: int) -> None
__init__(self: huira._huira.Image_rgb_f32, width: int, height: int, fill_value: glm::vec<3, float, (glm::qualifier)0>) -> None
__init__(self: huira._huira.Image_rgb_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_rgb_f32) None¶
- property empty¶
- fill(self: huira._huira.Image_rgb_f32, value: glm::vec<3, float, (glm::qualifier)0>) None¶
- property height¶
- property resolution¶
- property sensor_bit_depth¶
- property shape¶
- to_numpy(self: huira._huira.Image_rgb_f32) numpy.ndarray[numpy.float32]¶
Return image data as a numpy array (always copies).
- property width¶
- class huira.Image_rgb_f64¶
- __init__(*args, **kwargs)¶
Overloaded function.
__init__(self: huira._huira.Image_rgb_f64) -> None
__init__(self: huira._huira.Image_rgb_f64, width: int, height: int) -> None
__init__(self: huira._huira.Image_rgb_f64, width: int, height: int, fill_value: huira._huira.Vec3) -> None
__init__(self: huira._huira.Image_rgb_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_rgb_f64) None¶
- property empty¶
- fill(self: huira._huira.Image_rgb_f64, value: huira._huira.Vec3) None¶
- property height¶
- property resolution¶
- property sensor_bit_depth¶
- property shape¶
- to_numpy(self: huira._huira.Image_rgb_f64) numpy.ndarray[numpy.float64]¶
Return image data as a numpy array (always copies).
- property width¶
Image I/O¶
- huira.read_png_f32(filepath: str) tuple¶
Read a PNG into (Image_f32, Image_f32 alpha).
- huira.read_png_u8(filepath: str) tuple¶
Read a PNG into (Image_u8, Image_f32 alpha).
- huira.read_png_u16(filepath: str) tuple¶
Read a PNG into (Image_u16, Image_f32 alpha).
- 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._huira.Image_u8, bit_depth: int = 8) -> None
write_png(filepath: str, image: huira._huira.Image_u16, bit_depth: int = 16) -> None
write_png(filepath: str, image: huira._huira.Image_rgb_f32, bit_depth: int = 8) -> None
write_png(filepath: str, image: huira._huira.Image_f32, alpha: huira._huira.Image_f32, bit_depth: int = 8) -> None
- huira.read_fits(filepath: str) tuple¶
Read a FITS file into (Image_f32, FitsMetadata).
- huira.write_fits(filepath: str, image: huira._huira.Image_f32, bit_depth: int = -32, metadata: huira._huira.FitsMetadata = FitsMetadata(custom_keywords=0)) None¶
Write an Image_f32 to a FITS file.