- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
For ippiRGBToHLS_8u_C3R() we've written next:
H is the hue red at 0 degrees, which has range [0 .. 360 degrees],
L is the lightness , it has range [0. .. 1.],
S is the saturation, it has range [0. .. 1.]
H,L,S are scaled to the range:
[0..IPP_MAX_8u] for the 8u depth.
H = H * IPP_MAX_8U / 360.f;
L = L * IPP_MAX_8U;
S = S * IPP_MAX_8U;
To restore the true value(H,L,S) after ippiRGBToHLS_8u they should do next calculation:
H = (Ipp32f)H*360.f/(Ipp32f)IPP_MAX_8U;
L = (Ipp32f)L/(Ipp32f)IPP_MAX_8U;
S = (Ipp32f)S/(Ipp32f)IPP_MAX_8U;
Data is found in memory as an array of unsigned characters in which the first byte contains the H, the second byte contains the L, the third byte contains S.
P.S.: Please see ippiman.pdf for more details
Regards,
Vladimir
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page