Filter löschen
Filter löschen

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

2 Ansichten (letzte 30 Tage)
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

Antworten (3)

Iain
Iain am 21 Jun. 2013
If you mean pixel levels in that range:
school(school > 100 & school < 190) = 40;

Walter Roberson
Walter Roberson am 21 Jun. 2013
Bearbeitet: Walter Roberson am 21 Jun. 2013
school = imread('school.tif');
school(school > 100 & school < 190) = 40;
imshow(school)

Image Analyst
Image Analyst am 24 Jun. 2014
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.

Kategorien

Mehr zu Resizing and Reshaping Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by