miop.image_helper.geometry

Functions

get_rotation_matrix(axis, angle[, rad])

Returns a rotation matrix for given axis and angle.

sample_points_on_plane(n, d[, size, num_points])

Samples random points on a plane defined by the normal vector n and intercept d.

miop.image_helper.geometry.get_rotation_matrix(axis, angle, rad=False)[source]

Returns a rotation matrix for given axis and angle.

Parameters: - axis: A 3-element array-like specifying the axis of rotation (e.g., [1., 1., 1.]) - angle_degrees: The angle of rotation in degrees

Returns: - A 3x3 rotation matrix

miop.image_helper.geometry.sample_points_on_plane(n, d, size=500, num_points=1000)[source]

Samples random points on a plane defined by the normal vector n and intercept d.

Parameters: - n: A 3-element array representing the normalized normal vector of the plane. - d: The intercept of the plane (distance from origin along the normal). - num_points: The number of random points to sample (default: 1000)

Returns: - A (num_points, 3) array where each row is a point on the plane.