Borrar filtros
Borrar filtros

use of conditional statement

1 visualización (últimos 30 días)
Sapam Jaya
Sapam Jaya el 7 de Feb. de 2014
Comentada: Sapam Jaya el 23 de Feb. de 2014
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.

Respuesta aceptada

Jos (10584)
Jos (10584) el 7 de Feb. de 2014
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 comentario
Sapam Jaya
Sapam Jaya el 23 de Feb. de 2014
Here d values are in columns..i need to get as matrix so as display it.

Iniciar sesión para comentar.

Más respuestas (1)

David Sanchez
David Sanchez el 7 de Feb. de 2014
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 comentarios
Sapam Jaya
Sapam Jaya el 23 de Feb. de 2014
At d intensity of each pixel
Sapam Jaya
Sapam Jaya el 23 de Feb. de 2014
Using if else returns a logical matrix.i want to get d intensity values

Iniciar sesión para comentar.

Categorías

Más información sobre Get Started with Image Processing Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by