Skip to content

0x43eba/WaveformTransform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Waveform Transformer

A user provided image is converted into a spline, which is then applyed to windows of a generated wave function as a frequency transform.

High Contrast Line Drawing

target

Resulting Edge Detection

Screenshot 2024-07-10 at 20 06 03

Resulting Spline Fit and Spline Expansion

Screenshot 2024-07-10 at 20 05 42 Screenshot 2024-07-10 at 20 05 47

Note: Output graph may contain anomolous behaviour towards the terminal area. This is an artefact of the CubicSpline fit that is created. If pushed beyond the available information, splines may generate unusual behaviour as a result of extrapolation.

Resulting Wave Function

Screenshot 2024-07-10 at 20 05 53

Resulting Output WAVE File (segment)

Screenshot 2024-07-10 at 20 12 46

Requirements

  • Python 3.x
  • OpenCV (cv2)
  • NumPy
  • Matplotlib
  • SciPy

Installation

Ensure you have Python installed on your system. You can then install the required packages using pip:

pip install opencv-python numpy matplotlib scipy

Usage

To use the script, you need to provide the path to the input image file (PNG format) and the desired output path for the WAV file.

Flags

-f or --file: Specifies the path to the input image file. Only PNG files are supported. -o or --output: Specifies the path where the output WAV file will be saved. Only WAV files are supported. -h or --help: Displays the usage information.

Example

python main.py -f example.png -o output.wav

This command will read example.png, process the image, and generate a sound file named output.wav based on the image data.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages