code: def descriptors(
      f, interest_points, is_integral=False, descriptor_only=False
  ):
      """
      desc_array = descriptors(f, interest_points, is_integral=False, descriptor_only=False)
  
      Compute SURF descriptors
  
      Parameters
      ----------
      f : ndarray
          input image or integral image (if `is_integral`)
      interest_points : ndarray
          interest points in the format returned by the ``interest_points()`` function
      is_integral : boolean, optional
          Whether ``f`` is an integral image
      descriptor_only : boolean, optional
          If ``descriptor_only``, then returns only the 64-element descriptors
  
      Returns
      -------
      points : ndarray of double, shape = (N, 6 + 64)
          `N` is nr of points. Each point is represented as
          *(y,x,scale,score,laplacian,angle, D_0,...,D_63)* where *y,x,scale* is
          the position, *angle* the orientation, *score* and *laplacian* the
          score and sign of the detector; and *D_i* is the descriptor.
          If ``descriptor_only`` is true, then returns only *(D_0,...,D_63)*
      """
      if not is_integral:
          f = integral(f)
      else:
          if f.dtype != np.double:
              raise TypeError(
                  "mahotas.surf: integral image must be of dtype double"
              )
      interest_points = np.ascontiguousarray(
          interest_points, dtype=np.float64
      )
      surfs = _surf.descriptors(f, interest_points)
      if descriptor_only:
          surfs = surfs[:, 6:]
      return surfs
  
file_path: mahotas/mahotas/features/surf.py
imports: from __future__ import division
  import numpy
  from .None import _surf
label_desc: Use image node_id 4 for calling a global function with example usage: descriptors(f, interest_points, is_integral, descriptor_only) and returns: surfs