From: Stacy Ross on
Hello,
I want to convert my RGB image to gray to complete a step that requires uint8. But after that step, is there a way for me to put the gray scale back to RGB?

Thanks in advance!

Stacy
From: ImageAnalyst on
Stacy:
It's possible with the cat(3,r,g,b) command but only if you have the
red, green, and blue channels. They may have been altered somehow by
you, but you at least have to have them to get a true color image.
Otherwise you can get a "color" image in the sense that it's a 3D
image but it will have only a monochrome appearance because that's
what you'd have if you used only a single monochrome image to build up
your 3D image array. Make sense?

From: Stacy Ross on
ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <ecdc4ac6-f62a-45a6-b22e-b5e84d805c23(a)b33g2000yqc.googlegroups.com>...
> Stacy:
> It's possible with the cat(3,r,g,b) command but only if you have the
> red, green, and blue channels. They may have been altered somehow by
> you, but you at least have to have them to get a true color image.
> Otherwise you can get a "color" image in the sense that it's a 3D
> image but it will have only a monochrome appearance because that's
> what you'd have if you used only a single monochrome image to build up
> your 3D image array. Make sense?


I start out with the RGB and know how to split it into R,G,B. Then I know how to make it gray scale. The next step, I complete a function that connects some pixels, but discards others. I want to know if I can take this gray image, with some discarded pixels, and get it back into RGB.
From: ImageAnalyst on
See my prior answer. I don't know what else to add. Like I said, you
need 3 monochrome images to build into a 3D RGB image. Do you have 3
2D gray scale images?
From: Mark Shore on

> I start out with the RGB and know how to split it into R,G,B. Then I know how to make it gray scale. The next step, I complete a function that connects some pixels, but discards others. I want to know if I can take this gray image, with some discarded pixels, and get it back into RGB.

The reason ImageAnalyst asks whether you've retained separate greyscale images for the individual RGB components is that information is irretrievably lost when you convert a color image to a single greyscale one. The conversion is essentially one way only.