easyidp.reconstruct.Sensor#

class easyidp.reconstruct.Sensor#

The base class of camera model

__init__()#

Methods

__init__()

in_img_boundary(polygon_hv[, ignore, log])

Judge whether given polygon is in the image area, and move points to boundary if specify ignore.

Attributes

id

the sensor id in this 3D reconstruction project, often only has one.

label

the sensor label/name, <class 'str'>

type

Sensor type in [frame, fisheye, spherical, rpc] (often for metashape project), <class 'str'>

width

The sensor width pixel number, <class 'int'>

height

The sensor height pixel number, <class 'int'>

w_mm

sensor actual width, unit is mm, <class 'float'>

h_mm

sensor actual height, unit is mm, <class 'float'>

pixel_width

the scale of one pixel width, unit in mm, <class 'float'>

pixel_height

the scale of one pixel height, unit in mm, <class 'float'>

pixel_size

the scale of one pixel, for pix4d, [pixel_height, pixel_width]

focal_length

focal length, unit in mm, <class 'float'>

calibration

sensor calibration information, easyidp.Calibration

calibration#

sensor calibration information, easyidp.Calibration

focal_length#

focal length, unit in mm, <class 'float'>

h_mm#

sensor actual height, unit is mm, <class 'float'>

height#

The sensor height pixel number, <class 'int'>

id#

the sensor id in this 3D reconstruction project, often only has one. <class 'int'>

in_img_boundary(polygon_hv, ignore=None, log=False)#

Judge whether given polygon is in the image area, and move points to boundary if specify ignore.

Parameters:
  • polygon_hv (numpy nx2 array) – [horizontal, vertical] points in pixel coordinate

  • ignore (str | None, optional) –

    Whether tolerate small parts outside image

    • None: strickly in image area;

    • x: only y (vertical) in image area, x can outside image;

    • y: only x (horizontal) in image area, y can outside image.

    Todo

    This API will be enhanced and changed in the future.

    ignore (str) -> ignore_overflow (bool):

    • True: strickly in image area, default;

    • False: cut the polygon inside the image range;

    back2raw_ignore_todo.png'

  • log (bool, optional) – whether print log for debugging, by default False

Return type:

None | polygon_hv

label#

the sensor label/name, <class 'str'>

pixel_height#

the scale of one pixel height, unit in mm, <class 'float'>

pixel_size#

the scale of one pixel, for pix4d, [pixel_height, pixel_width]

pixel_width#

the scale of one pixel width, unit in mm, <class 'float'>

type#

Sensor type in [frame, fisheye, spherical, rpc] (often for metashape project), <class 'str'>

w_mm#

sensor actual width, unit is mm, <class 'float'>

width#

The sensor width pixel number, <class 'int'>