Class CaptchaTool.ShadowDistorted

java.lang.Object
com.xxl.tool.captcha.CaptchaTool.ShadowDistorted
All Implemented Interfaces:
CaptchaTool.DistortedEngine
Enclosing class:
CaptchaTool

public static class CaptchaTool.ShadowDistorted extends Object implements CaptchaTool.DistortedEngine
阴影效果
  • Constructor Details

    • ShadowDistorted

      public ShadowDistorted()
  • Method Details

    • getDistortedImage

      public BufferedImage getDistortedImage(BufferedImage baseImage)
      Specified by:
      getDistortedImage in interface CaptchaTool.DistortedEngine
    • gaussianFilter

      public BufferedImage gaussianFilter(BufferedImage src, float radius)
      高斯模糊 1、radius越大,模糊效果越明显,耗时越长; 2、范围,0~20
    • makeKernel

      public static Kernel makeKernel(float radius)
      高斯矩阵 1、功能:图像模糊 2、原理:高斯矩阵是一种用于图像模糊处理的矩阵,通过将高斯函数与图像进行卷积运算来对图像进行处理。 3、注意:radius越大,模糊效果越明显,耗时越长。
    • convolveAndTranspose

      public static void convolveAndTranspose(Kernel kernel, int[] inPixels, int[] outPixels, int width, int height, boolean premultiply, boolean unpremultiply)
      图像卷积 1、功能:图像模糊、锐化、边缘检测等。 2、原理:图像卷积是一种线性滤波操作,通过将滤波器与图像进行卷积运算来对图像进行处理。 3、注意:premultiply和unpremultiply参数用于控制图像的预乘和反预乘操作。