Lagrange
Loading...
Searching...
No Matches
Texproc Module

Texture-space processing utilities. More...

Classes

struct  DilationOptions
 Options for geodesic texture dilation and position map computation. More...
 
struct  CompositingOptions
 Options for texture compositing. More...
 
struct  ConstWeightedTextureView< ValueType >
 A view of a texture with weights associated with each texel. More...
 
struct  FilteringOptions
 Options for texture filtering (smoothing or sharpening). More...
 
struct  StitchingOptions
 Options for texture stitching. More...
 
struct  CameraOptions
 Parameters for computing the rendering of a mesh. More...
 
struct  TextureRasterizerOptions
 Options for computing the texture map and confidence from a rendering. More...
 
class  TextureRasterizer< Scalar, Index >
 Given a mesh with UVs, unproject rendered images into a UV texture and confidence map. More...
 

Functions

template<typename Scalar, typename Index, typename ValueType>
void geodesic_dilation (const SurfaceMesh< Scalar, Index > &mesh, image::experimental::View3D< ValueType > texture, const DilationOptions &options={})
 Extend pixels of a texture beyond the defined UV mesh by walking along the 3D surface.
 
template<typename Scalar, typename Index, typename ValueType>
image::experimental::Array3D< ValueType > texture_compositing (const SurfaceMesh< Scalar, Index > &mesh, std::vector< ConstWeightedTextureView< ValueType > > textures, const CompositingOptions &options={})
 Composite multiple textures into a single texture.
 
template<typename Scalar, typename Index, typename ValueType>
void texture_filtering (const SurfaceMesh< Scalar, Index > &mesh, image::experimental::View3D< ValueType > texture, const FilteringOptions &options={})
 Smooth or sharpen a texture image associated with a mesh.
 
template<typename Scalar, typename Index, typename ValueType>
void texture_stitching (const SurfaceMesh< Scalar, Index > &mesh, image::experimental::View3D< ValueType > texture, const StitchingOptions &options={})
 Stitch the seams of a texture associated with a mesh.
 
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.
 

Detailed Description

Texture-space processing utilities.

Function Documentation

◆ geodesic_dilation()

template<typename Scalar, typename Index, typename ValueType>
void geodesic_dilation ( const SurfaceMesh< Scalar, Index > & mesh,
image::experimental::View3D< ValueType > texture,
const DilationOptions & options = {} )

#include <lagrange/texproc/geodesic_dilation.h>

Extend pixels of a texture beyond the defined UV mesh by walking along the 3D surface.

Parameters
[in]meshInput mesh with UV attributes.
[in,out]textureTexture to extend beyond UV mesh boundaries, or where to write the output position map. When writing a position map, the texture must have 3 channels.
[in]optionsDilation options.
Template Parameters
ScalarMesh scalar type.
IndexMesh index type.
ValueTypeImage value type.

◆ texture_compositing()

template<typename Scalar, typename Index, typename ValueType>
image::experimental::Array3D< ValueType > texture_compositing ( const SurfaceMesh< Scalar, Index > & mesh,
std::vector< ConstWeightedTextureView< ValueType > > textures,
const CompositingOptions & options = {} )

#include <lagrange/texproc/texture_compositing.h>

Composite multiple textures into a single texture.

Parameters
[in]meshInput mesh with UV attributes.
[in]texturesTextures to composite. Input textures must have the same dimensions.
[in]optionsCompositing options.
Template Parameters
ScalarMesh scalar type.
IndexMesh index type.
ValueTypeTexture value type.
Returns
Texture image resulting from the compositing.

◆ texture_filtering()

template<typename Scalar, typename Index, typename ValueType>
void texture_filtering ( const SurfaceMesh< Scalar, Index > & mesh,
image::experimental::View3D< ValueType > texture,
const FilteringOptions & options = {} )

#include <lagrange/texproc/texture_filtering.h>

Smooth or sharpen a texture image associated with a mesh.

Parameters
[in]meshInput mesh with UV attributes.
[in,out]textureTexture image to filter.
[in]optionsFiltering options.
Template Parameters
ScalarMesh scalar type.
IndexMesh index type.
ValueTypeTexture value type.

◆ texture_stitching()

template<typename Scalar, typename Index, typename ValueType>
void texture_stitching ( const SurfaceMesh< Scalar, Index > & mesh,
image::experimental::View3D< ValueType > texture,
const StitchingOptions & options = {} )

#include <lagrange/texproc/texture_stitching.h>

Stitch the seams of a texture associated with a mesh.

Parameters
[in]meshInput mesh with UV attributes.
[in,out]textureTexture to stitch.
[in]optionsStitching options.
Template Parameters
ScalarMesh scalar type.
IndexMesh index type.
ValueTypeImage value type.

◆ filter_low_confidences()

void filter_low_confidences ( span< std::pair< image::experimental::Array3D< float >, image::experimental::Array3D< float > > > textures_and_weights,
float low_ratio_threshold )

#include <lagrange/texproc/TextureRasterizer.h>

Discard low-confidence values.

Texels whose weight is < threshold * max_weight are set to zero.

Parameters
[in,out]textures_and_weightsA list of compute texture and confidence images.
[in]low_ratio_thresholdThreshold for discarding low-confidence texels.