From: ebaugh on 21 May 2010 06:45 How would one convert a grey scale image into another color scale? By "another color-scale" I mean rather than rendered in shades of grey, rendered in shades of a different color. Many thanks, Jason In case you were wondering why I am asking: I am attempting to use Mathematica to analyse microarray data. The capture software outputs multi-image tifs. One image represents a green wavelength, another image represents a green wave length. But they are rendered in grey scale. These images get combined to give a ratio of the two wavelength, but for that to work, they have to be converted from greyscale. Jason Ebaugh, PhD. Ad astra per aspera Dissertation: http://hdl.handle.net/2142/13005 Linkedin: http://www.linkedin.com/profile? viewProfile=&key=22842228&locale=en_US&trk=tab_pro
From: Matthias Odisio on 22 May 2010 00:40 Jason, On 5/21/10 5:45 AM, ebaugh(a)illinois.edu wrote: > How would one convert a grey scale image into another color > scale? > > By "another color-scale" I mean rather than rendered in shades > of grey, rendered in shades of a different color. > > Many thanks, > Jason > > > In case you were wondering why I am asking: > I am attempting to use Mathematica to analyse microarray data. > The capture software outputs multi-image tifs. > One image represents a green wavelength, another image > represents a green wave length. But they are rendered in grey > scale. These images get combined to give a ratio of the two > wavelength, but for that to work, they have to be converted from > greyscale. I'm unsure I understood what you're looking for, so my answers may be too widespread. Did you mean that one image represents a green wavelength and the other other one a red wavelength? From your two single-channel images imggreen and imgred, you can create a RGB color image like that, creating a blue channel that is equal to 0 everywhere: ColorCombine[{imgred, imggreen, ImageMultiply[imgred, 0]}] Or would you like to visualize the two images in two different colors? ImageApply[#*{1, 0, 0} &, imgred] ImageApply[#*{0, 1, 0} &, imggreen] If you'd like to compute a ratio between, say, the log of the pixel values: lr = Log[2, 1 + ImageData[imgred, "Byte"]]; lg = Log[2, 1 + ImageData[imggreen, "Byte"]]; ratio = lr - lg ListPlot[Transpose[Flatten /@ {.5*(lg + lr), lr - lg}]] Matthias Odisio Wolfram Research
From: Patrick Scheibe on 22 May 2010 00:41 Hi, zillion ways exist. One is to use ArrayPlot and change the ColorFunction. Please check the option ColorFunctionScaling and all the nice Color Schemes inside Mathematica too: data = ImageData[ColorConvert[Import["http://img.diytrade.com/\ cdimg/186638/526363/0/1068053813/Mucy_Grey_Mystic_Grey_Gris_\ Jaspe.jpg"], "Grayscale"], "Byte"]; ArrayPlot[data, ColorFunction -> ColorData["BrightBands"]] For large images this solution maybe not the best one. Cheers, Patrick PS: If the link is destroyed through my/your email client, just import any image. On Fri, 2010-05-21 at 06:45 -0400, ebaugh(a)illinois.edu wrote: > How would one convert a grey scale image into another color > scale? > > By "another color-scale" I mean rather than rendered in shades > of grey, rendered in shades of a different color. > > Many thanks, > Jason > > > In case you were wondering why I am asking: > I am attempting to use Mathematica to analyse microarray data. > The capture software outputs multi-image tifs. > One image represents a green wavelength, another image > represents a green wave length. But they are rendered in grey > scale. These images get combined to give a ratio of the two > wavelength, but for that to work, they have to be converted from > greyscale. > > > Jason Ebaugh, PhD. > Ad astra per aspera > > Dissertation: http://hdl.handle.net/2142/13005 > Linkedin: http://www.linkedin.com/profile? > viewProfile=&key=22842228&locale=en_US&trk=tab_pro >
From: Yasvir Tesiram, PhD on 22 May 2010 00:43 Hello, Something like, redchannel == RandomInteger[{1, 255}, {96, 96}]; greenchannel == RandomInteger[{1, 255}, {96, 96}]; GraphicsRow[{ArrayPlot[redchannel, ColorFunction -> (RGBColor[#, 0, 0] &)], ArrayPlot[redchannel, ColorFunction -> (RGBColor[0, #, 0] &)]} ] Yas -----Original Message----- From: ebaugh(a)illinois.edu [mailto:ebaugh(a)illinois.edu] Sent: Friday, May 21, 2010 5:45 AM Subject: Changing image from grey-scale to another How would one convert a grey scale image into another color scale? By "another color-scale" I mean rather than rendered in shades of grey, rendered in shades of a different color. Many thanks, Jason In case you were wondering why I am asking: I am attempting to use Mathematica to analyse microarray data. The capture software outputs multi-image tifs. One image represents a green wavelength, another image represents a green wave length. But they are rendered in grey scale. These images get combined to give a ratio of the two wavelength, but for that to work, they have to be converted from greyscale. Jason Ebaugh, PhD. Ad astra per aspera Dissertation: http://hdl.handle.net/2142/13005 Linkedin: http://www.linkedin.com/profile? viewProfile==&key==22842228&locale==en_US&trk==tab_pro
|
Pages: 1 Prev: Numerical solution of differential equation with boundary Next: data in absolutetime |