DownsamplingMatlab#
- class deepinv.physics.DownsamplingMatlab(factor=2, kernel='cubic', padding='reflect', antialiasing=True, **kwargs)[source]#
Bases:
DownsamplingDownsampling with MATLAB imresize
Downsamples with default MATLAB
imresize, using a bicubic kernel, antialiasing and reflect padding.Wraps
imresizefrom a modified version of the original implementation.The adjoint is computed using autograd via
deepinv.physics.adjoint_function(). This is becauseimresizewith reciprocal of scale is not a correct adjoint. Note however the adjoint is quite slow.- Parameters:
- A(x, factor=None, **kwargs)[source]#
Downsample forward operator
- Parameters:
x (torch.Tensor) – input image
factor (int, float) – downsampling factor. If not
None, use this factor and store it as current factor.
- A_adjoint(y, factor=None, **kwargs)[source]#
Downsample adjoint operator via autograd.
- Parameters:
y (torch.Tensor) – input measurement
factor (int, float) – downsampling factor. If not
None, use this factor and store it as current factor.