title: Trying to make color balance of photoshop using opencv
body: <p>I want to make the same thing programmatically like <code>Color balance</code> in <code>Photoshop</code> , like in below image</p>
  
  <p><img src="https://i.stack.imgur.com/WEo7E.jpg" alt="enter image description here"></p>
  
  <p>if we have same bar positions in Photoshop then how we can make them in OpenCV , because the problem which I am not understanding is that we have the image with <code>RGB</code> format yes we can convert in other color format but how I can understand these values (do we need to subtract the Cyan values in OpenCV if Cyan Level is -20 in PS ? Or we need to Add ?) and did the same operation in OpenCV ,
  For example if I need to change values in <code>Cyan</code> , <code>Magenta</code> and <code>Blue</code> Do I need to convert image first to add values in Cyan and magenta and then convert it back to <code>BGR</code> and then increase <code>blue</code> ?
  And is there any built in function in OpenCv for <code>Shadows , MidTones and Highlight</code> </p>
  
  <p>I am trying something like this</p>
  
  <pre><code>Mat img = imread("E:\\raw_3.jpg");
  vector&lt;Mat&gt; colors;
  split(img,colors);
  colors[0] += 69;
  colors[1] += 40 ;
  colors[2] -= 23 ;
  merge(colors,img);
  imshow("image" , img);
  imwrite("E:\\color_balance.jpg",img);
  waitKey();
  </code></pre>
  
  <p>for Cyan - red = -23 Magenta - Green = 40 Yellow - Blue = 69 But i am not getting the accurate result as it should be</p>