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: Invert each component in the heatmap.
  
  This shifts low values towards high values and vice versa.
  
  This changes each value to::
  
      v' = max - (v - min)
  
  where ``v`` is the value at a spatial location, ``min`` is the
  minimum value in the heatmap and ``max`` is the maximum value.
  As the heatmap uses internally a ``0.0`` to ``1.0`` representation,
  this simply becomes ``v' = 1.0 - v``.
  
  This function can be useful e.g. when working with depth maps, where
  algorithms might have an easier time representing the furthest away
  points with zeros, requiring an inverted depth map.
  
  Returns
  -------
  imgaug.augmentables.heatmaps.HeatmapsOnImage
      Inverted heatmap.
docstr_tok: ["Invert","each","component","in","the","heatmap",".","This","shifts","low","values","towards","high","values","and","vice","versa",".","This","changes","each","value","to",":",":","v","'","=","max","-","(","v","-","min",")","where","``","v","``","is","the","value","at","a","spatial","location",",","``","min","``","is","the","minimum","value","in","the","heatmap","and","``","max","``","is","the","maximum","value",".","As","the","heatmap","uses","internally","a","``","0.0","``","to","``","1.0","``","representation",",","this","simply","becomes","``","v","'","=","1.0","-","v","``",".","This","function","can","be","useful","e.g",".","when","working","with","depth","maps",",","where","algorithms","might","have","an","easier","time","representing","the","furthest","away","points","with","zeros",",","requiring","an","inverted","depth","map",".","Returns","--","--","--","-","imgaug.augmentables.heatmaps.HeatmapsOnImage","Inverted","heatmap","."]
code: def invert(self):
      """Invert each component in the heatmap.
  
      This shifts low values towards high values and vice versa.
  
      This changes each value to::
  
          v' = max - (v - min)
  
      where ``v`` is the value at a spatial location, ``min`` is the
      minimum value in the heatmap and ``max`` is the maximum value.
      As the heatmap uses internally a ``0.0`` to ``1.0`` representation,
      this simply becomes ``v' = 1.0 - v``.
  
      This function can be useful e.g. when working with depth maps, where
      algorithms might have an easier time representing the furthest away
      points with zeros, requiring an inverted depth map.
  
      Returns
      -------
      imgaug.augmentables.heatmaps.HeatmapsOnImage
          Inverted heatmap.
  
      """
      arr_inv = HeatmapsOnImage.from_0to1(
          1 - self.arr_0to1,
          shape=self.shape,
          min_value=self.min_value,
          max_value=self.max_value,
      )
      arr_inv.arr_was_2d = self.arr_was_2d
      return arr_inv
  
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 5 for calling the HeatmapsOnImage obj's underlying member method code with example usage: obj.invert() and returns: arr_inv