MATLAB中给图像加高斯噪声时imnoise的方差参数问题
在經過仔細閱讀文檔后發現,其實MATLAB的說明文檔已經寫得很清楚,現摘出如下:
J = imnoise(I,type,parameters) Depending on type, you can specify additional parameters to imnoise 《一線大廠Java面試題解析+后端開發學習筆記+最新架構講解視頻+實戰項目源碼講義》無償開源 威信搜索公眾號【編程進階路】 . All numerical parameters are normalized— they correspond to operations with images with intensities ranging from 0 to 1.
其中最關鍵的就是 normalized,即歸一化,方差值在0~1之間。這時才想起來,關于gaussian參數的說明:
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.
即默認的M,V值分別為0, 0.01(注意此處的方差形式)。
所以最終的結論就是 需要對方差歸一化處理 ,比如此處要對一幅256*256的圖像加入標準偏差為10的高斯噪聲,那么相應的語句應為:
J = imnoise(I, ‘gaussian’, 0, 102/2552)
總結
以上是生活随笔為你收集整理的MATLAB中给图像加高斯噪声时imnoise的方差参数问题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 图标设计思路
- 下一篇: 科技爱好者周刊:第 91 期