diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 5a600b8..d9e60c1 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.3","generation_timestamp":"2024-05-06T20:56:04","documenter_version":"1.4.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.3","generation_timestamp":"2024-05-29T13:47:17","documenter_version":"1.4.1"}} \ No newline at end of file diff --git a/dev/about/author/index.html b/dev/about/author/index.html index e30fda6..62ad7cd 100644 --- a/dev/about/author/index.html +++ b/dev/about/author/index.html @@ -1,2 +1,2 @@ -Author · ImageQuilting.jl
+Author · ImageQuilting.jl
diff --git a/dev/about/citation/index.html b/dev/about/citation/index.html index 5f34b38..5359447 100644 --- a/dev/about/citation/index.html +++ b/dev/about/citation/index.html @@ -11,4 +11,4 @@ url={http://dx.doi.org/10.1016/j.cageo.2017.05.012}, year={2017}, month={May} -} +} diff --git a/dev/about/license/index.html b/dev/about/license/index.html index 4bd2d45..385ebf8 100644 --- a/dev/about/license/index.html +++ b/dev/about/license/index.html @@ -19,4 +19,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +SOFTWARE. diff --git a/dev/index.html b/dev/index.html index 4a0ce17..4022127 100644 --- a/dev/index.html +++ b/dev/index.html @@ -10,4 +10,4 @@ soft::AbstractVector=[], hard::Dict=Dict(), tol::Real=.1, path::Symbol=:raster, nreal::Integer=1, threads::Integer=cpucores(), debug::Bool=false, - progress::Bool=true, rng::AbstractRNG=Random.default_rng())

Performs image quilting simulation as described in Hoffimann et al. 2017.

Parameters

Required

Optional

The main output reals consists of a list of realizations that can be indexed with reals[1], reals[2], ..., reals[nreal]. If debug=true, additional output is generated:

reals, cuts, voxs = iqsim(..., debug=true)

cuts[i] is the boundary cut for reals[i] and voxs[i] is the associated voxel reuse.

source

The major difference compared to the high-level API is that the iqsim function has no notion of coordinate system, and you will have to pre/post-process the data manually to match it with the cells in the simulation grid.

GeoStats.jl takes the coordinate system into account and also enables parallel simulation on clusters of computers with distributed memory.

+ progress::Bool=true, rng::AbstractRNG=Random.default_rng())

Performs image quilting simulation as described in Hoffimann et al. 2017.

Parameters

Required

Optional

The main output reals consists of a list of realizations that can be indexed with reals[1], reals[2], ..., reals[nreal]. If debug=true, additional output is generated:

reals, cuts, voxs = iqsim(..., debug=true)

cuts[i] is the boundary cut for reals[i] and voxs[i] is the associated voxel reuse.

source

The major difference compared to the high-level API is that the iqsim function has no notion of coordinate system, and you will have to pre/post-process the data manually to match it with the cells in the simulation grid.

GeoStats.jl takes the coordinate system into account and also enables parallel simulation on clusters of computers with distributed memory.

