How to convert pixel color white to black and other color to white

1 visualización (últimos 30 días)
lina
lina el 16 de Dic. de 2012
dear all,
I need the information how to convert the white pixel to black, and convert the other colors in to white
thanks
  5 comentarios
lina
lina el 16 de Dic. de 2012
okay sorry if my question not clear, I want to change: (255,255,255) into black and other colors: (0<=color<255,0<=color<255,0<=color<255) into white thanks
Image Analyst
Image Analyst el 16 de Dic. de 2012
Are you sure you have a true color image and not a gray scale uint8 image?

Iniciar sesión para comentar.

Respuestas (2)

Walter Roberson
Walter Roberson el 16 de Dic. de 2012
newImage = ~all(Image == 255,3);

Image Analyst
Image Analyst el 16 de Dic. de 2012
On the wild chance that it's a gray level image...
binaryImage = grayScaleImage < 255;

Categorías

Más información sobre Convert Image Type en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by