A user provided image is converted into a spline, which is then applyed to windows of a generated wave function as a frequency transform.
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.
- Python 3.x
- OpenCV (
cv2) - NumPy
- Matplotlib
- SciPy
Ensure you have Python installed on your system. You can then install the required packages using pip:
pip install opencv-python numpy matplotlib scipyTo 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.
-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.
python main.py -f example.png -o output.wavThis command will read example.png, process the image, and generate a sound file named output.wav based on the image data.