Hi LM,
Based on my understanding, you want to define a Gaussian point spread function (PSF) using the amplitude, sigma, and mean (mu) as parameters.
To achieve this, you can use one of the following methods:
- You can create a custom function to generate a Gaussian PSF using the given parameters. Below is a sample function:
function psf = createGaussianPSF(amplitude, sigma, mu, size)
%create a grid of points
[x, y] = meshgrid(-(size(2)-1)/2:(size(2)-1)/2, -(size(1)-1)/2:(size(1)-1)/2);
mu_x = mu(1);
mu_y = mu(2);
%create custom PSF
PSF = amplitude * exp(-((x - mu_x).^2 + (y - mu_y).^2) / (2 * sigma^2));
PSF = circshift(PSF, [mu_y, mu_x]);
end
- You can create a Gaussian PSF using MATLAB 'fspecial' function and adjust it according to your parameters:
PSF = fspecial('gaussian', hsize, sigma);
PSF = amplitude * PSF;
shift_x = mu(1);
shift_y = mu(2);
PSF = circshift(PSF, [shift_y, shift_x]);
To apply Lucy-Richardson deblurring algorithm, you can use MATLAB 'deconvlucy' function.
For more information, please refer to the following MATLAB documentations for ‘circshift’, ‘fspecial’ and ‘deconvlucy’ functions, respectively.
- https://www.mathworks.com/help/matlab/ref/circshift.html
- https://www.mathworks.com/help/images/ref/fspecial.html
- https://www.mathworks.com/help/images/ref/deconvlucy.html
Hope this solves your query.
