What is wrong with this grey level sliced without background code?

1 visualización (últimos 30 días)
Sumeet Badgujar
Sumeet Badgujar el 28 de Oct. de 2018
Respondida: Walter Roberson el 28 de Oct. de 2018
aa=input('image.jpg');
z=aa;
e=input ('Enter lower threshold value ');
f=input ('Enter higher threshold value ');
%Grey level without background
mask = (z>e) & (z<f);
z(mask)=255;
mask1=(z<e) & (z>f);
z(mask1)=0;
subplot(2,2,4);
imshow(z);
title ('Grey level sliced image without background');

Respuestas (1)

Walter Roberson
Walter Roberson el 28 de Oct. de 2018
Suppose the user entered 17 and 222. Now when you compute mask1, which pixels in the image will have a value that is simultaneously less than 17 & greater than 222?

Categorías

Más información sobre Image Processing Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by