Skip to content

AbheeshtM/PixelWave

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ¨πŸ”Š PixelWave

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.


🌟 Features

  • πŸ”„ Image to Audio (Sonification) β€” Convert grayscale or RGB images to .wav sound
  • πŸ” Audio to Image (Desonification) β€” Reconstruct images from encoded .wav files
  • 🎨 Supports grayscale and full-color (RGB)
  • πŸ”Š Uses multichannel audio encoding for color images
  • πŸ§ͺ Useful for data experiments, art installations, and audio-visual hacking

πŸ“‚ Project Structure

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

πŸ› οΈ Technologies Used

  • Python 3
  • NumPy β€” for image/audio array manipulation
  • Pillow (PIL) β€” for image loading, resizing, RGB splitting
  • SoundFile β€” for reading/writing multi-channel .wav files
  • SoundDevice β€” for optional audio playback
  • OpenCV β€” for displaying and saving grayscale images

πŸš€ How to Use

1. πŸ”„ Convert Grayscale Image to Audio

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.

About

πŸŽ¨πŸ”Š PixelWave turns images into sound β€” and sound back into images. A creative toolkit for data sonification, audio-visual art, and signal experiments.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages