2023, Till Bovermann
A python script that extracts contours from an image and generates a wav file for each contour.
git clone git@github.com:tai-studio/contours2wav.git
cd contours2wav
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtBefore usage, make sure to activate the virtual environment:
source venv/bin/activatealternatively, you can use the venv/bin/python command:
venv/bin/python contour2wav.py -m100 -n50000 -t 110 infile.jpg outDirpython contour2wav.py -m100 -n50000 -t 110 infile.jpg outDirfor file in ../_assets/*.jpg; do python contour2wav.py -m100 -n50000 -t 110 $file ../_renders; doneusage: 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- Anja Riese for triggering the idea
- OpenCV
- NumPy
- scipy