Created
August 26, 2016 20:21
-
-
Save juniorhero/4ab69f387e7af3b262b479055381bff3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a=imread('lena.png'); | |
subplot(2,2,1); | |
imshow(a); | |
[M,N]=size(a); | |
title 'Original Image'; | |
r1=input('enter value r1: '); | |
r2=input('enter value r2: '); | |
for i=1:1:M | |
for j=1:1:N | |
if a(i,j)>=r1 && a(i,j)<=r2 | |
b(i,j)=255; | |
% d(i,j)=255; | |
else | |
b(i,j)=a(i,j); | |
% d(i,j)=0; | |
end | |
end | |
end | |
% s1=uint8(s); | |
subplot(2,2,2); | |
imshow(b); | |
title 'Output 1'; | |
% subplot(2,2,3); | |
% imshow(d); | |
% title 'Output 2'; |
Author
juniorhero
commented
Aug 26, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment