which imshow is true?
Afficher commentaires plus anciens
Hello. I have an image that i add some noise to it. finally i want to show it with imshow.i use two syntax but i dont know which one is right? here is my code:
% 2nd way b
clear all;
close all;
clc;
I=im2double(imread ('cameraman.tif'));
size_I=size(I);
%%adding noises
%adding quantization noise
thresh = multithresh(I,7);
valuesMax = [thresh max(I(:))];
[quant8_I_max,~] = imquantize(I,thresh,valuesMax);
%speckle noise
SI=imnoise(I,'speckle',0.2);
% adding salt and pepper noise or shot noise
Shot_noise = imnoise(I, "salt & pepper", 0.20);
%adding background noise
mean=0.5953;
BG = poissrnd(mean, size_I);
BGR=I+BG;
BGR=BGR./max(BGR);
% total noise
noisy_image=I+quant8_I_max+SI+Shot_noise+BGR;
figure
imshow(I);
title('Original Image')
figure
subplot(121)
imshow(noisy_image,[])
title("noisy image show with []");
subplot(122)
imshow(noisy_image)
title("noisy image show without []");
1 commentaire
Stephen23
le 21 Déc 2021
Do you want to scale the image to its maximum and minimum values, or not? Only you know what your intent is.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Image Arithmetic dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
