({{, (RefLink[ListDeconvolve, paclet:ref/ListDeconvolve])[ker,list] 
gives a deconvolution of list using kernel ker.}})

OpenersNotesSection(Spacer1)Details and Options

The arguments ker and list in (RefLink[ListDeconvolve, paclet:ref/ListDeconvolve])[ker,list] can be real numerical arrays of any rank, and ker cannot be larger than list in any dimension.

The following options can be given:

If the elements of list are exact numbers, (RefLink[ListDeconvolve, paclet:ref/ListDeconvolve]) begins by applying (RefLink[N, paclet:ref/N]) to them.

For a full documentation of available settings, see the reference page for (RefLink[ImageDeconvolve, paclet:ref/ImageDeconvolve]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (10)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Create a 2D array and convolve it with a Gaussian kernel:

data=ImageData[];
ArrayPlot[blurred=ListConvolve[GaussianMatrix[4],data,4,1]]

Deconvolve the array:

ArrayPlot[ListDeconvolve[GaussianMatrix[4],blurred]]

Deconvolve a 3D array:

data=ImageData[];

ListDeconvolve[GaussianMatrix[{{2,2,2}}],data]//Image3D

OpenersExampleSection1(Spacer1)Options  (2)

OpenersExampleSubsection0(Spacer1)Method  (2)

Deconvolve a signal with different levels of regularization:

data ={0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0.5,0.5,0.5,0.5,0,0,0,0,0,0,0,0};
conv =ListConvolve[ker=GaussianMatrix[{{3}}],data,4] + 0.02 * RandomReal[NormalDistribution[],Length[data]];
ker = GaussianMatrix[{{3}}];GraphicsRow[ListLinePlot[{#,conv}, PlotRange-> All,AspectRatio->1/3]&/@{ListDeconvolve[ker,conv,Method->{"DampedLS",0.01}],ListDeconvolve[ker,conv, Method-> {"DampedLS",0.1}],ListDeconvolve[ker,conv, Method-> {"DampedLS",0.5}]},ImageSize->Large]

Use various methods to deconvolve a piecewise constant signal:

data ={0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0.5,0.5,0.5,0.5,0,0,0,0,0,0,0,0};
conv =ListConvolve[ker=GaussianMatrix[{{3}}],data,4] + 0.02 * RandomReal[NormalDistribution[],Length[data]];
ker = GaussianMatrix[{{3}}];
GraphicsRow[ListLinePlot[{Tooltip[#,"deblurred"],Tooltip[conv,"blurred"]}, PlotRange-> All,AspectRatio->1/3]&/@{ListDeconvolve[ker,conv,Method->{"DampedLS"}],ListDeconvolve[ker,conv, Method-> "Wiener"],ListDeconvolve[ker,conv, Method-> "TotalVariation"]},ImageSize->Large]

OpenersExampleSection2(Spacer1)Applications  (2)

Deconvolve a piecewise constant signal that was blurred and corrupted by additive noise:

data ={0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0.5,0.5,0.5,0.5,0,0,0,0,0,0,0,0};
conv =ListConvolve[ker=GaussianMatrix[{{3}}],data,4] + 0.02 * RandomReal[NormalDistribution[],Length[data]];
deconv = ListDeconvolve[ker,conv, Method-> "TotalVariation"];
ListLinePlot[{Tooltip[data,"original"],Tooltip[conv,"blurred"],Tooltip[deconv,"deblurred"]}, PlotRange->{-0.1,1.2}]

Deconvolve a cellular automaton list:

ca = CellularAutomaton[150,{{1},0},30];
ker =BoxMatrix[1]/9;
blurred =ListConvolve[ker,ca]; 
restored = ListDeconvolve[ker, blurred, Method->"RichardsonLucy",  MaxIterations->50];
ArrayPlot /@ {blurred, restored}

OpenersExampleSection3(Spacer1)Properties & Relations  (2)

(RefLink[ListDeconvolve, paclet:ref/ListDeconvolve]) is an approximate inverse of (RefLink[ListConvolve, paclet:ref/ListConvolve]):

data={0.,0.,1.,2.,1.,2.,1.,0.,0.,0.};
ker={1/3,1/3,1/3};
conv=ListConvolve[ker,data,2]

deconv=ListDeconvolve[ker,conv,Method->"RichardsonLucy"]

(RefLink[ImageDeconvolve, paclet:ref/ImageDeconvolve]) can be used to deblur images:

ImageDeconvolve[, DiskMatrix[3]/37]

OpenersExampleSection4(Spacer1)Possible Issues  (1)

Zero regularization values give rise to ringing artifacts:

data ={0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0.5,0.5,0.5,0.5,0,0,0,0,0,0,0,0};
conv =ListConvolve[ker=GaussianMatrix[{{3}}],data,4] + 0.02 * RandomReal[NormalDistribution[],Length[data]];
ker = GaussianMatrix[{{3}}];
ListLinePlot[{ListDeconvolve[ker,conv,Method->{"Wiener",0.0}],conv}, PlotRange-> All,AspectRatio->1/3]

OpenersExampleSection5(Spacer1)Neat Examples  (1)

This generates blurry and noisy data:

f = {6,7,2,5,1};h = {1,1,1}/3.;n = {-0.05, 0.2, 0.1, -0.2, -0.1};

g = ListConvolve[h,f,2]+n

Compute 30 iterations of the Richardson–Lucy algorithm:

tmp =Map[ListDeconvolve[h,g,Method->"RichardsonLucy",MaxIterations->#,Padding->"Periodic"]&, Range[1,30]];

Visualize the restoration process. The red dots show the original values of the signal:

ListLinePlot[Transpose[tmp],PlotStyle->Black,PlotRange->All,AspectRatio->2/3,Epilog->{PointSize[Medium],{Blue,Point[Thread[{1,tmp[[1]]}]]},{Red,Point[Thread[{30,f}]]}}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[ListConvolve, paclet:ref/ListConvolve])  ▪  (RefLink[ImageDeconvolve, paclet:ref/ImageDeconvolve])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Data Transforms and Smoothing, paclet:guide/DataTransformsAndSmoothing])}, {▪(RefLinkPlain[Image Filtering & Neighborhood Processing, paclet:guide/ImageFilteringAndNeighborhoodProcessing])}, {▪(RefLinkPlain[Linear and Nonlinear Filters, paclet:guide/LinearAndNonlinearFilters])}})}})