Skip to content

Varshith07827/morse-code-decoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

📡 Real-Time Morse Code Decoder

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.

Features

  • 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

How It Works

  1. The camera captures frames continuously
  2. Average brightness of the frame is measured
  3. Brightness changes above a threshold are classified as dots or dashes based on duration
  4. Gaps between signals are used to separate letters and words

Getting Started

pip install -r requirements.txt
python morse_decoder.py

Point your camera at a blinking light source (e.g. flashlight).

Configuration

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

Requirements

  • Python 3.x
  • OpenCV (opencv-python >= 4.8.0)
  • NumPy
  • A webcam

About

Real-time Morse code decoder using OpenCV and camera flashlight detection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages