code: def main():
      image = data.astronaut()[..., ::-1]  # rgb2bgr
      print(image.shape)
  
      cv2.namedWindow("aug", cv2.WINDOW_NORMAL)
      cv2.imshow("aug", image)
      cv2.waitKey(TIME_PER_STEP)
  
      for n_segments in cycle(
          reversed(np.arange(1, 200, SEGMENTS_PER_STEP))
      ):
          aug = iaa.Superpixels(p_replace=0.75, n_segments=n_segments)
          time_start = time.time()
          img_aug = aug.augment_image(image)
          print(
              "augmented %d in %.4fs"
              % (n_segments, time.time() - time_start)
          )
          img_aug = ia.draw_text(
              img_aug, x=5, y=5, text="%d" % (n_segments,)
          )
  
          cv2.imshow("aug", img_aug)
          cv2.waitKey(TIME_PER_STEP)
  
file_path: imgaug/checks/check_superpixels.py
imports: from __future__ import print_function, division
  import time
  from itertools import cycle
  import cv2
  import numpy
  from skimage import data
  import imgaug
  from imgaug import augmenters
label_desc: Use image node_id 1 for calling a global function with example usage: main() without return types