Gradient Domain Texture Processing (Version 1.00)
links
executables
compilation
changes
This software supports gradient-domain signal processing within a texture atlas. Supported applications include:
- (localized) texture smoothing and sharpening,
- vector-field visualization akin to line-integral convolution, and
- computation of single-source geodesics.
LINKS
Papers:
[Prada, Kazhdan, Chuang, and Hoppe, 2018],
[Cabral and Leedom, 1993],
[Crane, Weischedel, and Wardetzky, 2013]
Executables:
Win64
Source Code:
ZIP GitHub
Data:
ZIP
EXECUTABLES
TextureFiltering:
Supports the (localized) smoothing and sharpening of a texture by solving a screened Poisson equation which gives the signal whose values match the input and whose gradients match the modulated gradients of the input. If no output texture is specified, the executable will launch an interactive viewer that supports local "painting" of gradient modulation values and prescription of a global interpolation weight.
In the interactive viewer the modulation can be set globally by dragging the slider on the top left.
The modulation can be set locally by holding the [SHIFT] key down and either dragging with the left mouse button (to sharpen) or the right mouse button (to smooth).
- --in <input mesh and texture names>
- These two strings specify the the names of the mesh and the texture image.
The input mesh is assumed to be in PLY format, giving the set of vertices with the x-, y-, and z-coordinates of the positions encoded by the properties x, y, and the set of polygons encoded by two lists. The first gives the indices of the vertices in the polygon (integers). The second gives the texture coordinates at each polygon corner (pairs of floats).
The input texture is assumed to be an image if the file extension is png, jpg, or jpeg, and a normal map if the extension is normap.
- [--out <output texture>]
- This string is the name of the file to which the processed texture will be written.
- [--interpolation <interpolation weight>]
- This floating point values gives the interpolation weight.
The default value for this parameter is 1000.
- [--modulation <gradient modulation>]
- This floating point values gives the (uniform) gradient modulation.
The default value for this parameter is 1.
- [--useDirectSolver]
- If enabled, this flag specifies that a direct solver should be used (instead of the default multigrid solver).
- [--jitter]
- If enabled, this flag specifies that the texture coordinates should be jittered slightly. (This is used to avoid singular situations when mesh vertices fall directly on edges in the texture grid. In such a situation, the executable will issue a warning "Zero row at index ...".)
LineIntegralConvolution:
Creates a line integral convolution visualization of a vector-field by defining a new metric on the surface that stretches distances along the vector-field values, diffuses a random color texture with respect to the new anisotropic metric, and then sharpens the resulting signal.
- --in <input mesh name>
- This string specifies the name of the mesh.
The input mesh is assumed to be in PLY format, giving the set of vertices with the x-, y-, and z-coordinates of the positions encoded by the properties x, y, and the set of polygons encoded by two lists. The first gives the indices of the vertices in the polygon (integers). The second gives the texture coordinates at each polygon corner (pairs of floats).
- [--vf <vector field file>]
- This string specifies the file containing the vector field for visualization. (If this parameter is not specified, the principal curvature direction is used.)
This file is assumed to be in binary, with the first four bytes storing an integer representing the number of vectors (this should be equal to the number of triangles in the mesh) followed by the list of vectors.
The latter are encoded using double-precision floating point values and should be 8*num_triangles*dim bytes, with num_triangles the number of triangles/vectors and dim the dimension of vector field. (The value of dim is equal to two if the --intrinsicVF is specified an three otherwise.)
- [--out <output texture>]
- This string is the name of the file to which the processed texture will be written.
- [--licInterpolation <line integral convoluation interpolation weight>]
- This floating point values gives the interpolation weight used for the line integral convolution.
The default value for this parameter is 10000.
- [--sharpInterpolation <sharpening interpolation weight>]
- This floating point values gives the interpolation weight used for sharpening the line integral convolution results.
The default value for this parameter is 10000.
- [--modulation <sharpening gradient modulation>]
- This floating point values gives the gradient modulation used for sharpening the line integral convolution results.
The default value for this parameter is 100.
- [--width <output texture width>]
- This integers specifies the width of the output texture.
The default value for this parameter is 2048.
- [--height <output texture height>]
- This integers specifies the height of the output texture.
The default value for this parameter is 2048.
- [--intrinsicVF]
- If enabled and a vector field is specified, this flag indicates that the vector values are represented with two values per vector field, using an intrinsic frame. Specifically, for triangle ( v0 , v1 , v2 ), the two-dimensional coefficients ( x , y ) correspond to the three-dimensional tangent vector ( x·(v1-v0) , y·(v2-v0) ).
- [--minor]
- If enabled, this flag specifies that the directions of minimal principal curvature should be used to define the vector field (instead of the default maximal principal curvature directions).
- [--useDirectSolver]
- If enabled, this flag specifies that a direct solver should be used (instead of the default multigrid solver).
- [--jitter]
- If enabled, this flag specifies that the texture coordinates should be jittered slightly. (This is used to avoid singular situations when mesh vertices fall directly on edges in the texture grid. In such a situation, the executable will issue a warning "Zero row at index ...".)
Geodesics:
An interactive tool for visualizatin single-source geodesics using the heat method.
In the interactive viewer the source can be set by holding the [SHIFT] key down and clicking/dragging with either mouse button.
- --in <input mesh name>
- This string specifies the the name of the mesh.
The input mesh is assumed to be in PLY format, giving the set of vertices with the x-, y-, and z-coordinates of the positions encoded by the properties x, y, and the set of polygons encoded by two lists. The first gives the indices of the vertices in the polygon (integers). The second gives the texture coordinates at each polygon corner (pairs of floats).
- [--out <output texture>]
- This string is the name of the file to which the processed texture will be written.
- [--licInterpolation <line integral convoluation interpolation weight>]
- This floating point values gives the interpolation weight used for the line integral convolution.
The default value for this parameter is 10000.
- [--sharpInterpolation <sharpening interpolation weight>]
- This floating point values gives the interpolation weight used for sharpening the line integral convolution results.
The default value for this parameter is 10000.
- [--modulation <sharpening gradient modulation>]
- This floating point values gives the gradient modulation used for sharpening the line integral convolution results.
The default value for this parameter is 100.
- [--width <output texture width>]
- This integers specifies the width of the output texture.
The default value for this parameter is 2048.
- [--height <output texture height>]
- This integers specifies the height of the output texture.
The default value for this parameter is 2048.
- [--minor]
- If enabled, this flag specifies that the directions of minimal principal curvature should be used to define the vector field (instead of the default maximal principal curvature directions).
- [--useDirectSolver]
- If enabled, this flag specifies that a direct solver should be used (instead of the default multigrid solver).
- [--jitter]
- If enabled, this flag specifies that the texture coordinates should be jittered slightly. (This is used to avoid singular situations when mesh vertices fall directly on edges in the texture grid. In such a situation, the executable will issue a warning "Zero row at index ...".)
COMPILATION AND EXECUTION
- The Windows executables require both the glew and glut dynamically linked libraries to run. These can be found here and should be included either in the directory with the executables, or in the directory from which the executables are run.
- Compiling under Windows requires both the glew and glut libraries. These can be found here and should be placed in the output directory for linkage.
HISTORY OF CHANGES
SUPPORT
This work genersouly supported by NSF grant #1422325.
HOME