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 Constructor of the oscillatory network Sync for image segmentation.
  
  @param[in] color_radius (double): Radius of color connectivity (color similarity) for the first layer.
  @param[in] object_radius (double): Radius of object connectivity (object similarity) for the second layer,
             if 'None' then object segmentation is not performed (only color segmentation).
  @param[in] noise_size (double): Size of segment that should be considered as a noise and ignored by the second layer.
  @param[in] ccore (bool): If `True` then C/C++ implementation is used to increase performance (by default is `True`).
docstr_tok: ["!","@","brief","Constructor","of","the","oscillatory","network","Sync","for","image","segmentation",".","@","param","[","in","]","color_radius","(","double",")",":","Radius","of","color","connectivity","(","color","similarity",")","for","the","first","layer",".","@","param","[","in","]","object_radius","(","double",")",":","Radius","of","object","connectivity","(","object","similarity",")","for","the","second","layer",",","if","'None","'","then","object","segmentation","is","not","performed","(","only","color","segmentation",")",".","@","param","[","in","]","noise_size","(","double",")",":","Size","of","segment","that","should","be","considered","as","a","noise","and","ignored","by","the","second","layer",".","@","param","[","in","]","ccore","(","bool",")",":","If","`","True","`","then","C\/C++","implementation","is","used","to","increase","performance","(","by","default","is","`","True","`",")","."]
code: def __init__(
      self, color_radius, object_radius, noise_size=0, ccore=True
  ):
      """!
      @brief Constructor of the oscillatory network Sync for image segmentation.
  
      @param[in] color_radius (double): Radius of color connectivity (color similarity) for the first layer.
      @param[in] object_radius (double): Radius of object connectivity (object similarity) for the second layer,
                 if 'None' then object segmentation is not performed (only color segmentation).
      @param[in] noise_size (double): Size of segment that should be considered as a noise and ignored by the second layer.
      @param[in] ccore (bool): If `True` then C/C++ implementation is used to increase performance (by default is `True`).
  
      """
  
      self.__color_radius = color_radius
      self.__object_radius = object_radius
      self.__noise_size = noise_size
  
      self.__order_color = 0.9995
      self.__order_object = 0.999
  
      self.__network = None
      self.__ccore = ccore
      if self.__ccore is True:
          self.__ccore = ccore_library.workable()
  
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 1 to create a new syncsegm object  with example: obj = syncsegm(color_radius, object_radius, noise_size, ccore)