フィルターのクリア

how to set all pixels in the range (100 , 190) to 40 for some picture called "school" ??

2 ビュー (過去 30 日間)
Maria
Maria 2013 年 6 月 21 日
回答済み: Image Analyst 2014 年 6 月 24 日
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

回答 (3 件)

Iain
Iain 2013 年 6 月 21 日
If you mean pixel levels in that range:
school(school > 100 & school < 190) = 40;
  2 件のコメント
Maria
Maria 2013 年 6 月 21 日
i meant the matrix array pixel values ,can u help me
Iain
Iain 2013 年 6 月 21 日
Have you tried my code?

サインインしてコメントする。


Walter Roberson
Walter Roberson 2013 年 6 月 21 日
編集済み: Walter Roberson 2013 年 6 月 21 日
school = imread('school.tif');
school(school > 100 & school < 190) = 40;
imshow(school)

Image Analyst
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.

カテゴリ

Help Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by