public BufferedImage getColorTransparentImage() {
        Color leftTopColor = new Color(this.img.getRGB(0, 0));
        ImageFilter filter = new SimilarColorFilter(leftTopColor, 0.5, 0.2, 0.06);

        // Apply the filter
        final ImageProducer ip = new FilteredImageSource(this.img.getSource(), filter);
        Image transparentImage = Toolkit.getDefaultToolkit().createImage(ip);

        // Convert to Buffered Image
        final BufferedImage bufferedImage = new BufferedImage(transparentImage.getWidth(null),
                transparentImage.getHeight(null),
                BufferedImage.TYPE_INT_ARGB);
        final Graphics2D g2d = bufferedImage.createGraphics();
        g2d.drawImage(transparentImage, 0, 0, null);
        g2d.dispose();
        return bufferedImage;
    }
@link https://www.bytebang.at/Blog/Removing+a+uniform+background+from+an+image+with+Java
plugins/image-plugin/src/test/java/com/github/hui/quick/plugin/test/BgFilter.java