class_docstr: Object representing heatmaps on a single image.
  
  Parameters
  ----------
  arr : (H,W) ndarray or (H,W,C) ndarray
      Array representing the heatmap(s) on a single image.
      Multiple heatmaps may be provided, in which case ``C`` is expected to
      denote the heatmap index.
      The array must be of dtype ``float32``.
  
  shape : tuple of int
      Shape of the image on which the heatmap(s) is/are placed.
      **Not** the shape of the heatmap(s) array, unless it is identical
      to the image shape (note the likely difference between the arrays
      in the number of channels).
      This is expected to be ``(H, W)`` or ``(H, W, C)`` with ``C`` usually
      being ``3``.
      If there is no corresponding image, use ``(H_arr, W_arr)`` instead,
      where ``H_arr`` is the height of the heatmap(s) array
      (analogous ``W_arr``).
  
  min_value : float, optional
      Minimum value for the heatmaps that `arr` represents. This will
      usually be ``0.0``.
  
  max_value : float, optional
      Maximum value for the heatmaps that `arr` represents. This will
      usually be ``1.0``.
class_docstr_tok: ["Object","representing","heatmaps","on","a","single","image",".","Parameters","--","--","--","--","--","arr",":","(","H",",","W",")","ndarray","or","(","H",",","W",",","C",")","ndarray","Array","representing","the","heatmap","(","s",")","on","a","single","image",".","Multiple","heatmaps","may","be","provided",",","in","which","case","``","C","``","is","expected","to","denote","the","heatmap","index",".","The","array","must","be","of","dtype","``","float32","``",".","shape",":","tuple","of","int","Shape","of","the","image","on","which","the","heatmap","(","s",")","is\/are","placed",".","*","*","Not","*","*","the","shape","of","the","heatmap","(","s",")","array",",","unless","it","is","identical","to","the","image","shape","(","note","the","likely","difference","between","the","arrays","in","the","number","of","channels",")",".","This","is","expected","to","be","``","(","H",",","W",")","``","or","``","(","H",",","W",",","C",")","``","with","``","C","``","usually","being","``","3","``",".","If","there","is","no","corresponding","image",",","use","``","(","H_arr",",","W_arr",")","``","instead",",","where","``","H_arr","``","is","the","height","of","the","heatmap","(","s",")","array","(","analogous","``","W_arr","``",")",".","min_value",":","float",",","optional","Minimum","value","for","the","heatmaps","that","`","arr","`","represents",".","This","will","usually","be","``","0.0","``",".","max_value",":","float",",","optional","Maximum","value","for","the","heatmaps","that","`","arr","`","represents",".","This","will","usually","be","``","1.0","``","."]
docstr: Draw the heatmaps as overlays over an image.
  
  Parameters
  ----------
  image : (H,W,3) ndarray
      Image onto which to draw the heatmaps.
      Expected to be of dtype ``uint8``.
  
  alpha : float, optional
      Alpha/opacity value to use for the mixing of image and heatmaps.
      Larger values mean that the heatmaps will be more visible and the
      image less visible.
  
  cmap : str or None, optional
      Name of the ``matplotlib`` color map to use.
      See :func:`HeatmapsOnImage.draw` for details.
  
  resize : {'heatmaps', 'image'}, optional
      In case of size differences between the image and heatmaps,
      either the image or the heatmaps can be resized. This parameter
      controls which of the two will be resized to the other's size.
  
  Returns
  -------
  list of (H,W,3) ndarray
      Rendered overlays as ``uint8`` arrays.
      Always a **list** containing one RGB image per heatmap array
      channel.
docstr_tok: ["Draw","the","heatmaps","as","overlays","over","an","image",".","Parameters","--","--","--","--","--","image",":","(","H",",","W,3",")","ndarray","Image","onto","which","to","draw","the","heatmaps",".","Expected","to","be","of","dtype","``","uint8","``",".","alpha",":","float",",","optional","Alpha\/opacity","value","to","use","for","the","mixing","of","image","and","heatmaps",".","Larger","values","mean","that","the","heatmaps","will","be","more","visible","and","the","image","less","visible",".","cmap",":","str","or","None",",","optional","Name","of","the","``","matplotlib","``","color","map","to","use",".","See",":","func",":","`","HeatmapsOnImage.draw","`","for","details",".","resize",":","{","'heatmaps","'",",","'image","'","}",",","optional","In","case","of","size","differences","between","the","image","and","heatmaps",",","either","the","image","or","the","heatmaps","can","be","resized",".","This","parameter","controls","which","of","the","two","will","be","resized","to","the","other","'s","size",".","Returns","--","--","--","-","list","of","(","H",",","W,3",")","ndarray","Rendered","overlays","as","``","uint8","``","arrays",".","Always","a","*","*","list","*","*","containing","one","RGB","image","per","heatmap","array","channel","."]
code: def draw_on_image(
      self, image, alpha=0.75, cmap="jet", resize="heatmaps"
  ):
      """Draw the heatmaps as overlays over an image.
  
      Parameters
      ----------
      image : (H,W,3) ndarray
          Image onto which to draw the heatmaps.
          Expected to be of dtype ``uint8``.
  
      alpha : float, optional
          Alpha/opacity value to use for the mixing of image and heatmaps.
          Larger values mean that the heatmaps will be more visible and the
          image less visible.
  
      cmap : str or None, optional
          Name of the ``matplotlib`` color map to use.
          See :func:`HeatmapsOnImage.draw` for details.
  
      resize : {'heatmaps', 'image'}, optional
          In case of size differences between the image and heatmaps,
          either the image or the heatmaps can be resized. This parameter
          controls which of the two will be resized to the other's size.
  
      Returns
      -------
      list of (H,W,3) ndarray
          Rendered overlays as ``uint8`` arrays.
          Always a **list** containing one RGB image per heatmap array
          channel.
  
      """
      # assert RGB image
      assert image.ndim == 3, (
          "Expected to draw on three-dimensional image, "
          "got %d dimensions with shape %s instead."
          % (image.ndim, image.shape)
      )
      assert (
          image.shape[2] == 3
      ), "Expected RGB image, got %d channels instead." % (
          image.shape[2],
      )
      assert (
          image.dtype.name == "uint8"
      ), "Expected uint8 image, got dtype %s." % (image.dtype.name,)
  
      assert 0 - 1e-8 <= alpha <= 1.0 + 1e-8, (
          "Expected 'alpha' to be in the interval [0.0, 1.0], got %.4f"
          % (alpha)
      )
      assert resize in ["heatmaps", "image"], (
          'Expected resize to be "heatmaps" or "image", '
          "got %s instead." % (resize,)
      )
  
      if resize == "image":
          image = ia.imresize_single_image(
              image, self.arr_0to1.shape[0:2], interpolation="cubic"
          )
  
      heatmaps_drawn = self.draw(
          size=image.shape[0:2] if resize == "heatmaps" else None,
          cmap=cmap,
      )
  
      # TODO use blend_alpha here
      mix = [
          np.clip(
              (1 - alpha) * image + alpha * heatmap_i, 0, 255
          ).astype(np.uint8)
          for heatmap_i in heatmaps_drawn
      ]
  
      return mix
  
imports: from __future__ import print_function, division, absolute_import
  import numpy
  import six.moves
  from ..None import imgaug
  from .base import IAugmentable
label_desc: Use image node_id 4 for calling the HeatmapsOnImage obj's underlying member method code with example usage: obj.draw_on_image(image, alpha, cmap, resize) and returns: mix