How can i modify matrix which i retrieve from image?
이전 댓글 표시
I have a gray image, i want to see only the black part ,rest of image i want to replace with value 250, so that gray part will be white.
f=imread('image1.jpg');
T = zeros(size(f));
for ii = 1:numel(f)
if f(ii)<50
T(ii) = f(ii);
else
T(ii) = 250;
end
end
imshow(T)
댓글 수: 5
Matt J
2013년 6월 19일
Yes, the code you've shown would accomplish that, so what is your question?
Iain
2013년 6월 19일
What, exactly, is your question?
Umme Tania
2013년 6월 19일
Evan
2013년 6월 19일
What's the minimum value of your image?
Umme Tania
2013년 6월 19일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Image Processing and Computer Vision에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!