Pixel Convention¶
See Pixel Coordinate Conventions for what the conventions mean and when to change them.
- class huira.PixelConvention¶
The pixel coordinate convention a camera’s users work in: what the principal point (cx, cy) passed to a camera, and the positions it projects to, mean.
Presets: opencv() (the default; first pixel centered at (0, 0), y down), colmap() (first pixel centered at (0.5, 0.5), y down; Huira before v0.9.10), matlab() (first pixel centered at (1, 1), y down) and fits() (first pixel centered at (1, 1), y up from the bottom row, as for FITS WCS keywords such as CRPIX).
The convention never changes the rendered image when the principal point is left at its default, the center of the sensor.
- __init__(*args, **kwargs)¶
Overloaded function.
__init__(self: huira._huira.PixelConvention) -> None
The default convention, PixelConvention.opencv().
__init__(self: huira._huira.PixelConvention, center: huira._huira.PixelCenter, origin: huira._huira.PixelOrigin = <PixelOrigin.TopLeft: 0>) -> None
- property center¶
- static colmap() huira._huira.PixelConvention¶
First pixel centered at (0.5, 0.5), y down: pixel edges at integers.
- static fits() huira._huira.PixelConvention¶
First pixel centered at (1, 1), y up from the bottom row.
- static matlab() huira._huira.PixelConvention¶
First pixel centered at (1, 1), y down.
- static opencv() huira._huira.PixelConvention¶
First pixel centered at (0, 0), y down. The default.
- property origin¶
- class huira.PixelCenter¶
Which coordinate the center of the first pixel has.
Members:
Integer : Pixel centers at integers, the first at 0: pixel i covers [i - 0.5, i + 0.5).
HalfInteger : Pixel edges at integers, so the first pixel’s center is at 0.5: pixel i covers [i, i + 1).
OneBased : Pixel centers at integers, the first at 1.
- HalfInteger = <PixelCenter.HalfInteger: 1>¶
- Integer = <PixelCenter.Integer: 0>¶
- OneBased = <PixelCenter.OneBased: 2>¶
- __init__(self: huira._huira.PixelCenter, value: int) None¶
- property name¶
- property value¶
- class huira.PixelOrigin¶
Which corner of the image pixel coordinates count from. x always runs left to right; images are always stored top row first.
Members:
TopLeft : y runs down from the top row.
BottomLeft : y runs up from the bottom row.
- BottomLeft = <PixelOrigin.BottomLeft: 1>¶
- TopLeft = <PixelOrigin.TopLeft: 0>¶
- __init__(self: huira._huira.PixelOrigin, value: int) None¶
- property name¶
- property value¶