openalea.phenomenal.multi_view_reconstruction.multi_view_reconstruction.voxels_is_visible_in_image

openalea.phenomenal.multi_view_reconstruction.multi_view_reconstruction.voxels_is_visible_in_image(voxels_position, voxels_size, image, projection, inclusive, image_int=None)[source]
Return a numpy array containing True if the voxel are

projected is photo-consistent on image else False

Algorithm

1. Project each voxel center position on the image, if the position projected (x, y) is positive on image return True


2. If the bouding box of the voxel projected have positive value on the image the voxel are True


  1. Check if one pixel containing in the bounding box projected on image have positive value, if yes return True else return False

Parameters:
  • voxels_position (numpy.array([[x, y, z], ...]) – Center position of the voxels

  • voxels_size (float) – diameter size of the voxels

  • image (numpy.array) – Binary image where the voxels are projected.

  • projection (function (numpy.array([[x, y, z], ...]) -> numpy.array([[x, y], ...])) – Function of projection who take 1 argument (numpy.array([[x, y, z], …] of voxels positions) and return the projected 2D position numpy.array([[x, y], …])

  • inclusive (Describe if the voxels projection are out of the image,) –

  • visible (they are considered like still) –

  • image_int (Integral image of the binary image (optimization)) –

Returns:

out – Numpy array containing True if the voxel are projected is photo-consistent on image else False

Return type:

numpy.array([True, False, …])