YD 验证码(关注参数即可)¶
本模块支持多种 YiDun 验证码类型的识别, 只需关注各类型的输入参数格式与识别效果.
注意:本模块仅提供 YiDun 验证码的识别功能.
文字点选¶
decode_captcha
¶
decode_captcha(
bg: Union[str, Path, Image, ndarray, bytes],
cw: str,
show: bool = True,
) -> tuple[str, Optional[Image.Image]]
解码 YD word 验证码, 根据文字内容找到点击点
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bg
|
Union[str, Path, Image, ndarray, bytes]
|
背景图,可以是路径、PIL对象、OpenCV图像或原始字节。 |
required |
cw
|
str
|
验证码内容, 字符串 |
required |
show
|
bool
|
是否返回可视化图像。默认为 True。 |
True
|
Returns:
| Type | Description |
|---|---|
tuple[str, Optional[Image]]
|
返回点击点坐标和处理后的图像
|
