public MonochromeFilter(
      int imageWidth, int imageHeight, Context mainActivity, Bitmap sharedBitmap) {
    super(imageWidth, imageHeight, mainActivity, sharedBitmap);

    script = new ScriptC_monochrome(rs);

    script.set_imageWidth(imageWidth);
    script.set_imageHeight(imageHeight);
    script.set_script(script);
    script.set_in(allocationIn);
    script.set_out(allocationOut);
  }
  @Override
  public Bitmap execute(byte[] data) {
    allocationYUV.copyFrom(data);

    intrinsicYuvToRGB.setInput(allocationYUV);
    intrinsicYuvToRGB.forEach(allocationIn);

    script.invoke_filter();

    allocationOut.syncAll(Allocation.USAGE_SHARED);

    return outputBitmap;
  }