M mona:) New Member Oct 1, 2012 #1 hi buddies i am in an emergency situation , i must divide an image into some image with same size as original one in matlab without using for loop! could anyone help me? here is the code i used but didn't work... imagepath='forest.tif' [I map]=imread(imagepath); Ig=I; if ~isempty(map) Ig=ind2gray(I,map); elseif length(size(I))==3 Ig=RGB2gray(I); else Ig=I; end; I1=I<100; I2=100=< I<160; I3=I>=160; imshow(I2)
hi buddies i am in an emergency situation , i must divide an image into some image with same size as original one in matlab without using for loop! could anyone help me? here is the code i used but didn't work... imagepath='forest.tif' [I map]=imread(imagepath); Ig=I; if ~isempty(map) Ig=ind2gray(I,map); elseif length(size(I))==3 Ig=RGB2gray(I); else Ig=I; end; I1=I<100; I2=100=< I<160; I3=I>=160; imshow(I2)
MikeMl Well-Known Member Most Helpful Member Oct 1, 2012 #2 And the emergency is???? Let me guess, homework assignment is due.