Q:

Some image acquisition systems are not very accurate, and the result is noisy images. To see this effect, put a JPEG file in your Current Folder and use imread to load it

0

Some image acquisition systems are not very accurate, and the result is noisy images. To see this effect, put a JPEG file in your Current Folder and use imread to load it. Then, create a new image matrix by randomly adding or subtracting a value n to every element in this matrix. Experiment with different values of n. Create a script that will use subplot to display both images side by side.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Ch13Ex11.m

% Make an image "noisy" and show both side by side

im = imread('photo1.jpg');

[r, c, d] = size(im);

im2 = im;

n = 50;

im2(:,:,1) = im2(:,:,1) + uint8(n*randi([-1 1],r,c));

im2(:,:,2) = im2(:,:,2) + uint8(n*randi([-1 1],r,c));

im2(:,:,3) = im2(:,:,3) + uint8(n*randi([-1 1],r,c));

subplot(1,2,1)

image(im)

subplot(1,2,2)

image(im2)

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now