Workaround for the norminv function in statistics toolbox

18 ビュー (過去 30 日間)
Kyle Bryenton
Kyle Bryenton 2013 年 7 月 19 日
I am working on some image processing software and to get rid of the background noise in the pictures I am working with, it was suggested I use the following code. I found that it worked, however the computer I want to process these images on does not have the statistics toolbox which contains the norminv function. I was wondering if there is a way to work around using that particular function
Here is what my code currently looks like:
im=rgb2gray(imread(input('What picture would you like to input: ','s')));
fmt=fspecial('gaussian',2*ceil(-norminv((1e-1)/2,0,4))+1,4.0);
im2=(double(im)-imfilter(double(im),fmt))./(sqrt(imfilter((double(im)-imfilter(double(im),fmt)).^2,fmt)));
im3=filter2(fspecial('average',10),im2);
im4=...
Any suggestions?

採用された回答

Wayne King
Wayne King 2013 年 7 月 19 日
編集済み: Wayne King 2013 年 7 月 19 日
You can use the inverse complementary error function. You'll have to convert from a nonstandard normal distribution, but that should not be hard.
If you are dealing with the standard normal, N(0,1), then
p = 0.9;
norminv(p)
is equal to
-sqrt(2)*erfcinv(2*p)
If you have a Gaussian distribution other than the standard normal
mu = 1;
sigma = 4;
p = 0.9;
norminv(0.9,1,4)
equals
sigma.*(-sqrt(2)*erfcinv(2*p))+mu
  1 件のコメント
Kyle Bryenton
Kyle Bryenton 2013 年 7 月 19 日
Thank you I will give it a try :)

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by