MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / richardsonLucy

Function richardsonLucy

src/api/c/deconvolution.cpp:111–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109
110template<typename T, typename CT>
111void richardsonLucy(Array<T>& currentEstimate, const Array<T>& in,
112 const Array<CT>& P, const Array<CT>& Pc,
113 const unsigned iters, const float normFactor,
114 const dim4 odims) {
115 for (unsigned i = 0; i < iters; ++i) {
116 auto fft1 = fft_r2c<CT, T>(currentEstimate, BASE_DIM);
117 auto cmul1 = arithOp<CT, af_mul_t>(fft1, P, P.dims());
118 auto ifft1 = fft_c2r<CT, T>(cmul1, normFactor, odims, BASE_DIM);
119 auto div1 = arithOp<T, af_div_t>(in, ifft1, in.dims());
120 auto fft2 = fft_r2c<CT, T>(div1, BASE_DIM);
121 auto cmul2 = arithOp<CT, af_mul_t>(fft2, Pc, Pc.dims());
122 auto ifft2 = fft_c2r<CT, T>(cmul2, normFactor, odims, BASE_DIM);
123
124 currentEstimate =
125 arithOp<T, af_mul_t>(currentEstimate, ifft2, ifft2.dims());
126 }
127}
128
129template<typename T, typename CT>
130void landweber(Array<T>& currentEstimate, const Array<T>& in,

Callers 1

iterDeconvFunction · 0.85

Calls 1

dimsMethod · 0.45

Tested by

no test coverage detected