|
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. |