openalea.phenomenal.multi_view_reconstruction.project_voxel_centers_on_image

openalea.phenomenal.multi_view_reconstruction.project_voxel_centers_on_image(voxels_position, voxels_size, shape_image, projection, value=255, dtype=<type 'numpy.uint8'>)[source]

Create a image with same shape that shape_image and project each voxel on image and write positive value (255) on it.

Parameters:
  • voxels_position (numpy.ndarray) – Voxels center position [[x, y, z], …]
  • voxels_size (float) – Diameter size of the voxels
  • shape_image (2-tuple) – Size height and length of the image target projected
  • projection (function ((x, y, z)) -> (x, y)) –
    Function of projection who take 1 argument (tuple of position (x, y, z))
    and return this position 2D (x, y)
  • value (int) – value between 0 and 255 of positive pixel. By default 255.
  • dtype (type) – numpy type of the returned image. By default numpy.uint8.
Returns:

out – Binary image

Return type:

numpy.ndarray