Skip to content

Latest commit

 

History

History
65 lines (47 loc) · 1.47 KB

README.md

File metadata and controls

65 lines (47 loc) · 1.47 KB

contours2wav

2023, Till Bovermann

A python script that extracts contours from an image and generates a wav file for each contour.

Installation

git clone git@github.com:tai-studio/contours2wav.git
cd contours2wav
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Usage

Before usage, make sure to activate the virtual environment:

source venv/bin/activate

alternatively, you can use the venv/bin/python command:

venv/bin/python contour2wav.py -m100 -n50000 -t 110 infile.jpg outDir

single input file

python contour2wav.py -m100 -n50000 -t 110 infile.jpg outDir

multiple input files

for file in ../_assets/*.jpg; do python contour2wav.py -m100 -n50000 -t 110 $file ../_renders; done

Options

usage: contour2wav.py [-h] [-m MINPOINTS] [-n MAXPOINTS] [-t THRESHOLD] [-s NUMSAMPLES] [-r SAMPLERATE] infile outdir

positional arguments:
  infile                input image file
  outdir                final result will be saved to outdir/infile
options:
  -h, --help            show this help message and exit
  -m MINPOINTS, --minPoints MINPOINTS
  -n MAXPOINTS, --maxPoints MAXPOINTS
  -t THRESHOLD, --threshold THRESHOLD
  -s NUMSAMPLES, --numSamples NUMSAMPLES
  -r SAMPLERATE, --sampleRate SAMPLERATE

Thanks