本文整理汇总了Python中menpo.transform.Rotation.init_identity方法的典型用法代码示例。如果您正苦于以下问题:Python Rotation.init_identity方法的具体用法?Python Rotation.init_identity怎么用?Python Rotation.init_identity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类menpo.transform.Rotation
的用法示例。
在下文中一共展示了Rotation.init_identity方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: fit_from_camera
# 需要导入模块: from menpo.transform import Rotation [as 别名]
# 或者: from menpo.transform.Rotation import init_identity [as 别名]
def fit_from_camera(self, image, camera, instance=None, gt_mesh=None,
max_iters=50, camera_update=False,
focal_length_update=False, shape_prior_weight=1.,
texture_prior_weight=1., return_costs=False):
# Execute multi-scale fitting
algorithm_results = self._fit(
image, camera, instance=instance, gt_mesh=gt_mesh,
max_iters=max_iters, camera_update=camera_update,
focal_length_update=focal_length_update,
reconstruction_weight=1.,
shape_prior_weight=shape_prior_weight,
texture_prior_weight=texture_prior_weight,
landmarks_prior_weight=None, landmarks=None,
return_costs=return_costs)
# Return multi-scale fitting result
return self._fitter_result(
image=image, algorithm_results=algorithm_results,
affine_transform=Rotation.init_identity(n_dims=2),
gt_mesh=gt_mesh)
示例2: test_rotation2d_as_vector_raises_notimplementederror
# 需要导入模块: from menpo.transform import Rotation [as 别名]
# 或者: from menpo.transform.Rotation import init_identity [as 别名]
def test_rotation2d_as_vector_raises_notimplementederror():
with raises(NotImplementedError):
Rotation.init_identity(2).as_vector()
示例3: test_rotation2d_from_vector_raises_notimplementederror
# 需要导入模块: from menpo.transform import Rotation [as 别名]
# 或者: from menpo.transform.Rotation import init_identity [as 别名]
def test_rotation2d_from_vector_raises_notimplementederror():
Rotation.init_identity(2).from_vector(0)
示例4: init_from_image_shape_and_vector
# 需要导入模块: from menpo.transform import Rotation [as 别名]
# 或者: from menpo.transform.Rotation import init_identity [as 别名]
def init_from_image_shape_and_vector(cls, image_shape, vector):
r = Rotation.init_identity(n_dims=3)
t = Translation.init_identity(n_dims=3)
p = PerspectiveProjection(focal_length=1, image_shape=image_shape)
return cls(r, t, p).from_vector(vector)
示例5: test_3d_rotation_n_parameters
# 需要导入模块: from menpo.transform import Rotation [as 别名]
# 或者: from menpo.transform.Rotation import init_identity [as 别名]
def test_3d_rotation_n_parameters():
assert Rotation.init_identity(3).n_parameters == 4
示例6: test_rotation3d_identity
# 需要导入模块: from menpo.transform import Rotation [as 别名]
# 或者: from menpo.transform.Rotation import init_identity [as 别名]
def test_rotation3d_identity():
assert_allclose(Rotation.init_identity(3).h_matrix, np.eye(4))
示例7: test_rotation3d_as_vector_raises_notimplementederror
# 需要导入模块: from menpo.transform import Rotation [as 别名]
# 或者: from menpo.transform.Rotation import init_identity [as 别名]
def test_rotation3d_as_vector_raises_notimplementederror():
Rotation.init_identity(3).as_vector()