plz help me in this question
조회 수: 1 (최근 30일)
이전 댓글 표시
imnoise(I,'gaussian',0.1*5e-6); in the above line why it is 0.1*5e-6 is written.
댓글 수: 2
John D'Errico
2017년 7월 21일
편집: John D'Errico
2017년 7월 21일
Why not just read the help for imnoise? There you will find a complete explanation of the parameters for imnoise. Instead, you want someone else to re-write the help for you here?
채택된 답변
Star Strider
2017년 7월 21일
My guess would be sloppy coding. That would evaluate to 5e-7.
댓글 수: 2
Star Strider
2017년 7월 21일
As I read it, it would be the mean, since it is the first argument after 'gaussian' (at least in R2017a).
If you are using an earlier release, you need to see the documentation for the imnoise function for your MATLAB version.
Type either of these in your Command Window:
doc imnoise
or if that does not work, type:
help imnoise
to get the documentation.
추가 답변 (2개)
Image Analyst
2017년 7월 21일
Because the programmer made a mistake, in my opinion, by not being explicit. According to the help:
J = imnoise(I,'gaussian',M,V) adds Gaussian white noise of mean m and variance v to the image I. The default is zero mean noise with 0.01 variance.
so it should take 2 numbers after 'gaussian', not one like they had. Perhaps they meant:
noisyImage = imnoise(I,'gaussian',0.1, 5e-6);
where there is a comma instead of a *, but who knows. You need to ask the programmer.
If they put just one number, the number would be the mean, not the variance. The variance would take on the default value of 0.01
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!