Borrar filtros
Borrar filtros

how do i convert rgb image to grayscale and then back to rgb?

3 visualizaciones (últimos 30 días)
Aakash Amar
Aakash Amar el 30 de Mzo. de 2017
Respondida: TEJASWINI CHINAWALE el 21 de Sept. de 2017
please help me out if there is any method to do this

Respuestas (2)

Image Analyst
Image Analyst el 30 de Mzo. de 2017
Try
grayImage = rgb2gray(rgbImage); % Convert to gray scale.
rgbImage = ind2rgb(grayImage, colorMap); % Will not be the same original RGB image though.

TEJASWINI CHINAWALE
TEJASWINI CHINAWALE el 21 de Sept. de 2017
You can try using jet(m) command which returns the colormap with m colors. You can change the value of m depending on how the converted image should look like.However it is not possible to obtain the original coloured image once you convert it to grayscale or any other form.

Categorías

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