docstr: Get representative points in the objects using K means
  
  src_obj - get some of the foreground points from the source objects
  dest_obj - get the rest of the foreground points from the destination
             objects
  
  returns a vector of i coordinates of representatives and a vector
          of j coordinates
docstr_tok: ["Get","representative","points","in","the","objects","using","K","means","src_obj","-","get","some","of","the","foreground","points","from","the","source","objects","dest_obj","-","get","the","rest","of","the","foreground","points","from","the","destination","objects","returns","a","vector","of","i","coordinates","of","representatives","and","a","vector","of","j","coordinates"]
code: def get_kmeans_points(self, src_obj, dest_obj):
      """Get representative points in the objects using K means
  
      src_obj - get some of the foreground points from the source objects
      dest_obj - get the rest of the foreground points from the destination
                 objects
  
      returns a vector of i coordinates of representatives and a vector
              of j coordinates
      """
      from sklearn.cluster import KMeans
  
      ijv = numpy.vstack((src_obj.ijv, dest_obj.ijv))
      if len(ijv) <= self.max_points.value:
          return ijv[:, 0], ijv[:, 1]
      random_state = numpy.random.RandomState()
      random_state.seed(ijv.astype(int).flatten())
      kmeans = KMeans(
          n_clusters=self.max_points.value,
          tol=2,
          random_state=random_state,
      )
      kmeans.fit(ijv[:, :2])
      return (
          kmeans.cluster_centers_[:, 0].astype(numpy.uint32),
          kmeans.cluster_centers_[:, 1].astype(numpy.uint32),
      )
  
imports: from functools import reduce
  import centrosome.cpmorphology
  import centrosome.fastemd
  import centrosome.filter
  import centrosome.index
  import centrosome.propagate
  import numpy
  import scipy.ndimage
  import scipy.sparse
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT
  from cellprofiler_core.module import Module
  from cellprofiler_core.setting import Binary
  from cellprofiler_core.setting.choice import Choice
  from cellprofiler_core.setting.subscriber import LabelSubscriber
  from cellprofiler_core.setting.text import Integer
  from cellprofiler.modules import _help
label_desc: Use image node_id 9 for calling the MeasureObjectOverlap obj's underlying member method code with example usage: obj.get_kmeans_points(src_obj, dest_obj) and returns: kmeans,  kmeans, ijv,  ijv