-2

I need to know how to apply Gaussian function on this image as 1D Gaussian fit or 2D Gaussian fit using MATLAB.

Image of (what looks like) a fluorescent bead

Cris Luengo
  • 55,762
  • 10
  • 62
  • 120
Tod S
  • 1
  • 2
    What is “apply Gaussian function”? Do you mean “fit Gaussian function”? Or do you want to filter the image with a Gaussian kernel? Something else? – Cris Luengo Dec 19 '21 at 13:54
  • Hi Cris, I mean the fit Gaussian function. Thanks – Tod S Dec 19 '21 at 23:40

1 Answers1

1

You may use Gero Nootz's Fit 2D Gaussian Function to Data.
It uses a simple model with an example how to use MATLAB's optimizers to get the model parameters.

You may also have a look at Fitting a 2D Gaussian function using scipy.optimize.curve_fit - ValueError and minpack.error.

Eric Johnson
  • 682
  • 1
  • 12
  • Thanks Eric. How does this model function handle pixels? Is the fitting work only on the pixels that cross the line or the summing of the pixels on the entire x and y axis? – Tod S Jan 16 '22 at 16:50
  • For 2D it means it evaluates the best fit taking advantage of all pixels. – Eric Johnson Jan 17 '22 at 16:20