I have gray scale noisy image (2-D). I want to plot Gaussian PDF for this 2-D gray scale noisy image in MATLAB. How I write matlab code for this?

2 次查看(过去 30 天)
I have gray scale noisy image (2-D). I want to plot Gaussian PDF for this 2-D gray scale noisy image in MATLAB. How I write matlab code for this?

回答(1 个)

John D'Errico
John D'Errico 2017-6-29
编辑:John D'Errico 2017-6-29
If the image noise is presumed to be i.i.d. Gaussian (independent, identically distributed) then I'd probably do what I did in my estimate noise utility on the FEX. While it works on 1-d data only, the basic idea will still work.
1. Convolve your image with a simple finite difference kernel, like K = [0 1 0;1 -4 1;0 1 0]/sqrt(20). So conv2 will apply here. The convolution will remove any local trends, while leaving behind colored noise. But it will have the same variance as your original noise. Don't forget to convert to doubles first.
2. Unroll the array, because the result will be a simple list of samples from a Gaussian.
3. Trim off the outliers from the sample. That tries to remove any sharp transients from the original image.
4. What remains will be Gaussian variates. Estimate the variance of the Gaussian noise distribution using var. Even better code might try to estimate the variance using a censored Gaussian knowing the trim fraction, but this might be problematic.

类别

Help CenterFile Exchange 中查找有关 Image Segmentation and Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by