Contains some general routines that are often used in Bregman/Primal Dual iterative algorithms. These algorithms solve non-linear inverse problems that are encountered within the field of image reconstruction and restoration.
bregman_utils.q | Contains some general routines that are often used in Bregman/Primal Dual iterative algorithms. |
Functions | |
kernelshift | Hiep’s kernelshift function: pads a given filter kernel (mask) with zeros so that it has the dimensions rows x cols. |
displacement_diff | Computes a displacement difference. |
shrink | Soft-shrinkage of a subband (or cell array) |
Dx | Horizontal derivative operation |
Dy | Vertical derivative operation |
Dxt | Horizontal derivative operation (adjoint operation) |
Dyt | Vertical derivative operation (adjoint operation) |
psnr | Computation of the Peak-Signal-To-Noise (PSNR) ratio |
Hiep’s kernelshift function: pads a given filter kernel (mask) with zeros so that it has the dimensions rows x cols. This function is useful for implementing a convolution in the frequency domain
function result = kernelshift(kernel, rows, cols)
kernel | the filter kernel (mask) to extend |
rows | the new number of rows |
cols | the new number of cols |
Computes a displacement difference. Useful for implementing discrete derivatives, such as used in Total Variation (TV) approaches. The function uses circular boundary extension.
function y = displacement_diff(x, d)
x | input matrix/cube to add displacement |
d | displacement vector |
y | The displaced difference, according to the relationship |
y[p] = x[p] - x[p+d]