Helper function
A helper function is provided for the fast approximation of the mean voxel reuse:
ImageQuilting.voxelreuse — Function.voxelreuse(trainimg::AbstractArray{T,N}, tilesize::Dims{N};
overlap::NTuple{N,Float64}=ntuple(i->1/6,N),
nreal::Integer=10, kwargs...)Returns the mean voxel reuse in [0,1] and its standard deviation.
Notes
- The approximation gets better as
nrealis made larger. - Keyword arguments
kwargsare passed toiqsimdirectly.
Plot recipe
A plot recipe is provided for tile 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):
] add Plots GRThe 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")