%% Author: Aleks Prša % Date: January, 2022 % alex.prsa@gmail.com % ========================================================================= %{ % ------------------------------------------------------------------------- % projImage(proj_tmp, parameter) % ------------------------------------------------------------------------- % DESCRIPTION: % % This function converts attenuation images to signal images and adds % Poisson and Gaussian noise to projection images. % % INPUT: % % - proj_tmp = projection % - parameter = parameter of all geometry % % OUTPUT: % % - dataProj = noised projection images. % %} % ========================================================================= %% Convert attenuation coefficients to signal image and add Poisson and Gaussian noise function dataProjNoise = projImage(proj_tmp, parameter) lambda = parameter.Io * exp(- parameter.dz * proj_tmp); I = parameter.eo .* poissrnd(lambda, parameter.nv, parameter.nu); D = normrnd(parameter.mu, parameter.sigma, parameter.nv, parameter.nu); dataProjNoise = I + D; end