Borrar filtros
Borrar filtros

code explanation in image processing

1 visualización (últimos 30 días)
Sivakumaran Chandrasekaran
Sivakumaran Chandrasekaran el 24 de Ag. de 2012
a = imread('cameraman.tif');
threshold = 150
a(a>threshold)
...
Hi, This is my code and can anyone tell me what exactly the code does?
Regards, Siva

Respuestas (1)

Jürgen
Jürgen el 24 de Ag. de 2012
Editada: Image Analyst el 24 de Ag. de 2012
Hi, It gives you all values of a that are higher than threshold a>150 gives a logical (0 or 1) matrix from the same size as a: 0 (false) if element < or = 150 ; 1 (true) if element > 150 if you use that as index => you get the values of a larger than 150 greetings
  1 comentario
Image Analyst
Image Analyst el 24 de Ag. de 2012
The third line will also print all the gray level values of all pixels to the command window, since he did not end the line with a semicolon.

Iniciar sesión para comentar.

Categorías

Más información sobre 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