where xxxx.smd is the base name of your SMD file.am_build_apm xxxx
Optionally one can specify the regions to be modelled in the texture model
by defining a triangles file. The build_apm
will check for the existance of a file called model_path.tri, and if
it exists, assume it defines the triangles to be represented. If no such file
can be loaded, then it will model everything within the convex hull of the points.
Note that a triangles file may also be explicitly invoked within
the SMD file (see the "tri_file:" option).
You can generate and edit triangulation files using the
am_tri_editor tool.
A multi-resolution model will be built, with levels defined by the following fields:
min_level: 0 max_level: 2
The tex_sampler command defines how the image is to be sampled. There are two general approaches:
tex_sampler: vapm_triangle_sampler<vxl_byte> { }
tex_sampler: vapm_profile_set_sampler
{
profile_sampler: vsml_profile_sampler_2d<vxl_byte>
prof_hi: 2
prof_lo: -2
width: 1
step_size: 1.0
use_gradient: 0
use_sigmoidal_renormalisation: 0
}
The following properties can be specified to all of the samplers
sample_interp
- Sampling interpolation functional order. 0 means nearest, 1 linear, 2 quadratic, etc.warp_interp
- Warping interpolation functional order (for reconstruction)The following options also affect the sampling
The number of pixels sampled is given by the n_pixels: field:
The larger this number, the higher the resolution of the model. Note that this defines the resolution of the level zero model, higher level models will have reduced numbers of pixels (typically half the number in each dimension). Whether grey level or colour (RGB) models are to be built is defined by the colour: field:n_pixels: 5000
colour: Grey // Alternatives: Grey,RGB
// Options include None, align_linear_1d, align_linear_rgb, align_cog_rgb tex_aligner: AlignLinear1D
Options include `pca' for a linear eigen model, or `pca+haar1d' for a method which applies 1D Haar wavelets to compress the data before applying PCA.// Define statistical model for texture. tex_model: pca
The number will be chosen to explain proportion of the variance, constrained by min and max. Similarly the number of modes of the combined model is defined by the combined_modes: field:tex_modes: { min: 0 max: 999 prop: 0.95 }
combined_modes: { min: 0 max: 999 prop: 0.95 }
You can view the model using the am_view_apm tool.
You can view the shape model alone using the am_view_shape_model tool.