docs: @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 {
              if (mat.channels() == 1) {
                  equalizeHist(mat, result);
              } else {
                  split(mat, splitChannels);
                  equalizeHist(splitChannels.get(0), splitChannels.get(0)); //equalize histogram on the 1st channel (Y)
                  merge(splitChannels, result);
              }
          } catch (Exception e) {
              throw new RuntimeException(e);
          }
  
          return new ImageWritable(converter.convert(result));
      }