i have following code of image extraxtion but i got gray scale image output while giving input color image ,how could i get the color image output
Show older comments
a=imread('new2.png');
c=zeros(35,57,3)
e=zeros(35,57,3)
for i=1:35; for j=1:57; if a(i,j,1)>233 if a(i,j,1)<254 c(i,j,1)=a(i,j,1);
for i=1:35;
for j=1:57;
if a(i,j,2)>25
if a(i,j,2)<30
c(i,j,2)=a(i,j,2);
for i=1:35;
for j=1:57;
if a(i,j,3)>35
if a(i,j,3)<40
c(i,j,3)=a(i,j,3);
end
end
end
end
end
end
end
end
end
end
end
end
e=logical(c) colormap(jet) image(e)
Accepted Answer
More Answers (0)
Categories
Find more on Blue in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!