class_docstr: !
  @brief Class represents segmentation algorithm syncsegm. 
  @details syncsegm is a bio-inspired algorithm that is based on double-layer oscillatory network that uses modified Kuramoto model.
           Algorithm extracts colors and colored objects. It uses only CCORE (C++ implementation of pyclustering) parts to implement the algorithm.
  
           CCORE option is True by default to use sync network in the pyclustering core - C/C++ shared library for processing that significantly increases performance.
  
  Example:
  @code
      # create oscillatory for image segmentaion - extract colors (radius 128) and objects (radius 4), 
      # and ignore noise (segments with size that is less than 10 pixels)
      algorithm = syncsegm(128, 4, 10);
      
      # extract segments (colors and objects)
      analyser = algorithm(path_to_file);
      
      # obtain segmentation results (only colors - from the first layer)
      color_segments = analyser.allocate_colors(0.01, 10);
      draw_image_mask_segments(path_to_file, color_segments);
      
      # obtain segmentation results (objects - from the second layer)
      object_segments = analyser.allocate_objects(0.01, 10);
      draw_image_mask_segments(path_to_file, object_segments);
  @endcode
docstr: !
  @brief Performs image segmentation.
  
  @param[in] image_source (string): Path to image file that should be processed.
  @param[in] collect_dynamic (bool): If 'True' then whole dynamic of each layer of the network is collected.
  @param[in] order_color (double): Local synchronization order for the first layer - coloring segmentation.
  @param[in] order_object (double): Local synchronization order for the second layer - object segmentation.
  
  @return (syncsegm_analyser) Analyser of segmentation results by the network.
docstr_tok: ["!","@","brief","Performs","image","segmentation",".","@","param","[","in","]","image_source","(","string",")",":","Path","to","image","file","that","should","be","processed",".","@","param","[","in","]","collect_dynamic","(","bool",")",":","If","'True","'","then","whole","dynamic","of","each","layer","of","the","network","is","collected",".","@","param","[","in","]","order_color","(","double",")",":","Local","synchronization","order","for","the","first","layer","-","coloring","segmentation",".","@","param","[","in","]","order_object","(","double",")",":","Local","synchronization","order","for","the","second","layer","-","object","segmentation",".","@","return","(","syncsegm_analyser",")","Analyser","of","segmentation","results","by","the","network","."]
code: def process(
      self,
      image_source,
      collect_dynamic=False,
      order_color=0.9995,
      order_object=0.999,
  ):
      """!
      @brief Performs image segmentation.
  
      @param[in] image_source (string): Path to image file that should be processed.
      @param[in] collect_dynamic (bool): If 'True' then whole dynamic of each layer of the network is collected.
      @param[in] order_color (double): Local synchronization order for the first layer - coloring segmentation.
      @param[in] order_object (double): Local synchronization order for the second layer - object segmentation.
  
      @return (syncsegm_analyser) Analyser of segmentation results by the network.
  
      """
  
      self.__order_color = order_color
      self.__order_object = order_object
  
      data = read_image(image_source)
      color_analyser = self.__analyse_colors(data, collect_dynamic)
  
      if self.__object_radius is None:
          return syncsegm_analyser(color_analyser, None)
  
      object_segment_analysers = self.__analyse_objects(
          image_source, color_analyser, collect_dynamic
      )
      return syncsegm_analyser(color_analyser, object_segment_analysers)
  
imports: from math import floor
  from PIL import Image
  from pyclustering.cluster.syncnet import syncnet
  from pyclustering.core.wrapper import ccore_library
  from pyclustering.nnet import solve_type, initial_type
  from pyclustering.nnet.sync import sync_visualizer
  from pyclustering.utils import read_image
label_desc: Use image node_id 2 for calling the syncsegm obj's underlying member method code with example usage: obj.process(image_source, collect_dynamic, order_color, order_object) and returns: syncsegm_analyser, syncsegm_analyser