Adding poisson noise to a self made image
16 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I have seen similar questions
to my own before, but unfortunately I have not managed to fix it. I want to use imnoise to apply a Poisson noise to an image. I suspect my problem is that I don't really understand the necessary scaling which in the documentation is supposed to be 1e12 or 1e6. As far as I understand this number is supposed to correspond to the number of photons per pixel. The Poisson distribution is , where as I understand λ is the expected number of photons per pixel, and k is the actual number of photons per pixel.
My code is the following:
imageSizeX = 500;
imageSizeY = 420;
image=zeros(imageSizeX,imageSizeY,3)+1; %initialize white background
image(150:350,190:240,1:3)=0; %Black object
imgGauss = imnoise(image,'gaussian'); %Adds Gaussian white noise
imgPoisson = imnoise(image/1e12,'poisson'); %Adds Poisson noise
figure(1)
imshow(image)
figure(2)
imshow(imgGauss)
figure(3)
imshow(imgPoisson)
The output of imshow(imgPoisson) is just a black image. Can anyone enlighten me, and hopefully others, how one is supposed to use the imnoise function with a very basic example as the one shown above?
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!