I have a normalized image of size 160*190.i have to decompose it to low,middle and high inetnsity.the low bound is 0.4 and high bound is 0.7.which conditional statement can give the correct ans.

 Akzeptierte Antwort

Jos (10584)
Jos (10584) am 7 Feb. 2014

0 Stimmen

Here is an example to obtain low intensities. It is often handy to keep the original format and set the elements you are not interested in to NaN or some other arbitrary value.
AllImage = rand(6,5) % smaller example
tf = AllImage < 0.4
lowImage = nan(size(AllImage))
lowImage(tf) = AllImage(tf)
ValuesOnly = AllImage(tf)

1 Kommentar

Sapam Jaya
Sapam Jaya am 23 Feb. 2014
Here d values are in columns..i need to get as matrix so as display it.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

David Sanchez
David Sanchez am 7 Feb. 2014

0 Stimmen

if (x<0.4)
...do anything
elseif (x>=0.4 | x<=0.7)
...do another thing
else % this is for x>0.7
...whatever
end

4 Kommentare

Sapam Jaya
Sapam Jaya am 7 Feb. 2014
i have to group to low,high,middle respectively.i have tried with this but i m not getting d ans
Walter Roberson
Walter Roberson am 7 Feb. 2014
Are you looking at the intensity of each pixel? Or are you looking for an overall intensity?
Sapam Jaya
Sapam Jaya am 23 Feb. 2014
At d intensity of each pixel
Sapam Jaya
Sapam Jaya am 23 Feb. 2014
Using if else returns a logical matrix.i want to get d intensity values

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Encryption / Cryptography finden Sie in Hilfe-Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by