title: OpenCV: how to apply rainbow gradient map on an image?
body: <p>Say we had an image we somehow modified via openCV:</p>
  
  <p><img src="https://i.stack.imgur.com/TfBmw.jpg" alt="enter image description here"></p>
  
  <p>And now we would love to apply to it <a href="http://help.adobe.com/en_US/Photoshop/11.0/WSfd1234e1c4b69f30ea53e41001031ab64-763fa.html" rel="nofollow noreferrer">Gradient Map (like one we can apply via photoshop)</a>:</p>
  
  <p><img src="https://i.stack.imgur.com/DaSAD.jpg" alt="enter image description here"></p>
  
  <p>So I wonder how to apply gradient map (rainbow colors) via openCV?</p>