Extending Background Image Suppose I have the following image. I want to extend/expand the grey background behind the model. The extension should only be upward and sideward. I don't want to extend downward because it will be ugly. 

The purpose is to make the image into size (w, h) where w is greater than or equal to current image width and h is greater than or equal to current image height.

One way I could think is, to copy the pixel in the (0, 0) and fill the image extension using this pixel value. However, as you might notice, the grey background at bottom right is slightly different than the rest. This will make noticeable colour difference.



What are better algorithms that is usually used to do that? The resulting image should not have noticeable colour difference and looks natural.
What you're looking for basically is "Inpainting".

In Photoshop is called "Content Aware Fill".  

You should look for articles for Inpainting.

Trivial option would be using "Replication" of the border and later enforce some smoothness (Either by Gaussian Blur or even Poisson Image Editing).

P.S.
We'd be happy if you could join our Community Proposal at http://area51.stackexchange.com/proposals/86832 for Image Processing and Computer Vision.
We need more people to follow, up vote suggested questions with less than 10 up votes and suggest new questions.
Thank You.