Skip to content

Commit 5bfff9f

Browse files
committed
Add gradient operator docs
1 parent e551ea0 commit 5bfff9f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/src/tutorials/gradient.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# # Gradient Operator
2+
include("../../util.jl") #hide
3+
# This operator computes a direction gradient along one or more dimensions of an array:
4+
gop = GradientOp(eltype(image); shape = (N, N), dims = 1)
5+
gradients = reshape(gop * vec(image), :, N)
6+
fig = Figure()
7+
plot_image(fig[1,1], image, title = "Image")
8+
plot_image(fig[1,2], gradients[:, :], title = "Gradient", colormap = :vik)
9+
resize_to_layout!(fig)
10+
fig

0 commit comments

Comments
 (0)