Skip to content

Commit

Permalink
Merge pull request #155 from JuliaImages/jc/democards
Browse files Browse the repository at this point in the history
upgrade to Documenter 0.25 and DemoCards 0.3
  • Loading branch information
johnnychen94 authored Sep 15, 2020
2 parents 3a4e439 + 921563a commit 96e6703
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 20 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ AxisArrays = "0"
ColorTypes = "0"
Colors = "0"
CoordinateTransformations = "0"
DemoCards = "0.2"
DemoCards = "0.3"
Distances = "0"
Documenter = "0.24.2"
Documenter = "0.25"
FileIO = "1"
FixedPointNumbers = "0"
ImageAxes = "0"
Expand Down
2 changes: 2 additions & 0 deletions docs/examples/color_channels/color_separations_svd.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# ---
# cover: assets/color_separations_svd.gif
# title: Image Compression using SVD
# author: Tim Holy
# date: 2020-03-17
# ---

# This demonstration shows how to work with color channels to explore image compression
Expand Down
2 changes: 2 additions & 0 deletions docs/examples/color_channels/rgb_grayscale.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# ---
# title: RGB to GrayScale
# cover: assets/rgb_grayscale.gif
# author: Gautam Mishra
# date: 2020-07-01
# ---

# This example illustrates RGB to Grayscale Conversion
Expand Down
2 changes: 2 additions & 0 deletions docs/examples/color_channels/rgb_hsv_thresholding.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# ---
# title: RGB to HSV and thresholding
# cover: assets/rgb_hsv_thresholding.png
# author: Johnny Chen
# date: 2019-12-07
# ---

# This example illustrates how RGB to HSV (Hue, Saturation, Value) conversion
Expand Down
3 changes: 3 additions & 0 deletions docs/examples/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"theme": "grid"
}
2 changes: 2 additions & 0 deletions docs/examples/contours/contour_detection.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# ---
# cover: assets/contour_detection.png
# title: Contour Detection and Drawing
# author: Archit Rungta
# date: 2020-01-12
# ---

# This demonstration shows how to detect contours on binary images
Expand Down
2 changes: 2 additions & 0 deletions docs/examples/contours/detecting_corners.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# ---
# cover: assets/corner.png
# title: Detecting Corners
# author: Jivetesh Jain
# date: 2020-07-01
# ---

# Corner Detection, which is a subset of Interest Point Detection, tries to detect
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# ---
# cover: assets/ssim.png
# title: Structural Similarity Index
# description: This demo shows how SSIM and MSE are used to evaluate the image quality
# author: Jivetesh Jain
# date: 2020-07-01
# ---

# When comparing images, the **Mean Squared Error** (or MSE), though straightforward to calculate,
Expand Down
2 changes: 2 additions & 0 deletions docs/examples/spatial_transformation/alpha_compositing.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# ---
# title: Alpha Compositing
# cover: assets/alpha_compositing.png
# author: Johnny Chen
# date: 2020-03-07
# ---

# This demonstration shows how [alpha compositing](https://en.wikipedia.org/wiki/Alpha_compositing)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# ---
# title: Histogram equalisation
# cover: assets/histogram_equalization.png
# author: Archit Rungta
# date: 2020-01-12
# ---

# This demo issustrates the use of [Histogram equalization](https://juliaimages.org/ImageContrastAdjustment.jl/stable/reference/#Equalization-1), [gamma correction matching](https://juliaimages.org/ImageContrastAdjustment.jl/stable/reference/#Matching-1)
Expand Down Expand Up @@ -28,4 +30,4 @@ mosaicview(img, hist_equal, gamma_correction, hist_adapt; nrow = 1)

# --- save covers --- #src
using FileIO #src
save("assets/histogram_equalization.png", hist_equal) #src
save("assets/histogram_equalization.png", hist_equal) #src
2 changes: 2 additions & 0 deletions docs/examples/spatial_transformation/image_diffview.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# ---
# title: Image Difference View
# cover: assets/image_diffview.png
# author: Johnny Chen
# date: 2020-03-07
# ---

# This demonstration shows some common tricks in image comparision -- difference view
Expand Down
8 changes: 5 additions & 3 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ using ImageContrastAdjustment, TestImages, FileIO, MosaicViews, ImageMorphology

branch = "master"

templates, theme = cardtheme("grid")
demos, demos_cb = makedemos("examples", templates; branch = branch)
demos, demos_cb, demo_assets = makedemos("examples"; branch = branch)

assets = []
isnothing(demo_assets) || push!(assets, demo_assets)

format = Documenter.HTML(edit_link = "source",
prettyurls = get(ENV, "CI", nothing) == "true",
assets = [theme])
assets = assets)

makedocs(modules = [Images, ImageCore, Colors, ColorTypes, FixedPointNumbers, ImageAxes,
ImageFeatures, ImageFiltering, ImageMetadata, ImageContrastAdjustment,
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pkgs/metadata/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ and the properties dictionary with `properties`:
```jldoctest
julia> properties(img)
Dict{Symbol,Any} with 2 entries:
:date => 2016-07-31
:date => Date("2016-07-31")
:time => "high noon"
```

Expand Down
22 changes: 9 additions & 13 deletions docs/src/tutorials/conversions_views.md
Original file line number Diff line number Diff line change
Expand Up @@ -486,22 +486,18 @@ UInt8` array representing an RGB movie (`t` being the time axis). To
have it display as an RGB movie, you might create the following view of
the array `A`:

```julia
mov = colorview(RGB, normedview(PermutedDimsArray(A, (3,1,2,4))))
```

If you show `mov` at the REPL, the `summary` prints like this:

```jldoctest; setup = :(using Images; A = rand(UInt8, 5, 6, 3, 10); mov = colorview(RGB, normedview(PermutedDimsArray(A, (3,1,2,4)))))
julia> summary(mov)
"5×6×10 reshape(reinterpret(RGB{N0f8}, normedview(N0f8, PermutedDimsArray(::Array{UInt8,4}, (3, 1, 2, 4)))), 5, 6, 10) with eltype RGB{Normed{UInt8,8}}"
```@setup view
using Images
using Random
Random.seed!(1234)
```

which may be somewhat easier to read than the type:
```@repl view
A = rand(UInt8, 5, 6, 3, 10);
mov = colorview(RGB, normedview(PermutedDimsArray(A, (3,1,2,4))));
```jldoctest; setup = :(using Images; A = rand(UInt8, 5, 6, 3, 10); mov = colorview(RGB, normedview(PermutedDimsArray(A, (3,1,2,4))))), filter=r"Symbol\(.*\)"
julia> typeof(mov)
Base.ReshapedArray{RGB{Normed{UInt8,8}},3,Base.ReinterpretArray{RGB{Normed{UInt8,8}},4,Normed{UInt8,8},MappedArrays.MappedArray{Normed{UInt8,8},4,PermutedDimsArray{UInt8,4,(3, 1, 2, 4),(2, 3, 1, 4),Array{UInt8,4}},ImageCore.var"#37#38"{Normed{UInt8,8}},typeof(reinterpret)}},Tuple{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64}}}
summary(mov)
typeof(mov)
```

While there is little or no performance cost to making use of
Expand Down

0 comments on commit 96e6703

Please sign in to comment.