How can I make a gray-scale image with a continuously changing intensity pattern?
Mostrar comentarios más antiguos
Hi. I am trying to figure out how to make a gray-scale image with a continuously changing intensity pattern. For example, if I run the code below, I get a staircase-like discrete pattern along the horizontal direction because of the limited number of colormap values (?). I wonder if I can make it displayed more smoothly.
x = [1:10000]; figure(1), imagesc(x), colormap gray
Thank you!
Respuesta aceptada
Más respuestas (1)
Image Analyst
el 1 de Feb. de 2013
If you don't specify the number of steps in the colormap, it defaults to 64 which give rise to the step-like appearance. You can specify how many steps to give the colormap, up to a max of 256. So do this, to give a smoother appearance:
colormap(gray(256));
1 comentario
ysung
el 2 de Feb. de 2013
Categorías
Más información sobre Images en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!