Info

此问题已关闭。 请重新打开它进行编辑或回答。

Noise to Image Object

1 次查看(过去 30 天)
Kelsey
Kelsey 2020-2-26
关闭: MATLAB Answer Bot 2021-8-20
Hello! I am a little rusty on my matlab and would love any and all feedback. I am creating a new image using smaller images (think collage style). I am happy with the output image. However, I would like to add gaussian noise to the output image. I am having issues because the imnoise function does not work with an image object datatype. I'm sure there is an easy solution but I can't seem to find exactly what I am looking for. Thanks in advance.
image(B_1);
hold on
image(pos, pos2 , Hit_1);
image(pos5, pos6, Hit_2);
image(pos3, pos4, Noise1);
rectangle('Position', [pos pos2 s s], 'EdgeColor','r')
rectangle('Position', [pos3 pos4 s2 s2], 'EdgeColor','r')

回答(1 个)

Prabhan Purwar
Prabhan Purwar 2020-3-2
Hello,
Following code may help
C = imread('ngc6543a.jpg');
ni=imnoise(C,'gaussian');
imshow(ni)
imshow(C)
Kindly make use of imwrite() to convert file into jpg format as shown
A = rand(50);
imwrite(A,'myGray.png')
Following links may help

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by