File:Deconvolution with imperfect kernels.png

Original file(678 × 636 pixels, file size: 171 KB, MIME type: image/png)

Captions

Captions

Deconvolution is very sensitive to the kernel you use.

Summary edit

Description
English: If you know the response function of your instrument, you can deconvolve it from your measurement to obtain a much sharper signal. But deconvolution is a dangerous procedure, as small mistakes in the kernel can result in heavy artifacts.
Date
Source https://twitter.com/j_bertolotti/status/1126058724722917377
Author Jacopo Bertolotti
Permission
(Reusing this file)
https://twitter.com/j_bertolotti/status/1030470604418428929

Mathematica 11.0 code edit

data = Abs[ExampleData[{"TestImage", "Tree"}, "GrayLevels"] - 1];
size = Dimensions[data][[1]];
kernel = RotateRight[
   PadRight[GaussianMatrix[30], {size, size}], {-30, -30}];
cd = InverseFourier[Fourier[data]*Conjugate[Fourier[kernel]]];
ikernel = kernel; ikernel[[20, 20]] = Max[kernel];
nkernel = 
  RotateRight[
   PadRight[
    GaussianMatrix[30]*RandomReal[{0.5, 1.5}, {61, 61}], {size, size}], {-30, -30}];
p1 = Grid[{{ ArrayPlot[cd, Frame -> False], "deconvolved\n   with", ArrayPlot[RotateRight[kernel, {size/2, size/2}] , PlotLabel -> "Perfect kernel"], "\[Rule]", ArrayPlot[InverseFourier[Fourier[cd]/Conjugate[Fourier[kernel]]], Frame -> False]},
   { ArrayPlot[cd, Frame -> False], "deconvolved\n   with", ArrayPlot[RotateRight[ikernel, {size/2, size/2}]  , PlotLabel -> "Imperfect kernel\n(one pixel wrong)"], "\[Rule]", 
    ArrayPlot[InverseFourier[Fourier[cd]/Conjugate[Fourier[ikernel]]], Frame -> False]},
   { ArrayPlot[cd, Frame -> False], "deconvolved\n   with", ArrayPlot[RotateRight[nkernel, {size/2, size/2}], 
     PlotLabel -> "Imperfect kernel\n(noisy)" ], "\[Rule]", ArrayPlot[InverseFourier[Fourier[cd]/Conjugate[Fourier[nkernel]]], Frame -> False]}
   }, Alignment -> {Center, Center, {{1, 1} -> Bottom, {2, 1} -> Bottom, {3, 1} -> Bottom, {1, 5} -> Bottom, {2, 5} -> Bottom, , {3, 5} -> Bottom}}]

Licensing edit

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current09:17, 9 May 2019Thumbnail for version as of 09:17, 9 May 2019678 × 636 (171 KB)Berto (talk | contribs)User created page with UploadWizard

There are no pages that use this file.

Metadata