[Lcms-user] Color image processing using LittleCMS
An ICC-based CMM for color management
Brought to you by:
mm2
From: FreeImage T. <fre...@ti...> - 2006-04-13 22:23:41
|
Hi to all, This is a newbie question related to color image processing ... I've got a lot of computer vision and image processing algorithms that=20 works on greyscale images, i.e. 8-bit, 16-bit and float greyscale images. I want to update my algorithms and process color images. There are very few research papers on color image processing and each=20 paper use a different method to process such images (e.g. a different=20 color space, a different white point, ...). While I'm well versed in computer vision (using greyscale images), I'm a=20 newbie to color image processing, and the more I read research papers or=20 books or FAQ or web articles on the subject, the more I am confused=20 about all these conflicting informations and different mathematics ... Nevertheless, to sum up what I have learned, this is what I need to do=20 to convert my algorithms : 1) First, I want to deal with RGB-24-bit, RGB-48-bit and RGB float (also=20 known as HDR) images 2) To process such images, I need to convert them to Yxy or CIE Lab=20 color space 3) Then, I need to apply my greyscale algorithms to the Y (Yxy) or to=20 the L (CIE Lab) component 4) I then have to convert back the transformed image to a RGB color=20 space (RGB 24-/48-bit or RGB float) 5) for HDR images, once I have a transformed RGB float image, I can=20 apply a tone mapping algorithm and convert to 48-bit (or 24-bit) The problems I have are the following : --------------------------------------- A) If I need to write a RGB2XYZ matrix to convert my images, what matrix=20 should I use ? My images are taken from unknown files (LDR, HDR float) or from unknown=20 camera (JPEG 24-bit or RAW converted to 48-bit, no profile attached), so=20 do I have to assume they have linear RGB color values or do I have to=20 assume that they use a sRGB color model or do I need to apply a gamma=20 correction before the transformation ? In the second case (sRGB) or=20 third case (gamma correction), the transformation matrix is far more=20 complex to calculate (from a computationnal standpoint). Is this=20 computation really needed ? For example, given this link:=20 http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html, and=20 given a RGB file that is not known, do I need to compute these complex=20 transformations before using a RGB2XYZ matrix ? =3D> And what reference white point should I use (e.g. D50, D65) ??? B) Instead of writing my own transformation matrices, does LittleCMS can=20 do this for me ? That would mean: converting from RGB 24-/48-bit and RGB float to a float=20 color space such as Yxy ? I noticed that LittleCMS has 16-bit XYZ/Yxy/Lab types and even 8-bit=20 Lab. How is this possible ??? All research papers I could read work with=20 float images (not double images and even less 8-bit, and this is=20 something I can easily understand), so how can you represent such color=20 spaces as 8-bit (even as 16-bit) ? 16-bit is probably correct for images coming from a digital camera, due=20 to the limitation of the CCD captors, but what about computer generated=20 images (i.e. most of the HDR images) ? I know this is a lot of questions, but as I have said, I'm a newbie to=20 the field of color image processing and I just want to apply greyscale=20 image processing algorithms to a color image. Is this really possible ?=20 Is there a *standard way* or at least a *commonly accepted way* to do=20 this ? Thanks in advance for any info or pointers you could give me :) Herv=E9 Drolon |