How to plot a Gaussian 2d of grayscale image

19 Ansichten (letzte 30 Tage)
Alan David
Alan David am 11 Nov. 2020
Kommentiert: Ameer Hamza am 11 Nov. 2020
I'm beginner in Matlab programming and I'm try to find a peak in grayscale image using gaussian fit.
but no luck; Is there any preprocessing image before applying this function.

Antworten (1)

Ameer Hamza
Ameer Hamza am 11 Nov. 2020
Bearbeitet: Ameer Hamza am 11 Nov. 2020
If you directly want to create an image matrix, the try something like this
[X, Y] = meshgrid(-3:0.01:3);
Z = exp(-X.^2-Y.^2);
Z = rescale(Z, 0, 1);
imshow(Z)
  2 Kommentare
Alan David
Alan David am 11 Nov. 2020
Thanks Ameer,
I have an image already but in the function they mention the input as:
% x0 = [Amp,x0,wx,y0,wy,theta]: Inital guess parameters.
% x = [Amp,x0,wx,y0,wy,theta]: simulated gaussian parameters.
how to get these parameters from my image?
Ameer Hamza
Ameer Hamza am 11 Nov. 2020
Can you show the image?

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by