Logo Search packages:      
Sourcecode: pfstools version File versions  Download package

pfs Namespace Reference


Detailed Description

PFS library - color space transformations.

This file is a part of PFSTOOLS package. ---------------------------------------------------------------------- Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk.

This file is a part of PFSTOOLS package. ---------------------------------------------------------------------- Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ----------------------------------------------------------------------

Author:
Rafal Mantiuk, <mantiuk@mpi-sb.mpg.de>
Id
colorspace.cpp,v 1.6 2007/07/18 08:49:25 rafm Exp

All classes and function from PFS library reside in pfs namespace.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ----------------------------------------------------------------------

Author:
Rafal Mantiuk, <mantiuk@mpi-sb.mpg.de>
Id
pfsview_widget.h,v 1.5 2007/11/20 11:44:12 rafm Exp


Classes

class  Array2D
 Interface for 2 dimensional array of floats. More...
class  Array2DImpl
 Two dimensional array of floats. More...
class  Channel
class  ChannelImpl
class  ChannelIterator
class  ChannelIteratorImpl
class  CommandLineException
struct  CSTransEdge
class  DOMIO
class  DOMIOImpl
class  Exception
struct  FilePattern
class  Frame
struct  FrameFile
class  FrameFileIterator
class  FrameFileIteratorImpl
class  FrameImpl
class  SelfDestructPtr
struct  str_cmp
class  TagContainer
class  TagContainerImpl
class  TagIterator
class  TagIteratorImpl

Typedefs

typedef SelfDestructPtr
< ChannelIterator
ChannelIteratorPtr
typedef std::map< const char
*, ChannelImpl *, str_cmp > 
ChannelMap
typedef void(* CSTransformFunc )(const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, Array2D *outC1, Array2D *outC2, Array2D *outC3)
typedef SelfDestructPtr
< TagIterator
TagIteratorPtr
typedef list< string > TagList

Enumerations

enum  ColorSpace {
  CS_XYZ = 0, CS_RGB, CS_SRGB, CS_YUV,
  CS_Yxy, CS_LAST
}
 This enum is used to specify color spaces for transformColorSpace function. More...

Functions

static float clamp (const float v, const float min, const float max)
void copyArray (const Array2D *from, Array2D *to)
void copyTags (Frame *from, Frame *to)
void copyTags (const TagContainer *from, TagContainer *to)
void multiplyArray (Array2D *z, const Array2D *x, const Array2D *y)
static void multiplyByMatrix (const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, Array2D *outC1, Array2D *outC2, Array2D *outC3, const float mat[3][3])
static void parseFrameRange (const char *rangeString, int &firstFrame, int &lastFrame, int &everyNthFrame)
static void readTags (TagContainerImpl *tags, FILE *in)
static void removeCommandLineArg (int &argc, char *argv[], int firstArgToRemove, int numArgsToRemove=1)
void setArray (Array2D *array, const float value)
void transformColorSpace (ColorSpace inCS, const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, ColorSpace outCS, Array2D *outC1, Array2D *outC2, Array2D *outC3)
static void transformRGB2XYZ (const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, Array2D *outC1, Array2D *outC2, Array2D *outC3)
static void transformSRGB2XYZ (const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, Array2D *outC1, Array2D *outC2, Array2D *outC3)
static void transformXYZ2RGB (const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, Array2D *outC1, Array2D *outC2, Array2D *outC3)
static void transformXYZ2SRGB (const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, Array2D *outC1, Array2D *outC2, Array2D *outC3)
static void transformXYZ2Yuv (const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, Array2D *outC1, Array2D *outC2, Array2D *outC3)
static void transformXYZ2Yxy (const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, Array2D *outC1, Array2D *outC2, Array2D *outC3)
static void transformYuv2XYZ (const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, Array2D *outC1, Array2D *outC2, Array2D *outC3)
static void transformYxy2XYZ (const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, Array2D *outC1, Array2D *outC2, Array2D *outC3)
static void writeTags (const TagContainerImpl *tags, FILE *out)

Variables

CSTransEdge * CSTransGraph []
const char * PFSFILEID = "PFS1\x0a"
static const float rgb2xyzD65Mat [3][3]
CSTransEdge TN_RGBXYZ = { NULL, CS_RGB, CS_XYZ, transformRGB2XYZ }
CSTransEdge TN_SRGBXYZ = { NULL, CS_SRGB, CS_XYZ, transformSRGB2XYZ }
CSTransEdge TN_XYZRGB = { NULL, CS_XYZ, CS_RGB, transformXYZ2RGB }
CSTransEdge TN_XYZSRGB = { &TN_XYZYxy, CS_XYZ, CS_SRGB, transformXYZ2SRGB }
CSTransEdge TN_XYZYUV = { &TN_XYZRGB, CS_XYZ, CS_YUV, transformXYZ2Yuv }
CSTransEdge TN_XYZYxy = { &TN_XYZYUV, CS_XYZ, CS_Yxy, transformXYZ2Yxy }
CSTransEdge TN_YUV2XYZ = { NULL, CS_YUV, CS_XYZ, transformYuv2XYZ }
CSTransEdge TN_Yxy2XYZ = { NULL, CS_Yxy, CS_XYZ, transformYxy2XYZ }
static const float xyz2rgbD65Mat [3][3]


Generated by  Doxygen 1.6.0   Back to index