code: @Override
      protected ImageWritable doTransform(ImageWritable image, Random random) {
          if (image == null) {
              return null;
          }
          Mat mat = (Mat) converter.convert(image.getFrame());
  
          Mat result = new Mat();
  
          try {
              cvtColor(mat, result, conversionCode);
          } catch (Exception e) {
              throw new RuntimeException(e);
          }
  
          return new ImageWritable(converter.convert(result));
      }
docs: Takes an image and returns a transformed image.
  Uses the random object in the case of random transformations.
  
  @param image  to transform, null == end of stream
  @param random object to use (or null for deterministic)
  @return transformed image