本文整理汇总了Python中pymvg.camera_model.CameraModel.load_camera_default方法的典型用法代码示例。如果您正苦于以下问题:Python CameraModel.load_camera_default方法的具体用法?Python CameraModel.load_camera_default怎么用?Python CameraModel.load_camera_default使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pymvg.camera_model.CameraModel
的用法示例。
在下文中一共展示了CameraModel.load_camera_default方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: build_example_system
# 需要导入模块: from pymvg.camera_model import CameraModel [as 别名]
# 或者: from pymvg.camera_model.CameraModel import load_camera_default [as 别名]
def build_example_system(n=6,z=5.0):
base = CameraModel.load_camera_default()
x = np.linspace(0, 2*n, n)
theta = np.linspace(0, 2*np.pi, n)
cams = []
for i in range(n):
# cameras are spaced parallel to the x axis
center = np.array( (x[i], 0.0, z) )
# cameras are looking at +y
lookat = center + np.array( (0,1,0))
# camera up direction rotates around the y axis
up = -np.sin(theta[i]), 0, np.cos(theta[i])
cam = base.get_view_camera(center,lookat,up)
cam.name = 'theta: %.0f'%( np.degrees(theta[i]) )
cams.append(cam)
system = MultiCameraSystem(cams)
return system