Hue rotation

Really, no magic here, once you process the image in HSL color space. The operation is as trivial as adding or subtracting a specified value from the pixel's \(H\) component:

// pseudo-code
void hue_rotation(/*array of pixels*/image, double _hue){
  for(const & pixel: image){
    pixel.hue = std::clamp(pixel.hue + _hue, 0., 360.); // hue is in range [0..360]°
  }
}

/home/p1ypbkyw641d/public_html/wiki.new.sub2r.com/data/pages/isp/hue_rotation.txt · Last modified: 2022/04/04 23:32 by 127.0.0.1
CC Attribution-Share Alike 4.0 International Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International