pyvale.render.blender.calibration module

Blender calibration-target configuration helpers.

class BlenderCalibrationData(angle_lims=(-10.0, 10.0), angle_step=5.0, plunge_lims=(-5.0, 5.0), plunge_step=5.0, x_limit=None, y_limit=None, max_images=None)[source]

Bases: object

Describe the pose sweep used to render a camera calibration target.

Parameters:
  • angle_lims (tuple[float, float], optional) – Inclusive lower and upper target-angle limits in degrees.

  • angle_step (float, optional) – Angular increment in degrees.

  • plunge_lims (tuple[float, float], optional) – Inclusive lower and upper target-depth limits.

  • plunge_step (float, optional) – Target-depth increment.

  • x_limit (float or None, optional) – Optional lateral target-position limits retained for calibration scene generation.

  • y_limit (float or None, optional) – Optional lateral target-position limits retained for calibration scene generation.

  • max_images (int or None, optional) – Maximum number of TIFF files to render. None renders every pose.

angle_lims
angle_step
plunge_lims
plunge_step
x_limit
y_limit
max_images
__init__(angle_lims=(-10.0, 10.0), angle_step=5.0, plunge_lims=(-5.0, 5.0), plunge_step=5.0, x_limit=None, y_limit=None, max_images=None)
class BlenderCalibrationTarget(size, image_path, millimetres_per_pixel, material=<factory>)[source]

Bases: object

A textured planar target used to generate calibration images.

Parameters:
  • size (numpy.ndarray) – Target width, height, and thickness in world units.

  • image_path (pathlib.Path) – Calibration-target texture image.

  • millimetres_per_pixel (float) – Texture resolution used by Blender UV unwrapping.

  • material (BlenderMaterial, optional) – Backend-owned material controls for the target.

size
image_path
millimetres_per_pixel
material
__init__(size, image_path, millimetres_per_pixel, material=<factory>)
calibration_image_count(data)[source]

Return the number of legacy Blender calibration-target images.

Parameters:

data (BlenderCalibrationData) – Calibration target pose-sweep configuration.

Returns:

int – Number of target poses in the historical nine-position lateral sweep.

render_calibration_images(target, cameras, config, data=None, lights=None)[source]

Render a legacy-compatible Blender calibration-target pose sweep.

Parameters:
  • target (BlenderCalibrationTarget) – Textured physical calibration target.

  • cameras (Sequence[Camera]) – Exactly two perspective cameras defining the calibration rig.

  • config (BlenderConfig) – Blender engine, image output, and sampling controls.

  • data (BlenderCalibrationData, optional) – Target translation and rotation sweep controls.

  • lights (Sequence[Light] or None, optional) – Optional scene lights. None preserves Blender’s dark default world.

Returns:

RenderResult – File-only result containing the calibration TIFF paths.

Raises:

RenderInputError – If input is invalid or the Blender backend is unavailable.