fft_convolve: Convolution of two images via FFT

Description Usage Arguments Examples

Description

Convolution of two images via FFT

Usage

1
fft_convolve(im, filter, deconvolution = FALSE)

Arguments

im, filter

cimg objects

deconvolution

logical indicating if the deconvolution should be performed

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
im <- lenna
filter <- imfill(9,9,val = 1)
blurred.im <- fft_convolve(im, filter)
deblurred.im <- fft_convolve(blurred.im, filter, deconvolution = TRUE)
par(mfrow = c(1,3), mar = c(0,0,1,0)+0.1)
plot(im, axes = FALSE, interp = FALSE, main = 'Original Lenna')
plot(blurred.im, axes = FALSE, interp = FALSE, main = 'Blurred Lenna')
plot(deblurred.im, axes = FALSE, interp = FALSE, main = 'deBlurred Lenna')
PSNR(im, blurred.im)
PSNR(im, deblurred.im)

coldfir3/RED documentation built on May 8, 2019, 10:52 p.m.