フィルターのクリア

Reconstruct Gaussian fitted Beads

2 ビュー (過去 30 日間)
John
John 2014 年 10 月 30 日
コメント済み: John 2014 年 10 月 31 日
I have gaussian fitted a bead in an image and I have its x & y coordinate, standard deviation (std) of the gauss fit as well as amplitude (amp). Is there a way to reconstruct the bead from the x,y,std & amp values?

採用された回答

Image Analyst
Image Analyst 2014 年 10 月 30 日
Try this:
grayImage = zeros(480, 640, 'uint8');
[rows, columns] = size(grayImage);
xCenter = 200;
yCenter = 300;
sigma = 50;
sigmaSquared = sigma^2;
amplitude = 255;
[X, Y] = meshgrid(1:columns, 1:rows);
grayImage = exp(-((X-xCenter).^2 + (Y-yCenter).^2) ./ sigmaSquared);
imshow(grayImage, []);
axis on
  3 件のコメント
Image Analyst
Image Analyst 2014 年 10 月 31 日
編集済み: Image Analyst 2014 年 10 月 31 日
You could use it like this:
grayImage = amplitude * exp(-((X-xCenter).^2 + (Y-yCenter).^2) ./ sigmaSquared);
I chose that so that the numbers would go from 0 - 255, and if they did, I could cast to uint8 and display it with imshow() without the []. But I must have forgotten to put it in when I remembered imshow() can display floating point images scaled to 0-255 for display if you use the [] as the second input argument.
If it's "closer" but not enough to officially "Accept" the answer, then let me know exactly what you are looking for. For example, attach a screenshot or image or something to fill in the details missing from your original question.
John
John 2014 年 10 月 31 日
Awesome, thanks.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeExplore and Edit Images with Image Viewer App についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by