Skip to content
Snippets Groups Projects
Commit 31606b50 authored by Stephan Hilb's avatar Stephan Hilb
Browse files

fix minor stuff

parent 9fd2afec
No related branches found
No related tags found
No related merge requests found
...@@ -358,7 +358,7 @@ function test_mesh(mesh) ...@@ -358,7 +358,7 @@ function test_mesh(mesh)
edgemap[e3] = push!(get!(edgemap, e3, []), cell) edgemap[e3] = push!(get!(edgemap, e3, []), cell)
end end
for (edge, cells) in edgemap for (edge, cells) in edgemap
@assert(length(cells) <= 2) @assert(1 <= length(cells) <= 2)
end end
# are cells positively oriented? # are cells positively oriented?
for cell in cells(mesh) for cell in cells(mesh)
... ...
......
...@@ -117,6 +117,7 @@ function step!(ctx::L1L2TVContext) ...@@ -117,6 +117,7 @@ function step!(ctx::L1L2TVContext)
print("solve ... ") print("solve ... ")
ctx.du.data .= A \ b ctx.du.data .= A \ b
# solve dp1 # solve dp1
function dp1_update(x; g, u, p1, du, tdata) function dp1_update(x; g, u, p1, du, tdata)
m1 = max(gamma1, norm(T(tdata, u) - g)) m1 = max(gamma1, norm(T(tdata, u) - g))
...@@ -332,7 +333,7 @@ function denoise(img; name, params...) ...@@ -332,7 +333,7 @@ function denoise(img; name, params...)
ctx = L1L2TVContext(name, mesh, m; T, tdata = nothing, S, params...) ctx = L1L2TVContext(name, mesh, m; T, tdata = nothing, S, params...)
interpolate!(ctx.g, x -> interpolate_bilinear(img, x)) interpolate!(ctx.g, x -> interpolate_bilinear(img, x))
m = size(img) ./ 2 m = (size(img) .- 1) ./ 2 .+ 1
interpolate!(ctx.g, x -> norm(x .- m) < norm(m) / 3) interpolate!(ctx.g, x -> norm(x .- m) < norm(m) / 3)
save_denoise(ctx, i) = save_denoise(ctx, i) =
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment