14#include <lagrange/CameraTransforms.h>
15#include <lagrange/SurfaceMesh.h>
16#include <lagrange/image/Array3D.h>
17#include <lagrange/image/View3D.h>
19namespace lagrange::texproc {
54template <
typename Scalar,
typename Index>
58 using Array3Df = image::experimental::Array3D<float>;
85 image::experimental::View3D<const float>
image,
104 span<std::pair<image::experimental::Array3D<float>, image::experimental::Array3D<float>>>
105 textures_and_weights,
106 float low_ratio_threshold);
A general purpose polygonal mesh class.
Definition SurfaceMesh.h:73
std::pair< Array3Df, Array3Df > weighted_texture_from_render(image::experimental::View3D< const float > image, const CameraTransforms &transforms) const
Unproject a rendered image into a UV texture and confidence map.
TextureRasterizer(const SurfaceMesh< Scalar, Index > &mesh, const TextureRasterizerOptions &options)
Construct a new instance of the rasterizer.
~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.
Options for computing the texture map and confidence from a rendering.
Definition TextureRasterizer.h:28
size_t height
Texture height.
Definition TextureRasterizer.h:45
size_t width
Texture width.
Definition TextureRasterizer.h:42
double depth_precision
Depth precision (for determining visibility).
Definition TextureRasterizer.h:39
double depth_discontinuity_threshold
Depth discontinuity threshold (in view space).
Definition TextureRasterizer.h:33
unsigned int depth_discontinuity_erosion_radius
Erosion radius (in texels).
Definition TextureRasterizer.h:30