blenderproc.python.sampler.UniformSO3 module
Uniformly samples rotations from SO(3). Allows to limit the rotation around Blender World coordinate axes.
- class blenderproc.python.sampler.UniformSO3._UniformSO3[source]
Bases:
object
- static random_quaternion(rand=None)[source]
Return uniform random unit quaternion.
https://github.com/thodan/bop_toolkit/blob/master/bop_toolkit_lib/transform.py
- Parameters:
rand (
Union
[List
[float
],ndarray
,None
]) – Three independent random variables that are uniformly distributed between 0 and 1.- Return type:
ndarray
- Returns:
Unit quaternion.
- blenderproc.python.sampler.UniformSO3.uniformSO3(around_x=True, around_y=True, around_z=True)[source]
Uniformly samples rotations from SO(3). Allows to limit the rotation around Blender World coordinate axes.
- Parameters:
around_x (
bool
) – Whether to rotate around X-axis.around_y (
bool
) – Whether to rotate around Y-axis.around_z (
bool
) – Whether to rotate around Z-axis.
- Return type:
ndarray
- Returns:
Sampled rotation in euler angles.