I really enjoy programming in C#. After working with Photoshop CS5 - Content Aware I got insanely curious about the way it works. I tried many ways to find it out myself but the amazing-ness of this new feature has gotten me lost. Can anyone help me ? So basically I would like to know the ( Formula or Code ) behind this cool feature ...
The algorithm used in content-aware fill is called PatchMatch; there is a paper as well as some code on this website: http://gfx.cs.princeton.edu/pubs/Barnes_2009_PAR/index.php
The concept is right there in the paper, but actually implementing it is an entirely different story. You're not going to get the code for it anywhere in the open -- there's a reason why Photoshop costs as much as it does.