rgb_to_hsv.h 487 B

12345678910111213141516171819202122232425
  1. #ifndef IGL_RGB_TO_HSV_H
  2. #define IGL_RGB_TO_HSV_H
  3. #include "igl_inline.h"
  4. namespace igl
  5. {
  6. // Convert RGB to HSV
  7. //
  8. // Inputs:
  9. // r red value ([0,1])
  10. // g green value ([0,1])
  11. // b blue value ([0,1])
  12. // Outputs:
  13. // h hue value (degrees: [0,360])
  14. // s saturation value ([0,1])
  15. // v value value ([0,1])
  16. template <typename R,typename H>
  17. void rgb_to_hsv(const R * rgb, H * hsv);
  18. };
  19. #ifdef IGL_HEADER_ONLY
  20. # include "rgb_to_hsv.cpp"
  21. #endif
  22. #endif