home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / graphics / 11999 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  4.5 KB

  1. Path: sparky!uunet!ukma!usenet.ins.cwru.edu!agate!doc.ic.ac.uk!uknet!mucs!lilleyc
  2. From: lilleyc@cs.man.ac.uk (Chris Lilley)
  3. Newsgroups: comp.graphics
  4. Subject: Re: Color Sample to RGB Conversion
  5. Keywords: color conversion
  6. Message-ID: <6759@m1.cs.man.ac.uk>
  7. Date: 17 Nov 92 02:00:30 GMT
  8. References: <hewitt.721337021@usafa.af.mil>
  9. Sender: news@cs.man.ac.uk
  10. Organization: Dept Computer Science, University of Manchester, U.K.
  11. Lines: 94
  12.  
  13. In article <hewitt.721337021@usafa.af.mil> hewitt@usafa.af.mil (W. Joe
  14. Hewitt) writes: 
  15.  
  16. >     I am looking for a way to generate a color on a workstation that closely 
  17. >matches a given sample from a color plate.  
  18.  
  19. The simple answer is, mix it by eye. This is also a pretty accurate
  20. answer. However you may want to do this automatically, perhaps for a
  21. large number of colours. So you need a way of spacifying the colour
  22. numerically.
  23.  
  24. >     I have tried scanning the image (24 bit scanner) with little success.  
  25. >The scanning software only gives percentages of the R,G, & B components.  
  26. >Using a little math I converted each percentage to a value in the range 
  27. >0..255 (24 bit color system) for each RGB component.  
  28.  
  29. OK so you scanned it in as an RGB image. That will not help solve your
  30. problem, however.
  31.  
  32. >The problem is that 
  33. >the new color doesn't look very much like the original sample.  
  34.  
  35. No, it won't. Red, green, and blue are very loose specifications for
  36. colours. They differ between different monitors, and between different
  37. scanners. 
  38.  
  39. >I know 
  40. >that the monitor can be adjusted to do minor compenstaion, but it still 
  41. >doesn't get close enough to the original sample.
  42.  
  43. Nope. And the adjustment would need to be non linear in any case -
  44. some colours get closer, others get worse.
  45.  
  46. >     Is there a better way to accurately reproduce a color sample on a 24 bit 
  47. >workstation?  Is there something I have missed in the conversion?
  48.  
  49. As you have realised, RGB is not the way to go. You basically have two
  50. options. 
  51.  
  52. One is inexpensive and slow - mix the colours by eye using a
  53. paint package that lets you mix colours. This may be easier if you use
  54. HLS or HSV rather than RGB, but do whatever you find easier. This
  55. method is OK if you only have a few colours to match, and can give
  56. very accurate results. Be aware, however, that the colours you mix up
  57. will only hold good under the lighting conditions you mixed them under
  58. - flourescent striplight, electric lightbulb, sunny day, overcast day
  59. - and will look wrong under different illumination conditions.
  60. Sometimes just a bit wrong, sometimes markedly wrong.
  61.  
  62. The other method is automated but might cost a bit - in time odr
  63. money.
  64.  
  65. You need to use a standard numerical specification for your colours.
  66. These is one by the International Standards Organisation that is
  67. widely used, called CIE XYZ. The difference from RGB is that the CIE
  68. XYZ specification of a colour is an objective quantity that can be
  69. measured and reproduced on a wide variety of equipment. You then need
  70. to display this on your workstation by converting to RGB. This
  71. conversion will be different for each monitor. Details of how to do
  72. this are in various books or if you are stuck mail me for details. You
  73. will need some data from the monitor manufacturer to do the conversion
  74. - the colour of that monitors red, green, blue and white using
  75. standard CIE colour descriptions, and also the gamma (transfer
  76. function) of the monitor which compensates for its nonlinearity.
  77.  
  78. Given the same data for the scanner, you could continue to use your
  79. existing scanner set up. The conversion would then be:
  80.  
  81. your scanner RGB --> CIE XYZ --> your monitor RGB
  82.  
  83. Relevant data should be available from the scanner manufacturer if you
  84. ask persistently ;-)
  85.  
  86. The other way to get CIE XYZ values is to borrow (or even buy - but
  87. they cost about $6k) an instrument to measure them. These instruments
  88. typically look like a squat gun with some sort of readout like a LCD
  89. (or via a serial port). You put the sample against the muzzle, press
  90. the trigger and the X, Y and Z values are displayed.
  91.  
  92. >     Please E-mail any responses directly to me since my news feed is several 
  93. >days behind.
  94.  
  95. Well so is mine!  Anyway perhaps others would like to know the answer
  96. too.
  97.  
  98.  
  99. --
  100. Chris Lilley
  101. ---------------------------------------------------------------------------
  102. Technical Author, ITTI Computer Graphics and Visualisation Training Project
  103. Computer Graphics Unit, Manchester Computing Centre, Manchester, UK
  104. Internet:   lilley@cgu.mcc.ac.uk        Janet:   lilley@uk.ac.mcc.cgu
  105. Voice:      +44 (0)61 275 6095          Fax:     +44 (0)61 275 6040
  106. ---------------------------------------------------------------------------
  107.