Skip to content

prof. Tushar sandhan gave a course project on frequency mixing and de-mixing in which we create a hybrid image containing both high and low frequency images, and remove unwanted noise from a given music audio.

Notifications You must be signed in to change notification settings

sriramd23/EE200-course-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

EE200 Signal Processing Project

This repository contains a Jupyter Notebook (ee200_231035(2).ipynb) that demonstrates practical applications of signal processing in two distinct domains: Image Processing and Audio Signal Processing.

The project applies Fourier Transforms, filter design, and spectral analysis to manipulate media files programmatically.

πŸ“‚ Project Structure

The notebook is divided into two main sections:

1. Hybrid Images (Image Processing)

This section creates a "Hybrid Image"β€”an optical illusion that looks like one object from up close and another from far away.

  • Technique: Uses 2D Fast Fourier Transforms (FFT) to manipulate spatial frequencies.
  • Process:
    • Low-pass filter: Applied to the "Dog" image to retain only low frequencies (smooth, blurry shapes).
    • High-pass filter: Applied to the "Cat" image to retain only high frequencies (sharp details/edges).
    • Combination: The frequency domains are merged and converted back to the spatial domain using inverse FFT.
  • Result: A hybrid image where the "Dog" appears from a distance, and the "Cat" appears when viewed closely.

2. Instrument Isolation (Audio Processing)

This section processes a mixed audio track to isolate a specific instrument (Saxophone) using digital filtering.

  • Technique: Bandpass filtering using scipy.signal.
  • Process:
    • Input: Reads a WAV file (song_with_2piccolo.wav).
    • Filter Design: Implements a 4th-order Butterworth bandpass filter with cutoff frequencies at 1150 Hz and 1800 Hz to target the saxophone's frequency range.
    • Spectral Analysis:
      • Plots the Power Spectral Density (PSD) to compare original vs. filtered signals.
      • Generates a Bode Plot to visualize the filter's frequency response.
      • Creates a Pole-Zero Plot for stability analysis.
      • Displays a Spectrogram to visualize frequency changes over time.
  • Output: Saves the filtered audio as saxophone_only.wav.

πŸ› οΈ Dependencies

To run this notebook, you will need the following Python libraries:

numpy
matplotlib
scipy
Pillow

You can install them using pip:

pip install numpy matplotlib scipy Pillow

πŸš€ Usage

  1. Clone the repository:
    git clone https://github.com/sriramd23/EE200-course-project.git
  2. Add Input Files: Ensure the following files are in the same directory as the notebook:
    • cat_gray.jpg (High-frequency source)
    • dog_gray.jpg (Low-frequency source)
    • song_with_2piccolo.wav (Audio source)
  3. Run the Notebook: Open ee200_231035(2).ipynb in Jupyter Notebook or Google Colab and run all cells.

πŸ“Š Outputs

The notebook generates the following outputs:

  • Visualizations:
    • Hybrid Image and Frequency Spectra.
    • PSD Comparison Plot (psd_comparison.png).
    • Bode Plot (bode_plot.png).
    • Pole-Zero Plot (pole_zero_plot.png).
    • Spectrogram (spectrogram.png).
  • Audio:
    • saxophone_only.wav: The processed audio file containing the isolated instrument.

πŸ‘€ Author

sriram dhanasekaran Course: EE200

About

prof. Tushar sandhan gave a course project on frequency mixing and de-mixing in which we create a hybrid image containing both high and low frequency images, and remove unwanted noise from a given music audio.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published