Reference 
Pascal Getreuer, “Gunturk–Altunbasak–Mersereau Alternating Projections Image Demosaicking,” Image Processing On Line, 2011. DOI: 10.5201/ipol.2011.g_gapd. 
Permalink 
http://dx.doi.org/10.5201/ipol.2011.g_gapd 
Bibtex 
@article{getreuer11gunturk,
title = {{GunturkAltunbasakMersereau} Alternating Projections
Image Demosaicking},
author = {Pascal Getreuer},
journal = {Image Processing On Line},
year = {2011},
doi = {10.5201/ipol.2011.g_gapd}
}

See also the original work by Gunturk et al., "Color Plane Interpolation Using Alternating Projections".
Source Code (ANSI C)
IPOL
Abstract
The problem of image demosaicking (or demosaicing) is where an image has been captured through a color filter array (CFA), and the goal is to estimate complete color information at every pixel. This IPOL article describes the image demosaicking method proposed by Gunturk, Altunbasak, and Mersereau in “Color Plane Interpolation Using Alternating Projections.” Given an initial demosaicking, the method improves the result by alternatingly applying two different projections. One projection copies the green channel's wavelet detail coefficients to the red and blue channels while the other projection constrains the solution to agree with the observed data.
©2011, IPOL Image Processing On Line & the authors. 