RES: Transferring Color to Greyscale Images
"Felipe Rezek Mohallem" <[email protected]> Thu, 21 Aug 2003 11:24:13 -0300
| Newsgroups | gmane.comp.lang.delphi.programming |
|---|---|
| Message-ID | <[email protected]> |
Just call the funcition RGB ( red, green, blue )! -----Mensagem original----- De: rolfjf [mailto:[email protected]] Enviada em: quinta-feira, 21 de agosto de 2003 09:46 Para: [email protected] Assunto: [Delphi] Transferring Color to Greyscale Images Thank you for your help! That was really a good ideia! But, I=B4mtrying to do what the article "Transferring Color to Greyscale Images" by Tomihisa Welsh, Michael Ashikhmin and Klaus Mueller. They convert RGB to LAB (luminance, alpha, beta). They use what is in the article "Color Transfer between Images" by Reinhard, Ashikhmin, Gooch e Shirley. I created 6 arrays for each image, one for R, one for G, one for B, one for L, one for alpha and one for beta. How can I assembly 3 values (R,G,B) into one to have the color of the pixel? Rolf > hello Rolf, > as u know colors are from red blue and green, a grayscale color has > got the same value of these 3 colors. for example 200,200,200 is a > silver (grayscale) color but 200,200,199 is not. I think you should > use this method for your filter: > get each color value from the greyscale picture and the colored > picture, add them up then div 2 (Average). > think, the silver color is 666666 and the rgb color is 3F8F3D, you > see 3F is 63 and 8F is 143 and 3D is 61 in dec. > ( 66 + 63 ) / 2 =3D 64 -> 40 in hex > ( 66 + 143) / 2 =3D 104 -> 68 in hex > ( 66 + 61 ) / 2 =3D 63 -> 3F in hex > so the mixed color is 40683F. well 666666 is a dark gray and 3F8F3D > is a green and the result is a dark green! there are 255 colors in > grayscale mode, one is white one is black and 223 colors are silver. > > Joy, > > Comboy. > > > Hi > > What I want to do is transfer color from a color image to a > greyscale > > image. There is a paper called "Transferring Color to Greyscale > > Images" and I want to make a program that uses this paper. > > The user gives a color image and a greyscale image and the program > > transferes colors from the color image to the greyscale... > > It=B4s eazy to find the paper in google... > > Could you help me? > > thank you > > Rolf Yahoo! Groups Sponsor ADVERTISEMENT Delphi VCL Top Sites! http://www.sandbrooksoftware.com/TS/TS2/Components.shtml --------------------------------------------------------------- Unsubscribe:[email protected] List owner:[email protected] --------------------------------------------------------------- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. [Non-text portions of this message have been removed] ------------------------ Yahoo! Groups Sponsor ---------------------~--> Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. h= ttp://www.c1tracking.com/l.asp?cid=3D5511 http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/i7folB/TM ---------------------------------------------------------------------~-> Delphi VCL Top Sites! http://www.sandbrooksoftware.com/TS/TS2/Components.shtml --------------------------------------------------------------- Unsubscribe:[email protected] List owner:[email protected] ---------------------------------------------------------------=20 Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/=20