code: def obj_fpr(result, reference, connectivity=1):
      """
      The false positive rate of distinct binary object detection.
  
      The false positive rates gives a percentage measure of how many distinct binary
      objects in the second array do not exists in the first array. A partial overlap
      (of minimum one voxel) is here considered sufficient.
  
      In cases where two distinct binary object in the second array overlap with a single
      distinct object in the first array, only one is considered to have been detected
      successfully and the other is added to the count of false positives.
  
      Parameters
      ----------
      result : array_like
          Input data containing objects. Can be any type but will be converted
          into binary: background where 0, object everywhere else.
      reference : array_like
          Input data containing objects. Can be any type but will be converted
          into binary: background where 0, object everywhere else.
      connectivity : int
          The neighbourhood/connectivity considered when determining what accounts
          for a distinct binary object. This value is passed to
          `scipy.ndimage.generate_binary_structure` and should usually be :math:`> 1`.
          The decision on the connectivity is important, as it can influence the results
          strongly. If in doubt, leave it as it is.
  
      Returns
      -------
      tpr : float
          A percentage measure of how many distinct binary objects in ``results`` have no
          corresponding binary object in ``reference``. It has the range :math:`[0, 1]`, where a :math:`0`
          denotes an ideal score.
  
      Raises
      ------
      RuntimeError
          If the second array is empty.
  
      See also
      --------
      :func:`obj_tpr`
  
      Notes
      -----
      This is not a real metric, as it is directed. Whatever array is considered as
      reference should be passed second. A perfect score of :math:`0` tells that there are no
      distinct binary objects in the second array that do not exists also in the reference
      array, but does not reveal anything about objects in the reference array also
      existing in the second array (use :func:`obj_tpr` for this).
  
      Examples
      --------
      >>> arr2 = numpy.asarray([[1,0,0],[1,0,1],[0,0,1]])
      >>> arr1 = numpy.asarray([[0,0,1],[1,0,1],[0,0,1]])
      >>> arr2
      array([[1, 0, 0],
             [1, 0, 1],
             [0, 0, 1]])
      >>> arr1
      array([[0, 0, 1],
             [1, 0, 1],
             [0, 0, 1]])
      >>> obj_fpr(arr1, arr2)
      0.0
      >>> obj_fpr(arr2, arr1)
      0.0
  
      Example of directedness:
  
      >>> arr2 = numpy.asarray([1,0,1,0,1])
      >>> arr1 = numpy.asarray([1,0,1,0,0])
      >>> obj_fpr(arr1, arr2)
      0.0
      >>> obj_fpr(arr2, arr1)
      0.3333333333333333
  
      Examples of multiple overlap treatment:
  
      >>> arr2 = numpy.asarray([1,0,1,0,1,1,1])
      >>> arr1 = numpy.asarray([1,1,1,0,1,0,1])
      >>> obj_fpr(arr1, arr2)
      0.3333333333333333
      >>> obj_fpr(arr2, arr1)
      0.3333333333333333
  
      >>> arr2 = numpy.asarray([1,0,1,1,1,0,1])
      >>> arr1 = numpy.asarray([1,1,1,0,1,1,1])
      >>> obj_fpr(arr1, arr2)
      0.0
      >>> obj_fpr(arr2, arr1)
      0.3333333333333333
  
      >>> arr2 = numpy.asarray([[1,0,1,0,0],
                                [1,0,0,0,0],
                                [1,0,1,1,1],
                                [0,0,0,0,0],
                                [1,0,1,0,0]])
      >>> arr1 = numpy.asarray([[1,1,1,0,0],
                                [0,0,0,0,0],
                                [1,1,1,0,1],
                                [0,0,0,0,0],
                                [1,1,1,0,0]])
      >>> obj_fpr(arr1, arr2)
      0.0
      >>> obj_fpr(arr2, arr1)
      0.2
      """
      (
          _,
          _,
          _,
          n_obj_reference,
          mapping,
      ) = __distinct_binary_object_correspondences(
          reference, result, connectivity
      )
      return (n_obj_reference - len(mapping)) / float(n_obj_reference)
  
imports: import numpy
  from scipy.ndimage import _ni_support
  from scipy.ndimage import distance_transform_edt, binary_erosion, generate_binary_structure
  from scipy.ndimage import label, find_objects
  from scipy.stats import pearsonr
label_desc: Use image node_id 19 for calling a global function with example usage: obj_fpr(result, reference, connectivity) and returns: unknown