Image Quilting for Texture Synthesis and Transfer
Switch branches/tags
Nothing to show
Clone or download
Latest commit 03c2ae5 Mar 20, 2018
Permalink
Failed to load latest commit information.
img Add images Jul 7, 2016
LICENSE Create LICENSE Mar 20, 2018
README.md Add images on README.md Jul 7, 2016
choose_sample.m Add choose_sample.m Jun 22, 2016
cut.m Add cut.m Jun 22, 2016
find_mindelta.m Add find_mindelta.m Jun 22, 2016
get_ssd.m Add get_ssd.m Jun 22, 2016
quilt_simple.m Add quilt_simple.m Jun 22, 2016
ssd_patch.m Add ssd_patch.m Jun 22, 2016
texture_transfer.m Add texture_transfer.m Jun 22, 2016

README.md

ImageQuilting

Image Quilting for Texture Synthesis and Transfer

Explanation

Synthesizing images by stitching together small patches. Using Matlab.

Results

Image Quilting

input_2.bmp iq-result_2.png

Texture Synthesis

texture_4.jpg

target.jpg

ts-result_4.jpg

Usage

  • For image quilting

    1. Download all Matlab codes in one folder.
    2. Open quilt_simple.m
    3. Input "cmdcode_quilt_simple"
  • For texture transfer

    1. Download all Matlab codes in one folder.
    2. Open texture_transfer.m
    3. Input "cmdcode_texture_transfer"

Cmdcodes

cmdcode_quilt_simple

clear;
clc;
datestr(now)
sample = imread('input5.bmp');
outsize = [600; 600];
patchsize = 48;
overlap = 8;
tol = 0.1;
// sample
imout = quilt_simple(sample, outsize, patchsize, overlap, tol);
imout = imout / 255;
imshow(imout);

cmdcode_texture_transfer

clear;
clc;
datestr(now)
texture = imread('texture7.jpg');
texture = double(texture);
patchsize = 10;
overlap = 3;
target = imread('target.jpg');
target = double(target);
tol = 0.1;
// sample
imout = texture_transfer(texture, target, patchsize, overlap, tol);
imout = imout / 255;
imshow(imout);

References