Skip to content

Deterministic Analog Clock Reading Algorithm (Angle-measured, Floor-based) #2861

@whgksk0508-boop

Description

@whgksk0508-boop

Confirm this is a feature request for the Python library and not the underlying OpenAI API.

  • This is a feature request for the Python library

Describe the feature or improvement you're requesting

Many failures in analog clock reading appear to come from heuristic or visual-approximation approaches.
I propose a deterministic computer-vision + geometry pipeline that eliminates guessing and rounding:
• Define 0° as vertical-up direction from clock center.
• Detect clock center and hand line segments.
• Measure exact angles of each hand using vector math.
• Convert angles to time using floor-based cumulative rules:
• minute = floor(theta_m / 6)
• hour = floor(theta_h / 30)
• No rounding or “closest number” heuristics.
• Optional consistency check for continuous hour hands:
theta_expected = 30h + 0.5m (+0.5/60*s)

This approach is deterministic, explainable, and robust across photos, icons, and illustrations.
It also supports jump-hour-hand clocks and clocks without explicit 12 o’clock markers.

Goal: eliminate the “ChatGPT cannot read clocks” failure class with a stable geometric solution.

Additional context

-south korea, cho hana

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions