[問題] imnoise已回收

看板MATLAB作者 (技安)時間16年前 (2009/06/30 22:17), 編輯推噓1(101)
留言2則, 2人參與, 最新討論串1/1
不好意思我問個問題 我現在有個gray的image y 裡頭值是double值的range 是0~255 我是這樣寫的 Noisy = imnoise(y,'gaussian', 0 , 0.05); 然後Noisy跑出來的圖片是range為0~1之間的double 在他的的help我發現這行 Note: The mean and variance parameters for 'gaussian', 'localvar', and 'speckle' noise types are always specified as if the image were of class double in the range [0, 1]. If the input image is of class uint8 or uint16, the imnoise function converts the image to double, adds noise according to the specified type and parameters, and then converts the noisy image back to the same class as the input. 意思是說我必須先把原圖先用成介於[0 1]之間然後做完再轉回來嗎? 請問高手是怎樣做的 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.4.234

07/01 05:12, , 1F
我不是高手...但是我的確是先轉成[0 1],之後再轉回來
07/01 05:12, 1F

07/01 14:47, , 2F
不然也可以把noise*255再加回影像...
07/01 14:47, 2F
文章代碼(AID): #1AIXviPH (MATLAB)
文章代碼(AID): #1AIXviPH (MATLAB)