Voxel reuse

Helper function

A helper function is provided for the fast approximation of the mean voxel reuse:

voxelreuse(training_image::AbstractArray,
           tplsizex::Integer, tplsizey::Integer, tplsizez::Integer;
           overlapx::Real=1/6, overlapy::Real=1/6, overlapz::Real=1/6,
           cut::Symbol=:boykov, simplex::Bool=false, nreal::Integer=10,
           threads::Integer=CPU_PHYSICAL_CORES, gpu::Bool=false)

Returns the mean voxel reuse in [0,1] and its standard deviation.

Notes

The approximation gets better as nreal is made larger.

source

Plot recipe

A plot recipe is provided for template design in image quilting. In order to plot the voxel reuse of a training image, install Plots.jl and any of its supported backends (e.g. GR.jl):

Pkg.add("Plots")
Pkg.add("GR")

The example below uses training images from the GeoStatsImages.jl package:

using ImageQuilting
using GeoStatsImages
using Plots

TI₁ = training_image("Strebelle")
TI₂ = training_image("StoneWall")

voxelreuseplot(TI₁, label="Strebelle")
voxelreuseplot!(TI₂, label="StoneWall")

Voxel reuse plot