how to set all pixels in the range (100 , 190) to 40 for some picture called "school" ??
조회 수: 2 (최근 30일)
이전 댓글 표시
how to set all pixels in the range (100 , 190) to 40 for some picture called "school" ?? , plz i need full code for doing that
댓글 수: 0
답변 (3개)
Walter Roberson
2013년 6월 21일
편집: Walter Roberson
2013년 6월 21일
school = imread('school.tif');
school(school > 100 & school < 190) = 40;
imshow(school)
댓글 수: 0
Image Analyst
2014년 6월 24일
Try
school(school >= 100 & school <= 190) = 40;
Same as the others had but since 100 and 190 are in the range I used the = sign whereas the others didn't so pixels with values of 100 and 190 will not get set to 40 in their answers.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!