Quantcast
Channel: Intel® Integrated Performance Primitives
Viewing all articles
Browse latest Browse all 1294

RGBToHLS

$
0
0

In the headers and documentation for ippiRGBToHLS (both for ipp v9 and v2017) the following pseudo-code is given

      if R = M2 then H = Cb - Cg

      if G = M2 then H = 2 + Cr - Cb

      if B = M2 then H = 4 + Cg - Cr

 

referring to 

      David F.Rogers

      Procedural Elements for Computer Graphics

      1985.pp.(403-406)

 

However, in that book (2nd ed. 1998) on page 629 I read

      if R = M1 then H = Cb - Cg

      if G = M1 then H = 2 + Cr - Cb

      if B = M1 then H = 4 + Cg - Cr

 

and this does give different results. I haven't checked what ipp actually does, but at least there is a discrepancy in the documentation and headers.

Regards,

Adriaan van Os

 


Viewing all articles
Browse latest Browse all 1294

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>