Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

void phSCTX_to_RGBX_XBGR uint32_t  nelems,
uint8_t  id,
uint8_t  od,
uint8_t  order,
uint8_t  offset,
uint8_t src,
uint8_t **  dst,
uint32_t pdstsize
 

Conversion from SCT/LAB to RGB color space involves the reverse process from the above RGB->SCT conversion. The following is the order dependent series of equations to perform SCT->RGB:

b = L * cos(A)
r = L * cos(B) * sin(A)
g = sqrt( L^2 - ( r^2 + b^2 ) )

Attention:
This function is not very useful because the values for SCT are clipped into a 0-255 value range. SCT needs more than 1 byte of space in order to correctly convert from RGB to SCT and from SCT to RGB without loosing information. Until Phission supports different channel data types (float,short,int,etc), this functionality will not be useful.
Parameters:
[in] nelems The number of pixel elements in the image. This is usually the image width times the image height.
[in] id The input depth(bytes)/number of channels of the SCT format
[in] od The output depth(bytes)/number of channels of the RGB format
[in] order The order of the RGB chanels: 0=RGBX, 1=XBGR. This combined with the offset allows for a few variations of the pixel channels. For example: order=1, offset=1, od=4 is the ABGR format.
[in] offset A byte value offset into each pixel at which the RGB channels start. For example, ABGR has an offset of one.
[in] src The source of the SCT image data
[out] dst The destination of the converted data
[out] pdstsize The size of the allocated (possibly resized) dst buffer.

Definition at line 1606 of file ImageConversions.c.





Copyright (C) 2002 - 2007 Philip D.S. Thoren ( pthoren@users.sourceforge.net )
University Of Massachusetts at Lowell
Robotics Lab
SourceForge.net Logo

Generated on Sat Jun 16 02:45:26 2007 for phission by  doxygen 1.4.4