title: Build heatmap/attention map over an image from points coordinates with OpenCV
body: <p>I would like to build an heatmap from points coordinates overlapping an image (in grayscale). I have the x and y coordinates of my points. The idea is to easily see the attention/density, where points are concentrated (red region if there is an important number of points).</p>
  
  <p>I think I can use OpenCV for this. The following function sounds interesting: <code>applyColorMap(src, result, cv::COLORMAP_JET);</code>. But I don't know how to link this map to the points and not to the image.</p>
  
  <p>Does someone know how to build an heatmap from points coordinates please?</p>
  
  <p> Thanks to @berak's code and using <code>COLORMAP_RAINBOW</code> instead of <code>COLORMAP_JET</code> here is what I obtain:<img src="https://i.stack.imgur.com/wLLwG.png" alt="enter image description here">
  This is close to the result I want exept that it seems too "discrete" and not "smooth"/"fuzzy" enough. I don't want points to appear (specially those which are "alone"), I want density zone to clearly show up like <a href="http://www.markcregan.com/wp-content/uploads/2010/06/mouse-move-heat-map1.png" rel="nofollow noreferrer">here</a>.
  As some of you said I think I "just" need to change the intensity of pixels around my ROI.</p>
  
  <p>Does someone have more clues please? </p>