Package com.xxl.tool.captcha
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidconvolveAndTranspose(Kernel kernel, int[] inPixels, int[] outPixels, int width, int height, boolean premultiply, boolean unpremultiply) 图像卷积 1、功能:图像模糊、锐化、边缘检测等。gaussianFilter(BufferedImage src, float radius) 高斯模糊 1、radius越大,模糊效果越明显,耗时越长; 2、范围,0~20getDistortedImage(BufferedImage baseImage) static KernelmakeKernel(float radius) 高斯矩阵 1、功能:图像模糊 2、原理:高斯矩阵是一种用于图像模糊处理的矩阵,通过将高斯函数与图像进行卷积运算来对图像进行处理。
-
Constructor Details
-
ShadowDistorted
public ShadowDistorted()
-
-
Method Details
-
getDistortedImage
- Specified by:
getDistortedImagein interfaceCaptchaTool.DistortedEngine
-
gaussianFilter
高斯模糊 1、radius越大,模糊效果越明显,耗时越长; 2、范围,0~20 -
makeKernel
高斯矩阵 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参数用于控制图像的预乘和反预乘操作。
-