This project simulates an optical wireless communication system where one monitor transmits binary data using colors (black as 0 and white as 1), and a camera captures the transmitted information. The captured data is analyzed to calculate the Bit Error Rate (BER), which reflects the accuracy of the transmission.
The project involves:
- Capturing frames from a camera.
- Detecting the predominant color (black or white).
- Simulating the transmission of bits using visual signals.
- Calculating the Bit Error Rate (BER) for performance evaluation.
src/camera.py
: Captures frames from the camera and detects colors.src/utils.py
: Contains utility functions, including the BER calculation.src/main.py
: Main script to execute the transmission simulation and print results.
-
Clone the repository:
git clone git@github.com:MateusjsSilva/optical-wireless-transmission.git cd optical-wireless-transmission
-
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
- On Windows:
venv\Scripts\activate
- On macOS/Linux:
source venv/bin/activate
- On Windows:
-
Install the required Python packages:
pip install -r requirements.txt
To start the simulation, run the following command:
python receiver/src/main.py
python sender/src/main.py
Feel free to open issues or submit pull requests. All contributions are welcome!
This project is licensed under the Apache License - see the LICENSE file for details.