Skip to content

extract contours from images, save them as wav files

Notifications You must be signed in to change notification settings

tai-studio/contours2wav

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

contours2wav

2023, Till Bovermann

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

Installation

git clone [email protected]: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

About

extract contours from images, save them as wav files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages