PatchDroid-PatchMatch Android Library

Post on 18-Nov-2014

790 views 4 download

description

 

Transcript of PatchDroid-PatchMatch Android Library

VFX FINAL PROJECT: PATCHDROID - PATCHMATCH LIBRARY ON ANDROID DEVICE電子所R01943028 歐順興D01943013 張嘉洋

A new randomized algorithm for quickly finding approximate nearest-neighbor matches between image patches.

INTRODUCTION – PATCHMATCH

Finding similar patch

Reconstruct by patchesRef. Connelly Barnes, Eli Shechtman, Adam Finkelstein, Dan B Goldman, “PatchMatch: A Randomized Correspondence Algorithm for Structural Image Editing” ACM Transactions on Graphics (Proc. SIGGRAPH), August 2009

----- PatchMatch: Ns x Ms x w2 x iteration

ALGORITHM• How to find out all nearest patches for each pixel in source image?

• Patch size : w x w , source image : Ns x Ms , target image: Nt x Mt • Brute force: Ns x Ms x Nt x Mt x w2

Finding similar patch

Random Initial Guess

Propagation= argmin ( , , )

Random search= argmin ( + wαR )

¼ iteration 5 iteration

APPLICATION• Retargeting

Resize

Maintain Ratio

APPLICATION• Retargeting – gradual resizing

x [0.9 1]

iterativelyx [0.9 1]

Final Result

DEMO

PATCHMATCH LIBRARY FOR ANDROID

• Core algorithm in C/C++ code.• Wrapped with Java-Native-Interface (JNI)• Compiled with Android Native Development Kit (NDK)

APPLICATION• Hole filling(inpainting)

Original ConstraintResult

iteratively

APPLICATION• Cloning

Original Hard CopyResult

iteratively