diff --git a/dev/search_index.js b/dev/search_index.js index 5ad74ae..89e937b 100644 --- a/dev/search_index.js +++ b/dev/search_index.js @@ -1,3 +1,3 @@ var documenterSearchIndex = {"docs": -[{"location":"about/license/","page":"License","title":"License","text":"The ImageQuilting.jl package is licensed under the MIT License:","category":"page"},{"location":"about/license/","page":"License","title":"License","text":"MIT License\n\nCopyright (c) 2015 Júlio Hoffimann and contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","category":"page"},{"location":"voxel-reuse/#Helper-function","page":"Voxel reuse","title":"Helper function","text":"","category":"section"},{"location":"voxel-reuse/","page":"Voxel reuse","title":"Voxel reuse","text":"A helper function is provided for the fast approximation of the mean voxel reuse:","category":"page"},{"location":"voxel-reuse/","page":"Voxel reuse","title":"Voxel reuse","text":"voxelreuse","category":"page"},{"location":"voxel-reuse/#ImageQuilting.voxelreuse","page":"Voxel reuse","title":"ImageQuilting.voxelreuse","text":"voxelreuse(trainimg::AbstractArray{T,N}, tilesize::Dims{N};\n overlap::NTuple{N,Float64}=ntuple(i->1/6,N),\n nreal::Integer=10, kwargs...)\n\nReturns the mean voxel reuse in [0,1] and its standard deviation.\n\nNotes\n\nThe approximation gets better as nreal is made larger.\nKeyword arguments kwargs are passed to iqsim directly.\n\n\n\n\n\n","category":"function"},{"location":"voxel-reuse/#Plot-recipe","page":"Voxel reuse","title":"Plot recipe","text":"","category":"section"},{"location":"voxel-reuse/","page":"Voxel reuse","title":"Voxel reuse","text":"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):","category":"page"},{"location":"voxel-reuse/","page":"Voxel reuse","title":"Voxel reuse","text":"] add Plots","category":"page"},{"location":"voxel-reuse/","page":"Voxel reuse","title":"Voxel reuse","text":"The example below uses training images from the GeoStatsImages.jl package:","category":"page"},{"location":"voxel-reuse/","page":"Voxel reuse","title":"Voxel reuse","text":"using ImageQuilting\nusing GeoStatsImages\nusing Plots\n\nTI₁ = geostatsimage(\"Strebelle\")\nTI₂ = geostatsimage(\"StoneWall\")\n\nvoxelreuseplot(TI₁, label=\"Strebelle\")\nvoxelreuseplot!(TI₂, label=\"StoneWall\")","category":"page"},{"location":"voxel-reuse/","page":"Voxel reuse","title":"Voxel reuse","text":"(Image: Voxel reuse plot)","category":"page"},{"location":"about/author/","page":"Author","title":"Author","text":"Júlio Hoffimann","category":"page"},{"location":"about/author/","page":"Author","title":"Author","text":"You can find more about my research on my website.","category":"page"},{"location":"about/author/","page":"Author","title":"Author","text":"Below are some ways that we can connect:","category":"page"},{"location":"about/author/","page":"Author","title":"Author","text":"ResearchGate\nLinkedIn\nGitHub","category":"page"},{"location":"about/citation/","page":"Citation","title":"Citation","text":"If you find ImageQuilting.jl useful in your work, please consider citing our paper:","category":"page"},{"location":"about/citation/","page":"Citation","title":"Citation","text":"@ARTICLE{Hoffimann2017,\n title={Stochastic Simulation by Image Quilting of Process-based Geological Models},\n author={Hoffimann, J{\\'u}lio and Scheidt, C{\\'e}line and Barfod, Adrian and Caers, Jef},\n journal={Computers \\& Geosciences},\n publisher={Elsevier BV},\n volume={106},\n pages={18-32},\n ISSN={0098-3004},\n DOI={10.1016/j.cageo.2017.05.012},\n url={http://dx.doi.org/10.1016/j.cageo.2017.05.012},\n year={2017},\n month={May}\n}","category":"page"},{"location":"#Overview","page":"Home","title":"Overview","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"A Julia package for fast 3D image quilting simulation.","category":"page"},{"location":"","page":"Home","title":"Home","text":"(Image: Build Status) (Image: Coverage Status) (Image: Stable Documentation) (Image: Latest Documentation)","category":"page"},{"location":"","page":"Home","title":"Home","text":"This package implements an extension to the famous Efros-Freeman algorithm for texture synthesis and transfer in computer vision. Unlike the original algorithm developed for 2D images, our method can also handle 3D masked grids and pre-existing point-data very efficiently (the fastest in the literature). For more details, please refer to our paper in Citation.","category":"page"},{"location":"","page":"Home","title":"Home","text":"(Image: 3D Quilting Animation)","category":"page"},{"location":"#Features","page":"Home","title":"Features","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Masked grids\nHard data conditioning\nSoft data conditioning\nFast computation with GPUs","category":"page"},{"location":"#Installation","page":"Home","title":"Installation","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Get the latest stable release with Julia's package manager:","category":"page"},{"location":"","page":"Home","title":"Home","text":"] add ImageQuilting","category":"page"},{"location":"#Talks","page":"Home","title":"Talks","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Below is a list of talks related to this project. For more material, please subscribe to the YouTube channel.","category":"page"},{"location":"","page":"Home","title":"Home","text":"

\n\n

\n

\n\n

","category":"page"},{"location":"#Usage","page":"Home","title":"Usage","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"This package is part of the GeoStats.jl framework. See its documentation for examples of practical use.","category":"page"},{"location":"#Low-level-API","page":"Home","title":"Low-level API","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"If you are interested in using the package without GeoStats.jl, please use the following function:","category":"page"},{"location":"","page":"Home","title":"Home","text":"iqsim","category":"page"},{"location":"#ImageQuilting.iqsim","page":"Home","title":"ImageQuilting.iqsim","text":"iqsim(trainimg::AbstractArray{T,N}, tilesize::Dims{N},\n simsize::Dims{N}=size(trainimg);\n overlap::NTuple{N,<:Real}=ntuple(i->1/6,N),\n soft::AbstractVector=[], hard::Dict=Dict(), tol::Real=.1,\n path::Symbol=:raster, nreal::Integer=1,\n threads::Integer=cpucores(), debug::Bool=false,\n progress::Bool=true, rng::AbstractRNG=Random.default_rng())\n\nPerforms image quilting simulation as described in Hoffimann et al. 2017.\n\nParameters\n\nRequired\n\ntrainimg is any Julia array\ntilesize is the tile size\n\nOptional\n\nsimsize is the size of the simulation grid (default to training image size)\noverlap is the percentage of overlap (default to 1/6 of tile size)\nsoft is a vector of (data,dataTI) pairs (default to none)\nhard is a dictionary mapping coordinates to data values (default to none)\ntol is the initial relaxation tolerance in (0,1] (default to .1)\npath is the simulation path (:raster, :dilation or :random)\nnreal is the number of realizations (default to 1)\nthreads is the number of threads for the FFT (default to all CPU cores)\ndebug informs whether to export or not the boundary cuts and voxel reuse\nprogress informs whether to show or not estimated time duration\nrng is the random number generator (default to Random.default_rng())\n\nThe main output reals consists of a list of realizations that can be indexed with reals[1], reals[2], ..., reals[nreal]. If debug=true, additional output is generated:\n\nreals, cuts, voxs = iqsim(..., debug=true)\n\ncuts[i] is the boundary cut for reals[i] and voxs[i] is the associated voxel reuse.\n\n\n\n\n\n","category":"function"},{"location":"","page":"Home","title":"Home","text":"The major difference compared to the high-level API is that the iqsim function has no notion of coordinate system, and you will have to pre/post-process the data manually to match it with the cells in the simulation grid.","category":"page"},{"location":"","page":"Home","title":"Home","text":"GeoStats.jl takes the coordinate system into account and also enables parallel simulation on clusters of computers with distributed memory.","category":"page"}] +[{"location":"about/license/","page":"License","title":"License","text":"The ImageQuilting.jl package is licensed under the MIT License:","category":"page"},{"location":"about/license/","page":"License","title":"License","text":"MIT License\n\nCopyright (c) 2015 Júlio Hoffimann and contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","category":"page"},{"location":"voxel-reuse/#Helper-function","page":"Voxel reuse","title":"Helper function","text":"","category":"section"},{"location":"voxel-reuse/","page":"Voxel reuse","title":"Voxel reuse","text":"A helper function is provided for the fast approximation of the mean voxel reuse:","category":"page"},{"location":"voxel-reuse/","page":"Voxel reuse","title":"Voxel reuse","text":"voxelreuse","category":"page"},{"location":"voxel-reuse/#ImageQuilting.voxelreuse","page":"Voxel reuse","title":"ImageQuilting.voxelreuse","text":"voxelreuse(trainimg::AbstractArray{T,N}, tilesize::Dims{N};\n overlap::NTuple{N,Float64}=ntuple(i->1/6,N),\n nreal::Integer=10, kwargs...)\n\nReturns the mean voxel reuse in [0,1] and its standard deviation.\n\nNotes\n\nThe approximation gets better as nreal is made larger.\nKeyword arguments kwargs are passed to iqsim directly.\n\n\n\n\n\n","category":"function"},{"location":"voxel-reuse/#Plot-recipe","page":"Voxel reuse","title":"Plot recipe","text":"","category":"section"},{"location":"voxel-reuse/","page":"Voxel reuse","title":"Voxel reuse","text":"A plot recipe is provided for tile design in image quilting. In order to plot the voxel reuse of a training image, install any of the Makie.jl backends.","category":"page"},{"location":"voxel-reuse/","page":"Voxel reuse","title":"Voxel reuse","text":"] add CairoMakie","category":"page"},{"location":"voxel-reuse/","page":"Voxel reuse","title":"Voxel reuse","text":"The example below uses training images from the GeoStatsImages.jl package:","category":"page"},{"location":"voxel-reuse/","page":"Voxel reuse","title":"Voxel reuse","text":"using ImageQuilting\nusing GeoStatsImages\nusing CairoMakie\n\nTI₁ = geostatsimage(\"Strebelle\")\nTI₂ = geostatsimage(\"StoneWall\")\n\ntimg₁ = asarray(TI₁, :facies)\ntimg₂ = asarray(TI₂, :Z)\n\nvoxelreuseplot(timg₁)\nvoxelreuseplot!(timg₂)","category":"page"},{"location":"voxel-reuse/","page":"Voxel reuse","title":"Voxel reuse","text":"(Image: Voxel reuse plot)","category":"page"},{"location":"about/author/","page":"Author","title":"Author","text":"Júlio Hoffimann","category":"page"},{"location":"about/author/","page":"Author","title":"Author","text":"You can find more about my research on my website.","category":"page"},{"location":"about/author/","page":"Author","title":"Author","text":"Below are some ways that we can connect:","category":"page"},{"location":"about/author/","page":"Author","title":"Author","text":"ResearchGate\nLinkedIn\nGitHub","category":"page"},{"location":"about/citation/","page":"Citation","title":"Citation","text":"If you find ImageQuilting.jl useful in your work, please consider citing our paper:","category":"page"},{"location":"about/citation/","page":"Citation","title":"Citation","text":"@ARTICLE{Hoffimann2017,\n title={Stochastic Simulation by Image Quilting of Process-based Geological Models},\n author={Hoffimann, J{\\'u}lio and Scheidt, C{\\'e}line and Barfod, Adrian and Caers, Jef},\n journal={Computers \\& Geosciences},\n publisher={Elsevier BV},\n volume={106},\n pages={18-32},\n ISSN={0098-3004},\n DOI={10.1016/j.cageo.2017.05.012},\n url={http://dx.doi.org/10.1016/j.cageo.2017.05.012},\n year={2017},\n month={May}\n}","category":"page"},{"location":"#Overview","page":"Home","title":"Overview","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"A Julia package for fast 3D image quilting simulation.","category":"page"},{"location":"","page":"Home","title":"Home","text":"(Image: Build Status) (Image: Coverage Status) (Image: Stable Documentation) (Image: Latest Documentation)","category":"page"},{"location":"","page":"Home","title":"Home","text":"This package implements an extension to the famous Efros-Freeman algorithm for texture synthesis and transfer in computer vision. Unlike the original algorithm developed for 2D images, our method can also handle 3D masked grids and pre-existing point-data very efficiently (the fastest in the literature). For more details, please refer to our paper in Citation.","category":"page"},{"location":"","page":"Home","title":"Home","text":"(Image: 3D Quilting Animation)","category":"page"},{"location":"#Features","page":"Home","title":"Features","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Masked grids\nHard data conditioning\nSoft data conditioning\nFast computation with GPUs","category":"page"},{"location":"#Installation","page":"Home","title":"Installation","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Get the latest stable release with Julia's package manager:","category":"page"},{"location":"","page":"Home","title":"Home","text":"] add ImageQuilting","category":"page"},{"location":"#Talks","page":"Home","title":"Talks","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Below is a list of talks related to this project. For more material, please subscribe to the YouTube channel.","category":"page"},{"location":"","page":"Home","title":"Home","text":"

\n\n

\n

\n\n

","category":"page"},{"location":"#Usage","page":"Home","title":"Usage","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"This package is part of the GeoStats.jl framework. See its documentation for examples of practical use.","category":"page"},{"location":"#Low-level-API","page":"Home","title":"Low-level API","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"If you are interested in using the package without GeoStats.jl, please use the following function:","category":"page"},{"location":"","page":"Home","title":"Home","text":"iqsim","category":"page"},{"location":"#ImageQuilting.iqsim","page":"Home","title":"ImageQuilting.iqsim","text":"iqsim(trainimg::AbstractArray{T,N}, tilesize::Dims{N},\n simsize::Dims{N}=size(trainimg);\n overlap::NTuple{N,<:Real}=ntuple(i->1/6,N),\n soft::AbstractVector=[], hard::Dict=Dict(), tol::Real=.1,\n path::Symbol=:raster, nreal::Integer=1,\n threads::Integer=cpucores(), debug::Bool=false,\n progress::Bool=true, rng::AbstractRNG=Random.default_rng())\n\nPerforms image quilting simulation as described in Hoffimann et al. 2017.\n\nParameters\n\nRequired\n\ntrainimg is any Julia array\ntilesize is the tile size\n\nOptional\n\nsimsize is the size of the simulation grid (default to training image size)\noverlap is the percentage of overlap (default to 1/6 of tile size)\nsoft is a vector of (data,dataTI) pairs (default to none)\nhard is a dictionary mapping coordinates to data values (default to none)\ntol is the initial relaxation tolerance in (0,1] (default to .1)\npath is the simulation path (:raster, :dilation or :random)\nnreal is the number of realizations (default to 1)\nthreads is the number of threads for the FFT (default to all CPU cores)\ndebug informs whether to export or not the boundary cuts and voxel reuse\nprogress informs whether to show or not estimated time duration\nrng is the random number generator (default to Random.default_rng())\n\nThe main output reals consists of a list of realizations that can be indexed with reals[1], reals[2], ..., reals[nreal]. If debug=true, additional output is generated:\n\nreals, cuts, voxs = iqsim(..., debug=true)\n\ncuts[i] is the boundary cut for reals[i] and voxs[i] is the associated voxel reuse.\n\n\n\n\n\n","category":"function"},{"location":"","page":"Home","title":"Home","text":"The major difference compared to the high-level API is that the iqsim function has no notion of coordinate system, and you will have to pre/post-process the data manually to match it with the cells in the simulation grid.","category":"page"},{"location":"","page":"Home","title":"Home","text":"GeoStats.jl takes the coordinate system into account and also enables parallel simulation on clusters of computers with distributed memory.","category":"page"}] } diff --git a/dev/voxel-reuse/index.html b/dev/voxel-reuse/index.html index 14f57ca..75d083d 100644 --- a/dev/voxel-reuse/index.html +++ b/dev/voxel-reuse/index.html @@ -1,12 +1,15 @@ Voxel reuse · ImageQuilting.jl

Helper function

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

ImageQuilting.voxelreuseFunction
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 nreal is made larger.
  • Keyword arguments kwargs are passed to iqsim directly.
source

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

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

using ImageQuilting
+           nreal::Integer=10, kwargs...)

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

Notes

  • The approximation gets better as nreal is made larger.
  • Keyword arguments kwargs are passed to iqsim directly.
source

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 any of the Makie.jl backends.

] add CairoMakie

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

using ImageQuilting
 using GeoStatsImages
-using Plots
+using CairoMakie
 
 TI₁ = geostatsimage("Strebelle")
 TI₂ = geostatsimage("StoneWall")
 
-voxelreuseplot(TI₁, label="Strebelle")
-voxelreuseplot!(TI₂, label="StoneWall")

Voxel reuse plot

+timg₁ = asarray(TI₁, :facies) +timg₂ = asarray(TI₂, :Z) + +voxelreuseplot(timg₁) +voxelreuseplot!(timg₂)

Voxel reuse plot