-
Notifications
You must be signed in to change notification settings - Fork 2
Visual Reasoning CAPTCHAs
Sepehr0Day edited this page Jun 13, 2026
·
2 revisions
The user reads the time shown on an analog clock.
from CaptchaGenerator import AnalogClockCaptcha, CaptchaConfig
config = CaptchaConfig(
width=720,
height=480,
random_seed=42,
accent_colors=("#d33f49", "#3478c8", "#2a9d6f"),
)
result = AnalogClockCaptcha(config).generate(
name_export="clock",
path_export="./output",
minute_step=5,
show_numbers=True,
twenty_four_hour_answer=False,
)
print("Show image:", result.path)
print("Question:", result.prompt)
user_time = "03:25"
solved = user_time.strip() == result.answer
print("Solved:", solved)Use the HH:MM format shown by result.answer. The metadata contains the raw
hour and minute for trusted server-side logging.
The user identifies the label on a requested face of a perspective object.
from CaptchaGenerator import CaptchaConfig, Perspective3DCaptcha
result = Perspective3DCaptcha(
CaptchaConfig(width=720, height=480, random_seed=42)
).generate(
name_export="perspective_3d",
path_export="./output",
labels=("1", "2", "3"),
ask_face="right",
skew=0.42,
)
print("Show image:", result.path)
print("Question:", result.prompt)
print("Choice buttons:", ("1", "2", "3"))
user_label = "2"
solved = user_label.strip().casefold() == str(result.answer).casefold()
print("Solved:", solved)ask_face can be selected by the application or left as None for a random
supported face.
- Home
- Installation
- Quick-Start
- Configuration
- Core-API
- Generator-API-Reference
- Core-Utilities
- Supported-CAPTCHAs
- All-Examples
- Text-and-Media-CAPTCHAs
- Logic-CAPTCHAs
- Image-CAPTCHAs
- Selection-CAPTCHAs
- Puzzle-CAPTCHAs
- Visual-Reasoning-CAPTCHAs
- Tkinter-Examples
- Web-Integration
- Architecture
- Creating-a-Generator
- Security
- Publishing
- Migration-to-2.0
- FAQ