A pixel based texture synthesis algorithm, based off of psuedocode from Efros and Leung's 1999 paper. Given an input texture, will used Efros/Leung's patch based algorithm to synthesize a larger texture. For higher quality images, use a higher window size (I recommend at least 7). Images can grow as large as you want. (As long as you're patient enough to wait for it to render ;) )
This was tested in Octave, however, instructions should be similar if not identical for matlab.
- Load required packages -
pkg load image
- Source file -
source growimage.m
- Call growimage -
growimage("sampleTextures/fire.JPG",5,20)
- For more information on parameters/individual functions, see function documentation.
Output filename is in format synthesized_<FILENAME>_winsize_<WINSIZE>_<OUTPUTSIZE>x<OUTPUTSIZE>
. Currently input image must be in jpg format. I've included a couple 20x20 output images with varying window sizes an example in the synthesizedTextures directory.