How do I add noise to a color image without using imnoise function?

2 次查看(过去 30 天)
is it possible to create noise in a color image without using imnoise function?

回答(2 个)

Image Analyst
Image Analyst 2013-4-17
Yes, you could use rand(), or just write any nonsense into the image that is not the image, such as
if yourImage(row, column) ~= 42
yourImage(row, column) = 42; % I just created noise!
end

Deepak Dhillon
Deepak Dhillon 2019-7-8
Hi Arun,
To add awgn noise (mean = 0, standard deviation = 30) to a colored image without using imnose() function:
You can add the awgn noise of mean = 0, standard deviation = 30 to each of Red, Green, and Blue channels independently; and then combine the noisy channels to form the colored noisy image.
I tried with both the methods (imnoise and independently), I got the same result.
  2 个评论
Image Analyst
Image Analyst 2019-7-8
Arun:
If you're not allowed to use imnoise(), are you allowed to use ANY built-in function, such as rand(), randn(), or awgn()?
Deepak Dhillon
Deepak Dhillon 2019-7-9
Hi Arun,
rand() and randn() are very basic functions. They can be found in every scientific engineering module of a programing language. You should use these.
But awgn() and imnoise() are not very basic functions. They may not be present in some language's library. You can avoid their use, if you want.
Also rand() and randn() are random number generator functions. Writing these functions on our own could be a tedious task and a project in its own. I would suggest you to never hesitate using these two build-in functions.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Motor Drives 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by