easyidp.reconstruct.Sensor

class easyidp.reconstruct.Sensor

相机模型的基类

__init__()

Methods

__init__()

in_img_boundary(polygon_hv[, ignore, log])

判断给定的多边形是否在图像区域内,如果指定忽略,则将点移动到边界。

Attributes

id

此3D重建项目中的传感器ID,通常只有一个。

label

传感器标签/名称,<class 'str'>

type

传感器类型在[frame, fisheye, spherical, rpc]中(通常用于metashape项目),<class 'str'>

width

传感器宽度像素数,<class 'int'>

height

传感器高度像素数,<class 'int'>

w_mm

传感器实际宽度,单位为毫米,<class 'float'>

h_mm

传感器实际高度,单位为毫米,<class 'float'>

pixel_width

一个像素宽度的比例,单位为毫米,<class 'float'>

pixel_height

一个像素高度的比例,单位为毫米,<class 'float'>

pixel_size

一个像素的比例,对于pix4d,[pixel_height, pixel_width]

focal_length

焦距,单位为毫米,<class 'float'>

calibration

传感器校准信息,easyidp.Calibration

calibration

传感器校准信息,easyidp.Calibration

focal_length

焦距,单位为毫米,<class 'float'>

h_mm

传感器实际高度,单位为毫米,<class 'float'>

height

传感器高度像素数,<class 'int'>

id

此3D重建项目中的传感器ID,通常只有一个。 <class 'int'>

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

判断给定的多边形是否在图像区域内,如果指定忽略,则将点移动到边界。

参数:
  • polygon_hv (numpy nx2 array) -- [水平,垂直] 像素坐标中的点

  • ignore (str | None, optional) --

    是否容忍图像外的小部分

    • None:严格在图像区域内;

    • x:仅y(垂直)在图像区域内,x可以在图像外;

    • y:仅x(水平)在图像区域内,y可以在图像外。

    待处理

    此API将在未来增强和更改。

    ignore (str) -> ignore_overflow (bool):

    • True:严格在图像区域内,默认值;

    • False:在图像范围内裁剪多边形;

    back2raw_ignore_todo.png'

  • log (bool, optional) -- 是否打印日志以进行调试,默认值为False

返回类型:

None | polygon_hv

label

传感器标签/名称,<class 'str'>

pixel_height

一个像素高度的比例,单位为毫米,<class 'float'>

pixel_size

一个像素的比例,对于pix4d,[pixel_height, pixel_width]

pixel_width

一个像素宽度的比例,单位为毫米,<class 'float'>

type

传感器类型在[frame, fisheye, spherical, rpc]中(通常用于metashape项目),<class 'str'>

w_mm

传感器实际宽度,单位为毫米,<class 'float'>

width

传感器宽度像素数,<class 'int'>