8 #ifndef varmapToImage_hpp
9 #define varmapToImage_hpp
28 template<
typename imageT >
34 typedef typename imageT::Scalar floatT;
36 im.resize(varmap.rows(), varmap.cols());
45 #pragma omp parallel for
46 for(
int i=0; i< im.rows(); ++i)
48 for(
int j=0; j< im.cols(); ++j)
50 for(
int ii =0; ii < im.rows(); ++ii)
52 psf_i = 0.5*(psf.rows()) - (ii - i);
54 if( psf_i < 0 || psf_i >= psf.rows())
continue;
56 for(
int jj =0; jj < im.cols(); ++jj)
58 psf_j = 0.5*(psf.cols()) - (jj - j);
60 if( psf_j >= 0 and psf_j < psf.cols() )
62 psfVal = psf(psf_i, psf_j)/psfNorm;
63 im(i, j) += varmap(ii, jj) * psfVal;
void varmapToImage(imageT &im, imageT &varmap, imageT &psf)
Convert a wavefront variance map to an intensity image by convolving with the PSF.