Skip to content

ofAlpaca/Texture-Transfer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Texture-Transfer

How to find the similar patch?

First of all, I sum up all the pixel difference in gray scale in a particular patch rectangle between texture and image. Second, find the patch rectangle which has the smallest difference, and that's the most similar part.

difference = |image.pixel(x,y) - texture.pixel(x,y)|

Here is some option setting

main.exe –i infile –o outfile –t texture_file –p patch_size -r overlap
  • -i input file name
  • -o output file name
  • -t texture file name
  • -p patch size (ex.32)
  • -r overlap (ex.4)

Example

Here is the input file, texture_transfer.jpg

texture_transfer

It is the texture file, texture_rice.jpg

texture_rice

And it is the output it would look like

  • Patch size : 16
  • Overlap : 4

texture_transfer_out

Releases

No releases published

Packages

No packages published

Languages