Data ScienceAIMachine Learningcomputer-visionpython
Clock that shows current time and date
By Alaa El-Maria

- Published on
- Repository
- https://github.com/Alaatahaelmaria/Clock-that-show-current-time-and-date
- Tech
- Python, OpenCV

Sharing
This project programmatically renders an analog clock into an RGB image canvas and updates the hands in real time. It demonstrates drawing primitives, coordinate transforms, anti‑aliasing, and date/time formatting.
Highlights
- Draws second, minute, and hour hands with tick marks and center pin.
- Uses trigonometric transforms to position hands precisely by time.
- Exports individual frames or animates a live preview window.
Getting started
- Clone the repository and install dependencies.
- Run the script to open a live clock window or save frames to disk.
python clock.py
Why it’s useful
- Teaches fundamentals of image rendering and layout in OpenCV.
- Serves as a starter for overlaying dynamic UI on camera frames.
Hi there! Want to support my work?