class_docstr: Image signature generator.
  
  Based on the method of Goldberg, et al. Available at http://www.cs.cmu.edu/~hcwong/Pdfs/icip02.ps
docstr: Computes grid points for image analysis.
  
  Corresponds to the second part of 'step 2' in the paper
  
  Args:
      image (numpy.ndarray): n x m array of floats -- the greyscale image. Typically,
          the output of preprocess_image
      n (Optional[int]): number of gridpoints in each direction (default 9)
      window (Optional[List[Tuple[int]]]): limiting coordinates [(t, b), (l, r)], typically the
          output of (default None)
  
  Returns:
      tuple of arrays indicating the vertical and horizontal locations of the grid points
  
  Examples:
      >>> img = gis.preprocess_image('https://pixabay.com/static/uploads/photo/2012/11/28/08/56/mona-lisa-67506_960_720.jpg')
      >>> window = gis.crop_image(img)
      >>> gis.compute_grid_points(img, window=window)
      (array([100, 165, 230, 295, 360, 424, 489, 554, 619]),
       array([ 66, 109, 152, 195, 238, 280, 323, 366, 409]))
docstr_tok: ["Computes","grid","points","for","image","analysis",".","Corresponds","to","the","second","part","of","'step","2","'","in","the","paper","Args",":","image","(","numpy.ndarray",")",":","n","x","m","array","of","floats","--","the","greyscale","image",".","Typically",",","the","output","of","preprocess_image","n","(","Optional","[","int","]",")",":","number","of","gridpoints","in","each","direction","(","default","9",")","window","(","Optional","[","List","[","Tuple","[","int","]","]","]",")",":","limiting","coordinates","[","(","t",",","b",")",",","(","l",",","r",")","]",",","typically","the","output","of","(","default","None",")","Returns",":","tuple","of","arrays","indicating","the","vertical","and","horizontal","locations","of","the","grid","points","Examples",":",">",">",">","img","=","gis.preprocess_image","(","'https",":","\/\/pixabay.com\/static\/uploads\/photo\/2012\/11\/28\/08\/56\/mona-lisa-67506_960_720.jpg","'",")",">",">",">","window","=","gis.crop_image","(","img",")",">",">",">","gis.compute_grid_points","(","img",",","window=window",")","(","array","(","[","100",",","165",",","230",",","295",",","360",",","424",",","489",",","554",",","619","]",")",",","array","(","[","66",",","109",",","152",",","195",",","238",",","280",",","323",",","366",",","409","]",")",")"]
code: def compute_grid_points(image, n=9, window=None):
      """Computes grid points for image analysis.
  
      Corresponds to the second part of 'step 2' in the paper
  
      Args:
          image (numpy.ndarray): n x m array of floats -- the greyscale image. Typically,
              the output of preprocess_image
          n (Optional[int]): number of gridpoints in each direction (default 9)
          window (Optional[List[Tuple[int]]]): limiting coordinates [(t, b), (l, r)], typically the
              output of (default None)
  
      Returns:
          tuple of arrays indicating the vertical and horizontal locations of the grid points
  
      Examples:
          >>> img = gis.preprocess_image('https://pixabay.com/static/uploads/photo/2012/11/28/08/56/mona-lisa-67506_960_720.jpg')
          >>> window = gis.crop_image(img)
          >>> gis.compute_grid_points(img, window=window)
          (array([100, 165, 230, 295, 360, 424, 489, 554, 619]),
           array([ 66, 109, 152, 195, 238, 280, 323, 366, 409]))
  
      """
  
      # if no limits are provided, use the entire image
      if window is None:
          window = [(0, image.shape[0]), (0, image.shape[1])]
  
      x_coords = np.linspace(
          window[0][0], window[0][1], n + 2, dtype=int
      )[1:-1]
      y_coords = np.linspace(
          window[1][0], window[1][1], n + 2, dtype=int
      )[1:-1]
  
      return x_coords, y_coords
  
imports: from skimage.color import rgb2gray
  from skimage.io import imread
  from PIL import Image
  from PIL.MpoImagePlugin import MpoImageFile
  from six import string_types, text_type
  from io import BytesIO
  import numpy
  import xml.etree
  import xml.etree.ElementTree
label_desc: Use image node_id 5 for calling the ImageSignature obj's underlying member method code with example usage: obj.compute_grid_points(image, n, window) and returns: x_coords,  y_coords