14#include <lagrange/SurfaceMesh.h>
15#include <lagrange/image/Array3D.h>
16#include <lagrange/image/View3D.h>
18#include <Eigen/Geometry>
20namespace lagrange::texproc {
70template <
typename Scalar,
typename Index>
74 using Array3Df = image::experimental::Array3D<float>;
101 image::experimental::View3D<const float>
image,
120 span<std::pair<image::experimental::Array3D<float>, image::experimental::Array3D<float>>>
121 textures_and_weights,
122 float low_ratio_threshold);
A general purpose polygonal mesh class.
Definition SurfaceMesh.h:66
TextureRasterizer(const SurfaceMesh< Scalar, Index > &mesh, const TextureRasterizerOptions &options)
Construct a new instance of the rasterizer.
std::pair< Array3Df, Array3Df > weighted_texture_from_render(image::experimental::View3D< const float > image, const CameraOptions &options) const
Unproject a rendered image into a UV texture and confidence map.
~TextureRasterizer()
Destructor.
Smart pointer with value semantics.
Definition value_ptr.h:134
::nonstd::span< T, Extent > span
A bounds-safe view for sequences of objects.
Definition span.h:27
void filter_low_confidences(span< std::pair< image::experimental::Array3D< float >, image::experimental::Array3D< float > > > textures_and_weights, float low_ratio_threshold)
Discard low-confidence values.
Basic image data structure.
Parameters for computing the rendering of a mesh.
Definition TextureRasterizer.h:29
Eigen::Projective3f projection_transform
Camera projection transform (view space -> NDC space).
Definition TextureRasterizer.h:37
Eigen::Affine3f view_transform
Camera view transform (world space -> view space).
Definition TextureRasterizer.h:31
Options for computing the texture map and confidence from a rendering.
Definition TextureRasterizer.h:44
size_t height
Texture height.
Definition TextureRasterizer.h:61
size_t width
Texture width.
Definition TextureRasterizer.h:58
double depth_precision
Depth precision (for determining visibility).
Definition TextureRasterizer.h:55
double depth_discontinuity_threshold
Depth discontinuity threshold (in view space).
Definition TextureRasterizer.h:49
unsigned int depth_discontinuity_erosion_radius
Erosion radius (in texels).
Definition TextureRasterizer.h:46