PixelWave is a unique imageβaudio transformation toolkit that allows you to sonify grayscale and color images into audio signals β and reconstruct them back! It's built for artists, researchers, and curious developers to explore how visual data can be encoded into sound.
- π Image to Audio (Sonification) β Convert grayscale or RGB images to
.wavsound - π Audio to Image (Desonification) β Reconstruct images from encoded
.wavfiles - π¨ Supports grayscale and full-color (RGB)
- π Uses multichannel audio encoding for color images
- π§ͺ Useful for data experiments, art installations, and audio-visual hacking
PixelWave/ β βββ i2a.py # Grayscale image β mono audio βββ a2i.py # Mono audio β grayscale image βββ colouredi2a.py # RGB image β 3-channel audio βββ coloureda2i.py # 3-channel audio β RGB image βββ pengbrew.png # Sample grayscale image βββ a2.png # Sample RGB image βββ qr_sonified.wav # Output from i2a βββ color_encoded.wav # Output from colouredi2a βββ reconstructed.png # Output from coloureda2i βββ README.md # This file
- Python 3
- NumPy β for image/audio array manipulation
- Pillow (PIL) β for image loading, resizing, RGB splitting
- SoundFile β for reading/writing multi-channel
.wavfiles - SoundDevice β for optional audio playback
- OpenCV β for displaying and saving grayscale images
python i2a.py
Input: pengbrew.png
Output: qr_sonified.wav
2. π Convert Audio Back to Grayscale Image
python a2i.py
Input: dog-bark.wav
Output: bark_image.png
3. π¨ Convert RGB Image to 3-Channel Audio
python colouredi2a.py
Input: a2.png
Output: color_encoded.wav
4. πΌοΈ Reconstruct Color Image from Audio
python coloureda2i.py
Input: color_encoded.wav
Output: reconstructed.png
π¦ Installation
Install the required libraries:
pip install numpy pillow soundfile sounddevice opencv-python
πΈ Example
Input Image Encoded Audio Reconstructed Image
π΅ color_encoded.wav
π§ Applications
πΆ Audio-driven art
π§ͺ Data representation experiments
π Teaching signal processing or encoding
π΅οΈ Hidden image transmission via sound
βοΈ License
This project is open-source and free to use under the MIT License.