- Description This is a python implementation for Fast Texture synthesis using Tree-structured Vector Quantization found here: https://dl.acm.org/doi/pdf/10.1145/344779.345009
- It only handles input images that have dimensions of the form
$2^Lm$ where$L$ the levels of the pyramid used and m any integer. - It only handles grayscale images but the project should be about colored images.
- It hasn't been thoroughly tested.
- Dependencies
- numpy
- matplotlib
- tqdm
- Generate a fixed “initial_noise.jpg” from Python, which is our
Isvalue - The Python synthesizer (synth.py) loads that
Isinstead of making a new randomIs, and run synth.py:
python3 synth.py
- The translated C version synthesizer (synth.c) loads that same
Is, and run synth.c:
gcc -std=c99 -O0 -o synth synth.c -lm
./synth input1.jpg output_c.jpg
python3 compare.py output.jpg output_c.jpg
If everything matches, we should see:
MSE: 0.0
Max absolute diff: 0
Wrote difference image to diff.jpg