Decode Morse code in real time using your device's camera. Point the camera at a flashlight or blinking light source and the app will translate the signals into text.
- Real-time detection — Uses OpenCV to analyze live camera feed
- Brightness-based decoding — Detects dot/dash signals from light changes
- Configurable timing — Adjust dot/dash durations to match transmission speed
- Full Morse alphabet — Supports all standard Morse code characters
- The camera captures frames continuously
- Average brightness of the frame is measured
- Brightness changes above a threshold are classified as dots or dashes based on duration
- Gaps between signals are used to separate letters and words
pip install -r requirements.txt
python morse_decoder.pyPoint your camera at a blinking light source (e.g. flashlight).
Edit the timing constants in morse_decoder.py:
DOT_DURATION = 0.1 # seconds
DASH_DURATION = 0.3 # seconds
LETTER_GAP = 0.25 # seconds
WORD_GAP = 0.6 # seconds
BRIGHTNESS_THRESHOLD = 100- Python 3.x
- OpenCV (
opencv-python >= 4.8.0) - NumPy
- A webcam